Skip to main content
← Selected work

Case study

Hephestus Agent

Active2026

Supervised local LLM security-research agent

>_ hephestus / evidence[ + ]
Hephestus project wordmark with a helmet emblem and the subtitle Supervised Local LLM Security Research Agent.
Stack
Python, llama-cpp-python, GGUF, Flask, Cryptography, PowerShell, ReportLab

Executive summary

One of my biggest projects and a portfolio highlight: Hephestus V2.0, a supervised local LLM security-research workspace with operator approval, local or encrypted remote execution, and evidence reporting.

Exploring model-assisted security research requires a way to review proposed commands and distinguish observed results from model claims.

How a task runs

  1. Load a model. Hephestus loads one GGUF file chosen in the Models screen, and nothing loads at startup.
  2. State the task and the authorised scope. Quick suits a small task, and Goal runs a bounded sequence of iterations.
  3. The agent proposes commands. Static policy checks and an optional model review run before the proposal reaches you.
  4. You decide in the browser: approve selected commands, reject them, change the guidance, ask for an edit or stop the run. Nothing executes before approval.
  5. The approved command runs where the mode says it should, and its output goes back to the agent and into the session record.
  6. The loop repeats until the goal is reached, the run limits in Settings are hit or you stop it.

Where commands run

The controller is the computer running Hephestus. The model, the browser interface, the agent and the saved evidence stay there in both modes. Only the place where an approved command executes changes.

Local and remote execution

Local mode

  1. Agent proposesThe GGUF model runs on the controller.
  2. Policy checksStatic rules and an optional model review.
  3. You approve in the browser
  4. Controller shell runs itWith the permissions of your account.

Remote mode

  1. Agent proposesThe model still runs on the controller.
  2. Policy checks
  3. Encrypted relayIn memory on the controller, reached through a temporary cloudflared tunnel.
  4. Target operator approvesThe full script is shown on the target: Y, N, U to edit, or Q to quit.
  5. Target PowerShell runs itWith the permissions of the account that launched the worker.

Results from either mode return to the agent and the session record.

The browser interface stays private on the controller. The tunnel exposes only the relay.

Local and remote compared
PartLocalRemote
Model and agentRun on the controller.Run on the controller. No model on the target.
Command approvalController browser.The target operator’s PowerShell window.
Command executionController shell.The authorised target’s PowerShell.
Relay and tunnelNot needed.A relay on the controller, reached through cloudflared.
Saved evidenceThe controller’s sessions folder.The same folder. Remote results return through the relay.

Remote mode safeguards

  • Each connection generates fresh random keys and a new endpoint, so an old bundle cannot join a new session.
  • The relay lives in memory on the controller’s loopback interface, and its own authentication key never goes into the worker bundle.
  • Command and result payloads are encrypted between controller and worker, with authenticated requests, replay checks and job expiry.
  • There is one worker and one in-flight job. The worker checks authorisation again just before it executes and tries to stop the process tree if the connection drops.
  • Permission to connect is not approval to execute. The target operator reviews every proposed script in full.
  • The target needs no Python, no model, no inbound firewall rule and no administrator rights. The worker runs with whatever permissions the launching account has.
  • The connection bundle works as a credential, so it should be deleted from both machines when the work ends.
  • Cloudflare carries the encrypted traffic and can see connection metadata.

Evidence you can check

Sessions persist across restarts. You can reopen, rename or delete them, and ask questions about the recorded evidence in a read-only panel. A session exports as JSON or as a Cybersecurity Audit Evidence Report in PDF form. The PDF keeps the scope, runtime settings, operator decisions, command evidence, captured output and a timeline, with SHA-256 hashes chained across events.

The hashes let a reader detect later edits. They do not provide trusted timestamps, prove where the data came from or show that the model reached its objective.

Four things that get mistaken for each other
  1. A plausible commandThe model proposes something that looks right.The agent understood the task.Nothing has run yet.
  2. A clean exitThe process returns exit code 0.The command ran.The output can still say access denied.
  3. A completion messageThe model announces that the goal is done.The model believes it has finished.It is a claim, and models are sometimes wrong about their own progress.
  4. A verified resultCaptured output meets the stated objective.The objective was reached.

Hephestus records completion claims from the model as unverified until the captured output supports them.

Models and hardware

Hephestus loads one complete, single-file GGUF model and never downloads arbitrary models by itself. Setup can fetch a pinned quick-start model, Qwen2.5-Coder-1.5B-Instruct at Q4_K_M, which is about 1.12 GB, and verifies its size, GGUF header and SHA-256 before using it. It is a small model for learning the workflow and makes no claim to be the best choice for security work.

The size of the file on disk is not the memory requirement, because context and inference buffers add to it. Settings expose GPU offload, context size, batch size, threads, sampling and run limits, and the workspace shows GPU telemetry when the hardware reports it. Setup can target CPU, CUDA, Metal, Vulkan or ROCm builds of the inference runtime where upstream wheels exist.

From research beta to V2.0

Three stages of the project
  1. Research betaThe master's artifact, evaluated in the dissertation. Hosted 14B-model inference.
  2. V1Substantially upgraded afterwards for my red-team work. Not evaluated.
  3. V2.0The public release with local GGUF inference, a browser workspace and Local and Remote modes. Not evaluated.

The dissertation tested the research beta only: Qwen2.5-Coder-14B-Instruct served through llama.cpp on a rented GPU, in a controlled lab. Its findings explain where the project came from and what shaped its design. They are not performance results for V2.0.

Read the study summary

Limits to know

  • Use it only on systems you own or have explicit authorisation to assess, and agree the targets and permitted actions first.
  • Remote mode targets Windows machines and runs approved scripts through PowerShell.
  • Quick Tunnels are meant for testing and development, and the tunnel provider carries relay traffic.
  • It is a personal portfolio project, shared without a promise of support or of a managed security service.

Run it locally

Python 3.10 or later is required and 3.12 is recommended. These are the Windows commands. On Linux and macOS use python3 and .venv/bin/python instead.

git clone https://github.com/phantom0004/hephestus-redteam-agent.git
cd hephestus-redteam-agent
py -3.12 setup.py --download-model
.\.venv\Scripts\python.exe .\start_hephestus.py

The browser opens a private address on loopback port 5000. Local mode needs no second computer, relay or tunnel.

Scope

Released lab research prototype for systems the operator owns or is authorized to assess. Commands run with the operator’s account permissions; policy checks and approval do not provide isolation or establish task success. Model weights are not included.

Methodology

Designed and built the V2.0 browser workspace, Quick and Goal workflows, local GGUF model library, GPU telemetry, encrypted Windows worker connections, explicit operator approval with command editing, persistent sessions, and PDF audit reports. The project grew from an earlier master’s research beta; that study did not evaluate V1 or V2.

Engineering decisions
CHOSE / OVER / BECAUSE

Original decision record. Alternatives and rationale appear only where stated.

↳ Kept inference local through llama-cpp-python and external GGUF models.

↳ Required operator review of command proposals before execution.

↳ Made local execution the default, with explicit remote selection and per-connection worker credentials.

↳ Recorded model completion claims as unverified and documented experimental limitations.

Evidence

  • Released MIT-licensed source code
  • Supervised command proposal and approval loop
  • Local shell and encrypted relay-based Windows worker execution
  • Browser workspace with Quick and Goal workflows and editable command approvals
  • GGUF model library, GPU telemetry, persistent sessions, evidence exports, and PDF audit reports

Related research

  • Chains of command: how agentic AI alters attacker tactics, techniques and procedures (MSc)
  • Python
  • llama-cpp-python
  • GGUF
  • Flask
  • Cryptography
  • PowerShell
  • ReportLab
View on GitHub ↗

More projects

  • Morpheus IOC Scanner: defensive security research, 2024–2025
  • PenTest Vault: offensive-security research collection, 2023–2024
  • Oberon Framework: controlled malware-research proof of concept, 2025

All selected work · Research summaries