|
|||||||||||
|
Re: shell script cgi
From: Brian Hatch <vuln-dev(at)ifokr.org>
Date: Sat Nov 16 2002 - 11:29:38 EST > thought the wrong way in my last message.
The HTTP_USER_AGENT string is set by Apache (etc) as an environment variable. Let's make the unradical assumption that your browser is not a shell script, and thus is setting it correctly without any shell expansion problems possible. So HTTP_USER_AGENT is set to `cat /etc/passwd` I use the single quotes here to make sure no expansion tricks are possible, which is how your web browser will work. The var is set exactly. Excellent. Can we abuse it? bash$ echo $VAR `cat /etc/passwd` bash$ echo "$VAR" `cat /etc/passwd` Nope. How 'bout if we have: bash$ export VAR='blahblahblah *' bash$ echo $VAR blahblahblah file1.cgi file2.cgi file3.cgi bash$ echo "$VAR" blahblahblah * See that with no quotes you can get a file listing through shell expansion. -- Brian Hatch I used to be a lumberjack, Systems and but I just couldn't hack Security Engineer it, so they gave me the ax. http://www.ifokr.org/bri/ Every message PGP signed
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:37 EDT |
||||||||||
|
|||||||||||