原文始发于NCCGroup:Metastealer – filling the Racoon void
tl;dr
MetaStealer is a new information stealer variant designed to fill the void following Racoon stealer suspending operations in March of this year. Analysts at Israeli dark web intelligence firm Kela first identified its emergence on underground marketplaces [1] and later as being used in a spam campaign by SANS Internet Storm Centre Handler Brad Duncan [2], where the initial stages and traffic were detailed. This analysis further describes the final MetaStealer payload detailing its functionality.
Significant findings include:
- Heavy reliance on open-source libraries
- Microsoft Defender Bypass
- Scheduled Task Persistence
- Password Stealer
- Keylogger
- Hidden VNC server
Technical Analysis
Defender Bypass
Early on in execution, the below command is executed using PowerShell:
powershell -inputformat none -outputformat none –NonInteractive -Command Add-MpPreference -ExclusionExtension "exe"
powershell rename-item -path .xyz -newname hyper-v.exe
Persistence
String Obfuscation
Command and Control
The UUID in the ok
key is used as a BotId
and changes on each new registration request.
Command and Control Commands
Command ID | Function | Description |
1001 | System Information | Spawn cmd.exe process with the command line system info and read output using attached pipes. |
1002 | Cookie Stealer | Access Cookie data from the following locations (location can change based on a currently installed version check): Chrome ‘C:\Users\{user}\AppData\Local\Google\Chrome\User Data\Default{\Network (depending on version check) }\Cookies’ Firefox C:\Users\{user}\AppData\Roaming\Mozilla\Firefox\Profiles\cookies.sqlite Edge C:\Users\{user}\AppData\Local\Microsoft\Edge\User Data\Default{\Network (depending on version check) }\Cookies |
1003 | Password Stealer | Access saved password data from the following locations: Chrome C:\Users\{user}\AppData\Local\Google\Chrome\User Data\Default\Login Data Firefox C:\Users\{user}\AppData\Roaming\Mozilla\Firefox\Profiles\ logins.json / signons.sqlite C:\Users\{user}\AppData\Local\Microsoft\Edge\User Data\Default\LoginData |
1004 | Start keylogger | Start keylogger on the following applications: ChromeFirefoxNotepad |
1005 | Stop keylogger | Stop Keylogger |
1006 | Start HVNC | Setup Hidden Virtual Network Connection by creating a hidden desktop and network connectivity using sockets through the open-source library Kissnet [5] |
1007 | Stop HVNC | Stop HNVC |
1008 | Execute Command | Execute the given command using a spawned cmd.exe process and read the result using connected pipes. |
Appendix
IOC’s
YARA
rule metaStealer_memory {
meta:
description = "MetaStealer Memory"
author = "Peter Gurney"
date = "2022-04-29"
strings:
$str_c2_parse = {B8 56 55 55 55 F7 6D C4 8B C2 C1 E8 1F 03 C2 8B 55 C0 8D 04 40 2B 45 C4}
$str_filename = ".xyz -newname hyper-v.exe" fullword wide
$str_stackstring = {FF FF FF C7 85 ?? ?? ?? ?? ?? ?? ?? ?? C7 85 ?? ?? ?? ?? ?? ?? ?? ?? C7 85 ?? ?? ?? ?? ?? ?? ?? ?? C7 85 ?? ?? ?? ?? ?? ?? ?? ?? 66 0F EF}
condition:
uint16(0) == 0x5a4d and
2 of ($str_*)
}
References
[1] https://www.bleepingcomputer.com/news/security/new-blackguard-password-stealing-malware-sold-on-hacker-forums/
[2] https://isc.sans.edu/forums/diary/Windows+MetaStealer+Malware/28522/
[3] https://github.com/yhirose/cpp-httplib
[4] https://github.com/nlohmann/json
[5] https://github.com/Ybalrid/kissnet