Electron Applications
Adversaries may abuse components of the Electron framework to execute malicious code. Electron is a cross-platform desktop application development framework using JavaScript, HTML, and CSS that embeds a Chromium browser engine and Node.js runtime. Common Electron apps include Signal, Slack, Microsoft Teams, VS Code, and Discord. Adversaries can abuse these applications by passing malicious JavaScript via command-line flags (--inspect, --inspect-brk, --remote-debugging-port) to enable DevTools remote debugging and execute arbitrary JavaScript with Node.js privileges. Lumma Stealer is a notable malware using this technique. This grants full system access including filesystem operations, child process spawning, and network communication.
let ElectronApps = dynamic(["slack.exe", "teams.exe", "discord.exe", "code.exe", "signal-desktop.exe", "notion.exe", "obsidian.exe", "figma.exe", "1password.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (ElectronApps) or ProcessCommandLine has_any ("--inspect", "--inspect-brk", "--remote-debugging-port", "--remote-allow-origins", "--js-flags")
| extend DebugPort = ProcessCommandLine has_any ("--inspect", "--inspect-brk", "--remote-debugging-port")
| extend RemoteDebugging = ProcessCommandLine matches regex @"--remote-debugging-port=\d+"
| extend JSFlags = ProcessCommandLine has "--js-flags"
| extend AllowOrigins = ProcessCommandLine has "--remote-allow-origins"
| extend SuspiciousParent = InitiatingProcessFileName has_any ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| where DebugPort or RemoteDebugging or JSFlags or (AllowOrigins and SuspiciousParent)
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine, DebugPort, RemoteDebugging, JSFlags, SuspiciousParent
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Developers using Electron debugging features (--inspect, --remote-debugging-port) during application development and testing
- IT administrators using Electron debug flags for troubleshooting application issues
- Automated testing frameworks (Spectron, Playwright for Electron) that use debug ports for headless testing
- VS Code extension developers using the --inspect flag for extension debugging
References (5)
- https://attack.mitre.org/techniques/T1218/015/
- https://www.electronjs.org/docs/latest/tutorial/security
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.015/T1218.015.md
- https://www.qualys.com/2024/10/01/lumma-stealer-analysis/
- https://www.netskope.com/blog/lumma-stealer-analysis
Unlock Pro Content
Get the full detection package for T1218.015 including response playbook, investigation guide, and atomic red team tests.