GlassWorm Hides a RAT Inside a Malicious Chrome Extension
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
GlassWorm abuses compromised npm, PyPI, GitHub, and OpenVSX packages to distribute a multi-stage malware platform. Its first stage launches a loader that queries a Solana blockchain memo to obtain command-and-control addresses, then downloads an encrypted payload. The second stage steals credentials, cryptocurrency wallet files, and host details, while the third stage deploys a persistent WebSocket-based RAT along with a malicious Chrome extension designed to capture browser data. The operation is aimed primarily at developers and cryptocurrency holders.
Investigation
Analysts linked the initial compromise to malicious pre-install scripts and Unicode-based loaders embedded in otherwise legitimate packages. They uncovered two Solana wallet addresses acting as dead-drop locations for C2 URLs and saw the loader polling several Solana RPC endpoints. The stage-three RAT relies on DHT bootstrap nodes and reverts to Solana-based retrieval if DHT resolution fails. Researchers also identified the exfiltration infrastructure and mapped the malicious Chrome extension used in the campaign.
Mitigation
Organizations should enforce supply-chain scanning for npm and other package ecosystems, verify package integrity and publisher trust, and block known malicious IPs and domains. Endpoint defenses should monitor for rogue Node.js runtimes, unexpected scheduled tasks, and suspicious registry Run keys. Browser credential stores should be hardened, and cryptocurrency users should adopt hardware wallet verification where possible.
Response
If GlassWorm is detected, isolate the affected endpoint, stop the malicious processes, and remove any dropped files and persistence mechanisms such as scheduled tasks. Revoke compromised npm tokens, rotate cryptocurrency wallet credentials, and reset browser-stored passwords. Complete a full forensic review of host logs to trace loader execution and update security controls to reduce the risk of future supply-chain compromises.
"graph TB %% Class Definitions classDef technique fill:#ffcc99 classDef persistence fill:#99ffcc classDef exfil fill:#ff9999 classDef credential fill:#ccccff classDef execution fill:#ffdb4d classDef collection fill:#c2f0c2 classDef command fill:#ffd699 %% Nodes u2013 Attack Steps step1_initial_access["<b>Technique</b> – <b>T1195.001 Supply Chain Compromise</b><br/>Malicious npm/pyPI packages and compromised GitHub repositories deliver a loader."] class step1_initial_access technique step2_obfuscation["<b>Technique</b> – <b>T1027 Obfuscated Files or Information</b><br/>Loader code is obfuscated and compiled after delivery (T1027.004)."] class step2_obfuscation execution step3_guardrails["<b>Technique</b> – <b>T1480 Execution Guardrails</b><br/>Loader checks locale, language and timezone and aborts execution outside targeted Russian regions."] class step3_guardrails execution step4_dead_drop["<b>Technique</b> – <b>T1102.001 Dead Drop Resolver</b><br/>Loader polls Solana blockchain transaction memos to obtain the C2 URL."] class step4_dead_drop command step5_cred_files["<b>Technique</b> – <b>T1552.001 Credentials In Files</b><br/>Harvests .npmrc, NPM_TOKEN, cloud provider configs and SSH private keys."] class step5_cred_files credential step6_browser_creds["<b>Technique</b> – <b>T1555.003 Credentials from Web Browsers</b><br/>Extracts passwords, cookies, autofill data and payment cards from Chrome, Edge, Firefox; bypasses appu2011bound encryption."] class step6_browser_creds credential step7_private_keys["<b>Technique</b> – <b>T1552.004 Private Keys</b><br/>Copies cryptocurrency wallet files and screenshots of seed phrases."] class step7_private_keys credential step8_exfil_webhook["<b>Technique</b> – <b>T1567.004 Exfiltration Over Webhook</b><br/>Zips staged data and POSTs to attackeru2011controlled HTTP endpoints."] class step8_exfil_webhook exfil step9_persistence_rc["<b>Technique</b> – <b>T1037.004 RC Scripts</b><br/>Creates HKCU\Software\Microsoft\Windows\CurrentVersion\Run entry and scheduled task to launch PowerShell launcher at startup."] class step9_persistence_rc persistence step10_wmi_event["<b>Technique</b> – <b>T1546.003 WMI Event Subscription</b><br/>Registers WMI event to detect USB hardware wallets and launch phishing UI."] class step10_wmi_event persistence step11_ps_profile["<b>Technique</b> – <b>T1546.013 PowerShell Profile</b><br/>Adds persistence via PowerShell profile script."] class step11_ps_profile persistence step12_vnc["<b>Technique</b> – <b>T1021.005 VNC</b><br/>Loads hidden VNC (HVNC) native module for invisible remote desktop."] class step12_vnc command step13_multi_stage["<b>Technique</b> – <b>T1104 Multiu2011Stage Channels</b><br/>Establishes a bidirectional Socket.IO WebSocket channel for C2 commands."] class step13_multi_stage command step14_input_injection["<b>Technique</b> – <b>T1674 Input Injection</b><br/>Executes attackeru2011supplied JavaScript via eval() within the RAT."] class step14_input_injection execution step15_keylog_clip["<b>Technique</b> – <b>T1056.001 Keylogging</b> & <b>T1115 Clipboard Data</b><br/>Malicious Chrome extension logs keystrokes, captures clipboard text and takes screenshots."] class step15_keylog_clip collection step16_browser_hijack["<b>Technique</b> – <b>T1185 Browser Session Hijacking</b><br/>Extension harvests cookies and session tokens and can redirect active tabs to attackeru2011controlled URLs."] class step16_browser_hijack collection %% Connections u2013 Attack Flow step1_initial_access –>|leads to| step2_obfuscation step2_obfuscation –>|leads to| step3_guardrails step3_guardrails –>|leads to| step4_dead_drop step4_dead_drop –>|leads to| step5_cred_files step5_cred_files –>|leads to| step6_browser_creds step6_browser_creds –>|leads to| step7_private_keys step7_private_keys –>|leads to| step8_exfil_webhook step8_exfil_webhook –>|leads to| step9_persistence_rc step9_persistence_rc –>|leads to| step10_wmi_event step10_wmi_event –>|leads to| step11_ps_profile step11_ps_profile –>|leads to| step12_vnc step12_vnc –>|leads to| step13_multi_stage step13_multi_stage –>|leads to| step14_input_injection step14_input_injection –>|leads to| step15_keylog_clip step15_keylog_clip –>|leads to| step16_browser_hijack "
Attack Flow
Detections
NodeJS Binary Executing From Uncommon Location (via cmdline)
View
Possible IP Lookup Domain Communications Attempted (via dns)
View
Possible Persistence Points [ASEPs – Software/NTUSER Hive] (via registry_event)
View
Possible Publicnode Ethereum Abuse Attempt As C2 Channel (via dns_query)
View
IOCs (DestinationIP) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
IOCs (HashMd5) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
IOCs (HashSha256) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
IOCs (HashSha1) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
IOCs (SourceIP) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
IOCs (Emails) to detect: GlassWorm Hides a RAT Inside a Malicious Chrome Extension
View
GlassWorm RAT and Data Exfiltration Detection [Windows Network Connection]
View
Detection of Ledger/Trezor Phishing Binary Execution [Windows Process Creation]
View
Simulation Execution
Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.
Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.
-
Attack Narrative & Commands:
An attacker has obtained a malicious binary that pretends to be the Ledger Live/Trezor wallet client. The binary is namedAssaac.exeto mimic a legitimate executable. It is dropped into the user’s%APPDATA%directory, and a companion JavaScript file (index.js) is placed in a hidden sub‑folderQtCvyfVWKH. The attacker then executes the binary, causing Windows to log a process‑creation event with the exact image name and command‑line path that the Sigma rule watches.Step‑by‑step:
- Create the hidden folder and drop the malicious script.
- Copy the malicious executable (
Assaac.exe) into the user’s AppData. - Launch the executable, which reads
index.jsand begins credential‑theft routines.
-
Regression Test Script:
# ------------------------------------------------------------ # Setup malicious files # ------------------------------------------------------------ $appData = $env:APPDATA $folder = Join-Path $appData "QtCvyfVWKH" $exePath = Join-Path $appData "Assaac.exe" $jsPath = Join-Path $folder "index.js" # Ensure the hidden folder exists New-Item -ItemType Directory -Path $folder -Force | Out-Null # Hide the folder (optional) (Get-Item $folder).Attributes += 'Hidden' # Deploy a dummy malicious executable (for demo we use a copy of calc.exe) Copy-Item -Path "$env:SystemRootSystem32calc.exe" -Destination $exePath -Force # Deploy a dummy JavaScript payload (content is irrelevant for detection) @" // malicious payload placeholder console.log('Crypto wallet theft executed'); "@ | Set-Content -Path $jsPath -Encoding UTF8 # ------------------------------------------------------------ # Execute the malicious binary (this should fire the Sigma rule) # ------------------------------------------------------------ & $exePath "$jsPath" # ------------------------------------------------------------ # End of script – leave artifacts for manual cleanup # ------------------------------------------------------------ -
Cleanup Commands:
# Terminate the malicious process if still running Get-Process -Name "Assaac" -ErrorAction SilentlyContinue | Stop-Process -Force # Remove the created files and folder Remove-Item -Path $exePath -Force -ErrorAction SilentlyContinue Remove-Item -Path $jsPath -Force -ErrorAction SilentlyContinue Remove-Item -Path $folder -Recurse -Force -ErrorAction SilentlyContinue