Discovery / credits: Malvuln (John Page aka hyp3rlinx) (c) 2022
Original source: https://malvuln.com/advisory/7f314e798c150aedd9ce41ed39318f65_B.txt
Threat: Builder XtremeRAT v3.7
Vulnerability: Insecure Crypto Bypass
Description: The malware builds backdoors and requires authentication to access the GUI using credentials stored in the "user.info" config file. XtremeRAT doesn't properly validate saved passwords are what the user actually set when saving them in user.info config. This can allow attackers who can guess the first few characters the ability to pad the rest with zeroes or whatever character they want, providing they guess the password length. The issue it seems is in Delphi 2009, default string type changed from ANSI, the MD5 implementation is not unicode aware generating incorrect hashes. Therefore, a user may enter the password "abc123" thinking that is the exact password which will grant access to the builder. However, the flaw allows attackers the ability to more easily bypass authentication as only part of the password will now be required as the remainder can be any characters E.g. abc000. Moreover, the hashing implementation used makes no use of a salt. Creating a similar password hash to logon, requires the resulting file size should be be 64 bytes not 32. If you just copy and paste a hash into a file you may see it is only 32 bytes, the one generated by XtremeRAT is 64 bytes as it is encoded.
Vuln ID: MVID-2022-0624
import os, hashlib
#Creates broken unicode MD5 hashes to change an existing XtremeRAT config password.
#Basically, if the actual password is 'abc123' and was generated by XtremeRAT
#we only need to guess 3 out of 6 chars E.g. abc000
#as long as we can guess the length we can bypass the need to know the full password.
#We can also emulate broken passwords and replace "user.info" config with ours.
passwd = u'abc'
tmp = hashlib.md5(passwd.encode('utf-16le'))
print("[+] XtremeRAT v3.7 ")
print("[+] Password hash bypass created")
print("[+] By malvuln")
print("[-] " +tmp.hexdigest())
print("Login using abc000 or any last three chars!")
#Login using abc000, abc!@# or abc123 it don't matter.
f=open(XRat_Config, "w", encoding='utf-16LE')
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).