Red:
- csrf_audit: fetch one page, list its forms (action, method, input count) and
flag forms without an input whose name contains csrf, token or nonce; the
page is evidence.
Blue:
- kernel_hardening: 12 sysctls (ASLR, kptr_restrict, dmesg_restrict,
perf_event_paranoid, unprivileged_bpf_disabled, ptrace_scope,
protected_hardlinks/symlinks, suid_dumpable, modules_disabled,
bpf_jit_harden) plus core_pattern, scored with per-check findings; optional
root prefix.
- sudoers_audit: /etc/sudoers and /etc/sudoers.d, flagging NOPASSWD,
!authenticate, broad ALL=(ALL), direct user rules and world-writable files.
- auditd_audit: event type counts, AVC denials, failed auth, top exe paths and
keys from an auditd log under /var/log or the state directory.
Fixed evidence ordering: sort by mtime and nanoseconds before the filename, so
two blobs written in the same second no longer flip (a flake the coverage build
exposed).
Tests with a sysctl tree, a sudoers tree, a two-form page and an auditd log.
663 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.17.0.
Red:
- snmp_walk: GETNEXT over 1.3.6.1.2.1.1 for up to 30 steps, decoding the
returned OID and value (string, integer, timeticks, counter, IP, OID).
- ldap_search: anonymous bind, namingContexts resolved from the rootDSE when no
base is given, then one subtree search (scope 2, size limit 20) for
present(objectClass); collects DNs with cn/uid/mail.
- openapi_discovery: six usual spec paths; version, info title and path count,
document saved as evidence.
Blue:
- systemd_audit: unit files under /etc/systemd/system and
/usr/lib/systemd/system (root prefix supported): ExecStart in /tmp,
/dev/shm or /var/tmp, services without User=, world-writable unit files and
the number of .wants/.requires links.
Tests: a UDP SNMP agent returning a GETNEXT chain, an LDAP server with rootDSE
plus two subtree entries, an OpenAPI endpoint and a systemd tree. 649 checks,
ASan suite green, analyze clean, release-check green including distcheck
1.16.0.
Two parser bugs the fixtures caught: the system OID prefix is 14 characters
(not 15), and the rootDSE response's searchResultDone must be drained before
reading the subtree answer.
Red:
- http_methods: OPTIONS Allow list and Server header, TRACE echo detection.
PUT/DELETE are named if Allow advertises them but never sent.
- websocket_probe: GET with Upgrade/Connection and a random Sec-WebSocket-Key;
reports 101, Upgrade, Connection and Sec-WebSocket-Accept. No frame.
- ike_probe: one IKEv2 IKE_SA_INIT with an SA proposal (AES-CBC-128,
HMAC-SHA2-256, DH group 14) over UDP; version, exchange, first notify and
responder SPI. No PSK, no authentication.
Blue:
- firewall_audit: nft list ruleset or iptables-save (or a saved dump), chain
and rule counts and every chain whose default policy is ACCEPT. Local process
only (LOCAL_EXEC exception in the gate audit).
Tests: HTTP server for OPTIONS/TRACE/101 upgrade, a UDP IKEv2 agent answering
NO_PROPOSAL_CHOSEN with a responder SPI, and nft/iptables-save ruleset dumps.
639 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.15.0.
ESP32 offline (tools_esp.c):
- esp_partition_table: parse the 32-byte entries at 0x8000 (magic 0xAA50),
type/subtype names, offset, size, flags and the MD5 entry.
- esp_nvs_parse: NVS pages (version byte 0xFE), namespace records (type 0x01,
nsIndex 0) and key records with namespace, type and span.
- firmware_scan: signatures (ESP app header 0xE9, partition table, NVS page,
littlefs/spiffs/FAT32, PEM), 4 KiB block entropy with integer-only log2 and
printable strings with samples. All read local dumps with size caps.
Blue:
- mount_audit: parses a mount table and flags /tmp, /var/tmp and /dev/shm
without nosuid/nodev/noexec and /home, /run/user, /media, /mnt without
nosuid/nodev, with the missing option list and severity.
Tests with locally built binary fixtures: a partition dump with two entries and
an MD5 record, an NVS page with one namespace and two keys, a firmware image
with all four signatures plus a random high-entropy block, and a mount table
with hardened and unhardened entries. 627 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.14.0.
Red:
- pop3_probe: banner, CAPA capability list with the STLS flag, then QUIT.
No USER/PASS and no login.
- sip_probe: one UDP OPTIONS with generated Via/From/To/Call-ID, then status
line, Server header and Allow method list from the answer.
- telnet_probe: reads the banner and decodes IAC WILL/WONT/DO/DONT option
negotiations (subnegotiations skipped); sends nothing.
Blue:
- package_integrity: runs dpkg -V (optionally for one package) or rpm -Va/-V,
parses changed files with their status flags, and can parse a saved verify
output from a mounted image instead. Local process only, covered by the
gate audit's LOCAL_EXEC exception.
Tests: POP3 with TOP/STLS/SASL, a UDP SIP agent answering 200 with
Server/Allow, a Telnet server sending IAC DO/WILL plus banner text, a saved
dpkg verify output, and a live dpkg -V bash run. 615 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.13.0.
Red:
- docker_api_probe: /version and /containers/json?all=1 without credentials;
engine/API version, OS, container and running counts, names and images. An
open API is audited, 401/403 is reported as protected, version reply saved.
- elasticsearch_probe: GET /, /_cluster/health and /_cat/indices without
credentials; cluster name, version, tagline, health, nodes and index count;
401/403 is reported as protected.
- imap_probe: banner, CAPABILITY list, STARTTLS and LOGINDISABLED flags, then
LOGOUT. No LOGIN, plain IMAP only.
Blue:
- module_audit: reads /proc/modules, /sys/module/<name>/taint and
/proc/sys/kernel/tainted, decodes the taint bits and lists tainted modules;
the three paths can point at a mounted image.
The tool table grows to 128 slots so the next tools fit.
Tests: Docker open and 401, Elasticsearch root/health/indices, IMAP with
STARTTLS+LOGINDISABLED, and a fake module tree with two tainted modules and
taint value 12289. 605 checks, ASan suite green, analyze clean, release-check
green including distcheck 1.12.0.
Red:
- vnc_probe: reads the RFB version, echoes it, then reads the security types
(3.7/3.8 list or 3.3 single type), names them and flags None authentication
(audited). A zero-length list reports the server's reason. No authentication.
- mqtt_probe: one MQTT 3.1.1 CONNECT with a clean session and no username or
password; reads the CONNACK code, disconnects, reports an anonymous broker
(code 0) or the refusal reason.
- graphql_probe: POSTs a compact introspection query and reports whether the
schema is exposed, the type count, query/mutation type names and a reason
when introspection is disabled or the endpoint is missing; evidence on hit.
Blue:
- cap_baseline: create/verify a baseline of Linux file capabilities
(security.capability xattr) under the same paths as suid_baseline, reporting
new, gone and changed capability sets; optional root prefix.
Tests: RFB 3.8 with None+VNC auth, RFB 3.3, a zero-security-type server, MQTT
brokers answering 0 and 5, GraphQL endpoints with a schema, disabled
introspection and a 404, and a capability tree (real caps need CAP_SETFCAP, so
the diff is exercised with a fabricated baseline entry). 593 checks, ASan suite
green, analyze clean, release-check green including distcheck 1.11.0.
Red:
- rdp_probe: X.224 Connection Request with an RDP negotiation request for
TLS|CredSSP (0x0f). Parses the Connection Confirm for the selected protocol
(RDP, TLS, CredSSP, RDSTLS, HYBRID_EX) or the failure code, and reports
whether NLA is in use. One connection, no logon.
- smb_probe: SMB2 NEGOTIATE offering 2.0.2, 2.1, 3.0, 3.0.2 and 3.1.1, then
reports dialect, signing required/enabled, capabilities, max transact/read/
write and the server GUID; an SMB1 answer is reported as such. No session
and no authentication.
Blue:
- suid_baseline: create/verify a SHA-256 manifest of SUID/SGID files under
/usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin, /bin and /sbin
(symlinked directories skipped). Verify reports planted, removed and
mode/hash-changed setuid binaries; optional root prefix for a mounted image.
Tests: RDP frames selecting CredSSP and a negotiation failure, an SMB2 server
answering 3.1.1 with signing and a fixed GUID, and a SUID tree where one file is
planted, one removed and two change. 579 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.10.0.
The SUID fixture documents a kernel behaviour: writing to a setuid file clears
the setuid bit, so a rewritten binary appears as gone unless the mode is set
again.
Red:
- ssti_probe: five template payloads ({{1337*7}}, ${1337*7}, #{1337*7},
<%= 1337*7 %>, {{1337*'7'}}) with expected outputs, after a baseline request
clears pages that already contain the numbers. Reports evaluation with the
likely engine, reflection or template errors; GET query or POST form;
evaluations saved as evidence.
- xxe_probe: XML with a DOCTYPE external entity pointing at a loopback listener
this process opens, in element and attribute form (optionally wrapped in a
form field). A callback proves the parser resolved it; parser error
signatures are reported too.
- ldap_probe: LDAPv3 anonymous simple bind, then a rootDSE search (baseObject
'', scope base, present(objectClass)); reports namingContexts, vendorName,
supportedLDAPVersion and the other attributes; an accepted anonymous bind is
audited.
Blue:
- ssh_key_audit: authorized_keys under /etc/ssh, /root/.ssh, /home/*/.ssh and
the state dir, plus private keys (id_* and /etc/ssh/ssh_host_*_key). Flags
unrestricted entries, ssh-rsa/ssh-dss, duplicate keys and private keys
readable beyond their owner; optional root prefix for a mounted image.
Tests: a template engine that evaluates Jinja and EL payloads, an XML endpoint
that fetches the external entity, LDAP servers that accept and reject the
anonymous bind with a rootDSE, and an SSH key tree with restricted,
unrestricted, duplicate and weak keys plus three private-key modes. 569 checks,
ASan suite green, analyze clean, release-check green including distcheck 1.9.0.
The LDAP bind parser had to be structural: the result code is an enum TLV
(0a 01 code), not three raw bytes after the protocol-op tag.
Red (tools_red.c):
- param_fuzz: three benign probes per parameter (unique marker, single quote,
{{1337*7}}) through GET query or POST form; reports marker reflection, SQL
error strings, stack traces, template errors and template evaluation (9359).
10 parameters per call, 100 ms apart, hits saved as evidence. It proves
handling signals, it does not extract data.
- open_redirect: sends an external marker URL and a protocol-relative variant
through one parameter and checks the Location header or a meta refresh for
the marker host, with evidence.
- host_header_injection: sends a .invalid canary as Host (plain HTTP) and as
X-Forwarded-Host and reports reflection in body or Location against the
baseline status/size.
Blue (tools_blue.c):
- net_baseline: create/verify a JSONL baseline of listening TCP ports with the
owning process name (/proc/net/tcp{,6} and /proc/<pid>/fd), reporting new,
gone and process-changed ports.
Tests with a local web fixture (reflecting endpoint, SQL error on quote,
template evaluation, redirect, Host echo, static pages) and a real
socket-open/socket-close pair around the port baseline. 553 checks, ASan suite
green, analyze clean, release-check green including distcheck 1.8.0.
New tools_db.c module:
- mysql_probe reads the initial handshake (protocol/server version, thread id,
auth plugin, capability flags for TLS, secure connection and plugin auth).
No credentials are sent.
- postgres_probe asks with a separate SSLRequest whether SSL is offered, then
sends one StartupMessage as user postgres and reports trust, cleartext, md5,
SCRAM (with mechanism) or rejected (with the server message). A trust answer
is audited; no password is sent.
- mongo_probe sends a legacy OP_QUERY isMaster to admin.$cmd with a hand-built
BSON document and parses the OP_REPLY for ok, maxWireVersion, writable
primary and a version string.
- memcached_probe sends one stats command and reports open access, version,
connections, items, memory limit and uptime.
Socket helpers apex_net_write/line/exact are exported from tools_proto.c.
Tests with local fixtures: MySQL handshake with caching_sha2_password,
PostgreSQL trust, md5, SCRAM and pg_hba rejection including an SSL-refused
server, a MongoDB OP_REPLY, and memcached stats plus an ERROR answer. 537
checks, ASan suite green, analyze clean, release-check green including
distcheck 1.7.0.
Red, deep service checks (tools_proto.c):
- tls_audit: four openssl s_client probes (TLS 1.0/1.1/1.2/1.3) plus a
-showcerts run, then openssl x509 for subject, issuer, validity and DNS SANs.
Flags TLS 1.0/1.1 and RC4/3DES/NULL/EXPORT/MD5 ciphers. A failed handshake
also prints a session block, so success is keyed on 'New, ..., Cipher is ...'
and (NONE) counts as failure.
- redis_probe: PING on one connection; when it answers without AUTH, INFO and
DBSIZE follow. Reports open access (audited), version, role, connected
clients, OS and database size. No password guessing.
- snmp_probe: hand-built SNMPv1/v2c GET sysDescr.0 over UDP, two attempts per
community (default public/private, max 4), raw answer saved as evidence. No
net-snmp dependency.
- dns_zone_transfer: dig AXFR against one in-scope server for one in-scope
zone; record counts per type, up to 200 raw records, full output as evidence,
and explicit refused/unreachable reasons.
Shared gated_run(): gate, audit and run with the output returned to the caller,
so multi-command tools keep the gate invariant.
Tests: TLS server with a generated certificate, open and AUTH-required Redis
servers, a UDP SNMP agent answering only 'public', an AXFR server with
SOA/NS/A records plus a refusing variant, and the out-of-scope paths. 522
checks, ASan suite green, analyze clean (an analyzer uninitialised-field report
was removed by initialising the token array), release-check green including
distcheck 1.6.0.
Red, protocols (tools_proto.c):
- ftp_probe: one connection, 220 banner, FEAT feature list, then the literal
anonymous pair (USER anonymous / PASS anonymous@apex.invalid). Reports both
reply codes and audits whether anonymous login was accepted.
- smtp_probe: banner, EHLO extension list, then VRFY for a small user list
(default root, admin, postmaster; max 8) classified exists / unknown /
cannot-verify / disabled. No mail is sent.
- ssh_audit: banner plus the KEXINIT name-lists (kex, host key, ciphers and
MACs in both directions); flags group1/group14-sha1, ssh-rsa, ssh-dss,
3des-cbc, arcfour, blowfish-cbc, cast128-cbc, hmac-md5 and sha1-96 once each.
No authentication is attempted.
Blue (tools_blue.c):
- persistence_audit: reads /etc/crontab, /etc/cron.d, /var/spool/cron/crontabs,
/var/spool/cron/atjobs and /etc/systemd/system (services and timers) and
flags /tmp,/dev/shm,/var/tmp execution, curl/wget piped to a shell,
base64-to-shell, nc -e/socat, bash -i and setuid chmod. The optional root
prefix audits a mounted image.
Tests with local fixtures: FTP servers that allow and refuse anonymous login,
an SMTP server with exists/unknown/cannot-verify VRFY answers, a modern and a
deprecated SSH KEXINIT, and a persistence tree with four malicious and three
clean files. 506 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.5.0.
Two parser bugs the fixtures caught: SSH name-lists begin at offset 18 (pad
byte + message type + 16-byte cookie), and FTP FEAT continuation lines carry no
reply code, so they need a dedicated reader.
Red, offline (tools_red.c):
- jwt_audit decodes header and payload, reports alg/typ/kid and the claims
iss/aud/sub/exp/iat/nbf, and flags alg=none (critical), a missing exp, an
expired token, a path-like kid, a missing audience/issuer and a validity over
a year. With secret= it verifies HS256 over header.payload with HMAC-SHA256
and reports valid or invalid; alg=none is never reported as verified.
- hash_id identifies MD5/NTLM, SHA-1/256/512, bcrypt, Argon2, crypt(3)
formats and JWTs by shape. It cracks nothing.
Blue, offline (tools_blue.c):
- mitre_map maps recorded findings to ATT&CK techniques through keywords in
title, tool, tags and CWE, and lists the finding ids per technique.
- process_snapshot reads /proc: name, exe, fd count, and flags executables
under /tmp, /dev/shm or /var/tmp, deleted executables, reverse-shell command
lines and more than 256 open files.
sha256.c gains a raw digest and HMAC-SHA256 for the JWT signature check.
Fixed the tool table capacity: g_tools[64] silently dropped tool number 65
(hash_id); it is 96 now.
Tests: HS256 valid and invalid tokens, alg=none and expired findings, a
path-like kid, malformed token, MD5/bcrypt/JWT identification, ATT&CK mapping
against real finding ids, and a spawned process with nc -e in its command line
caught by the snapshot. 490 checks, ASan suite green, analyze clean (a
false-positive uninitialised-buffer report was removed by decoding into a
calloc buffer), release-check green including distcheck 1.4.0.
Red:
- ssrf_probe opens a loopback listener, injects one parameter with URLs
(127.0.0.1, localhost, 127.1, unique tokens) and reports a callback only when
a request actually arrives; the request line is saved as evidence. GET query
or POST form, or a callback_base collector for remote targets. It never
targets metadata endpoints.
Blue:
- detect_rules writes one Sigma, one Suricata and one YARA skeleton per finding
under $APEX_HOME/detections/, with id, title, target and severity, and states
that they must be tuned before deployment.
- integrity_baseline creates/verifies a SHA-256 manifest (new sha256.c) and
reports changed, missing and added files; no external tools.
Hardware:
- esp_flash runs esptool write_flash only with confirm=true, an absolute image
path (1..16 MiB) and offset checks, and audits every attempt.
Tests: fetch-performing SSRF target plus one that ignores the URL, six rule
files from two findings with content assertions, a baseline round trip
(modified/missing/added) including the SHA-256 abc vector, and the three
esp_flash refusal paths. 476 checks, ASan green, analyze clean, release-check
green including distcheck 1.3.0.
Red (tools_red.c):
- vhost_discovery: Host-header fuzzing against one in-scope IP. Baseline
status/bytes/title, then each built-in or caller-supplied name; a status
change, a >24-byte difference or a different <title> is a hit and its
response is saved as evidence. Plain HTTP only; TLS SNI would need a
resolver override. 100 ms between names, 100 names max.
- http_brute: hidden-path probing from the built-in list, a comma list, or a
wordlist file (one path per line, # comments). Hits 200/201/204/301/302/307/
308/401/403; 100 ms apart, 40 paths default, 200 max; the first five 200/201
bodies become evidence.
Blue (tools_blue.c):
- web_log_audit: nginx/apache access log. 2xx/3xx/4xx/5xx split, top source
IPs, scanner user agents (sqlmap, nikto, nmap, gobuster, nuclei, hydra, ...),
SQLi/traversal/XSS patterns after percent-decoding the URI (one entry per
pattern) and IPs with a 4xx/5xx burst. Path limited to /var/log and the
state dir.
Tests: Host-routing fixture (admin/api/www), path-routing fixture with words
and a wordlist file, and a synthetic access log with encoded SQLi, traversal,
scanner UAs and a 4xx burst. 456 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.2.0.
The suite grows from reconnaissance into a red/blue/hardware toolset; existing
tools and file formats are unchanged.
Red (tools_red.c):
- vuln_check: non-destructive verification of exposed .git/HEAD, .env, open
directory listing and phpinfo; each hit saves the raw response as evidence;
.env returns key names only, never values.
- subdomain_enum: built-in wordlist or caller-supplied names under one in-scope
domain; every name goes through the gate before it is resolved.
- cred_test: HTTP Basic default credentials, max 20 attempts, 200 ms apart,
stops on 429, refuses a path that answers without authentication.
Blue (tools_blue.c):
- hardening_audit: sshd_config, sysctl, /etc/shadow mode, world-writable /etc
directories, listening sockets, firewall files, SUID count; scored findings.
- log_audit: auth-log failures per IP (flagged at five), invalid users,
accepted logins; path restricted to /var/log and the state dir.
- ioc_scan: directory walk for /dev/tcp shells, bash -i, base64|sh, curl|sh,
nc -e, socat EXEC:, setuid chmod, systemd units under /tmp.
ESP32 (tools_esp.c):
- esp_info (esptool chip_id plus USB VID/PID), esp_monitor (read the console,
send nothing), esp_read_flash (up to 4 MiB into evidence/). No flashing.
Shared helpers exported: apex_http_once, apex_status_code, apex_looks_tls,
apex_serial_open, apex_base64_alloc. Gate audit pins 54 tools with a local-exec
exception for the two esptool tools that have no network target.
439 checks with local fixtures for every new path, ASan suite green, analyze
clean, release-check green including distcheck 1.1.0.
- README rewritten for a first-time reader: the gate and its rule order, quick
start, all 45 tools by group, transports, proxy and rewrite rules, findings/
assets/traffic/reports, state layout, security model, limits, build and
release targets, install layout, environment, source layout, 1.x promise.
- License changed to CNCL 1.1 (Could Not Care Less License). LICENSE carries the
unchanged text; README, SECURITY.md and the man page point at it. make dist and
make install ship LICENSE.
- Scope gap tests: deny_ip beats allow_ip, port range endpoints and neighbours,
/25 boundary, IPv6 CIDR accept/refuse, apex vs subdomain vs wildcard matching
(*.name not matching the apex), embedded host:port, trailing FQDN dot, and a
failed scope_reload closing the gate. scope.c 75.9% -> 82.8%, total 79.4%.
397 checks, analyze clean, release-check green including distcheck 1.0.4.
tls_cert called openssl s_client -connect <port> - a bare port with no host -
so openssl tried to resolve '443' and every call failed. The new gap test that
asserts a certificate chain and 'Verify return code: 0' found it. It now passes
host:port, bracketing IPv6 literals.
Gap tests for the weakest files, all against local fixtures:
- guard rule table: shutdown/halt/init 6, systemctl mask, service stop, nft
flush, ufw disable, pfctl -F, iptables -X, wipefs, mkswap, shred, tee and
sed -i into /etc, socat EXEC, nc --exec; plus the world-writable, upload and
secret-file notes and an empty command.
- proc.c: a fake nmap that sleeps past its timeout is killed and reported
signalled in under 4 s; 1.2 MB of output is marked TRUNCATED and clamped;
a failed exec is exit 127 with the child's explanation; apex_have refuses a
program outside PATH.
- http_paths: base path prefix appears in the reported hit, limit=3 probes
exactly three, limit=0 means the default 40.
- proxy rewrite: the rule replaces a client header instead of duplicating it,
the wildcard host matches, and an invalid rewrite file on SIGHUP keeps the
last good rule set (and does not resurrect an older one).
Coverage 77.1% -> 78.7%; proc.c 66.9 -> 73.9, guard.c 72.5 -> 83.0,
tools_recon.c 69.3 -> 72.8, tools_guard.c 85.4 -> 95.1. 373 checks.
The suite occasionally saw the stdio server exit rc=0 with normal startup on
stderr and no replies, and a one-shot retry hid it. It was not the server.
MarauderSim.close() set stop, slept 0.1 s and closed the PTY fds. The reader
thread holds the fd number, not a file object: if it was still inside
select([master]) - a 0.2 s timeout, so roughly half the time after a 0.1 s
sleep - the number was free. The next mkstemp() in run() reused it, select
reported the temp file readable, and the thread read and discarded the
subprocess payload. The child then saw EOF, exited 0 and answered nothing.
That is why every observed failure was the dry-run call, the only run() that
follows a simulator close without a new openpty() in between.
Reproduced outside the suite: copying the shipped class and the close-then-spawn
sequence gave 17 empty spawns in 60 rounds (28%), with the simulator buffer
holding exactly the 47-byte payload.
close() now joins the reader and prompter threads before closing the fds, and
the reader refuses to read once stop is set. tests/run.py repeats
close-then-spawn twelve times and asserts no thread survives and no spawn loses
its stdin; without the fix that is 12/12 threads alive and 6/12 spawns lost.
The retry is removed so empty stdout fails again.
No product-code change. 336 checks, analyze clean, release-check green
including distcheck 1.0.2.
APEX_VERSION in src/apex.h is the only source of truth, and nothing compared it
with what users read. SECURITY.md claimed 0.23.x while the tree was at 0.30.0 for
seven releases.
tests/version_check.py now checks five places and names each disagreement:
man page .TH, README status line, top CHANGELOG heading, SECURITY supported line
(<major>.<minor>.x) and the Makefile tarball name (which must derive from
APEX_VERSION, not hardcode it). It runs first in tests/run.sh, has its own
make version-check target, and is the first step of make release-check.
Bump 1.0.0 -> 1.0.1 with all five updated. Red proof: leaving the man page at
1.0.0 fails with 'docs/apex-twin.1 .TH says 1.0.0, header says 1.0.1' and run.sh
stops before the suite.
Verified: make test (version check + gate audit + 334 checks), make analyze 0,
make release-check green through distcheck 1.0.1.
Set APEX_VERSION 1.0.0 and sync every version claim: the man page .TH, the
README status, SECURITY.md supported line (now 1.0.x, with --version as the
authority) and a 1.0.0 CHANGELOG entry. The 0.30.0 section gets its commit hash.
1.0 states the compatibility promise rather than adding features:
- every target-taking tool goes through the gate, enforced statically before
the suite;
- audit before action, one write per line;
- findings/assets/traffic JSON only gain fields; old state is readable and
reports stay derived;
- the documented limits are the contract;
- no shell/exploit, no TLS interception, no agent loop.
Verified: make test 334/334, analyze 0, mandoc lint 0, release-check green with
distcheck 1.0.0, make dist produces apex-twin-1.0.0.tar.gz with CHANGELOG,
SECURITY and the man page.
make install now ships five documents into $PREFIX/share/doc/apex-twin/
(README, CHANGELOG, SECURITY, operations, artex-port) and a new apex-twin(1)
man page into $PREFIX/share/man/man1/. MANDIR is overridable like the other
directories; DESTDIR works as before.
docs/apex-twin.1 covers the five modes, the scope rule order, every environment
variable (state, scope, rewrite, serial, dry-run, timeouts, webhook, proxy and
HTTP caps, audit and evidence limits), the state files, examples for --check and
curl -x, the hard limits, and pointers to the longer docs. mandoc -T lint is
clean and groff renders it.
Verified: make install DESTDIR=/tmp/apex-install-test lists the four units/docs
plus man page with modes 644/755; make test 334/334; release-check green
including distcheck 0.30.0.
APEX_EVIDENCE_MAX_BYTES (default 16 MiB, 0 unlimited) bounds one evidence blob.
Over the cap, t_evidence returns an error that names the variable and the actual
size, writes no file, and writes an audit deny line. --check and capabilities
report evidence_max_bytes.
Tests in a fresh state dir: 500 bytes under a 1000-byte cap is written; 2000
bytes is refused with APEX_EVIDENCE_MAX_BYTES in the message, evidence_list
still shows one file, and the audit has the deny; a limit of 0 accepts the same
2000 bytes. Red proof: disabling the check gives four red checks.
334 checks, coverage 76.9%, release-check green including distcheck.
The HTTP face forked a child per connection without a limit and read the head
with a blocking read, so a local client could hold children forever.
- APEX_HTTP_MAX_CHILDREN (default 64, max 1024) with a SIGCHLD handler,
waitpid(WNOHANG) reaping and a counter. At the cap the parent answers 503
'http busy' and audits it; a failed fork serves in the parent.
- APEX_HTTP_HEAD_TIMEOUT_MS (default 20000, 0 disables) is a deadline for the
whole head and body using poll with the remaining time; expiry answers 408
Request Timeout.
- Rejections (503, 408) half-close and drain what the client already sent before
closing: closing with unread bytes sends RST and can swallow the response.
http_send now has reason phrases for 408 and 503.
- --check and capabilities report both values.
Tests: cap of 1 with a held partial request -> second gets 503 'http busy';
after closing, the slot is reused and a valid initialize gets 200. A 500 ms head
timeout closes a half-sent head with 408 in under 2.5 s. Red proof: disabling
both turns those two checks red.
327 checks, coverage 76.9%, release-check green including distcheck.
audit.log grew without a bound. APEX_AUDIT_MAX_BYTES (default 10 MiB, 0
disables) rotates it to audit.log.1 when the next line would cross the limit:
the size is checked, then re-checked under flock(LOCK_EX) on audit.log.lock, so
only one proxy child renames. Lines are still one write() each, so a line never
mixes with another writer. A child with an already-open fd keeps writing to the
renamed file, which is still a valid log; new writers open the new file.
audit_log reads the current file only. --check and capabilities report
audit_max_bytes.
Tests with a 300-byte cap and 12 audited calls: audit.log.1 exists, every
non-empty line in both files parses as JSON, audit_log still answers, and
APEX_AUDIT_MAX_BYTES=0 produces no .1. Red proof: disabling the rotation call
fails the rotation and rotated-file checks.
323 checks, coverage 77.1%, release-check green including distcheck.
A full release-check occasionally sees the stdio server exit 0 with the normal
startup on stderr and no replies (one case in ~10 full runs, twice inside a
fresh-clone distcheck). Reproduced neither with 300 isolated invocations nor
with three parallel suites, and the same deterministic input always works. The
harness now retries exactly that shape (rc=0, empty stdout) once and logs it;
non-zero exits are never retried, and two empty runs still fail.
Version stays 0.26.0; product code is unchanged.
A fresh-clone distcheck run failed the dry-run check once with empty stdout:
rc=0, normal startup on stderr, no replies. The same input works everywhere
else, so the variable is the stdin pipe. Write the payload to a temp file and
pass the fd as stdin; the child then cannot miss bytes that were supposedly
written, and a silent exit with rc=0 becomes a real signal instead of a race.
Diagnostics on empty stdout stay in place.
Two local suites green. Version stays 0.26.0.
finding_add is idempotent for the same target and title. apex_finding_find()
scans the store with case-insensitive comparison where whitespace runs are
collapsed and ends trimmed, so 'Dup Test', ' dUp tEsT ' and 'dup test' are
one finding. The second call returns the existing id with duplicate:true,
writes no second file, leaves the stored fields alone (use finding_update) and
audits 'duplicate of <id>'. A different target or title creates a new finding.
Tests in a fresh state dir: first f0001, case/space variant same id + duplicate,
different title f0002, same title on 192.0.2.5 f0003, three files, stored
severity still low, JSON report total 3, duplicate in audit. Red proof:
returning NULL from the lookup turns six checks red.
317 checks, coverage 77.0%, release-check green including distcheck.
APEX_PROXY_MAX_CHILDREN (default 64, max 1024) bounds proxy children. SIGCHLD
now sets a flag and the parent reaps with waitpid(WNOHANG); at the cap the parent
answers 503 Service Unavailable with a 'proxy busy' reason and audits it instead
of forking. A failed fork still serves in the parent. --check and capabilities
report proxy_max_children.
The concurrency test exposed a real audit bug: append_line() wrote the JSON line
and the newline as two writes. With parallel children the writes interleaved and
audit_log() returned '{...}{...}' - invalid JSON at the caller. append_line()
now builds line+newline and writes once; audit_tail() reads with getline so a
command over 8 KiB is not split into half objects.
Tests: two slow requests fill a limit of 2, the third connection gets 503 with
'proxy busy', the refusal is audited, and a slot is usable after the children
exit. Red proof: removing the cap check turns the 503 and audit checks red.
One earlier run also showed the test racing a readiness child; the test now
retries admission and waits for both in-flight requests before probing.
309 checks, coverage 76.7%, release-check green including distcheck.
The proxy forks one child per accepted connection (SIGCHLD ignored, parent
closes the socket). A CONNECT tunnel no longer blocks the next request; each
child inherits the scope and the rewrite rules loaded at fork, and SIGHUP in the
parent reloads the rules for connections accepted afterwards. A failed fork
serves the connection in the parent instead of dropping it.
Concurrent captures are safe: apex_traffic_add reserves the id with O_EXCL on
tNNNN.json, creates the raw file O_EXCL (replacing a stale raw from a crashed
run), writes raw then JSON, and unlinks both on failure. The scan-then-write
race that would have let two children overwrite one record is gone.
next_traffic_id() is removed.
Tests: a CONNECT tunnel is held open against a silent TCP server; a GET through
the same proxy answers in under 2 s, three more parallel GETs all answer, and
the five captures (1 CONNECT, 4 GET) have unique ids. Red proof: putting the
serial accept loop back fails both timing checks.
303 checks, coverage 76.6%, release-check green including distcheck.
CHANGELOG.md records every released increment from 0.1.0 to 0.23.0 with the
commit that introduced it and the reason for it: the gate, the guard, findings
and assets, traffic and the proxy, rewriting, webhook, web checks, the fuzzers,
coverage, the PTY radio simulator and the release gate. The current entry is
this commit; earlier hashes are from git log.
SECURITY.md no longer claims 0.19.x forever: the supported line is the one
apex-twin --version prints, with the current line named and a note that older
builds are rebuilt rather than patched and that state stays readable.
make dist now ships CHANGELOG.md next to README and SECURITY. README links it.
tests/run.py prints rc and stderr when a run produces no stdout; one
release-check run hit that once (before this diagnostic), the following run and
three parallel suite runs were clean. Kept strict: empty output is a failure,
not a retry.
Verified: make test 298/298 + gate audit; make release-check green through all
stages; tarball contains CHANGELOG.md and SECURITY.md.
make distcheck builds the tarball, unpacks it into mktemp -d, runs make and make
test inside it, and removes the directory via a trap. It proves the shipped
tree builds without the workspace.
make release-check runs the whole gate fail-fast:
gate-audit -> test -> test-asan -> analyze -> fuzz -> fuzz-proxy ->
fuzz-http -> distcheck
It takes several minutes on one core and needs the network for the example.com
checks, so it stays out of make test.
Both documented in the README with their cost. Verified: make distcheck green
(298/298 inside the tarball); make release-check green through all stages; no
temp directory left behind.
tests/gate_audit.py parses every TOOLS_*[] table (45 tools, 8 tables) and the
handler bodies, with comments and string literals stripped before searching. It
enforces two rules:
A. a tool whose schema contains a target key must call gated(), gated_cmd()
or apex_scope_check() in its handler. Four record filters are named
exceptions: asset_list, finding_list, report_markdown, traffic_list.
B. a handler that opens a socket or spawns a process (http_once,
tcp_connect_host, tcp_probe, apex_run) must call one of the same functions.
It also pins the tool count at 45, so adding a tool forces a review here. The
audit runs first in tests/run.sh, so make test = gate audit + 298 checks; there
is also a make gate-audit target.
Red proof: renaming the gate call in portscan and finding_add produced three
violations (portscan twice: target and socket; finding_add once) and exit 1.
Restored, the audit is OK.
298 checks, 45 tools, analyze clean.
docs/operations.md is the run book: install with DESTDIR/PREFIX, the two
systemd units and their hardening, the state directory and what to back up,
scope lifecycle and rule order, proxy/rewrite/webhook operation, upgrade and
rollback, limits (8 MiB MCP body, 1 MiB proxy body/response, 1024 findings per
report) and troubleshooting by refusal reason.
SECURITY.md states the trust boundaries and the threat model: the scope file and
webhook URL are operator-owned, loopback listeners have no auth, CONNECT is a
blind tunnel, target content is data, and a missing gate is the highest severity
report. It includes a hardening checklist and the non-goals.
make dist reads APEX_VERSION from src/apex.h and writes apex-twin-<version>.tar.gz
with Makefile, README, SECURITY, .gitignore, src/, vendor/, tests/, docs/,
examples/ and systemd/; object files, gcov data, __pycache__, build dirs, the
binary and .git are excluded. 48 entries, no forbidden path.
Verified: make dist -> 0.20.0 tarball; extract to /tmp, make, full suite 298/298;
repo suite 298/298; analyze 0 warnings. README links the new docs.
report_markdown gains format=json. The file report-<ts>.json contains:
generated, scope_label,
filters {target, min_severity, status},
counts {total, by_severity{crisis...}, by_status{open...}},
findings [{id, ts, updated, target, title, severity, confidence, status,
tool, cwe, evidence, remediation, tags, note}],
assets [...] when include_assets is set.
Filters behave as in Markdown/CSV; the counts are computed over the filtered
set, so 'confirmed findings only' is one status filter away. Assets are included
independently of the finding filter (an inventory is not a finding). The reply
envelope still carries format, findings, bytes, path and the rendered text;
Markdown and CSV are untouched.
Tests: a two-finding state (critical/open, medium/confirmed) produces a
parseable file with correct counts, sorted findings, null filters and two
assets when asked; status=open yields an empty report; CSV stays CSV. Red proof:
dropping the include_assets flag for JSON turned two checks red.
The simulator kept the slave fd open, so before the tool set raw mode the line
discipline echoed the simulator's own prompts back to the master. Those echoes
arrived as commands ('Marauder>', 'login: ok'), emptied the console prompter and
made the login-refusal test flaky: it passed locally and failed in one fresh
clone run.
Disable ECHO on the slave at openpty time. Three consecutive suite runs are
green. No product code change; 0.18.0 stays.
tests/run.py now carries a simulator on a pty pair, addressed through
APEX_SERIAL, so the radio paths are tested without hardware:
- answers the guard's bare CRLF with a benign prompt (no console marker);
- info -> firmware/board, help -> command list, list -> APs, scanall -> APs,
stopscan -> stopped, attack -> started;
- records every command in order.
Tests: marauder_info reads firmware and help; marauder_commands works with a
device; marauder_cmd sends list; marauder_scan returns APs and the command log
proves scanall is followed by stopscan; a console simulator that answers the
blank line with 'login: ' is still refused; serial_tx=true lets 'attack'
through and the radio sees it.
Coverage: tools_radio.c 31.7% -> 76.2%, total 74.1% -> 76.4%. Red proof: removing
'login:' from the deny list and skipping the stopscan send turned three checks
red (login refusal twice, stopscan order once).
287 checks.
Transfer-Encoding: chunked is no longer 501. The proxy reads the chunk framing
(hex size with extensions, data, CRLF, trailers), validates it, and relays it
unchanged so the origin still receives chunked encoding:
- payload cap 1 MiB, checked from the chunk size before reading the data, so a
declared gigabyte costs one line; over the cap -> 413.
- malformed size or framing -> 400. Both answers happen before the origin socket
is opened, so a broken body never becomes half a request to someone else.
- the raw capture keeps the chunk framing (Transfer-Encoding header, size lines,
data, trailers), so traffic_read shows what was actually sent.
- Content-Length is dropped when chunked is present (TE wins); the old 501 branch
and its comment are gone.
Tests use a local origin that decodes chunked: 5+6 bytes become 'hello world',
a body split across two writes works, 0x200000 answers 413, 'ZZ' answers 400,
and the traffic record contains the framing. Red proof: forcing
r->chunked = 0 turned seven checks red.
276 checks, coverage 74.1% (make coverage re-run).
make coverage builds apex-twin-cov with -O0 --coverage, runs the suite and
prints per-file line coverage via tests/coverage.py (gcov only).
First measured pass: 55.9%. Gap tests brought it to 73.4%:
- method_techniques/playbook/tool (tools_kb.c 0 -> 100%),
- http_head, http_paths against a routed local origin, sqli_probe, xss_probe,
curl, http_capture of a binary body and traffic_read base64 (tools_web.c
50.4 -> 71.6%),
- banner against a raw socket, scope_reload, dns, dry-run gated_cmd
(tools_recon.c 51.8 -> 68.0%),
- traffic_list target filter and unknown-id read (tools_traffic.c 63.6 -> 81.8%),
- marauder_cmd/scan without a device (tools_radio.c 15.2 -> 31.7%; the rest
needs hardware, documented as a host limit).
The -O0 build also proved a real truncation warning in guard.c that -O2 did not
report: the copied scope reason is now bounded with %.240s. The proxy and the
HTTP face now handle SIGTERM/SIGINT by returning from the accept loop instead of
dying, so the last stderr line and coverage data are not lost (proxy.c 0 -> 70.9%,
rewrite.c 53.2 -> 79.9%, apex-twin.c 20.7 -> 77.2%); the HTTP child uses exit()
so gcov flushes.
Also corrected the technique count in the README: the table has 11 entries, not
12. 267 checks.
tests/fuzz_http.py drives the sanitizer build in --http mode with raw requests:
- valid initialize, wrong path, GET, garbage request line, missing head;
- Content-Length: negative, 999999999, 100000 (with body), duplicated, absent;
- chunked body, invalid UTF-8 body, 8.5 MiB body (refused from the header),
- a head split across two writes (exercises the partial-read loop),
- 40 mutated raw requests on top.
The HTTP face forks a child per connection, so liveness is not the judge: the
child inherits stderr and any ASan/UBSan report fails the run. A case also fails
if the connection does not close within 3 s. 200/202/400/404/405/413 are all
legitimate; a sanity counter requires at least one valid 200 so a server that
rejects everything cannot pass.
make fuzz-http: 40 cases, 18 valid 200 answers, no sanitizer report, no hang.
make fuzz-http-red builds with APEX_FUZZ_BUG_HTTP (heap overflow after a
complete head) and requires rejection: 2 failures including the exact
apex-twin.c UBSan line, 'caught the deliberate bug'. Normal builds never see the
macro.
239 checks + 240 file-fuzz + 60 proxy-fuzz + 40 HTTP-fuzz cases.
tests/fuzz_proxy.py starts the sanitizer proxy against a local origin and sends
mutated raw request heads in a fresh connection each time:
- seeds: absolute-URI GET, CONNECT, origin-form GET;
- 60 mutations: bit flip, truncate, duplicate/delete, invalid UTF-8/NUL, CRLF
injection, 1k/40k/100k request lines, garbage request line;
- the client half-closes after sending, so a truncated head is EOF, not a 20 s
read timeout. A case fails on a dead proxy, a sanitizer report, or a
connection that never closes. 400/403/501/502 and an ECONNRESET after the
proxy rejected unread bytes are successes. Valid requests must still get a
200 (the run counts them), so a proxy that rejects everything cannot pass.
make fuzz-proxy: 60 cases, 23 valid 200 answers, no sanitizer report, no hang.
make fuzz-proxy-red builds the same proxy with a deliberate heap overflow in the
request path (APEX_FUZZ_BUG_PROXY) and requires the fuzzer to reject it: 3
failure lines, including the proxy.c UBSan report, 'harness caught the
deliberate bug'. Normal builds never see the macro.
239 checks + 240 file fuzz cases + 60 proxy fuzz cases.
tests/fuzz.py is a deterministic fuzzer with no dependencies:
- seeds: examples/scope.json, the README rewrite rule, five JSON-RPC lines;
- 80 mutations each: bit flip, truncate, duplicate, delete, append invalid
UTF-8/NUL, deep nesting, 1k-100k value;
- each case runs the ASan/UBSan binary in a fresh APEX_HOME and fails on any
AddressSanitizer/UBSan report, a signal or a timeout. A broken scope file is
allowed to close the gate - that is a correct answer, not a fuzz failure.
make fuzz runs 240 cases; all pass. make fuzz-selftest compiles a real
out-of-bounds program and requires the detector to flag it, so the judge is not
blind. make fuzz-red builds apex-twin-asan-bug with one deliberate heap overflow
under -DAPEX_FUZZ_BUG and fails if the fuzzer reports it green; the red run shows
three failures and 'fuzz-red PASSED: the harness caught the deliberate bug'.
No functional change in a normal build: the bug lives behind APEX_FUZZ_BUG and
the fuzz targets are separate. 239 checks + 240 fuzz cases.
New build targets, no new features:
make asan apex-twin-asan with -fsanitize=address,undefined
make test-asan the whole suite against it (APEX_BIN override)
make analyze gcc -fanalyzer over every translation unit
Results: 239/239 checks pass against the ASan/UBSan binary with no report; a
batch of error paths, network captures, report generation and evidence/traffic
reads run with LeakSanitizer on: no leaks. make analyze is clean (0 warnings).
The analyzer was red first on vendor/libmcp/mcp.h: 'b->p = realloc(b->p, want)'
loses the only pointer to the old block when realloc fails. It now grows through
a temporary and assigns after the NULL check. That is a real robustness fix, not
a suppression.
.gitignore covers apex-twin-asan and build-asan/. README documents the targets
and the result.
make install now installs four things, with DESTDIR/PREFIX respected:
$PREFIX/bin/apex-twin
$PREFIX/share/doc/apex-twin/README.md
$PREFIX/lib/systemd/system/apex-twin.service
$PREFIX/lib/systemd/system/apex-twin-proxy.service
--check and the capabilities tool report rewrite_rules and
webhook_configured (a boolean: the URL is never printed), so an operator can
see whether the proxy will rewrite and whether a critical finding will wake
anyone, without starting a server or reading the env.
Tests: --check counts two rules from a temp rewrite.json, reports the webhook
when APEX_WEBHOOK is set and keeps the URL out of its output, survives an
invalid rewrite file (0 rules, old behaviour), and capabilities returns the same
state to the model. make install DESTDIR=/tmp/apex-install-test was run by hand:
four files, modes 755/644/644/644.
45 tools, 239 checks. Red proof: hardcoding both operational fields to 0/false
turned three checks red.
$APEX_HOME/rewrite.json (APEX_REWRITE overrides) holds ordered rules:
{match_host, match_path_prefix, block, set:[{name,value}],
remove:[name], note}
The first matching rule is applied before the request goes to the origin: block
answers 403 with the note and a deny line in audit.log; set replaces a header the
client sent and adds one it did not; remove drops a header. The applied rule is
named in the traffic record ('rewrite rule 0: marker') and audited under
tool=rewrite. SIGHUP reloads the file; a file with an invalid header name or
value is rejected whole and the previous rules stay active. The scope gate still
runs first: a rewrite rule can narrow what the proxy does, never widen it.
CONNECT is untouched - a blind tunnel has no headers to rewrite.
45 tools, 232 checks. Tests use a local origin that records headers and assert:
set, remove, untouched path, block + note, SIGHUP reload, rule in the traffic
record, rewrite allow/deny in audit. Red proof: matching disabled turned seven
checks red.
APEX_WEBHOOK + APEX_WEBHOOK_MIN_SEVERITY (default critical) turn a finding into
a JSON POST through curl, after the finding is safely on disk:
- finding_add fires 'finding_added' when severity >= floor;
- finding_update fires 'finding_confirmed' only on the transition into
confirmed, not on every later edit (the previous status is read first);
- notify_test sends one event and says whether curl accepted it;
- every attempt writes an audit line with decision allow/deny and the curl exit.
The webhook is operator infrastructure, not a target: it is not put through the
scope gate, and it is invoked with argv, never a shell, so the JSON cannot be
re-read as a command. A failing webhook never fails the finding. curl is a child
process, so the binary stays libc-only.
45 tools, 222 checks. The notification test runs a local HTTP collector and
asserts: critical posts, low stays quiet, confirm posts exactly once, notify_test
posts, audit has the notify line, and without APEX_WEBHOOK the test answers
configured=false. With the severity floor disabled, the low finding posted and
the quiet check went red.
Four checks that end in a graded lead instead of a wall of headers:
- cors_check sends a GET with a marker Origin and reports allow_origin,
allow_credentials, reflected, wildcard and a risk grade. Reflect + credentials
is high: any site can read authenticated responses.
- cookie_audit walks every Set-Cookie and reports missing Secure, HttpOnly and
SameSite, including SameSite=None without Secure. Values are read from the
head only, never the body.
- http_options reads Allow/Public and flags TRACE, PUT and DELETE.
- whois runs the real whois(1) through gated_cmd on port 43: no allow_port, no
lookup. If the binary is missing the answer says so instead of pretending.
All four are gated and audited. Tests use a local Python origin that reflects
the Origin, sets a bare and a fully flagged cookie, and answers OPTIONS with
TRACE, so the checks are deterministic instead of hoping a public site behaves.
44 tools, 213 checks. Red proof: forcing the reflected flag to false and the
cookie flags to true turned four checks red - the risk dropped to low and the
missing attributes disappeared.
apex-twin --proxy 8798 puts the gate in front of clients that do not speak
MCP: curl -x, a browser, an agent's fetch. Bind is loopback only.
- absolute-URI HTTP requests are parsed, checked with apex_scope_check() BEFORE
the origin socket is opened, audited, and forwarded with the request line
rewritten to origin form; headers lose Proxy-Connection/Connection and gain
Connection: close;
- Content-Length bodies are forwarded; chunked request bodies are refused with
501 rather than silently truncated;
- the exchange is stored through the same traffic store as http_capture, so
proxied and explicit captures sit together;
- CONNECT is tunnelled blind and recorded as metadata (host, port, bytes),
because this binary links no TLS stack; a half-close is propagated with
shutdown so the tunnel ends when the client does;
- out of scope -> 403 with the gate's reason in the body and a deny line in
audit.log.
The gate-bypass sabotage was seen red: with proxy_gate() skipped, the
out-of-scope request went out, 403 became 502, and the audit had no deny -
three checks failed.
197 checks, 40 tools. New systemd/apex-twin-proxy.service, loopback port,
no CAP_NET_RAW. Parser stores numbers unquoted; the proxy is serial on purpose.
http_capture is http_request that keeps the exchange: $APEX_HOME/traffic/
tNNNN.http holds the request bytes and the raw response, tNNNN.json holds
target, method, path, status and byte counts. TLS goes through curl, so the
request side is marked reconstructed in the file - the tool says what it did
not see. traffic_list and traffic_read find and replay the pair.
http_once now optionally returns the exact request it wrote, so a plain-HTTP
capture is byte-for-byte what went out. The store parses unquoted numbers and
booleans (simple_long); traffic_read rewinds before reading the pair.
The capture found a real pre-existing bug: status_code() took the first number
in 'HTTP/1.1 200 OK' - the 1 of the version - so http_paths, sqli_probe and
xss_probe had been comparing status 1 for every answer. It now skips the
protocol token; the suite asserts 200, and putting the old function back turns
two checks red.
40 tools, 185 checks. Two new files per capture are asserted on disk, the raw
pair is checked for the request line, the response marker and the status line,
and an out-of-scope capture is refused with the scope reason.