Thread: Dynamic URLs
View Single Post
Old 02-10-2006, 10:01 AM   #13 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Quote:
Originally Posted by DJMaze
index.php?page=/usr/etc/passwd%00

This would run as: include("/usr/etc/passwd%00.php");

Issue here is that %00 is NULL aka \0 and a string in C always end a \0.
So in this case it opens '/usr/etc/passwd' and the '.php' is not processed.
This would require either read access to /etc/passwd by apache/whatever deamon, or fscked up permission flags on /etc/passwd
Usualy you would only allow read access to the directory which your domain is hosted in, thus avoiding inclusion from below web-root
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote