Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Vulnerability Development: Re: Guestbook perl script (error fix)

Re: Guestbook perl script (error fix)

From: Matt Carothers <matt_at_TELEPATH.COM>
Date: Fri, 8 Oct 1999 09:57:46 -0500

On Mon, 4 Oct 1999, Blue Boar wrote:

> During my testing of the exploit, I've found that all of these work:
>
> <!--#exec cmd="cat /etc/group"-->
> <!--#exec cmd="cat /etc/group">
> <!--#exec cmd="cat /etc/group"
>
> This works even in the middle of a line of HTML code!
[...]
> Can anyone else verify that their web server behaves similarly, and that I
> haven't configured or compiled something funny? I haven't had time to dig
> into the Apache code yet.

Yeah, that's normal behavior. If mod_include sees a "<!--#", it processes
the directive. After it's done with the directive, it looks for "-->" and
logs a "premature EOF" error if it doesn't find it.

> I suggest that folks look for lines that have <!-- in them, and dump the
> whole line for safety's sake, when writing such scripts. In my brief
> testing, the entire <!-- prefix seemed necessary.

The entire "<!--#" has to be there to trigger a directive handler. Removing
all occurances of "<!--#" from the input is sufficient to neuter all
server-side includes.

$value =~ s/<!--#//g;

- Matt
Received on Oct 08 1999

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos