Skip to content

Commit 3d45533

Browse files
Bobby CookeBobby Cooke
authored andcommitted
COFFLoader capability added
1 parent 5bc9edc commit 3d45533

34 files changed

+4131
-2436
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Loki is a stage-1 command and control (C2) framework written in Node.js, built to script-jack vulnerable Electron apps _[MITRE ATT&CK T1218.015](https://attack.mitre.org/techniques/T1218/015/)_. Developed for red team operations, Loki enables evasion of security software and bypasses application controls by exploiting trusted, signed Electron apps.
33

44
Script-jacking hijacks the execution flow of an Electron app by modifying JavaScript files loaded in at runtime with arbitrary Node.js code. This technique can be leveraged to:
5-
- __Backdoor the Electron app__
6-
- __Hollow out the Electron app__
5+
- __Backdoor Electron app__
6+
- __Hollow Electron app__
77
- Chain execution to another process
88

99
_While several tools already address leveraging script-jacking to chain execution to another process, Loki is the first to enable backdooring and hollowing of signed Electron apps without invalidating their code signing signature._
@@ -72,6 +72,7 @@ _All agent commands are written in native Node.JS and do not require additional
7272
| `scan` | Perform TCP network scan across CIDR range with selected ports |
7373
| `dns` | DNS lookup. Leverages systems DNS configuration |
7474
| `set` | Set the Node load paths for assembly node and scexec nodes |
75+
| `bof` | Execute a COFF file and return output |
7576

7677
#### `Set` - Loading Nodes from Application Control Exclusion Paths
7778
- If there are application control rules preventing library loads for the node files you can use the `set` command to change the load paths for `assembly.node` and `scexec.node`.
@@ -186,7 +187,6 @@ bobby$ node obfuscateAgent.js
186187
- Click the agent from the dashboard table to open the agent window
187188
- Test to ensure Loki works properly
188189

189-
190190
## Backdooring Electron Apps and Keeping the real Application Working as Normal
191191
The most straightforward way to use Loki is to replace the files in `{ELECTRONAPP}/resources/app/` with the Loki files. This hollows out the app, meaning the app won't function normally -- Loki replaced its functionality.
192192

@@ -282,7 +282,5 @@ I do not recommend compiling the agent and using it for operations. Agent compil
282282
- [Pavel Tsakalidis](https://x.com/sadreck)
283283
- [BEEMKA - Electron Exploitation Toolkit](https://github.com/ctxis/beemka)
284284

285-
286285
## License
287-
This project is licensed under the Business Source License 1.1. Non-commercial use is permitted under the terms of the license. Commercial use requires the author's explicit permission. On April 3, 2030, this license will convert to Apache 2.0. See [LICENSE](./LICENSE) for full details.
288-
286+
This project is licensed under the Business Source License 1.1. Non-commercial use is permitted under the terms of the license. Commercial use requires the author's explicit permission. On April 3, 2030, this license will convert to Apache 2.0. See [LICENSE](./LICENSE) for full details.

β€Žagent/COFFLoader.nodeβ€Ž

160 KB
Binary file not shown.

β€Žagent/agent.jsβ€Ž

Lines changed: 0 additions & 66 deletions
This file was deleted.

β€Žagent/assembly.htmlβ€Ž

Lines changed: 0 additions & 10 deletions
This file was deleted.

β€Žagent/assembly.jsβ€Ž

Lines changed: 0 additions & 101 deletions
This file was deleted.

β€Žagent/assembly.nodeβ€Ž

128 Bytes
Binary file not shown.

β€Žagent/browser.htmlβ€Ž

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
Β (0)