Usage & REST API
CLI
noctis serve --host 0.0.0.0 --port 8080 # start the REST daemon
noctis -v serve ... # INFO logging
noctis -vv serve ... # DEBUG logging
noctis feeds update # install the feed set of this binary's release
noctis feeds path # print the feeds directory
Feeds directory
The engine and the detection feeds ship separately: cargo install noctis installs the engine,
and noctis feeds update downloads the feed set attached to the matching GitHub Release
(noctis-feeds.tar.gz), checks its sha256 and installs it into the feeds directory. It replaces
vulnerabilities/ and common/ and leaves other entries alone, so your own feeds can live next
to them (e.g. in custom/). The directory is, in order: --feeds-dir, the NOCTIS_FEEDS_DIR environment
variable, $XDG_DATA_HOME/noctis/feeds, then ~/.local/share/noctis/feeds
(%LOCALAPPDATA%\noctis\feeds on Windows). The Docker image sets it to /feeds; there,
update the feeds by pulling a newer image tag.
noctis feeds update --tag latest # the newest release instead of this binary's
noctis feeds update --tag v0.5.0 # a given release
noctis feeds update --archive noctis-feeds.tar.gz # offline: an archive already on disk
By default update takes the release matching the binary’s own version, because a feed can
rely on engine features added in that release. With --archive, the digest is checked against
noctis-feeds.tar.gz.sha256 when that file sits next to the archive.
serve resolves a relative entry of a scan request’s tests against the working directory
first, then against the feeds directory, so "tests": ["vulnerabilities/"] runs the installed
set from anywhere. Absolute paths are used as given.
Out-of-band (blind) detections
Some detections (Log4Shell, SSRF, XXE) confirm a vulnerability through a callback to a server you control. Enable the built-in OOB server:
noctis serve --oob --oob-host <public-ip> --oob-port 9090
Feeds then use wait_oob and the {{oob_url}} / {{oob_token}} variables. When OOB is not
configured, OOB steps are skipped.
The OOB port answers both HTTP and LDAP: a connection whose first byte is a BER SEQUENCE
(0x30) is served as LDAP, so a JNDI lookup such as ${jndi:ldap://<oob-host>:<oob-port>/<token>}
(Log4Shell) is recorded when the target sends its search on the token DN. The bind is accepted
and every search gets an empty result, so the target never loads anything. Open the OOB port to
the targets over TCP; LDAPS (ldaps://) is not supported.
REST API
| Method | Route | Description |
|---|---|---|
GET |
/health |
Health check |
POST |
/scans |
Submit a scan |
GET |
/scans |
List scans |
GET |
/scans/{id} |
Scan status |
DELETE |
/scans/{id} |
Cancel a scan |
GET |
/scans/{id}/findings |
Findings for a scan |
POST /scans
{
"host": "10.0.0.1",
"services": [
{ "port": 80, "service": "http", "protocol": "tcp" },
{ "port": 443, "service": "https", "protocol": "tcp" }
],
"tests": ["vulnerabilities/"],
"concurrency": 10
}
| Field | Description |
|---|---|
host |
Target IP or hostname (required) |
services |
Discovered services — port, service (nmap name), protocol (default tcp). At least one required |
tests |
One or more feed files or directories to run |
concurrency |
Parallel tasks, 1–100 (default 5) |
webhook_url |
(optional) URL notified when the scan completes |
filters |
(optional) exclude by exclude_uids, exclude_cve, exclude_categories, exclude_tags. Categories are a closed list — e.g. hardening (TLS / headers / legacy protocols), default-credentials (login attempts), exposure; see categories |
oob |
(optional) enabled, host, port — per-scan OOB callback server |
credentials |
(optional) username, password, token for authenticated feeds — see below |
Authenticated scans
"credentials": { "username": "admin", "password": "s3cr3t" }
All three fields are optional, but at least one of username / token must be set and a
password needs a username; an empty username or token is rejected with 422. Feeds read them as
{{cred_username}}, {{cred_password}}, {{cred_token}} and test {{cred_enabled}}. A feed
marked requires_credentials: true is skipped when no credentials are sent.
Credentials are write-only. They never appear in
GET /scans, webhook payloads orDebugoutput, and password / token values are replaced by<redacted>in findings and engine logs, including their lowercase hex and percent-encoded forms and the Basic-auth base64 ofusername:password. Other encodings a feed builds itself are not recognised. A secret under 8 bytes (a default password such asadmin) is masked only as a whole token, soadministratorstays readable.
Findings
Each finding carries the CVE id(s) (possibly empty for a misconfiguration), a severity, a
confidence in [0,1], a QoD score, and evidence.
Confidence is
confidence_base + confidence_delta, clamped to[0, 1]. The QoD reflects how the detection was proven — see Writing feeds.
Performance
At the default concurrency (5) with a 10 s step timeout, a scan of about 50 services against
the full feed set runs thousands of tasks. Rough wall-clock times:
| Concurrency | Local network | Remote / WAN |
|---|---|---|
| 5 (default) | 10–20 min | 20–40 min |
| 20 | 3–6 min | 8–15 min |
| 50 | 1–3 min | 3–8 min |
Most of the time goes to step timeouts against services that don’t answer the way a feed
expects. Raise concurrency (up to 100) and narrow tests to the products you run to speed up
large scans.