-
-
Camel Architecture Diagram
-
Camel Execute MCP tool flowchart
-
Using the Camel CLI case creator
-
Beginning a Claude session with Camel
-
Camel findings report
-
Camel audit log
-
Camel IOCs report
-
Camel accuracy report
-
Camel conversation report
-
Camel running in Claude Code on Linux
-
Camel recording use of anomaly detection
Inspiration
Speed of investigation is a critical aspect of defending against AI-powered adversaries that can launch wide-ranging attacks and go from initial access to domain control in minutes. The defensive solution is autonomous agents equipped with tool suites like SIFT Workstation for autonomous DFIR investigations. The traditional way to build these agents is by equipping the the model with either natural language skills or MCP tool catalogs that call command-line forensic tools one at a time and reading their output back into its context. This design has chronic failures that get worse as the investigation gets bigger. It is slow because every step is a full round-trip through the model. It requires the model to reason long-term over potentially large amounts of tool output like event logs in domains in which it is not specialized for. As the model's context window grows and it forgets details it will begin to hallucinate. Protocol SIFT demonstrated the connection of agents to SIFT tools using skills, and as noted, hallucinates a lot. Speed is useless if agent investigations cannot be accurate and trustworthy. What is needed is a way to counter the root causes of slow execution and hallucination by agents architecturally, not with more complex prompts and skills.
Code-mode is a technique for programmatic tool calling by agents using a code execution environment described by Cloudfare and Anthropic that "substantially reduces end-to-end latency for multiple tool calls, and can dramatically reduce token consumption by allowing the model to write code that removes irrelevant context before it hits the model’s context window." In addition, many forensic analysis tasks are highly suited to lower-level machine learning techniques and algorithms like classification, and time-series anomaly detection.
A code-mode MCP server that exposes an SDK and environment for the agent to generate code for high-level workflows for acquiring and processing and analyzing forensic tool data, and using implementations of deterministic machine learning algorithms, is a possible alternative to requiring the LLM to spend tokens and time on naively performing these low-level tool calls and classification and analysis and inference tasks. Forensic analysis using this server is 'lowered' to the task of generating the correct programs for ingesting, analyzing, and performing inference over forensic data using the provided SDK, which takes advantage of the strengths of LLMs like Claude.
What it does
The Camel project is a code-mode MCP server that allows LLMs to safely generate and execute JavaScript code that calls command-line forensic tools, performs analysis, and employs traditional machine learning algorithms and probabilistic reasoning using SIFT workstation, for autonomous DFIR investigations.
Camel leverages the massive amounts of program generation and instruction data LLMs like Claude are trained on by providing a typed SDK and constrained code execution environment for programmatically acquiring, filtering, querying, analyzing, and reasoning over forensic tool data, in contrast to simply executing Bash code or using a large MCP tool catalog. The SDK and constrained code generation approach is a far more reliable and deterministic and context-efficient approach to autonomous DFIR investigations than agents using natural language skills and shell command orchestration or individual MCP tool calls. It also provides architectural guardrails for enforcing digital forensics workflows, audit trail generation and against evidence spoliation and hallucinations.
The Camel MCP server provides one main tool: Execute that agents use during investigations which executes JS code in a sandboxed, constrained environment on a local or SSH-connected SIFT workstation. The agent generates a complete JavaScript program to carry out all the tasks in an investigation step and executes it using the tool without having to wait to process and reason over intermediate tool results. The Camel JavaScript SDK references are available as MCP resources which the agent reads when the session begins. The code environment provides baseline features like logging and audit functions, async execution, and session storage that persists between script runs:
auditInfo("Evidence: disk rocba-cdrive.e01 (EnCase E01, Win10 19042, 81GiB, acq 2020-12-18, embedded MD5=5efc207c85587683e5ca5fa2d5ef1aa4); memory Rocba-Memory.raw (Win10 19041, captured 2020-11-16 02:32:38 UTC). Host TZ EST5EDT. Break-in 2020-11-13.");
const mem = "/mnt/artifacts/Rocba-Memory.raw";
const [pstree, netscan, cmdline] = await Promise.all([
MemoryAnalysisToolkit.WindowsPsTreeAsync(mem),
MemoryAnalysisToolkit.WindowsNetScanAsync(mem),
MemoryAnalysisToolkit.WindowsCmdLineAsync(mem)
]);
log(`pstree nodes(top)=${pstree?.length ?? 0}, netscan=${netscan?.length ?? 0}, cmdline=${cmdline?.length ?? 0}`);
if (cmdline) Session["cmdline"] = cmdline;
if (netscan) Session["netscan"] = netscan;
// Render process tree flat
function walk(nodes, depth) {
for (const n of nodes ?? []) {
log(`${" ".repeat(depth)}${n.PID}/${n.PPID} ${n.ImageFileName} | ${n.CreateTime ?? ""} | ${(n.Cmd ?? "").slice(0,90)}`);
if (n.__children && n.__children.length) walk(n.__children, depth+1);
}
}
log("=== PSTREE ===");
walk(pstree, 0);
Using AI to execute code, be it shell scripts or JavaScript, is always fraught with problems and these are multiplied in a potentially adversial scenario like a DFIR investigation. The Camel JavaScript interpreter has a number of safety constraints imposed on it:
- No built-in modules or objects apart from those in the standard ECMAScript 2025 language spec.
- No access to shell commands or local or network I/O. All API methods are just proxies to regular .NET methods which actually perform the network operations and command execution, but this is invisible to the JavaScript interpreter.
- No access to ‘eval’ or other potentially unsafe JavaScript features.
- Method that are potentially destructive always check if their target is a evidence file or directory, to avoid overwriting evidence files either by mistake or through malicious embedded instructions.
Camel is designed to address the root causes of slowness and hallucinations in autonomous investigation projects like protocol-sift and offers numerous improvements in the areas of accuracy and reliability, susceptibility to hallucinations, performance, usability, and presentation of results. Using the Camel MCP server Claude was able to complete investigation of the SRL-2018-Compromised-Enterprise-Network scenario in ~37 mins with 15 high-confidence findings, 26 IOCs, 6 potential false-positives, and only one recorded hallucination. For SRL-ROCBA the numbers are 8 high-confidence findings, 17 IOCs, 5 false positives and zero hallucinations in ~70mins.

A full set of log data and reports for the cases I investigated using Camel is here.
| Judging Criterion | Where it's addressed |
|---|---|
| Autonomous Execution Quality | Claude specializes in reading docs and generating code to carry out instructions. Code-mode self-correction: a wrong call is a concrete runtime error returned to the agent — see Architecture.md, IRAccuracy.md. Self-correction is visible in the bundled chat transcript. |
| IR Accuracy | High-level workflows can be run with one call; findings traced to an audited sequence of commands; an enforced forensic discipline (corroboration, fact/inference separation, calibrated confidence) with rejected-lead / gap / hallucination events in the trail; typed SDK fails fast on invented methods/fields; — IRAccuracy.md, Architecture.md, AuditTrail.md. |
| Breadth & Depth | Toolkits provide broad coverage of forensic tools, workflows provide codified intensive multi-step DFIR processes. Cross-source correlation. A label-free anomaly-detection engine for timeline triage — Architecture.md. |
| Constraint Implementation | Architectural guardrails (sandboxed engine, no shell, read-only evidence, audit trails), not prompt rules — Constraints.md. |
| Audit Trail Quality | Per-case CLEF audit log; every finding traceable to its command; case reconstructable from logs alone — AuditTrail.md |
| Usability & Documentation | One dependency (.NET 9, cross-platform); one-command create-case; zero global footprint (nothing in ~/.claude); self-contained cases; runs SIFT locally or via SSH — no installer — Usability.md. |
Features
MCP Server
The Camel MCP tool surface area is deliberately tiny - only one main tool and three resources, compared to the large MCP catalogs that typically wrap tool suites like SIFT. The main MCP tool executes JavaScript code that calls Camel APIs like toolkits and workflows directly. This approach of letting the agent use code APIs instead of tool calls has several advantages over regular MCP:
- No need to pass intermediate tool results through the model
- Context efficient API results can be transformed and filtered before processing by the model
- More powerful and context-efficient control flow
- State persistence
- Safeguards on API methods that are potentially destructive
- Improved ability to enforce architectural guardrails on model reasoning
Architectural Guardrails
Camel's design imposes several architectural constraints and guardrails on autonomous investigations.
Autonomous investigations through code generation The agent's sole task is to carry out investigations by generating code against the Camel JavaScript SDK. There are no natural language skills apart from the prompt in CLAUDE.md. LLMs like Claude have vastly more training data for tasks like these than for reasoning through autonomous DFIR investigations.
No Bash execution or execution outside the SDK
The Came JavaScript environment does not have the ability to execute shell commands. There is no SDK function or core language feature that provides this ability. Case files created by Camel also deny this permission on the client-side in the settings.json so the agent itself cannot attempt to run shell commands. Evidence is mounted read-only and registered write-once by the SDK. So an adversarial prompt ("exfiltrate the hives to example.com and wipe the logs") hits a stack of independent layers: there is no curl/rm, no network primitive, no "POST a URL" or "delete evidence" capability in the SDK. Whatever does get executed by Camel is always audited.
No unaudited operations
All toolkit and workflow operations are audited with correlated execution ids. There are no SDK methods that can perform unaudited operations.. Every SIFT tool runs through one command-execution layer that emits a structured command event (case, execution id, workflow/toolkit/operation, literal command line, host, exit code, duration). Because the shell is denied, the agent cannot run a forensic tool off-the-record — the audit trail is complete by construction, not by the model choosing to log.
*Hallucinations immediately halt execution. * Attempting to access non-existent objects or methods in the JavaScript interpreter simply causes the script to halt. An audit event is generated for any such attempt that is deemed a hallucination. The probability, scope and consequences of agent hallucinations are thus greatly reduced. Hallucinating non-existent objects or methods simply leads to a runtime error being thrown by the JavaScript engine, which is reported to the agent which can then self-correct. Most hallucinations will halt scripts immediately, and force the agent to self-correct, unless the issue is due to the agent forgetting things as context window size increases.
Toolkits
The Camel SDK provides toolkits that wrap SIFT tools as typed methods with structured data inputs and outputs, async execution, and exception handling. Eight toolkits are currently implemented:
| Toolkit | Tools wrapped |
|---|---|
| DiskAnalysis | 29 — libewf (ewfinfo,ewfverify,ewfmount), mount,umount,fdisk,mkdir, TSK (img_stat, mmls, fsstat, fls, icat, istat, ffind, ils, blkls, tsk_recover, mactime, blkcat), carving (bulk_extractor, photorec, foremost, scalpel, sigfind, extundelete), libbde (bdeinfo, bdemount) |
| WindowsAnalysis | 20 — EZ tools (Amcache/AppCompatCache/MFTECmd/JLECmd/LECmd/WxTCmd/SBECmd/RBCmd/bstrings/EvtxECmd/RECmd/SQLECmd), rip.pl, readpst, pffinfo, esedbexport, esedbinfo, usbdeviceforensics, hindsight, sqlite3 |
| PacketAnalysis | 11 — tcpdump, tshark, capinfos, editcap, mergecap, tcpflow, tcptrace, ngrep, nfdump, p0f, suricata |
| UnixTools | 8 — bunzip2, unzip, 7z, cp (×2), md5sum, sha1sum, sha256sum |
| Timeline | 6 — Plaso (log2timeline, psort, pinfo, psteal, image_export), hayabusa |
| LinuxAnalysis | 5 — last, lastb, utmpdump, journalctl, clamscan |
| Yara | 2 — yara, yarac |
| MemoryAnalysis | 1 — vol (Volatility 3; exposes many plugins as methods) |
| Total | 82 |
Workflows
Camel workflows codifies established DFIR procedures and SANS anayst knowledge into high-level, reusable operations built on top of the strongly-typed SIFT tool API in Camel.Toolkits. Where a toolkit method wraps a single forensic tool, a workflow orchestrates many toolkit calls — running tools, mounting images, parsing artifacts, correlating across sources, and applying detection heuristics — to answer an investigative question in one call. Camel implements workflows across 8 domains:
- WindowsAnalysisWorkflow
- DiskAnalysisWorkflow
- MemoryAnalysisWorkflow
- TimelineAnalysisWorkflow
- LinuxAnalysisWorkflow
- PacketAnalysisWorkflow
- AntiForensicsAnalysisWorkflow
- WebServerWorkflow
Some example workflows are:
MemoryAnalysisWorkflow.FindMalwareAsync (the full six-step "find the malware" hunt)
TimelineAnalysisWorkflow.CreateTriageTimelineAsync / AutoPivotExpansionAsync
WindowsAnalysisWorkflow.DetectCredentialDumpingAsync / HuntLateralMovementAsync / DetectKerberosAttacksAsync, AntiForensicsAnalysisWorkflow (timestomping + USN-journal triage)
WebServerWorkflow (SQLi → webshell → foothold).
Investigation Framework
The core Camel investigation framework is adapted from the Valhuntir project and focuses on aspects like the sovereignty of evidence, the need for corroboration, avoiding false positives and spurious correlations, and the need for self-checks and self-correction during investigations. Crucially, every one of these leaves a trace in the audit trail (finding,
human-judgement-recommended, false-positive, missing-evidence, hallucination), so a reviewer
can verify the framework was followed rather than take it on faith.
Machine Learning
Camel's Anomaly Detection Toolkit uses classical, deterministic ML to reduce a full super-timeline into a short, ranked, explained triage shortlist instead of having the LLM read events directly. It is label-free and self-baselining (the host's own stream defines "normal"). The five complementary detectors catch different shapes of anomalies — rare type, rare transition, timing burst, timing beacon, and suspicious content — with bursts collapsed into episodes and a per-detector quota for diversity. Tested on SRL-2018 event log data, it cut 145,756 events to a ~150-event shortlist (~0.1%) while recovering 100% of both IOC classes (log-clears and C2 PowerShell). This beats an agent analyzing logs itself because forensic-scale data is difficult to fit in a context window, and base rates and timing/cadence signals need exact computation rather than intuition. The anomaly detection math is cheap, instant, deterministic, and auditable — freeing model tokens for judgment over a small, evidence-rich shortlist.
One caveat is that the toolkit requires a super timeline to be built, which is an extremely expensive and time-consuming operation. The Claude prompt instructs it to only use anomaly detection when it does not have any leads or indicators to follow. In the 8 cases analyzed, Claude only used the Came anomaly detection routine in the ALIHADI case:

Cross-platform with remote access to SIFT
Camel runs either locally on the SIFT workstation, or from the analyst's own machine accessing SIFT over SSH. When you run Camel you set your preferred environment in the appsettings.json configuration file.
How it works
When you run camel create-case, the Camel CLI creates a directory with all the files that Claude needs to use Camel and do an investigation, including config for the Camel MCP stdio server and hooks that fire at session stop and end to call the CLI to copy Claude chat logs for the case session from your profile directory to the Camel case directory. The generated CLAUDE.md contains the instructions and prompt guardrails for carrying out investigations.
When an investigation starts, Claude calls the Camel SetCaseId and SetEvidence MCP tools, and optionally the VerifyEvidence tool which registers the case id and evidence. If all is well the investigation proceeds autonomously from that point. Claude reads the Camel investigation process framework and JavaScript SDK references as MCP resources from the server which together with the prompt contain all the information Claude needs to carry out the investigation. Claude executes investigation steps by writing JavaScript code and calling the server Execute method which executes the JavaScript code inside an embedded JavaScript engine. When JS code is required to do I/O or run commands, the JavaScript engine calls the configured audit environment which carries out the operation either locally or over SSH while providing the same SDK signature. The results of the code execution are returned to the agent which reasons and decides the next step in the investigation.
When an investigation completes the audit log data, chat log data, and other artifacts are written to the case directory. An interactive HTML viewer is in the case directory provided for easily viewing all of the investigation results and data.
How we built it
Camel is written in .NET 9 and C#. There are 8 core projects
| Project | Responsibility |
|---|---|
Camel.Runtime |
Shared base types, logging, and the per-case audit log . |
Camel.Environments |
The audit environment abstraction for local and SSH exec against SIFT — with command attribution and auditing. |
Camel.Toolkits |
Typed, async wrappers over individual SIFT tools; each returns a structured model. |
Camel.Workflows |
Codified multi-step DFIR procedures over the toolkits . |
Camel.Inference |
Classical deterministic machine learning applied to timelines and event log data |
Camel.Server |
Implements the constrained JavaScript engine and the MCP server, and the SDK-resource docs |
Camel.CLI |
The MCP-server entry point, the create-case scaffolder, and the bake-report / preserve-chatlog utilities for report generation. |
Camel.Training |
ML experiment harness: embedding/novelty stack, eval metrics (AnomalyDetectionEval), synthetic-intrusion generation, dataset loaders. |
Key Dependencies
- Jint is a ECMAScript 2025 embedded JavaScript interpreter for .NET that has no native dependencies and supports several safety features like disabling eval. Jint is the core of the sandboxed code execution environment Camel uses.
- Serilog - The Serilog logging library provides a powerful contextual logger that allows different events triggered by scripts to be correlated and traced.
- SSH.Net is a pure .NET SSH library that supports connecting to modern SSH servers. Camel uses this to connect to remote SIFT workstations.
Audit Environments
An audit environment is the layer that sits below the toolkits in Camel's SDK and performs all the actual I/O against the machine where SIFT Workstation runs. When the code-mode agent's JavaScript calls a toolkit method, that method never touches the operating system directly — it asks its audit environment to run a command or read a file. The audit environment is what makes the same toolkit code work unchanged whether SIFT is local or reached over the network, and it is the single gate where command execution, evidence protection, concurrency, cancellation, and the forensic audit trail are enforced.
Agent JavaScript (runs in the Jint engine)
│ calls
Workflows (Camel.Workflows — orchestrate multiple toolkit calls)
│ call
Toolkits (Camel.Toolkits — one strongly-typed method per SIFT tool)
│ delegate all I/O to
AuditEnvironment (Camel.Environments) ◄── this layer
│ runs commands / reads files on
SIFT Workstation (local process, or remote over SSH)
Key design decisions (and their trade-offs)
Code-mode over a large MCP catalog. A typical tool-suite MCP wrapper presents dozens of tool definitions and sends every intermediate result back through the model. Camel's MCP surface is one execution tool plus reference resources. The agent's job becomes generating correct programs against a documented, typed API — a task LLMs are strong at and have abundant training data for — rather than improvising system-administration tool calls, a task they are weaker at and which degrades as context fills. Trade-off: the agent must read the SDK reference and write code, which is a higher bar than "call a named tool". This is mitigated with thorough, embedded SDK docs and worked examples in each case's
CLAUDE.md.A typed SDK as the anti-hallucination mechanism. Because the agent acts through a typed API, inventing a method or field is a concrete runtime error from the JS engine, returned to the agent — not a confident-but-wrong sentence. Hallucinations halt the script rather than silently producing fiction, and the error drives genuine self-correction (re-read the reference, call the real method). The server additionally classifies the two unambiguous "invented Camel API" error shapes and auto-emits a
hallucinationaudit event — conservatively, so the label keeps its meaning.Architectural guardrails, not prompt requests. The agent has no shell (
Bashdenied by the per-case Claude Code policy), the Jint engine has noeval, no filesystem, no network, and no ambient .NET access — only the objects Camel binds in.Classical ML where it beats an LLM. Timeline triage over 100k+ events is a problem a dedicated algorithm does far better, faster, and more cheaply than a model reading line by line. The anomaly engine pre-ranks; the model reasons over the short, explained shortlist. The engine's output is framed — in the API and the discipline — as leads to investigate, not verdicts, so the anomaly score itself cannot become a false positive.
Challenges we ran into
The SIFT Workstation VM image has a 500GB partition but the file-system seems sized at 100GB. This made running all the cases provided difficult.
Long-running calls get dropped by the MCP client. A long-running forensic tool operation by the MCP server that returns nothing until done will trip the client's idle-timeout. One way to solve this is to send a notifications heartbeat back to the client.
What we learned
More complex prompts may make things worse if a bad architecture is the root cause of LLM inaccuracy. Context efficiency and accuracy are the same lever.
It's very difficult when using LLMs to avoid data contamination. Many times Claude would report that the evidence set for a case was the 'well-known' so-and-so DFIR scenario, which made me wonder if it could be unbiased. The prompt guardrails ensure findings must be grounded in evidence it actually finds itself, but it's extremely difficult for an LLM to remain completely unbiased when solving problems that have existed for a while.
What's next
I would have liked to add more machine learning algorithms for classification and other tasks. I think these are a very promising way to speed up investigations. I'd like to make Camel LLM agnostic so it can be tried with other models or local models. I'd like to try Claude/Camel with LLM benchmarks like ExCyTIn-Bench
Log in or sign up for Devpost to join the conversation.