what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

pico33.txt

pico33.txt
Posted Jun 21, 2005
Authored by Raphael Rigo

Pico Server (pServ) versions 3.3 and below suffer from directory traversal, remote command execution, and heap overflow vulnerabilities.

tags | exploit, remote, overflow, vulnerability
SHA-256 | 1f225e2a45a655bfcf6ac51525c62d4428411528be7b9522b0bdf479cf38f65d

pico33.txt

Change Mirror Download
                 Multiple vulnerabilities in Pico Server (pServ) v3.3

discovered by Raphaƫl Rigo

Product: Pico Server (pServ)
Affected Version: 3.3 (verified), <=3.3 probably too
Not affected Version: 3.4
OS affected: all
Risk: critical
Remote Exploit: yes
URL: http://pserv.sourceforge.net/

Overview
========

Pico Server is a small web server. It is meant to be portable and configurable.
* small, portable
* fast
* CGI-BIN support
* auto-indexing of directories
* access and error logging (see p-reporter for an analyser)
* forking or single-connection at choice

Pico Server (pServ) is written in portable C (K&R style so it can compile on
older compilers too) and sports several options that by means of #define
statements can customize the behaviour, the performance and the feature set so
to be able to fit better the the requisites.

Vulnerabilities
===============

1) Directory traversal

A bug in the directory parsing code allows the attacker to access any
directory the server has the right to access.

Details :
pServ computes the depth of the directory the user tries to access in the
variable named depthCount. This counts is decreased when a /../ is
encountered, unfortunately, it is also increased when /./ is
encountered, allowing the attacker to use a /./ for each /../ to make
sure depthCount is not negative.

Risk : HIGH
The attacker may gain important information about the system that could
lead to other attacks.

Proof of concept :
access : http://www.example.com/./../

Workaround :
There is no workaround for this vulnerability.

Solution :
Update to v3.4

-----------------------------------------------------------------------

2) Remote command execution

The directory traversal vulnerability described above also enables
remote command execution. This may help an attacker to compromise the
server.

Details :
pServ considers every request beginning with /cgi-bin/ as a script
execution.

Risk : CRITICAL
The attacker may use this vulnerability to destroy data or for other
attacks (i.e. use wget to download root exploits).

Proof of concept :
access : http://www.example.com/cgi-bin/./.././../usr/bin/ls

Workaround :
Disable cgi-bin support at compile time.

Solution :
Update to v3.4

-----------------------------------------------------------------------

3) Multiple heap overflows in cgi execution

The lack of bounds checking for cgi arguments allows an attacker to
overflow the allocated memory, possibly allowing for remote code
execution.

Details :
Each argument is allocated a buffer of size MAX_PATH_LEN (128 on Linux)
but the attacker is only limited by the maximum request length (2048).
The malloc'ed buffer can therefore be overflowed.

Risk : HIGH
Successful exploitation can lead to arbitrary code execution.

Workaround :
Disable cgi-bin support at compile time.

Solution :
Update to v3.4

-----------------------------------------------------------------------


Timeline
========
2005-05-18 Discovery
2005-05-19 First attempt to contact developer
2005-05-21 Second attempt
2005-05-22 Developer reply
2005-06-11 Fixed version 3.4 released and advisory published
Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close