The state of malware today: From Highly Obfuscated Batch File to XWorm and Redline – SANS Internet Storm Center
Posted by jpluimers on 2024/10/10
A very interesting read, where it keeps me wondering how batch files like these are being generated (making them by hand feels very surreal): [Wayback/Archive] From Highly Obfuscated Batch File to XWorm and Redline – SANS Internet Storm Center
VirusTotal entry: [Wayback/Archive] VirusTotal – File – 453c017e02e6ce747d605081ad78bf210b3d0004a056d1f65dd1f21c9bf13a9a
The day after the article was written, only Kaspersky and ZoneAlarm detected it; in the past ZoneAlarm used the Kaspersky engine, but that stopped a while ago: [Wayback/Archive] ZoneAlarm Free Antivirus Review | PCMag.
The malware uses at least these technologies:
- obfuscation (not just by posing a wrong text encoding, but also using both empty and calculated environment variables, plus many loop + GOTO tricks)
- batch files
mshtawscript(usingwscript.shellto execute batch files)conhost(asconhost.exe 0xffffffff -ForceV1indicating a session-lessconhost)doskeynet sessionandnet1 sessionto check for administrative permissions- powershell (using
Start-Processto execute batch files, and iex (Invoke-Expression) to run a script which downloads others scripts to run them) - It is not clear if ctfmon is used, and when used if this involves vulnerabilities in the undocumented CTF (Common Text Framework) protocol or a malware program with the ctfmon.exe name
- rundll32
- python (downloaded dynamically) to download a script which embeds an also downloaded payload into any 32-bit Windows process using various Kerlen32 techniques and the Task Scheduler:
- schtasks
Finally it downloads the RedLine and XWorm malware.
Via: [Wayback/Archive] SANS.edu Internet Storm Center on X: “From Highly Obfuscated Batch File to XWorm and Redline …”
Related:
- [Wayback/Archive] cmd.exe – How to decode contents of a batch file with chinese characters – Super User (thanks [Wayback/Archive] pee2pee and [Wayback/Archive] grawity_u1686)
- [Wayback/Archive] Deconstructing Logon Session Enumeration | by Garrett White | Posts By SpecterOps Team Members
- [Wayback/Archive] Invoke-Expression (Microsoft.PowerShell.Utility) – PowerShell | Microsoft Learn
- [Wayback/Archive] Start-Process (Microsoft.PowerShell.Management) – PowerShell | Microsoft Learn
- [Wayback/Archive] schtasks commands | Microsoft Learn
Queries:
- [Wayback/Archive] “net1 session” – Google Search
- [Wayback/Archive] Redline malware – Google Search
- [Wayback/Archive] xworm malware – Google Search
- [Wayback/Archive] LoneNone1807 – Google Search
Archived malware files by [Wayback/Archive] LoneNone1807 · GitHub in [Wayback/Archive] GitHub – LoneNone1807/martin and [Wayback/Archive] GitHub – LoneNone1807/RedAV (I hope that by now either the user or the repositories – more at [Wayback/Archive] LoneNone1807 (LoneNone1807) / Repositories · GitHub – are gone) in order of the above SANS blog post:
- web.archive.org/web/20240000000000*/https://github.com/LoneNone1807/RedAV/raw/main/Python310.zip
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/xclient-enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/redline-enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/Redline.b64
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/XClient.b64
These were not included in the SANS blog post:
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/SoftwareH4X/main/XClient.b64
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/SoftwareH4X/main/crypted.bat
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/SoftwareH4X/main/enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/RedAV/main/Python310.zip
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/RedAV/main/antivmx.ps1
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/RedAV/main/shellcode
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/XRAT/main/load
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/XRAT/main/xshell
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/batman/main/Document.zip
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/batman/main/steal.bat
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/batman/main/startup
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/gialong1807/main/XClient.b64
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/gialong1807/main/crypted.bat
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/gialong1807/main/enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/batman.ps1
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/crypted
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/redline-enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/xclient-enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/xeno-enc
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/xeno.b64
- web.archive.org/web/20240000000000*/https://raw.githubusercontent.com/LoneNone1807/martin/main/xeno.bat
Repository not mentioned or (indirectly) referenced from the SANS blog post:
- [Wayback/Archive] GitHub – LoneNone1807/SoftwareH4X
- [Wayback/Archive] GitHub – LoneNone1807/XRAT
- [Wayback/Archive] GitHub – LoneNone1807/batman
- [Wayback/Archive] GitHub – LoneNone1807/gialong1807
- [Wayback/Archive] GitHub – LoneNone1807/himark68
Links inside the repositories:
- [Wayback] RedAV/Python310.zip at main · LoneNone1807/RedAV
- [Wayback/Archive] RedAV/antivmx.ps1 at main · LoneNone1807/RedAV · GitHub
- [Wayback/Archive] RedAV/shellcode at main · LoneNone1807/RedAV · GitHub
- ……………………………
- [Wayback/Archive] SoftwareH4X/XClient.b64 at main · LoneNone1807/SoftwareH4X · GitHub
- [Wayback/Archive] SoftwareH4X/crypted.bat at main · LoneNone1807/SoftwareH4X · GitHub
- [Wayback/Archive] SoftwareH4X/enc at main · LoneNone1807/SoftwareH4X · GitHub
- [Wayback/Archive] XRAT/load at main · LoneNone1807/XRAT · GitHub
- [Wayback/Archive] XRAT/xshell at main · LoneNone1807/XRAT · GitHub
- [Wayback] batman/Document.zip at main · LoneNone1807/batman
- [Wayback/Archive] batman/startup at main · LoneNone1807/batman · GitHub
- [Wayback/Archive] batman/steal.bat at main · LoneNone1807/batman · GitHub
- [Wayback/Archive] gialong1807/XClient.b64 at main · LoneNone1807/gialong1807 · GitHub
- [Wayback/Archive] gialong1807/crypted.bat at main · LoneNone1807/gialong1807 · GitHub
- [Wayback/Archive] gialong1807/enc at main · LoneNone1807/gialong1807 · GitHub
- [Wayback/Archive] himark68/Copyright-infringement-images.7z at main · LoneNone1807/himark68 · GitHub
- ……………………………
- [Wayback/Archive] martin/Redline.b64 at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/XClient.b64 at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/batman.ps1 at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/crypted at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/redline-enc at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/xclient-enc at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/xeno-enc at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/xeno.b64 at main · LoneNone1807/martin · GitHub
- [Wayback/Archive] martin/xeno.bat at main · LoneNone1807/martin · GitHub
Note the GitHub user did not have any public gists at the time of writing: [Wayback/Archive] LoneNone1807’s gists · GitHub
--jeroen






Leave a comment