exploit the possibilities
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:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close