`neurosploit provider add` has taken a full profile for a while — base URL,
wire format, proxy, session header, user agent, rate limits, context window and
per-million-token prices. The console never caught up: Settings offered a key
box against a fixed provider list, so registering a gateway meant dropping to a
terminal, which is the opposite of the point.
Every field the CLI accepts is now in Settings. Reads go straight to
.neurosploit/custom_providers.json — the registry the harness itself reads —
and writes go through `neurosploit provider`, so the CLI keeps owning
validation, the built-in-name collision check and the merge-don't-replace
semantics. Reimplementing those in JavaScript is how the two drift apart.
A registered provider is now listed by /api/providers and serves its model
list, so it is selectable everywhere a model is chosen rather than only working
if you happen to type `name:model`. That was the actual ask: register once,
use everywhere.
Four more knobs the launcher has always accepted and only the wizard could
set, one run at a time: the fallback model chain (which also enables voting on
a disputed finding), the reasoning budget, the token ceiling and temperature.
They are defaults now, and they only pre-fill — a default that overwrites what
the operator already typed is worse than no default.
Two things found while wiring it. Verifying a key calls the operator's own
gateway, and runCli had no timeout, so a host that never answers would hang the
HTTP request; runCli takes an optional bound and the key check uses 30s, with a
rejected key leaving the provider registered rather than losing it. And CLI
errors reached the UI with the binary's `[auto] …` banner glued to the front,
burying the one line that says what went wrong.
Verified against the running console: registered a provider with proxy, rate
limit, context and prices; confirmed it appears in /api/providers and its
models endpoint; confirmed `provider show` reports the same record; confirmed
editing one field leaves base URL, models, proxy, prices and context intact;
confirmed the rejections — shadowing a built-in, a path-traversal name, a
cross-origin POST and a negative rate — all hold.
Co-authored-by: Joas A Santos <34966120+CyberSecurityUP@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* feat(chat): tools through the toolbox, and citations the server checks
The chat read the engagement and answered from it. Three things were wrong
with that, and the first is mine.
Records went into the prompt unguarded. A finding's evidence is a copy of what
a TARGET sent us, so pasting it raw hands the target a turn at writing our
instructions. ARTEX fences its mention snapshots; we did not. Every record is
now fenced and prefaced as data, and every field is bounded, so neither a long
response body nor a crafted one steers the answer.
Nothing checked the answer. This harness has already produced a Critical whose
proof was `{"token":"eyJ..."}` — a placeholder, an attack described rather than
run. The model now cites [run:ID] and [finding:ID#N], and the server resolves
each citation against the files on disk before the answer is final. An
unresolved citation is reported with a reason, because two failures look alike
and are not: a record that exists but was not attached means the model is
reciting, and one that exists nowhere means it is inventing. Evidence carrying
placeholder tokens is flagged to the model as described, not demonstrated.
The chat could not act. It now runs real tools through agentic_tools, which
means through toolbox::run — so the scope built from the run's own target, the
operator's constraints, the sandbox and toolbox-audit.jsonl all apply. The
chat gets no path to the network an agent does not have. Tools need an
attached run because the run's target is the only thing that authorises a
packet; with none, it reads only.
Two defects found by running it against a live target rather than reasoning
about it: the catalog was missing, so the model invented tool ids (`http_get`,
`exec`) and burned the budget being told they do not exist — the same failure
visible in today's reactive run; and a loop that stopped early returned its raw
transcript as the answer. It now synthesises from what the tools actually
returned, and says plainly when they established nothing.
Verified against runs/ns-1787519539-testaspnet_vulnweb_com: 28 citations, all
resolved, validated and unvalidated findings correctly separated. A forced
answer citing one real-but-unattached run and one fictional run classified both
correctly. Against evidelo the loop held scope (evidelo.com.br), chose real
catalog tools, and — with the host missing the binaries — reported that it
could not fetch robots.txt rather than reciting paths it had in context.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* feat(console): give every view an address
The console was one page that answered to one URL. Clicking Chat and clicking
Findings left you at `/`, so you could not bookmark a view, send a colleague
the findings list, reload without being thrown back to home, or use the back
button for anything but leaving the app.
Each view now has a real path (/dashboard, /chat, /findings, /assets/…), kept
in step with history: a click pushes, boot and openRun replace, and popstate
switches without writing back so the back button is not fought. The server
serves index.html for extensionless paths, and the app reads the path on boot
and opens that view. A request for a missing file still 404s — an extension
means an asset.
Separate pages would have given the same addresses and cost a refactor of an
11k-line app.js, plus a reconnect of the four SSE streams on every navigation,
which is the one thing this console must not drop. Splitting is worth doing
later as ES modules behind one page, not as separate pages.
Two things that would have broken on a nested route: the favicon was the only
relative asset path, so /assets/networks asked for /assets/logo.svg; and the
auth gate only covered '/', so the new fallback would have served the console
shell to an unauthenticated request for /chat. Both fixed here — the gate now
covers anything that resolves to the shell.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Joas A Santos <34966120+CyberSecurityUP@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Backend: conversations persist under .neurosploit/chats, /api/chat/:id/send
drives `neurosploit chat` and relays its JSON lines over SSE. The first
message names the conversation, because a list of "New conversation" stops
being usable at about two.
Frontend: conversation list, message stream, model picker over the providers
that actually have a key, and an @ picker.
The @ picker is the point. It offers runs, targets and a findings search, and
those resolve server-side out of runs/ before the model sees anything — so an
answer quotes a finding that exists rather than describing the class of thing
it might be. Verified: asked how many findings a run had and at what severity,
it answered "2 findings, both Low", which is what that run holds.
What the resolver could NOT resolve is rendered in the answer's footer. A
reference that silently vanishes reads as the model not knowing, when it was
never told — and that is the failure an operator would misread as the target
being clean.
Answers render through a small markdown pass that escapes first, so a
finding's evidence cannot inject markup into the console.
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>
- 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
- the saved model can exist only in the live /models list, not the seed
list; the select fell back to the first model and Save persisted it
- Settings and the wizard now re-select the saved/preferred model after the
live catalog replaces the options
- OrcaRouter (api.orcarouter.ai/v1, ORCAROUTER_API_KEY): registry,
sk-orca- prefix detection, auto-config, web catalog + key verify
- Settings > Defaults: provider -> model, listing only usable providers,
with the live model catalog
- PoC re-validation and OPSEC evasion default on; sandbox defaults to Auto
(Kali if available)
- unchecking a default or picking "This host" sends the matching
NEUROSPLOIT_NO_* opt-out so the front-end choice wins
- wire --evasion into run/session args; drop the duplicate More options toggle
- autoconfig enables reactive (Black), models, tools, MCP, economy, PoC
re-validation, OPSEC evasion and an already-present Kali sandbox, each
with a NEUROSPLOIT_NO_* opt-out; authorization/safety stays explicit
- CVE lookup folded into pipeline/reactive recon (no separate cve command)
- AD/privesc recipes injected into agent prompts from run facts
- web: live model catalog for every provider plus a custom model id, and
OpenRouter model ids fixed
- activity store: append-only per-step log under <run>/activity with cross-worker
search/list/get and a prompt block (Artex-style process-level exchange)
- wire reactive workers to record tool steps and model observations by intent
- --worker-tools: bounded agentic tool loop per reactive worker (opt-in, off by
default) with a shared ToolBudget (calls/rounds/concurrency), priority-weighted
rounds, and cross-worker dedupe that reuses identical command output
- CLI + web /api/runs/:id/{activity,todolist} and a new
Workers tab (planner todolist + worker tape)
- no behavior change when the flag is off
Credential testing (credtest.rs) now covers tokens/API keys from a sourcemap
or .env leak (new "bearer" service, probed against common API paths) and
password logins to a web form (new "http-form" service, differential
Set-Cookie/error-text check) alongside the existing ssh/smb/winrm/http-basic
probes — a secret found by a whitebox/blackbox agent that previously had no
matching service now actually gets tried.
New privesc.rs: after credtest verifies an ssh/winrm foothold, runs the
standard enumeration (sudo -l, SUID/capabilities/cron on Linux; whoami /priv
and group membership on Windows) over that SAME session. NOPASSWD sudo and
local-admin-group membership are auto-confirmed and reported as verified
root/administrator access; SUID GTFOBins hits and SeImpersonate/
SeAssignPrimaryToken become cited hypotheses for the next round, not a
command the model has to invent from raw text. Wired into attack_chain right
after the existing credtest block.
New svc_probe.rs: run_host now runs nmap -sV deterministically against every
infra/network/AD/host target (not left to the model remembering to ask for
it), parses open ports/services/versions, runs a fixed read-only enrichment
probe per service (SNMP/LDAP/SMB/SQL/Redis/Mongo/NFS/RPC/VNC/FTP/Elastic/
Docker-API/WinRM/Kerberos), and looks each service+version up in the local
searchsploit mirror for candidate CVEs/exploits — "found a port, validated
the version, checked for a known exploit" now happens every run.
Web console: the "Host/Infra" tile is joined by separate Network and Active
Directory tiles (so an operator without a domain stops getting AD-only
agents), a new Mobile/Binary tile with a file-upload field wired to the
existing /api/upload endpoint and the CLI's --platform flag, and buildArgs
now forwards --platform for mobile runs. This finishes the mode/upload work
server.js already had in progress from the previous PR.
760 tests passing; release build clean.
- API: per-finding re-validate now POSTs /retest (was a 404 /poc/:fid);
snapshot lifecycle uses phase/interrupted; run timestamps use ts.
- Wiring: recreate Neo4j graph button, drop dead listeners, re-run
restores mode via selectMode, modals close on Esc/outside click.
- Security: JS-string-safe inline handlers (jsq), escape WAF/chains/todo
fields that were injected raw.
- Robustness: boot survives a failing endpoint, SSE frames parsed
defensively, guarded currentJob, loadDetail/dashboard/stop errors.
- Terminal: swallow unknown CSI sequences, fix clear/complete cursor.
- Projects: collapse duplicate runs, targets on their own line.
- Runs: expose launch mode (whitebox no longer shown as blackbox).
- Attack graph: merge run findings missing from graph.json, warn to
recompute; normalized confidence and review-status across views.
- Report nav: replace dead report anchors with real HTML/PDF/MD links
plus in-app Findings/Attack graph shortcuts.
- Attack-graph finding panel now falls back to the finding's real fields
(payload, evidence, impact, remediation, endpoint) when the derived
where/what/fix texts are empty — host/AD findings were selecting but
showing no detail. Adds PAYLOAD/COMMAND and EVIDENCE (what was done)
blocks so each step shows the exact command and observed proof.
- tryResumeActiveJob only re-attaches a job that is still running; a
finished/stopped/interrupted job no longer hijacks every page reload
onto its stale live screen.
Engine:
- host mode now applies --session-in-scope/-environment/-policy via
apply_authorization; previously parsed but ignored, so the scope guard
admitted only the single target and every pivot host (other subnets /
forests) was treated as out-of-scope.
- AUTHORIZATION_PREAMBLE rewritten: drop the judgment-suppressing lines
("not yours to re-litigate", "do not stop claiming authorization is
unverifiable") that read as coercion and triggered recon refusals;
state the engagement facts and keep the agent's own judgment.
- VOTE_SYS / REFUTE_SYS made modality-aware: command+nonce output (SSH,
WinRM, SMB, MSSQL, DCSync, nxc Pwn3d!) counts as concrete proof, not
only HTTP request/response. Privesc-to-root/SYSTEM/DA, RCE, credential
dumping and auth bypass are High/Critical when the evidence proves them.
Web validation unchanged (still requires concrete proof).
Web console:
- run history: a CLI-launched run (not owned by a console job) stays
"running" while its run dir shows a recent audit.jsonl heartbeat,
instead of being falsely shown as interrupted.
- attack graph: barycenter ordering so connected nodes align across
columns and edges read as clean left-to-right chains, not a crossing grid.
- chains tab: clamp overflowing move/ref/title text so long chain strings
and native tooltips no longer spill off-screen.
DeepSeek API only accepts deepseek-v4-pro and deepseek-flash.
Previous names (deepseek-r2, deepseek-v4.1, deepseek-v4) returned
400 Bad Request, causing all agents to fail silently.
Also wires Settings default model into New Engagement wizard so
the provider/model pre-selects when creating a new run.
- Replace free-text model input with grouped select dropdown (19 providers)
- Add DeepSeek R2/V4/V4.1/V4 Pro models to provider registry
- Persist API keys to disk (~/.neurosploit/keys.json, mode 0600) with load on startup
- Add key verification for 13 cloud providers (keyProbe)
- Fix broken select dropdowns in dark mode (remove appearance:none)
- Wire --agent-tools flag into every web-launched test for 200+ toolbox tools
C2 framework: local daemon with HTTP listener, session management, task
dispatch, beacon protocol. WebShell support for persistent access through
web endpoints. Full CLI surface (neurosploit c2/webshell), MCP tools, REPL
commands, and web console integration with real-time session monitoring.
Toolbox: 200+ real security tools catalog (nmap, ffuf, sqlmap, nuclei, etc.)
with structured output parsing, MCP tool server integration, and auto-install.
Runner executes tools with timeout, audit trail, and output capture. Catalog
is data-driven via tools/toolbox.json.
MCP: expanded tool surface for C2 sessions, task management, webshell
operations, and toolbox execution. All tools share one implementation with
CLI, REPL, and web console.
Web UI: C2 dashboard with session cards, task panels, webshell terminal.
Toolbox browser with search, run modal, and output viewer. API endpoints
for all operations.
Pipeline: toolbox integration for auto-running tools during engagements
when autonomy level permits.
0 build errors, test suite passes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reactive engine (--reactive): event-driven planner/worker loop replaces fixed
phases. Planner wakes on graph changes, workers claim intents from shared queue.
Includes heartbeat lease for worker liveness, intelligent reason trigger (skip
replan when graph unchanged), hint injection for operator-in-the-loop, and
session resume/conclude fallback to salvage partial work on failure.
Graph reasoning: BFS chain discovery from confirmed findings to untested assets,
LLM-driven strategy decisions, graph enrichment after findings. Wired into
planner loop (chain discovery when idle) and worker loop (enrich neighbors).
Knowledge base: agent markdowns as searchable methodology repository. Keyword
overlap scoring with CWE bonus. Dynamically injected into worker prompts per
task for context-aware testing guidance.
MCP profiles: pre-configured tool sets per test type (Web/Playwright,
MobileAndroid/REA, MobileIos/REA, BinaryAnalysis/REA, BurpSuite). Auto-register
via --mcp-profile flag. Tool allowlists and prompt context per profile.
CLI: --reactive, --mcp-profile, --autonomy flags. Web UI: wizard fields for
autonomy/MCP profile/reactive toggle, Reactive Engine info modal with feature
grid, MCP Profile modal with tool cards, Settings page reactive config card.
604 tests pass, 0 errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pipeline: keep ALL candidate findings after validation instead of
discarding vote-rejected ones. Rejected findings are marked with
review_status="rejected" so the UI can distinguish them visually.
Previously 11 findings during a run would shrink to 2 after validation
— now all 13 appear with their status clearly indicated.
Web console: implement working search/filter for Pentests list
(#pentestSearch) and Issues page (#issuesSearch, severity dropdown,
status dropdown). Previously the search inputs existed in HTML but had
no event listeners — typing in them did nothing.
Adds a "Re-run" button to the run detail view that opens the wizard
pre-populated with the previous run's settings (target, model, votes,
chain depth, recon, max agents, mode flags). Server now includes
launch params in the detail API response by looking up the persisted
job file. Previous findings and reports are preserved (new run ID).
- Remove filter that dropped terminal AttackStep nodes, which caused
the graph to show only isolated Finding nodes
- Rewrite hostOf to use OBSERVED_IN edges (Finding -> Endpoint) and
climb structural edges (HAS_ENDPOINT, EXPOSES, HAS_ASSET) to reach
host/asset nodes
- Hide all views (including pentestsView) when navigating to live/detail
- Scroll to top on all view transitions
- Treat all-agents-selected same as none (let recon decide)
- attachLiveJob now hides ALL views (including pentestsView) before
showing liveView, fixing the detail appearing below the pentests list
- Scroll to top on all view transitions (detail, live, fallback)
- When all agents are selected, treat as none selected so recon decides
which agents to run instead of pinning all 300+ agents
Add Max Agents input to Run Settings section in wizard. Wire maxAgents
through POST body, sanitizeLaunch, buildArgs (CLI), and buildReplScript
(REPL /agents command). Also pass --quick and --research as CLI flags
in buildArgs for modes that support them (run/whitebox/greybox).
Include needs-review in severity counts in report template and rename
KPI card from "Confirmed" to "Validated" combining both confirmed and
needs-review statuses.