Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e84a2d9
shhh
KCarretto Dec 12, 2025
b7fb89f
fixing dependency issues
KCarretto Dec 12, 2025
bf002b5
remove biased terminology
KCarretto Dec 12, 2025
9da25f3
Explicitly set musl target (#1292)
hulto Dec 12, 2025
2fdb8b9
Improve Eldritch error messages (#1301)
google-labs-jules[bot] Dec 12, 2025
dfecab0
Fix infinite recursion when printing self-referential structures in E…
google-labs-jules[bot] Dec 12, 2025
8ef5082
Remove unused `lazy_static` dependency (#1302)
google-labs-jules[bot] Dec 12, 2025
c983d9c
Remove unused `EldritchFunction` trait and `impl_eldritch_fn!` macro …
google-labs-jules[bot] Dec 12, 2025
149a868
Dynamic error location formatting in eldritch-core (#1303)
google-labs-jules[bot] Dec 12, 2025
a304ed3
Merge branch 'main' into eldritchv2-final
KCarretto Dec 12, 2025
940d6c6
Implement install command for imixv2 (#1309)
google-labs-jules[bot] Dec 12, 2025
3eb8e45
Rename `fetch_tasks` to `claim_tasks` in imixv2 agent (#1308)
google-labs-jules[bot] Dec 12, 2025
9199e7a
build reflective loader on libsys build
KCarretto Dec 12, 2025
d52b2b3
fix warnings
KCarretto Dec 12, 2025
2d48fb9
Fix imix task execution hang by implementing Drop for Interpreter (#1…
google-labs-jules[bot] Dec 12, 2025
e3e3b7b
Refactor get_callback_interval to return Result (#1307)
google-labs-jules[bot] Dec 12, 2025
ce72101
Fix: Handle NaN in list.remove/index and 'in' operator (#1300)
google-labs-jules[bot] Dec 12, 2025
ab0b1ec
fix libassets dep for tests
KCarretto Dec 12, 2025
dcbd2b0
Remove agent.sleep method (#1311)
google-labs-jules[bot] Dec 12, 2025
a1d85a7
Merge branch 'main' into eldritchv2-final
KCarretto Dec 13, 2025
8e45e88
cargo fmt
KCarretto Dec 13, 2025
f9eeb4c
begin refactor
KCarretto Dec 14, 2025
ee81fdd
Refactor Agent trait into dedicated eldritch-agent crate (#1327)
google-labs-jules[bot] Dec 16, 2025
b4edf66
Update eldritch-macros to enforce argument validation for library fun…
google-labs-jules[bot] Dec 20, 2025
4a57c2d
feat(eldritch-libfile): update file.list modified time format (#1336)
google-labs-jules[bot] Dec 20, 2025
4bb93ce
exec input param to sys.exec (#1333)
nullmonk Dec 21, 2025
b36b447
feat: add string subscripting and ensure builtin string methods (#1338)
google-labs-jules[bot] Dec 21, 2025
69c6e58
Addressed comments, fix tests
KCarretto Dec 21, 2025
1d9fb61
Merge branch 'main' into eldritchv2-final
KCarretto Dec 21, 2025
b431aa6
cargo fmt
KCarretto Dec 21, 2025
416966b
Update string.split() to handle whitespace when no args are passed (#…
google-labs-jules[bot] Dec 21, 2025
f4632ce
Fix TestNewShellHandler to use raw byte streams (#1346)
google-labs-jules[bot] Dec 21, 2025
10c346e
Fix mismatched type error in eldritch-libfile without unwrap (#1347)
google-labs-jules[bot] Dec 21, 2025
33cf37a
Add support for raw strings in eldritch-core (#1345)
google-labs-jules[bot] Dec 21, 2025
f716277
Implement chr and ord builtins in eldritch-core (#1344)
google-labs-jules[bot] Dec 21, 2025
326893f
Refactor call_bound_method to use dispatch pattern (#1343)
google-labs-jules[bot] Dec 21, 2025
fff3b82
cargo fmt
KCarretto Dec 21, 2025
fe975ae
Fix mismatch in expected error message for list.append() test (#1348)
google-labs-jules[bot] Dec 21, 2025
e7b04af
fix tests
KCarretto Dec 21, 2025
975dd26
Refactor eldritch-core methods.rs into a module folder (#1349)
google-labs-jules[bot] Dec 21, 2025
6746454
cargo fmt
KCarretto Dec 21, 2025
eb051cc
Refactor operations.rs into a module folder (#1351)
google-labs-jules[bot] Dec 21, 2025
adc2563
cargo fmt
KCarretto Dec 21, 2025
59c28ce
Fix 'Stdio' undeclared type error on Windows in eldritch-libsys (#1353)
google-labs-jules[bot] Dec 21, 2025
2e1dae8
Update strip methods to accept optional arguments (#1350)
google-labs-jules[bot] Dec 21, 2025
b84663f
Refactor eval.rs into modular eval/ directory structure (#1352)
google-labs-jules[bot] Dec 21, 2025
c3855b1
Refactor builtins: Move map, filter, reduce, sorted, eval to builtins…
google-labs-jules[bot] Dec 21, 2025
262d600
Format code in implants directory (#1355)
google-labs-jules[bot] Dec 21, 2025
0ae4831
Fix eldritchv2 Windows build errors (#1356)
google-labs-jules[bot] Dec 21, 2025
ab234b3
fix windows test
KCarretto Dec 21, 2025
e43f047
Fix line ending test failure on Windows (#1358)
google-labs-jules[bot] Dec 22, 2025
6f22002
misc fixes
KCarretto Dec 22, 2025
7169554
fix default feats
KCarretto Dec 22, 2025
27b460d
Cleanup auto gen and some formatting. (#1359)
hulto Dec 22, 2025
23088e2
Fix test failure on Windows in eldritch-libprocess (#1360)
google-labs-jules[bot] Dec 22, 2025
919a582
Fix Windows dll_inject test path resolution (#1361)
google-labs-jules[bot] Dec 22, 2025
c856f00
Remove documentation generation from build scripts (#1362)
google-labs-jules[bot] Dec 22, 2025
ced6874
cargo fmt
KCarretto Dec 22, 2025
edb2a1a
Rename `set_active_callback_uri` to `set_callback_uri` (#1363)
google-labs-jules[bot] Dec 22, 2025
8452b42
fixed error reporting bug, lint warnings, and added some logging
KCarretto Dec 22, 2025
f2456f0
Fix agent_callback_uri tome and docs to use set_callback_uri (#1365)
google-labs-jules[bot] Dec 22, 2025
5e82d78
Refactor eldritch-libpivot to move std implementations to std/ folder…
google-labs-jules[bot] Dec 22, 2025
545874d
delete v2 docs
KCarretto Dec 22, 2025
60900e1
update docs with an example for list_tasks()
KCarretto Dec 22, 2025
74eabb3
feat(eldritch-core): Implement missing dict methods (#1368)
google-labs-jules[bot] Dec 22, 2025
1940950
Fix recursion crash in PartialEq/Ord for Eldritch V2 (#1367)
google-labs-jules[bot] Dec 22, 2025
9931781
Add migration test script for eldritchv2 (#1369)
google-labs-jules[bot] Dec 22, 2025
3f7ed36
Add unit tests for missing eldritch-core methods (#1370)
google-labs-jules[bot] Dec 22, 2025
b110716
Update eldritch-libhttp to match v1 signatures (#1371)
google-labs-jules[bot] Dec 22, 2025
3678a9c
cargo fmt
KCarretto Dec 22, 2025
938d087
Fix failing Windows test_exec_input by replacing findstr with sort (#…
google-labs-jules[bot] Dec 22, 2025
aeeeae6
Fix incorrect byte length assertion in `test_write_reg_int` on Window…
google-labs-jules[bot] Dec 23, 2025
83acca8
Fix write_reg_int test assertions (#1376)
google-labs-jules[bot] Dec 23, 2025
39984cd
Fix eldritch-stdlib-tests on Windows by normalizing line endings and …
google-labs-jules[bot] Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 49 additions & 6 deletions docs/_docs/user-guide/eldritch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ permalink: user-guide/eldritch
---
# Overview

🚨 **DEPRECATION WARNING:** Eldritch v1 will soon be deprecated and replaced with v2 🚨


Eldritch is a Pythonic red team Domain Specific Language (DSL) based on [starlark](https://github.com/facebookexperimental/starlark-rust). It uses and supports most python syntax and basic functionality such as list comprehension, string operations (`lower()`, `join()`, `replace()`, etc.), and built-in methods (`any()`, `dir()`, `sorted()`, etc.). For more details on the supported functionality not listed here, please consult the [Starlark Spec Reference](https://github.com/bazelbuild/starlark/blob/master/spec.md), but for the most part you can treat this like basic Python with extra red team functionality.

Eldritch is a small interpreter that can be embedded into a c2 agent as it is with Golem and Imix.
Expand Down Expand Up @@ -121,14 +124,54 @@ for user_home_dir in file.list("/home/"):

## Agent

### agent.eval
### agent._terminate_this_process_clowntown (V2-Only)

`agent._terminate_this_process_clowntown() -> None`

> [!CAUTION]
> **DANGER**: The **agent._terminate_this_process_clowntown** method terminates the agent process immediately by calling `std::process::exit(0)`. This effectively kills the agent and should be used with extreme caution. This function does not return as the process exits.

### agent.get_config (V2-Only)

`agent.get_config() -> Dict<str, Value>`

The **agent.get_config** method returns the current configuration of the agent as a dictionary containing configuration keys and values. This method will error if the configuration cannot be retrieved.

### agent.get_transport (V2-Only)

`agent.get_transport() -> str`

The **agent.get_transport** method returns the name of the currently active transport (e.g., "http", "grpc").

### agent.list_transports (V2-Only)

`agent.list_transports() -> List<str>`

The **agent.list_transports** method returns a list of available transport names supported by the agent.

### agent.get_callback_interval (V2-Only)

`agent.get_callback_interval() -> int`

The **agent.get_callback_interval** method returns the current callback interval in seconds.

### agent.list_tasks (V2-Only)

`agent.list_tasks() -> List<Dict>`

The **agent.list_tasks** method returns a list of dictionaries representing the currently running or queued background tasks on the agent. Each dictionary contains task metadata and status.

```python
>>> agent.list_tasks()
[{"id": 42949672964, "quest_name": "The Nightmare of the Netherworld Nexus"}]
```

### agent.stop_task (V2-Only)

`agent.stop_task(task_id: int) -> None`

`agent.eval(script: str) -> None`
The **agent.stop_task** method stops a specific background task by its ID. If the task cannot be stopped or does not exist, the method will error.

The <b>agent.eval</b> method takes an arbitrary eldritch payload string and
executes it in the runtime environment of the executing tome. This means that
any `print`s or `eprint`s or output from the script will be merged with that
of the broader tome.

### agent.set_callback_interval

Expand Down
Loading
Loading