capabilities_from matches keywords over a finding's title, impact and
evidence. It misses a credential phrased in words the list does not carry, and
it mints rce from a finding that merely warns command injection is possible.
Add a second reader. capabilities_via_model shows a model the findings and the
nine-name vocabulary and asks what the tester can now do that they could not
before, with the distinction stated: a parameter reported vulnerable to
command injection is not rce, a command whose output is in the evidence is.
The two are unioned, never substituted. Only names from CAPABILITIES survive —
anything the model invents is dropped — and a failed or refused call leaves
the keyword result standing, so the read can only widen what was already
derived. Off with NEUROSPLOIT_CAPABILITY_READ=off, and skipped once the USD
budget is in wrap-up, since it is one call per round.
Fixes a latent bug the new tests surfaced: SkillMeta derived Default, giving
max_rounds 0, while the field's serde default is 2. The key-value frontmatter
parser starts from Default::default() and fills in only the keys a file names,
and route drops any skill that has reached its max_rounds — so a skill whose
frontmatter omitted the key loaded with 0 and was silently unroutable. No
shipped skill omits it, so nothing was broken in practice, but the next one
written would have been. Default is now written by hand to agree with serde.
Five tests: that only vocabulary names survive the filter, that an unusable
reply cannot narrow the keyword result, that route uses supplied capabilities
rather than re-deriving them, that frontmatter without max_rounds is still
routable, and that the two defaults cannot drift apart again.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Chaining ran entirely off `chains:` — skill A names skill B. That is a fixed
graph, so it only carries escalation paths somebody wrote down in advance. A
credential recovered by a skill nobody thought to draw an edge from reached
nothing, and the loop stopped at the end of whatever path was drawn.
extract_intel already mined credentials, secrets, internal hosts and endpoints
out of findings, but only to append as text to the recon context, where it
fired a skill solely if one happened to carry a matching trigger. The CWE
match was worth 5, under the 15 gate, so it could never promote anything on
its own.
Add a `consumes` field over a closed vocabulary of nine capabilities, and
derive from each finding what it actually yielded. Derivation reads the
finding's own fields and prose, not its agent's name, so a credential counts
the same whether default_credentials or sqli_union turned it up. A match is
worth 20, enough to clear the gate alone, because the point is that an
unforeseen path can start a round by itself.
72 skills declare what they consume. On a UNION SQLi yielding credentials, admin
access and an internal host, round 2 now reaches cloud_iam_privesc,
container_escape and exposed_admin_panel — none of which sqli_union names.
Five tests, three on the catalogue on disk: that a credential from a skill
declaring no chains at all still reaches credential-consuming skills, that a
disclosed internal host does the same, that a capability match clears the
round gate, that an empty finding set mints nothing so the anti-flooding
guarantee holds, and that every declared capability is one the deriver can
actually produce.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
173 more skills, 218 chain edges: API and GraphQL surface, auth and session,
client-side, request smuggling and caching, exposure and misconfiguration,
IIS and ASP.NET, supply chain, business logic and payments, Kubernetes and
container runtime, and the LLM skills under vulns/.
Cloud and Kubernetes skills take the modes that reach that surface rather than
web alone, so a host engagement that lands on a kubelet can follow it.
Some carry chains but no triggers: poc_developer, cve_poc_finder,
cve_exploit_scripter, cve_research_analyst, postgres_superuser_rce,
clickjacking_poc, csrf_poc. They elaborate a finding that already exists —
selecting them off recon would have them write a proof for a vulnerability
nobody confirmed, or attempt RCE with no injection in hand.
The generator's stoplist rejected five triggers too common to discriminate:
'header', 'log', 'file', 'error', 'model'. Replaced with terms that do.
meta/ (24) and chains/ (22) stay without frontmatter, and a test now pins
that: meta/ is orchestration roles and pipeline utilities, so triggers there
would have the exploration loop launch the reporter as an exploitation agent;
chains/ is recipes attack_chain consumes on its own path, so triggers would
fire the same recipe twice. A second test requires the mode-specific
categories to declare their modes, since a routable skill naming none fires in
every engagement.
The three ai/ copies of names that also live in vulns/ stay bare on purpose:
dedup keeps the copy carrying the metadata, and giving both frontmatter would
make that choice arbitrary.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three skills ship under the same name in two category directories:
llm_system_prompt_leak, llm_jailbreak and llm_excessive_agency each exist in
vulns/ and ai/. Both copies reached the catalogue, so route could pick the
same skill twice, and by_name — built by collect — resolved to whichever came
last. For llm_system_prompt_leak that meant get() returned the bare ai/ copy
while chain_map had been built from the vulns/ copy carrying the frontmatter.
load_catalog now keeps one copy per name, preferring the one that declares
routing metadata and falling back to the higher priority.
Frontmatter for 64 more skills, 108 chain edges. The binary_* skills are
scoped to mobile, host and whitebox rather than mobile alone: they analyse any
compiled artefact, and a host engagement that harvests a Windows binary should
reach them.
The twelve redteam_* skills carry chains but no triggers. They are jailbreak
strategies rather than findings, so recon must not select them directly;
llm_jailbreak chains into them once there is a guardrail worth pushing on.
307 of 530 skills now carry frontmatter.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
load_catalog loads all ten category directories whatever the engagement is,
and route never looked at a skill's category. So giving code_sqli the trigger
"sql" would have launched a source-review agent during a black-box web run
against a target with no source to read, and the AD skills would have fired on
any recon mentioning ldap or smb.
Add a `modes` field. A skill that names its modes runs only in those; one that
names none runs anywhere, which is what the 91 skills from the previous change
rely on. The mode comes from the same string each site already passes to the
coverage ledger.
Frontmatter for 152 more skills, 179 chain edges: recon discovery feeders,
container image scanning, Active Directory, Linux and Windows local privesc,
AWS, GCP and Azure, and the 84 source-review skills scoped to whitebox and
greybox. 243 of 530 now carry it.
Priority was being added unconditionally, so any skill at priority >= 30
scored 15 with nothing matching and cleared the gate on an empty recon. The
field documents itself as ordering skills that are "equally triggered" — a
tiebreaker — so it now applies only once a skill has matched. An anti-flooding
test on meaningless recon caught this.
Six tests on the catalogue on disk: that a web run never picks source-review
or host skills, that whitebox and host runs do reach theirs, that nothing
fires on meaningless recon in any mode, and that every chain edge resolves.
The generator refuses triggers under two characters or on a stoplist of terms
too common to discriminate, which rejected five on the first pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two limits kept the exploration loop from running even once frontmatter made
its skills routable.
skills_ran is seeded with the agents the opening selection already ran, so it
serves two purposes at once: dedup, and the meter for max_total_skills. That
default is 20. Measured across 17 recorded engagements, 7 opened with 20 or
more agents — two with 232 — so next_round returned empty on its first call
and the loop broke before launching anything. Count the skills this loop
launched separately and budget against that; skills_ran keeps doing dedup.
The round guard was off by one. round starts at 1 and the guard read
`round >= max_rounds`, so max_rounds: 3 gave two rounds. Now `round >
max_rounds`, and 3 means 3.
Updates max_rounds_respected, which asserted at round 1 and so encoded the
off-by-one; it now asserts at round 2, keeping its intent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
No shipped agent had frontmatter. Not five, as a `grep '^---'` suggests —
that matches horizontal rules in the body. Zero files begin with it.
That made the exploration loop dead code. `route` scores a skill as
10*(trigger hits) + 0.5*priority + 25 per chain edge from a finding, and
its no-metadata fallback is gated on `round == 0`. The loop starts at
`round = 1`. So every skill scored 0.0, was dropped by the `score > 0.0`
filter, `next_round` returned empty, and the loop hit `break` on its first
iteration — every run, in all six modes.
Add frontmatter to 91 core skills: 207 chain edges across injection, file
access, SSRF and cloud, auth and access control, client-side,
deserialisation, CMS, infra and LLM. Priority is >= 10 throughout, the floor
at which a single trigger hit clears the score >= 15 gate that `next_round`
applies past the first round.
Chains encode the escalation paths the harness is meant to walk on its own:
ssrf to cloud metadata to IAM privesc, sqli to postgres RCE, file_upload to
command_injection, sourcemap_exposure to js analysis to api_key_exposure,
jwt_manipulation to alg confusion to privilege_escalation.
Four tests, three of them against the shipped catalogue on disk: that it
routes at round 1, that a confirmed ssrf finding pulls cloud_metadata_exposure
in by chain, that no chain edge names a skill that does not exist, and a
regression pair pinning the round-1 behaviour that was broken.
439 skills still carry no frontmatter and reach only the round-0 sweep.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The console ran on debian-slim and reached tools by spawning a sibling Kali
container per command, through the mounted docker socket. Build the console
FROM the toolbox image instead: nmap, sqlmap, ffuf, nuclei, impacket, Ghidra
and the rest are on PATH in the same container the harness runs in. A run
set to sandbox "host" now executes tools in place; picking an image in the
UI still spawns an isolated sibling, so isolation stays available.
This makes build order load-bearing — the console image cannot resolve its
base until the toolbox image exists. install.sh builds kali-base first, then
neurosploit. Renamed the service from kali-worker to kali-base to say what it
is now: a base layer, not a worker pool.
Add .dockerignore. The build context was 19GB, 18GB of it neurosploit-rs/
target/, which the builder stage recompiles anyway; runs/ carried engagement
data into the context as well. agents_md/ is explicitly preserved.
Dropped NS_WORKER_IMAGE and NS_SANDBOX from the compose environment: neither
is read anywhere in the harness or the web server. The sandbox image comes
from the per-run --sandbox flag.
Also fixes install.sh printing a literal ${NS_PORT:-8787} in its closing
banner, and makes it wait for the console to answer before declaring success.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Severity cards read 0 for critical/high/medium/low: /api/db/stats is empty
without PostgreSQL and per-run `severities` is unpopulated. Count from
/api/issues, which carries the per-finding severity.
FAIR exposure read $400M most likely / $1.6B max. Two modelling errors:
the same finding reported by several agents was counted once per report,
and thirty criticals on one host were summed as thirty independent
breaches. Collapse duplicates on (title, target), then damp additional
findings per target harmonically — an attacker compromises a host once.
Lands at $89.2M / $362M on the same data.
PR review modal used classes that are not display:block, so labels and
inputs ran inline. Use the field-group / field-label / field-help pattern
the other modals use.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Move dashboardStats into pentests view (was global, polluting all pages)
- Make stats cards reflect actual run data from file storage
- Fix toolbox JSON parsing: separate stdout/stderr in runCli, handle
array JSON in toolsCall (was only matching object patterns)
- Add New PR Review modal with repo/PR input form
- Target table click now switches to pentests view
- Dashboard cards: severity-colored layout with CSS
- Strip redundant Storage card from stats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate pgPool/pgQuery/pgSaveRun/pgCompleteRun/pgGetRuns/pgGetFindings
declarations in server.js (caused SyntaxError at startup)
- Add DATABASE_URL connection string support alongside NS_PG_*/POSTGRES_* env vars
- Add connection test on startup with graceful fallback to file storage
- Fix login.html localStorage key mismatch: getItem('ns-token') → 'ns_token'
to match the key used by setItem and app.js
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hierarchical budget system inspired by ARTEX:
- BudgetLedger: thread-safe per-agent and total cost tracking
- ModelPricing: per-million-token pricing for all major providers
(Anthropic, OpenAI, DeepSeek, Gemini, Qwen, Groq + fallback)
- NEUROSPLOIT_BUDGET_USD env var for max spend enforcement
- wrap_up_mode() at 95% (5% reserve for validation/reporting)
- Cost recording wired into all 4 LLM completion paths
- cost.json persistence to workdir
- Human-readable cost report with top-8 agent breakdown
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track tested endpoints × vulnerability classes to identify attack surface gaps:
- 55+ web vuln classes, 30+ infra, 17 cloud, 20 mobile, 17 binary
- CWE-to-class mapping for 40+ CWE IDs
- Agent name inference when CWE is missing
- Technology-aware filtering (e.g., GraphQL classes only when detected)
- Gap analysis with priority ranking
- Persistence to coverage.json for cross-run accumulation
- Integrated into exploration loop for all modes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major pipeline enhancements:
1. Reusable exploration_loop() function wired into ALL modes:
- run() (web), run_host(), run_greybox(), run_whitebox(),
run_container(), run_mobile()
- Skill-driven chained exploitation with FindingIntel extraction
- Re-recon enrichment: discovered intel feeds back into agent context
2. Deterministic sourcemap harvest:
- Scans JS bundles for .map files after CAG collect
- Extracts secrets (AWS keys, API keys, GitHub PATs, passwords)
- Discovers API endpoints from source code
- Feeds intel into recon context for all agents
3. WAF adaptive bypass:
- Vendor-specific bypass strategies based on probe detection
- Covers Cloudflare, Akamai, AWS WAF, Imperva, ModSecurity,
F5/BIG-IP, Sucuri, Fastly, Azure Front Door
- Injected into shared_block for all exploit agents
4. attack_chain() wired into whitebox, container, mobile modes
(previously only web and host had it)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Transform agent markdown files into skills with structured frontmatter:
- triggers: signal patterns that activate the skill
- chains_from: other skills whose findings trigger this one
- cwes: mapped CWE IDs for coverage tracking
- priority: base priority for skill routing
- max_rounds: execution budget per skill
New skill.rs module:
- SkillCatalog: loads and indexes all skill files
- SkillRouter: scores skills based on recon signals + findings
- FindingIntel: extracts credentials, endpoints, secrets from findings
- ExplorationBudget: configurable round/skill limits via env vars
- next_round(): selects next skills to run based on current findings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Models such as DeepSeek emit DSML, Hermes or JSON action markup instead of
findings JSON, which dropped the agent's work. Parse those dialects, map
shell-style calls onto catalog tools (refusing chaining and redirects), and
run them in scope before asking the model for findings. The agentic loop
accepts the same recovered call as a normal action.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- Playwright Chromium records same-origin XHR/fetch, JS bundles and cookie names
- raw capture saved under traffic/; compact endpoint block injected into recon
- scope/auth/evasion UA honored; 60s timeout kills node + Chromium group
- best-effort with NEUROSPLOIT_BROWSER_RECON=0 opt-out
- replay a safe GET and store the real request/response as evidence
- sourcemap must be served and parse; admin rejects redirect/WAF/SPA/shell;
rate/IDOR without a receipt become leads; generic findings go through judge
- only validated findings are reported; the rest are leads
- default UA is the browser UA under evasion; explicit NEUROSPLOIT_UA still wins
- browser Accept/Accept-Language; scan header stays dropped
- recon curl/katana/nuclei/ffuf carry the same UA
- live catalog no longer re-applies the old/default model after the operator
changed it while the fetch was in flight
- custom provider:model is cleared when it conflicts with the selected provider
- model card, selects and run body stay in sync
- replace GNU grep -P in recon with perl (macOS/BSD)
- pause/continue sets phase running and recognises the CLI's resuming lines
- runs open in a new tab via ?run=<id>, Ctrl/Cmd/middle-click or the new link