C2 framework for script-jacking vulnerable Electron apps
Top 34.3% on sourcepulse
Loki is a Node.js-based command and control (C2) framework designed for red team operations, specifically targeting vulnerable Electron applications. It enables script-jacking to backdoor or hollow out signed Electron apps without invalidating their code-signing signatures, offering an evasion technique against security software and application controls.
How It Works
Loki leverages script-jacking by modifying JavaScript files within Electron applications at runtime to inject arbitrary Node.js code. This approach allows for persistent backdooring and execution within the context of a trusted, signed application. The framework operates without a traditional teamserver, with both the GUI client and agents communicating directly with a data store, such as Azure Storage Blob, protected by SAS tokens.
Quick Start & Requirements
npm install --save-dev javascript-obfuscator
.obfuscateAgent.js
script is used to create the payload.Highlighted Details
scexec
and assembly
requiring keytar.node
and assembly.node
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The effectiveness of backdooring relies on identifying vulnerable Electron applications, as newer versions may implement integrity checks. The README notes that older versions are more likely to be vulnerable. Some applications like 1Password, Signal, Slack, and Notion are listed as not vulnerable.
1 month ago
1 day