Exec Summary
Intro
Literature Review
Design
Architecture
Capabilities
ML Risk
AI Layer
DevSecOps
Security
Empirical Eval
Case Study
Mapping
Discussion
Ethics
Future
Conclusion
References
Executive Summary Why HEAVEN Exists Literature Review Design Principles Architecture Capabilities Risk Scoring (ML) The AI Layer DevSecOps Security Controls Empirical Evaluation Case Study Threat Mapping Discussion Limitations & Ethics Future Work Conclusion References
◈Autonomous Offensive Security · Build & Field Study

HEAVEN
An Autonomous
Penetration-Testing Framework

Design, Architecture, Machine-Learning Risk Scoring & a Real-World Deployment

◈ Author-built · verified on live DVWA · source on GitHub
Nisarg Chasmawala (shroff)
alias // HEAVEN
Penetration Tester  |  Vulnerability Assessment  |  Cybersecurity Researcher  |  Offensive Security Engineer  |  Digital Forensics
2877+Tests
219+Modules
99+API Routes
5Benchmark Tiers
315k+CVEs Trained
Scroll to Explore

This is a build-and-evaluate study of HEAVEN, an autonomous penetration-testing framework the author designed, wrote, and put to work over roughly three years. HEAVEN automates the repeatable parts of a professional engagement, reconnaissance, vulnerability detection, exploitation proof, risk triage, and reporting, and leaves interpretation to the operator. Its defining choice is that a machine's opinion is never the last word: an LLM may propose where a weakness might be, but a real detector has to confirm it before it is reported. The framework runs 2877+ tests across 219+ modules, exposes 62+ CLI commands, 99+ API routes, and a 30+ page web console over one shared engagement dataset, and scores risk with a model trained on 315,648+ real NVD CVEs. It was verified against a live DVWA target and then used as the technical instrument in a real MSc dissertation: an authorised Cyber Essentials assessment of a UK social-housing provider that surfaced 167 findings across web, internal, and cloud scopes. This paper sets out the design, the architecture, the evaluation, and the field results, and positions HEAVEN against the open problems in autonomous offensive security.

00 — Executive Summary

HEAVEN at a Glance

HEAVEN is a production-grade platform, not a prototype. The numbers below grow with each release, so they are written as floors rather than fixed counts.

🛰️
One dataset, three ways in
62+ CLI commands, a 30+ page React console, and 99+ RBAC-protected API routes all drive the same engagement data, so nothing has to be transcribed between tools.
🔬
Propose, then prove
An observe→plan→act loop where the LLM proposes and real detectors confirm. Proof is active: sqlmap dumps, RCE canary files, and an in-house OAST collaborator for SSRF and XXE.
📊
Risk scoring that does not guess
The client score is computed exactly from each CVSS vector. A hybrid model trained on 315,648+ real NVD CVEs only ranks findings that have no published score.
🔒
Safe enough to run live
An authorisation gate that refuses out-of-scope actions, credential redaction before anything hits disk, and an HMAC-signed append-only audit log.
🗝️
Runs with no API key
Every AI feature has a deterministic fallback. Scanning, the UI, reports, and ML scoring all work offline, and a local model via Ollama keeps findings on the host.
🏢
Proven in the field
Verified against live DVWA, then run as the instrument in an MSc dissertation: a real social-housing assessment that found 167 issues across three scopes.
Motivation
01 — Introduction

Why HEAVEN Exists

The problem it was built for

Security is a lopsided contest. A defender has to cover every way in across the whole estate; an attacker needs one. As systems have grown into tangles of cloud services, microservices, container fleets, and identity providers, the ground a defender holds keeps growing while the attacker's job stays the same size. A yearly pen test and a signature scanner cannot keep pace with people who weaponise a fresh disclosure within hours.

Two responses fall short on their own. Traditional scanners are fast but shallow, they flag patterns and leave a human to sort the real from the noise. Recent LLM-driven agents are clever but unsafe, they will state things that are not true, and acting on a hallucinated command against a live system can cause an outage or break scope. HEAVEN was built to sit between the two: automate the repeatable work at machine scale, but never report a finding a real detector has not confirmed, and never take an action outside the agreed boundary.

What HEAVEN is

HEAVEN is a production-grade penetration-testing platform that automates the time-consuming parts of an engagement so the operator can focus on judgement. It runs three ways from the same dataset, a CLI for scriptable and CI use, a web console, and a REST-plus-WebSocket API, and it covers the full arc of an assessment from first recon to a client-ready report. The rest of this paper is about how it is built, why those choices matter, and what happened when it was pointed at a real target.

"The question is not whether a machine can find a bug. Under lab conditions it clearly can. The question is whether it can do so with the judgement, restraint, and accountability a live client environment demands. HEAVEN is an attempt to answer the second question, not just the first."

design rationale

Contributions

Where It Sits
Design
03 — Design Principles

The Ideas HEAVEN Is Built On

Propose with a model, confirm with a detector

The single most important rule in HEAVEN is that an LLM's assertion is never reported as fact. Inside the loop, a vuln-hypothesis agent lets the model propose where a weakness might be, and that hypothesis is handed to a real detector to confirm or reject. A proposal nothing can back up is dropped. This is what lets HEAVEN use a language model for its strength, breadth of ideas across an unfamiliar target, without inheriting its weakness. It is the practical answer to the hallucination problem the field keeps running into.

Proof is active, not assumed

A finding either carries its own proof or it is not reported as confirmed. SQL injection is proven with an sqlmap dump; remote code execution by dropping and reading back a canary file; SSRF and XXE out-of-band through an in-house OAST collaborator that needs no Burp Collaborator or interactsh dependency. Every confirmed finding ships with a defensible evidence package: the request and response, a copy-pasteable curl repro, the detection rationale, remediation, and CWE, OWASP, and MITRE references.

Safety is a layer, not a setting

Three properties make HEAVEN fit to run on a live, sensitive estate, and they sit over the engines rather than beside them. An authorisation gate refuses any destructive action without explicit sign-off and blocks anything outside agreed scope, so the operator cannot stray. Credentials seen during testing are redacted before anything is written to disk. The engagement log is a keyed hash, append-only, so a record cannot be altered afterwards without detection. These are the conditions under which a provider holding tenant data can reasonably let the work run at all.

It should run anywhere, with or without a key

Every AI feature has a deterministic fallback, so scanning, the console, reports, and ML scoring all work with zero API keys. When a model is wanted, HEAVEN is provider-agnostic across Anthropic, OpenAI, Gemini, and DeepSeek, and can point its entire AI layer at a local model through Ollama or any OpenAI-compatible server, which keeps findings on the host under an NDA. That the loop still runs with no external service is what makes an assessment reproducible.

Architecture
04 — System Design

HEAVEN Architecture

One engagement dataset drives three interfaces: a 62+ command CLI for scriptable and CI-friendly workflows, a 30+ page React console (scan launcher, live findings, combined risk, kill chain, reports), and a REST-plus-WebSocket API across 99+ RBAC-protected routes. Running the same evidence three ways removes the transcribe-between-tools step that usually breaks an audit trail.

HEAVEN — Layered Architecture (one dataset, three interfaces)
flowchart TD subgraph IF[Three Interfaces · One Dataset] CLI[CLI\n55 commands] UI[Web UI\n24 React pages] API[REST + WebSocket\n77 RBAC routes] end IF --> ORC{Async Dependency-Aware\nTask Graph · Resumable} ORC --> R[RECON\nnmap web DNS cloud K8s AD] ORC --> V[VULN DETECT\nSQLi XSS SSRF IDOR API] ORC --> X[EXPLOIT + POST-EX\nproof privesc lateral] ORC --> AI[AI / ML\nCVSS model · planner · KG] ORC --> REP[REPORTING\n8 formats · compliance] R & V & X & AI & REP --> ST[(PostgreSQL async 29-table\n+ SQLite fallback)] ST --> SEC[Security Layer\nJWT RBAC · AES-256-GCM · HMAC audit] style ORC fill:#0f1e38,stroke:#818cf8,color:#dde8f7 style ST fill:#020912,stroke:#00f5d4,color:#00f5d4 style SEC fill:#0b1629,stroke:#f472b6,color:#dde8f7 style AI fill:#0b1629,stroke:#34d399,color:#34d399

Beneath the interfaces sits an asynchronous, dependency-aware orchestrator that sequences the work as a resumable, checkpointed task graph with stealth timing from 1 to 5. It coordinates five engine groups, reconnaissance, vulnerability detection, verified exploitation and post-exploitation, machine-assisted analysis, and reporting, over a storage layer. Storage is an async PostgreSQL 29+ table schema with a partitioned audit log, plus a zero-config SQLite fallback that presents the same interface where a single file is one engagement. The security layer, JWT RBAC across admin, operator, viewer, and auditor roles, an AES-256-GCM credential vault, an HMAC-signed audit log, and LLM credential redaction, sits over every engine so none of them can act on an unauthorised target.

HEAVEN — Observe→Plan→Act with the Verify Loop
flowchart TD ENG([Engagement\nScope]) --> ORC{Async Task\nGraph Orchestrator} ORC --> OBS[OBSERVE\nRecon Agent] OBS --> PLAN[PLAN\nAttack-Chain Planner] PLAN --> HYP[Vuln-Hypothesis\nLLM Proposes] HYP --> VER[Real Detectors\nVERIFY] VER -->|Confirmed| PROOF[Verified Exploit\nsqlmap / RCE canary / OAST] VER -->|Rejected| FP[FP Suppression\nsub-0.40 discarded] PROOF --> ACT[ACT\nExploit + Post-Ex] ACT --> KG[(Knowledge Graph\ncross-engagement)] FP --> KG KG --> ORC KG --> ML[CVSS ML Predictor\nExtraTrees R2=0.9925] ML --> REP[/8-Format Report\nMITRE + KEV + EPSS/] style ENG fill:#0b1629,stroke:#00f5d4,color:#dde8f7 style ORC fill:#0f1e38,stroke:#818cf8,color:#dde8f7 style HYP fill:#0b1629,stroke:#f472b6,color:#f472b6 style VER fill:#0b1629,stroke:#34d399,color:#34d399 style PROOF fill:#0f1e38,stroke:#34d399,color:#34d399 style KG fill:#020912,stroke:#00f5d4,color:#00f5d4 style ML fill:#0b1629,stroke:#fbbf24,color:#dde8f7 style REP fill:#0b1629,stroke:#00f5d4,color:#00f5d4
The engagement loop, in outline
# HEAVEN observe -> plan -> act, verification in the middle for target in authorised_scope: # scope gate enforced first obs = recon.observe(target) # service + surface discovery plan = planner.attack_chain(obs) # LLM or deterministic fallback for hypothesis in plan.candidates: proof = detectors.verify(hypothesis) # real check, not the model's word if proof.confidence < 0.40: continue # two-stage FP suppression finding = act.prove(hypothesis) # sqlmap / RCE canary / OAST kg.record(finding) # cross-engagement knowledge graph report.render(kg, formats=8+) # MITRE + KEV + EPSS ordering

The package layout

The framework is organised into clear engine groups, each a set of modules under the main package: recon, vulnscan, postex, ai, ml, mitre, devsecops, db, security, api, and cli, with the React console as a separate front end. That separation is what lets each capability grow on its own, and it is why the module and command counts are floors that rise with each release rather than fixed numbers.

Capabilities
05 — What It Does

HEAVEN Capabilities, End to End

HEAVEN covers the whole arc of an assessment across 15+ scan modes. The tables below group the coverage; each area is an engine family that keeps expanding.

Reconnaissance

nmap, web crawling, DNS brute-force, certificate transparency, Shodan, Active Directory enumeration, cloud across AWS, GCP, and Azure, containers and Kubernetes through the Docker socket and K8s API and RBAC, IoT and SCADA, Git secrets, and email OSINT. It also fingerprints defences, firewall, IDS/IPS, and WAF detection, with an adaptive evasion re-probe when it meets one.

Vulnerability detection

ClassCoverage
InjectionSQLi (error, boolean, UNION, time-blind), command injection, LFI/RFI, XXE, CRLF
Web logicXSS, SSRF, CORS with reflected origin and credentials, open redirect (canary-confirmed), IDOR, mass assignment, race conditions
Protocol / transportrequest smuggling, GraphQL introspection, JWT attacks (alg:none, weak-secret crack), insecure session cookies
Surfacedirectory and file fuzzing, subdomain takeover, default credentials, Nuclei templates

Active Directory and identity

Authenticated LDAP assessment covering Kerberoasting and AS-REP roasting (via LDAP and credential-free Kerberos pre-auth), DCSync rights, unconstrained and constrained delegation, and SMB-signing, SMBv1, and NTLMv1 posture. It checks AD CS certificate-template abuse from ESC1 to ESC4 and ESC8 web-enrolment relay, and maps the NTLM coercion surface, PetitPotam, PrinterBug, DFSCoerce, bind-only, so it never actually triggers coercion. It also does BloodHound-style path analysis and SSO testing across OAuth 2.0 and SAML.

Verified exploitation and post-exploitation

Active proof rather than guesses: sqlmap SQLi dumps, RCE canary drop-and-read, and the in-house OAST collaborator for out-of-band SSRF and XXE. Post-exploitation ships self-contained privilege-escalation engines for both Linux (GTFOBins-scored SUID, sudo, and capabilities, docker and lxd escape, writable /etc/passwd, cron and PATH hijack) and Windows (unquoted service paths, writable service binaries, SeImpersonate and SeBackup token privileges, AlwaysInstallElevated, autologon and registry credentials, UAC posture), with no linPEAS or WinPEAS download. A loot harvester collects SSH keys and cloud credentials with secrets redacted and plaintext never persisted, and a credential-reuse loop feeds SSH, SMB, and PsExec lateral movement with pass-the-hash, all tagged to an ATT&CK kill chain.

Cloud, API, and offline analysis

Credential-free public storage-bucket exposure across S3, GCS, and Azure Blob, proven from the provider's own response rather than guessed, plus a cloud-metadata SSRF catalogue that turns an SSRF into confirmed credential theft, and an authenticated account audit including a read-only IAM privilege review. API security follows the OWASP API Top 10, BOLA and IDOR, broken auth, mass assignment, and excessive data exposure across REST and GraphQL. Offline, HEAVEN analyses binaries, firmware, pcaps, documents, and media, and scores Android APK and iOS IPA files against the OWASP Mobile Top 10.

CVE intelligence

A curated offline CVE database of ~150+ version-matched entries, with a live fallback: any product or version not held locally is looked up in real time against NVD and CIRCL, merged and de-duplicated, version-confirmed, then flagged for KEV membership, scored with EPSS, and correlated to an Exploit-DB PoC, and disk-cached with a seven-day TTL. It degrades gracefully offline.

Risk Model
06 — Machine Learning

Risk Scoring That Earns Trust

The score a client sees is computed exactly from each finding's CVSS vector using the reference formula. HEAVEN reports CVSS v4.0, the current standard, and shows the calibrated CVSS v3.1 score alongside. Published CVE scores come straight from NVD and OSV. The machine-learning model only steps in for a finding that has no published score, and even then it is a secondary ranking signal pinned to the authoritative severity, never the badge itself.

A hybrid predictor, measured honestly

The predictor has two paths. When a finding carries CVSS metrics, a 13-feature ExtraTreesRegressor predicts the base score at 5-fold cross-validated R²=0.91. When it does not, a TF-IDF text model (a TfidfVectorizer with Ridge regression) reads the finding's own vulnerability type and description; it is trained on the real-finding population of the dataset, 315,648+ CVEs carrying a non-zero CVSS score.

For the text path the honest figure is not a single R-squared but a set of numbers measured on the population the model actually scores. It reaches an exact-score R-squared of 0.64, a Spearman rank correlation of 0.80 against the true score, and it lands the correct CVSS severity band 99 percent of the time within one level. The band-accuracy and the rank correlation are the figures that matter, because the model is used to order unscored findings, not to stamp a precise number on them. Pushing the exact-score R-squared higher would mean leaking the CVSS formula's own sub-scores into the features, which would be measuring memorisation rather than prediction, so the tool reports what the model is honestly for: getting the ranking and the band right.

ExtraTrees vector model, 5-fold CV (R²)
0.91
Text model, rank correlation (Spearman ρ)
0.80
Text model, exact-score (R²)
0.64
Correct severity band, within one level
99%

HEAVEN CVSS predictor, figures as published in the project. The exact-formula path is used whenever a finding carries a CVSS vector; the model only ranks the unscored remainder, and provenance is documented in the model card.

Ordering on top of the score

Once a base score exists, HEAVEN layers on EPSS exploit-probability and CISA KEV membership, an asset-criticality multiplier so a crown-jewel host outranks a peripheral one, and empirical Bayesian priors learned from an operator's own past engagements. The result is an ordering that reflects real-world exploitation likelihood, not just theoretical severity. The models are fetched once with SHA-256 verification rather than bundled, and without them CVSS falls back gracefully to each finding's own base score.

Autonomy
07 — The AI Layer

Autonomous Reasoning, Grounded

HEAVEN's AI layer is more than a planner. It runs the observe→plan→act loop, a recon agent, an attack-chain planner, an LLM false-positive review, an AI remediation generator, and a cross-engagement knowledge graph that lets it reason about multi-hop attack paths rather than one step at a time. Every one of these has a deterministic fallback, so the loop runs with no key at all.

Grounded, not free-floating

The knowledge graph is what turns a foothold into a plan. When HEAVEN compromises a host, it can query the graph for what that host can reach next and which weaknesses those neighbours carry, which is how it reasons two or three hops ahead. This is the multi-hop planning the research literature describes, running in a shipped tool. The false-positive review is a second stage on top of the verify loop: a two-stage confirmation pass discards anything below 0.40 confidence outright, with an optional LLM second opinion on what remains.

✓

The safety story in one line: the LLM widens the search, the detectors close it. Breadth comes from the model, truth comes from the proof, and the authorisation gate makes sure neither can act outside the boundary the client agreed to.

Pipeline
08 — DevSecOps

Built for the Pipeline

Traditional pen testing is a once-a-year event; a modern pipeline ships several times a day, which leaves long stretches where nobody knows the security state. HEAVEN is built to close that gap. It runs scheduled re-scans with differential alerts through its watch command, so only what changed since the last baseline is surfaced. It carries Semgrep SAST, a dependency audit against OSV.dev, and CycloneDX SBOM generation, and it forwards to Jira and Linear for ticketing and to Splunk and Elastic for SIEM.

Because it exports SARIF, HEAVEN drops straight into GitHub code scanning, and its eight report formats mean the same engagement can produce a client PDF, a compliance-mapped HTML, and a machine-readable JSON or Burp XML from one run. The shift-left payoff is the usual one: catch an issue in development where a fix costs little, not in production where it costs a great deal.

Safety Controls
09 — Security Controls

The Controls That Make Autonomy Defensible

Letting a machine act on a live network is only reasonable if it cannot exceed its authority, cannot leak what it sees, and cannot quietly rewrite the record. HEAVEN's security layer is designed around those three needs.

ControlWhat it does
Authorisation gateDestructive actions refuse to run without explicit sign-off, and anything outside agreed scope is blocked, so the operator cannot stray.
JWT RBACadmin, operator, viewer, and auditor roles, with brute-force lockout on exponential backoff.
AES-256-GCM vaultEvery stored secret is encrypted at rest.
HMAC-signed audit logAppend-only, every operator action recorded, tamper-evident after the fact.
LLM credential redactionOperator credentials are scrubbed before any prompt reaches a third-party model endpoint.
Default-credential protectionThe admin/admin seed forces a password change on first login, and self-audit flags it as critical until changed.
Self-auditHEAVEN scores its own installation and surfaces misconfigurations.
◈

These controls are the neurosymbolic guardrail idea in production form: a hard, deterministic boundary that the learned and generative parts of the system cannot argue their way past. It is what let a provider holding tenant data allow the assessment to run at all.

Evaluation
10 — Empirical Evaluation

Measured, Reproducible, Across Five Tiers

The evaluation is deliberately not a single demo. HEAVEN is scored across five tiers, the web application, the API surface, the network and service layer, static source analysis, and full autonomous authenticated coverage, and every tier runs through the same precision, recall, and F1 metrics layer against a labelled ground truth. Four of the five run with no Docker and no network egress, so anyone can reproduce them, and they are enforced as a floor in continuous integration so a regression cannot slip through. The point of running the same scoring across such different surfaces is that a number means the same thing everywhere: a reported finding is counted true only when it maps to a labelled entry, so precision is measured honestly rather than by quietly ignoring whatever else the scan reported.

The headline result, across all five

TierTargetPrecisionRecallF1Runtime
Web (native)DVWA-faithful in-process surface100% (17/17)100% (11/11)100%~13 s
APIOWASP API Top 10 reproduction100% (9/9)100% (8/8)100%~0.1 s
NetworkMetasploitable-2 (live lab)100% (50/50)100% (12/12)100%~190 s
SASTOWASP Benchmark v1.2 (2,740 Java)100% (0 FP)100% (1,415/1,415)Youden 1.000~16 s
AutonomousLive DVWA behind login100%100% (10/10)100%authenticated

Every figure is measured and reproducible; the recall fractions are detections against the labelled ground truth on each target. The perfect scores are on controlled, labelled surfaces and are described honestly as such below, they are not a claim of parity with commercial suites across every vulnerability class.

Web tier: detection and attribution

The native web benchmark drives the real crawler, injection scanner, misconfiguration scanner, and out-of-band prober against a DVWA-faithful surface that reproduces MySQL comment semantics, and adds a misconfiguration and out-of-band surface for SSRF, XXE, CORS, open redirect, weak JWT, and insecure cookies. It covers 12 vulnerability categories and reports 17 findings, all real, with zero false positives on reflective or escaped endpoints, and it attributes each finding to the correct parameter rather than, say, the submit button. Crucially, SSRF and XXE are proven out-of-band: the target calls back to HEAVEN's own OAST collaborator, so they are confirmed interactions, not heuristics. The whole run finishes in about 13 seconds with no Docker and no network.

Network tier: real CVEs on a real VM

Against a running Metasploitable-2 host, HEAVEN surfaced all 12 must-find criticals with 50 of 50 reported findings mapping to a labelled entry and zero false positives. The twelve are the ones a competent network assessment has to find: the vsftpd 2.3.4 backdoor (CVE-2011-2523), the Samba usermap RCE (CVE-2007-2447), distccd (CVE-2004-2687), the UnrealIRCd backdoor (CVE-2010-2075), the ingreslock root bind shell, dRuby and Java RMI exposures, a world-readable NFS export, and default credentials on Tomcat manager, PostgreSQL, VNC, and SSH. Version-unconfirmed service CVEs are folded into one honest low-confidence roll-up rather than asserted as confirmed, which is what lets precision be measured against everything the scan legitimately reports.

SAST tier: a genuinely hard corpus

The static engine was scored against the industry-standard OWASP Benchmark v1.2, 2,740 Java cases where roughly half are real vulnerabilities and half are safe lookalikes built specifically to trip a scanner. HEAVEN scored a Youden index of 1.000, detecting all 1,415 real vulnerabilities with zero false positives across the full corpus, and every one of the eleven categories scored a perfect 1.000. This is not benchmark tuning: nothing in the detection path is benchmark-aware. The benchmark's safe lookalikes differ from the real bugs only by facts a sound dataflow analysis can decide, a tainted value assigned in a dead branch, read back from a collection under a different key, or discarded before the sink, and a weak algorithm named in configuration rather than in code, and HEAVEN performs that analysis generically over the real Java syntax tree, so the same logic holds on arbitrary code. For contrast, a purely pattern-based engine such as FindSecBugs scores about 0.42 Youden on the same corpus, because it cannot fold the dead code or resolve the configuration.

✓

Autonomous authenticated coverage. From just a base URL and a login session, HEAVEN authenticates, crawls past the login wall, discovers the protected attack surface on its own, 34 pages, 17 under the vulnerabilities path, and confirms real vulnerabilities against the labelled ground truth: error-based, UNION, and time-based blind SQL injection, local file inclusion leaking /etc/passwd, OS command injection returning the output of id, and a CSRF password change that accepts a tokenless GET. Every finding comes from a deterministic scanner observing the target's actual response; the LLM layers only plan, triage, and explain, and never invent a finding.

The engineering the numbers forced

The perfect scores are the end of a debugging story, not the start of one, and the benchmark is what surfaced the bugs that separate a demo from a usable tool. The first end-to-end run reported one injectable parameter 188 times, once per payload, which a fix to strip the query string from a finding's identity collapsed from 1,653 findings to 35 on a two-URL scan. Auth cookies were not being sent, so scanners hit protected pages unauthenticated until the cookie jar was corrected, taking endpoint discovery behind the login from 0 to 17. Two subtler fixes are the ones worth naming, because they are exactly the false-positive controls the literature review argues for: a reproduce-before-report rule that requires a concurrent divergence to recur on a confirmation burst before it is emitted, which took DVWA precision from 93 to 98 percent with recall unchanged, and a truth-value confirmation that requires a blind-SQLi oracle to survive a literal-swapped variant, so that a real oracle depending on the condition's truth value is kept and a transient coincidence is dropped, taking precision from 97.6 to 100 percent with recall still at 100.

Honest caveats

The evaluation states its own limits plainly. The DVWA runs used security level low behind an authenticated session, the canonical functional benchmark for a scanner, not a hardened production app. The benchmark target ran under CPU emulation, so wall-clock times are slower than on native hardware, though the findings are unaffected. The coverage spans the classes scored above and is not a claim of parity with commercial suites across every vulnerability class; the repository ships an honest head-to-head template with adapters for Burp, ZAP, and sqlmap rather than inventing competitor numbers. And the out-of-band SSRF and XXE proof requires the target to reach HEAVEN's collaborator, which holds for lab targets by default and needs a routable bind address for a remote one. Naming these is the same discipline as the rest of the tool.

11 — Real-World Case Study

HEAVEN in the Field: an MSc Dissertation

HEAVEN was the technical instrument for the author's MSc dissertation, a Cyber Essentials readiness study of a UK social-housing provider holding a large amount of tenant data. This is the part that separates the framework from a benchmark exercise. It was run under written authority, following the NIST SP 800-115 testing lifecycle and the BCS Code of Conduct, against a live estate spanning a public website, a head-office internal network, and cloud servers. The academic supervisor asked that HEAVEN serve as the instrument precisely because it produces a replicable evidence trail a conventional scanner cannot.

The framework ordered findings using its machine-learning severity estimate together with CVSS, EPSS, and the KEV catalogue, and recorded the request and response behind every finding so each one could be reproduced. The same three guardrails described above governed the work: the authorisation gate refused anything outside scope, credentials were redacted before anything touched disk, and the keyed-hash append-only log kept the record tamper-evident. A point worth stating plainly is that the model never acted on its own; it suggested which checks to run next, and the framework only performed actions that were already specified and authorised.

Authorised assessment, 167 findings across three scopes
SeverityCountWhere it concentrated
Critical2Both in the public web application
High1110 of the 11 on the older internal network
Medium110Long tail across the estate, largely information exposure
Low44Default settings on printers, network and management devices
167 findings total. The cloud network produced 41 findings with nothing above medium, a sign of a recent, centrally managed build; the older internal estate carried the bulk of the high-severity issues.

The shape of the result did real diagnostic work. The most common single class was sensitive file and path exposure, with 33 findings, followed by missing security headers and cleartext services, which told a small team that a handful of root causes sat behind the 167 findings rather than 167 unrelated ones, so the remediation plan could be short. A retest of eighteen findings from the provider's earlier November 2025 penetration test, chosen to span the severity range and every asset class, found nine truly closed, three partially closed, four that could not be judged without intrusive testing, and two re-opened on items previously marked done, which is exactly why the study argues that verifying a fix matters more than recording one.

◈

False-positive control, on a live estate: HEAVEN attached a confidence score to every detection, and the distribution was recorded as part of the study. About 20% of findings came in below 0.70 confidence and were flagged for manual review rather than reported as confirmed. That is the two-stage suppression pass, with sub-0.40 results discarded outright, doing its job in the field rather than on a benchmark.

Mapping
12 — Threat & Compliance Mapping

Every Finding, Placed in Context

A finding is more useful when it is tied to a framework a client already reports against. HEAVEN maps every finding to MITRE ATT&CK techniques and to Lockheed Cyber Kill Chain phases, and it can pull threat intelligence over a TAXII feed. Its methodology documentation carries mappings against the pen-testing standards, OWASP Testing Guide v4.2, PTES, and NIST SP 800-115, and against the compliance frameworks a publication-grade tool is expected to address: Cyber Essentials and Cyber Essentials Plus v3.3, ISO/IEC 27001:2022 with Amendment 1:2024, PCI DSS v4.0.1, CIS Critical Security Controls v8.1, NIST Cybersecurity Framework 2.0, and SOC 2.

What makes the mapping honest rather than decorative is that it is live and never fabricated. A control lights up as exercised only when the specific HEAVEN detector it names actually produced a finding in the current engagement, and the summary counts are computed from the rows so they cannot drift from the detail. Where a control cannot be evidenced from a network or credentialed scan, the row says so explicitly, marked manual for host and endpoint tests, organizational for governance and policy, or physical for physical controls, so an auditor sees coverage and its honest limits at a glance and an operator knows exactly what still has to be done by hand.

The combined-risk view is where this pays off in an engagement. HEAVEN correlates findings that are individually modest into a materially worse combined issue, then chains them into an end-to-end attack path where each step yields a capability the next one uses, and it ranks the single break-the-chain fixes that collapse the most paths. That narrative appears in the web console, the CLI, and the PDF and HTML reports, which is what turns a flat list of issues into a short, ordered remediation plan.

Discussion
13 — Discussion

How HEAVEN Answers the Field's Open Problems

The literature on autonomous penetration testing keeps returning to the same handful of unsolved problems. HEAVEN does not claim to close them, but each of its design choices maps onto one, and it is worth being precise about where it helps and where it does not.

◈ Open problem
LLM hallucination
Language-model agents state plausible but wrong commands and CVE IDs. Acting on those against a live system risks outage, corruption, and broken scope.
✓ How HEAVEN helps
The vuln-hypothesis agent lets the model propose but only reports what a real detector confirms, and proof is active (sqlmap, RCE canary, OAST). The model's word is never acted on alone, which removes hallucination as an operational risk rather than just reducing it.
◈ Open problem
CTF-only evaluation
Most agents are validated on puzzles, which overstates how ready they are for scoped, stealth-constrained, open-ended professional work.
✓ How HEAVEN helps
HEAVEN was validated on live DVWA and then run on a real, three-scope estate under written authority, with a per-finding confidence distribution and a false-positive control reported from the field. That is the enterprise-representative evidence the field is short of.
◈ Open problem
Stale datasets
Models trained on decade-old traffic are blind to modern cloud abuse, container escapes, and living-off-the-land techniques.
✓ How HEAVEN helps
The CVSS text model is trained on 315,648+ real NVD CVEs, and the CVE layer pulls live data from NVD and CIRCL with KEV and EPSS enrichment and a seven-day cache, so its intelligence stays close to the current threat landscape rather than a historical snapshot.
◈ Open problem
Governance and accountability
Autonomous offensive tools lack a settled answer to scope enforcement, credential handling, and a tamper-evident record of what was done.
✓ How HEAVEN helps
The authorisation gate, credential redaction, and HMAC-signed append-only audit log are concrete, shipped pieces of a governance stack, and they are what made a tenant-data assessment defensible in practice.

Where HEAVEN does not solve the problem

Two of the field's hardest problems remain open for HEAVEN too, and it would be dishonest to claim otherwise. The sim-to-real gap is sidestepped rather than solved: HEAVEN is validated on real targets instead of a simulator, which is the right call for a tool but does not advance the science of transfer learning. And calibrated confidence, making a stated confidence genuinely mean a matching probability of being real, is still an open research question; HEAVEN's per-finding confidence scoring is a step toward it, not a full answer. Naming these honestly is part of what a publishable account of the tool has to do.

Limits & Ethics
14 — Limitations & Ethics

Honest Limits and Responsible Use

Limitations

Dual use and oversight

A tool that can walk an estate at machine speed is a defensive asset in one set of hands and a weapon in another. HEAVEN is intended for authorised testing and education only, and running it against systems without explicit written permission is illegal in most jurisdictions. The design reflects that: the authorisation gate is not a convenience, it is the mechanism that keeps the tool inside the law and the engagement. The direction of regulation, across the EU AI Act, the US National Cybersecurity Strategy, and UK guidance, is toward mandatory human oversight for high-consequence automation, and HEAVEN's operator-in-the-loop model is built to meet that rather than resist it.

Future Work
15 — Future Work

Where HEAVEN Goes Next

Near term

Medium term

Longer term

Synthesis
16 — Conclusion

Conclusion

HEAVEN is an argument, made in software, that autonomous penetration testing becomes useful only when it is careful. It automates the repeatable work of an engagement at real scale, 2877+ tests, 219+ modules, 62+ commands, 99+ routes, and a risk model trained on 315,648+ real CVEs, but it earns trust by refusing to report a finding a detector has not confirmed, refusing to act outside the agreed scope, and keeping a record a client can rely on.

The evaluation backs the design. HEAVEN was proven on a live target and then used, under written authority, as the technical instrument in a real assessment of a social-housing provider, where it found 167 issues across three scopes, ordered them into a short remediation plan, and held back its own uncertain results rather than inflating the count. That is the difference between a system that is clever in the abstract and one that is safe enough to run on an estate holding other people's data.

The open problems in the field, sim-to-real transfer and calibrated confidence chief among them, remain open for HEAVEN too, and this account names them plainly rather than papering over them. But the direction is clear. The credible future of this work is augmentation: a machine carrying scale, breadth, and repetition, a person holding judgement and responsibility. HEAVEN is a working instance of that split, and its field results are the evidence that the split works.

17 — References

References

  1. Bakker, I. and Hastings, J. Autonomous Penetration Testing: Solving Capture-the-Flag Challenges with LLMs. arXiv:2508.01054.
  2. BDO. (2024) The EU AI Act: Key Takeaways. BDO Insights.
  3. Clifford Chance. (2025) Who is Responsible for Agentic AI? Clifford Chance Thought Leadership.
  4. Deng, G. et al. PentestGPT: A Large Language Model-Based Automatic Penetration Testing Tool. arXiv:2308.06782.
  5. Fang, R., Bindu, R., Gupta, A. and Kang, D. (2024) LLM Agents can Autonomously Exploit One-Day Vulnerabilities. arXiv:2404.08144.
  6. Ghanem, M.C. and Chen, T.M. (2020) Reinforcement Learning for Efficient Network Penetration Testing. Information, 11(1), pp. 1–23.
  7. Ginige, T. et al. (2025) AutoPentester: An LLM-Based Autonomous Penetration Testing Framework. Proceedings of IEEE TrustCom 2025. Piscataway, NJ: IEEE.
  8. Gioacchini, L. et al. AutoPenBench: An Open Benchmark for Automated Penetration Testing. arXiv:2410.03225.
  9. Hu, Z., Beuran, R. and Tan, Y. (2020) Automated Penetration Testing Using Deep Reinforcement Learning. IEEE European Symposium on Security and Privacy Workshops, pp. 2–10.
  10. Kong, H. et al. VulnBot: Autonomous Penetration Testing for a Multi-Agent Collaborative Framework. arXiv:2501.13411.
  11. Miao, Y. et al. (2023) GAN-Based Autonomous Penetration Testing for Web Applications. Sensors, 23(18), p. 8014.
  12. Nguyen, T. et al. Reinforcement Learning for Automated Penetration Testing: A Systematic Review. arXiv:2507.02969.
  13. NIST. (2008) SP 800-115: Technical Guide to Information Security Testing and Assessment. National Institute of Standards and Technology.
  14. Schwartz, J. and Kurniawati, H. (2019) Autonomous Penetration Testing Using Reinforcement Learning. arXiv:1905.05965.
  15. Shao, Y. et al. An Empirical Evaluation of LLMs for Solving Offensive Security Challenges. arXiv:2507.00829.
  16. Tran, N. et al. D-CYPHER: Dynamic Collaborative Intelligent Agents for Enhanced Reasoning in Offensive Security. arXiv:2502.10931.
  17. Zhang, A.K. et al. Cybench: A Framework for Evaluating Cybersecurity Capabilities and Risks of Language Models. arXiv:2408.08926.