Armorsteal Malware Analysis: Python Toolkit for Data Theft and Crypto Mining
Summary
Armorsteal is an advanced Python-based malware kit built for data exfiltration and cryptocurrency mining. It uses PyArmor to obfuscate malicious scripts and relies on a priority-based domain failover mechanism for Command and Control. The toolkit includes dedicated modules for stealing Discord tokens, browser credentials, cryptocurrency wallets, and capturing keystrokes.
Investigation
Researchers analyzed a compromised Windows host and discovered three malicious scheduled tasks referencing a Python-based malware kit stored in a system health directory. They decrypted the PyArmor-protected scripts to expose the modular behavior of the controller, miner manager, spy module, and stealer. The investigation also revealed evasion methods including cloud provider checks and automated disabling of security monitoring tools.
Mitigation
Organizations should enforce strict controls over PowerShell execution and monitor for suspicious scheduled tasks. Blocking known malicious domains and detecting unauthorized changes to Windows Defender exclusions are critical defensive measures. Restricting the use of untrusted portable Python environments can also help reduce the available attack surface.
Response
When Armorsteal activity is detected, immediately isolate the affected host to stop further data exfiltration or cryptocurrency mining. Investigate the scheduled tasks SysCheck2, SysCheckX, and SysHeal. Review Windows Defender exclusion lists for unauthorized entries and reset credentials for all accounts accessed from the compromised system.
Attack Flow
Detections
Windows Defender Temporary Exclusion Was Added (via registry_event)
View in Prime Core
Python Execution from Suspicious Folders (via cmdline)
View in Prime Core
LOLBAS Conhost (via cmdline)
View in Prime Core
Suspicious Defender Exclusions Modification (via cmdline)
View in Prime Core
Suspicious Browser Process Executed With Suspicious Parametres (via cmdline)
View in Prime Core
Windows Defender Preferences Suspicious Changes (via powershell)
View in Prime Core
Scripting Runtimes Initiating Outbound TLS Connections (via network_connection)
View in Prime Core
Possible Github File Downloading Initiated By Unusual Process (via network_connection)
View in Prime Core
Python File Created In Unusual Directory (via file_event)
View in Prime Core
Possible BYOVD – Bring Your Own Vulnerable Driver Attack (via audit)
View in Prime Core
Suspicious Scheduled Task (via audit)
View in Prime Core
Possible IP Lookup Domain Communications Attempted (via dns)
View in Prime Core