100 Commits
Author SHA1 Message Date
lotherk 59b71ab3a1 apex-twin 1.100.0: auth_test over six protocols, SIGPIPE fix
Authentication testing in src/tools_auth.c (new file, 16th table): auth_test
speaks http Basic, ftp, smtp AUTH LOGIN, imap, pop3 and mysql
(mysql_native_password) against one in-scope service. The operator supplies
the wordlists (inline or file) and every limit - delay_ms, max_attempts,
stop_on_hit, lockout_limit, timeout_ms; the program adds none of its own.
auth_plan counts a run without connecting, auth_protocols lists the
protocols, auth_hits returns the credential findings with evidence paths.
A hit is the protocol's own accept answer; each accepted pair becomes a
critical finding with the pair and the answer in evidence, while the audit
log keeps the account and service and never the password.

Two real bugs found by the tests they came with:

- An HTTP answer below 400 counted as a hit, so a 404 or a 500 would have
  been reported as valid credentials. Only 2xx/3xx prove authentication
  now; two checks pin it and fail against the old logic.
- SIGPIPE killed the whole server when a target hung up mid-write: one
  dead target, one dead MCP server. Ignored once at startup, so the write
  returns EPIPE and the tool reports a failed connection. Five checks, one
  per protocol.

SHA1 for the MySQL scramble is written out in the file and checked against
the published vectors for "", "abc", "password" and a 1000-byte multi-block
input. The MySQL seed is read by counting handshake fields; a fixed offset
picked up the capability flags and made every login fail against a healthy
server, which the suite proves by neutralising the offset.

427 tools, 1637 end-to-end checks, 84.7% line coverage.
release-check exit 0, distcheck 1.100.0 passes 1637/1637 from the tarball.
2026-11-24 06:45:02 +00:00
lotherk 759d9f8351 apex-twin 1.99.0: hydra, medusa and msfvenom wrappers
Three gated wrappers in tools_ext.c. hydra_scan and medusa_scan name a target
and go through gated_run(); msfvenom_build has no target, runs locally and
writes an audit line before the action. Flag sets read from the tools' own
sources (hydra.1 in the thc repo, Debian medusa(1), the msfvenom opt list),
not remembered.

A hit is the tool's verdict, not ours: medusa documents exit 1/2 as
FOUND_PAIR_EXIT_HOST/_AUDIT, hydra returns 0 either way and prints the hit, so
each wrapper parses its tool's own output and records it as evidence. A run
that finds nothing writes no finding.

Refused on purpose: hydra -M, medusa -H/-C and the host-file options read
targets out of a file the gate never parsed; msfvenom -l/--list/--help/
--refresh-cache print and exit without rendering a payload. The --list hole was
found by a test, not by review.

Test evidence: 1600/1600 (was 1576); tools_ext.c line coverage 80.9 -> 83.8,
total 84.8%. Red proof, both directions: forcing hydra_found to return 0 turns
exactly "hydra_scan reads the tool's own 'valid password found' as a hit" red
with 32 green; putting -M/-H/-C back on the allowlists turns exactly the three
host-file checks red with 37 green; restored, 40/40. Full release-check exit 0,
distcheck apex-twin-1.99.0 builds and passes 1600/1600 from the tarball.
2026-11-24 02:58:17 +00:00
lotherk cd77649497 apex-twin 1.98.0: three more modules, read-back proof, usage errors
weblogic_console (CVE-2020-14882), couchdb_admin (admin party) and
actuator_env (Spring Boot /env) join the exploit registry: eleven modules.

A write was confirmed on a bare 200. couchdb_admin and actuator_env now
re-read the section or the property and set read_back; a fixture that
accepts every POST/PUT and stores nothing keeps them at confirmed=false.

Missing run arguments (section, name, param, script, handle) came back as
JSON with an "error" member and isError unset, which reads like a statement
about the target; the ctx carries a usage flag and the reply is
mcp_reply_error now, the shape every other tool's argument error has.

url2 double-encodes for real; payload_build gained a json encoder.

Tests: 1576 checks pass (was 1564), coverage 84.8%, release-check exit 0
including distcheck 1.98.0 from the tarball (1576/1576). Red proof: dropping
the two read-back x_find comparisons turns exactly those two checks red
(1553 pass, 2 fail) and they were restored afterwards.
2026-11-23 20:48:04 +00:00
lotherk 7125d6987a apex-twin 1.97.0: exploit framework core, eight modules, payload builder
A module registry in src/tools_exploit.c with eight modules and one
check/run path. check proves the bug with a marker this process
generates, run carries what the operator supplies; a confirmed hit
saves evidence, writes a finding with CVE/CWE/severity and records an
audit line before it acts. The gate decides the target, nothing else
is decided for the operator.

Modules: shellshock (CVE-2014-6271), log4shell (CVE-2021-44228,
loopback JNDI listener or callback_base), struts2_s2045
(CVE-2017-5638), tomcat_put (CVE-2017-12617, check cleans up),
redis_write (CVE-2022-0543), cmd_inject (six operators, op=auto),
traversal (CVE-2021-41773/42013), jenkins_script (Groovy console).

payload_list/payload_build: templates with {lhost}/{lport} and ten
encoders. Shared helpers instead of copies: the callback listener moved
to apex_cb_open/apex_cb_wait, http_once passes headers through the curl
path so a module can inject a header over TLS, and the default
User-Agent no longer overrides the operator's.

Tests: 1564 end-to-end checks (was 1521), 420 tools (was 414), coverage
84.8%. Red proof: setting confirmed=0 in the shellshock branch turns
exactly the four shellshock checks red (1555/4), restored afterwards.
make release-check exit 0; distcheck builds and passes 1.97.0 from the
tarball. Gate audit parses tools_exploit.c and its indirect
exploit_call() gate path: 420 tools, 6 record-filter exceptions.
2026-11-23 19:50:47 +00:00
lotherk c07993810d AGENTS.md: the operator rule, the hard constraints and the release procedure
Written because the rule was only in the session and in the user profile, not
where the next agent working on this tree looks first.

- Konrad's rule of 2026-11-23: software never mouths or limits the user; no
  moralising, no warning gates, responsibility stays with the operator. The
  scope gate is documented as what it is - a targeting limit from scope.json,
  not a judgement about the request.
- Hard constraints: C99+POSIX clean under -Werror, every network tool gates and
  audits before acting, findings need evidence, version lives in five places.
- Release procedure with the exact targets, TMPDIR (distcheck needs it),
  "see the suite red first", and the 502 on git.hiddenbox.org as a known fact.
- The binary-size line: ~1041 KiB was copied from 1.68.0 to 1.95.0 unmeasured;
  the measured value for 1.96.0 is ~1349 KiB.

No code change; tests untouched (1521/1521 at dbf1b65).
2026-11-23 18:27:52 +00:00
lotherk dbf1b65129 apex-twin 1.96.0: PAM restriction and firewalld audits, Cassandra probe
Four new tools (414 total), 9 new end-to-end checks (1521 total):

- pam_restrict_audit (blue): /etc/security/group.conf and time.conf under
  the root prefix - a rule with an empty service field that can never fire,
  a time list that is not day+HHMM-HHMM, a group.conf rule for a group
  /etc/group does not list, a "*" group field, and a time rule with "*" in
  every field. Field counts are checked because both files drop a malformed
  line with only a syslog warning.
- pwhistory_audit (blue): pwhistory.conf and sepermit.conf - remember
  missing/0/below 5, enforce_for_root off, use_authtok missing, and a
  sepermit separator naming no group.
- firewalld_audit (blue): firewalld.conf plus zones/*.xml - PanicMode on,
  CleanupOnExit=no, trusted or blocking default zone, an ACCEPT target or a
  rich accept rule, and a zone bound to no source and no interface.
- cassandra_probe (red): CQL native protocol on 9042. OPTIONS/SUPPORTED
  identifies the port without auth, STARTUP answered READY means the cluster
  takes queries from anyone, ERROR 0x2200 "Required auth" means an
  authenticator is set. No query is sent.

Test evidence:
- tests/run.py: 1521 passed, 0 failed.
- Red proof: neutralising the dead-rule branch in pam_restrict_audit with
  `if (0 && ...)` gave 1520 passed, 1 failed (spamassassin_audit dead rule);
  restored, back to 1521/1521.
- make release-check exit 0: version-check (5 places, 1.96.0), gate-audit
  (414 tools, 6 record-filter exceptions), test, test-asan, analyze, fuzz,
  fuzz-proxy, fuzz-http, distcheck (apex-twin-1.96.0.tar.gz builds and
  passes from the tarball).
- make coverage: 33194/39039 lines = 85.0%.

Docs: README status line and tool tables, man page .TH, SECURITY supported
line, CHANGELOG entry, APEX_VERSION.
2026-11-23 18:26:42 +00:00
lotherk d1ce8b1483 apex-twin 1.95.0: SpamAssassin, OpenDMARC and amavis audits, Bitbucket probe
Three blue mail-stack audits:
- spamassassin_audit: local.cf/local.conf with required_score 0,
  report_safe 0, skip_rbl_checks 1, a rule scored 0, world-writable file.
- opendmarc_audit: opendmarc.conf with RejectFailures off/absent,
  FailureReports off, IgnoreAuthenticatedClients yes, TCP Socket.
- amavis_audit: amavisd.conf plus conf.d with D_PASS destinies,
  bypass_spam_checks/bypass_virus_checks, no $virus_admin.
One red probe:
- bitbucket_probe: /rest/api/1.0/projects on 7990 without a token,
  project list saved as evidence.

Verified: make test 1512/1512, test-asan 1512/1512, analyze 0 warnings,
240 fuzz cases, coverage 85.1%, release-check exit 0 (distcheck 1.95.0).
Red proof: crippling the dead-rule finding turns the new check red.
2026-11-23 17:16:30 +00:00
lotherk 81589e0252 apex-twin 1.94.0: opendkim and rspamd audits, Confluence probe
Three new tools (406 total):
- opendkim_audit (blue): opendkim.conf and /etc/opendkim - inet: milter
  socket reachable from the network, RequireSafeKeys no, Mode without "s"
  (verifies but never signs), Syslog debug leaking content and key paths.
  An empty tree reports no-config instead of missing Socket/Mode lines.
- rspamd_audit (blue): UCL config and local.d fragments - bind_socket on
  *, 0.0.0.0 or :: with a port, clear-text password/enable_password and
  secure_ip 0.0.0.0/0 or ::/0 (password check skipped for every client).
  Fragments matched by .conf, .inc and .local; "*:port" counts as wildcard.
- confluence_probe (red): /status plus /rest/api/space?limit=5 on 8090
  without a token; the space list is saved as evidence, 401/403 is closed.

Evidence: make test 1501/1501, test-asan 1501/1501, analyze 0 warnings,
240 fuzz cases clean, gate-audit 406 tools from 14 tables, distcheck
1.94.0 builds and passes from the tarball, release-check exit 0 (371 s).
Red proof: with the Mode sign check disabled the opendkim check fails
(1500 passed, 1 failed), then rolled back.
2026-11-23 16:51:27 +00:00
lotherk 369915ae06 apex-twin 1.93.0: seccomp and systemd socket audits, Solr probe
Three new tools: seccomp_audit and systemd_socket_audit (blue) and
solr_probe (red).

seccomp_audit reads unit files and /etc/seccomp/*.json under the root
prefix and flags an empty SystemCallFilter= (present but removes nothing),
a filter whose tokens are all "~" denials (the allowlist is the whole
syscall table), a root service with NoNewPrivileges=no or without the
setting at all, and a profile with SCMP_ACT_ALLOW or no defaultAction.

systemd_socket_audit reads .socket units: ListenStream on 0.0.0.0, [::]
or :::, a SocketMode with the world bit, Accept=yes without
MaxConnections= and a world-writable unit.

solr_probe asks /solr/, /solr/admin/cores?action=STATUS and
/solr/admin/info/system on 8983 without credentials; a 2xx with core
entries means the index inventory is public and the body becomes
evidence.

Evidence: make test 1493/1493, test-asan 1493/1493, analyze 0 warnings,
240 fuzz cases without a sanitizer report, release-check exit 0 (366 s)
including distcheck from the tarball, coverage 85.1% (README updated),
fresh clone of the previous tree green. The red proof for both blue
audits was run (check went red, then rolled back).
2026-11-23 16:31:26 +00:00
lotherk 997280b3d2 apex-twin 1.92.0: fluent-bit and Vector audits, Jaeger probe
Three new tools in the observability family:

- fluentbit_audit (blue): fluent-bit.conf plus conf.d fragments. Flags an
  [OUTPUT] with a non-loopback Host and no "tls On", a [SERVICE] with
  HTTP_Server On and HTTP_Listen 0.0.0.0, a debug/trace log level and a
  world-writable file.
- vector_audit (blue): vector.toml, block by block. Flags a source bound to
  0.0.0.0/::, a sink with an endpoint and no tls block (or tls.verify=false),
  the GraphQL api enabled beyond loopback, a missing sink and a
  world-writable file.
- jaeger_probe (red): /api/services on 16686 without credentials; a 2xx with
  a data array is the finding, the body is saved as evidence and the audit
  log records it. A 401 counts as closed.

Tests: make test 1485/1485, test-asan 1485/1485, analyze 0, 240 fuzz cases,
coverage 85.0%, release-check (incl. distcheck from the tarball) exit 0.
Red proof: breaking the "tls On" match turned the fluentbit check red and
was rolled back.
2026-11-23 15:57:02 +00:00
lotherk 41eac32f53 apex-twin 1.91.0: promtail and otel collector audits, Loki and Tempo probes
Two blue config audits and two red API probes for the observability stack.

promtail_audit (blue): positions.filename missing or under /tmp, a client
without tenant_id, a plain http push URL and a world-writable config.
otel_collector_audit (blue): an exporters block without tls, a debug
exporter, zpages/pprof and a world-writable config.
loki_probe (red): /loki/api/v1/labels without credentials; the label list
is saved as evidence.
tempo_probe (red): /api/search/tags without credentials; the tag list is
saved as evidence.

Verified: 1477/1477 checks (make test and test-asan), gate-audit 397 tools
from 14 tables, analyze 0 warnings, 240 fuzz cases, distcheck from the
tarball, coverage 85.0%. Red proof: disabling the tmp-positions check in
promtail_audit turns the fixture check red (1476/1), restored afterwards.
2026-11-23 15:33:59 +00:00
lotherk 2a0d5e5833 apex-twin 1.90.0: suricata, icinga2 and falco audits, Schema Registry probe
Three blue config audits and one red probe:
- suricata_audit: rule-files left empty (sensor inspects nothing), enabled: no,
  a default-rule-path that does not exist, world-writable .rules files.
- icinga2_audit: accept_config/accept_commands, ApiListener bound beyond
  localhost, run_as_root check commands, world-writable .conf.
- falco_audit: no rules_file, minimum_priority debug/info, http webhook,
  writable rules in rules.d.
- schema_registry_probe: /subjects on 8081 without credentials, subject list
  saved as evidence.

Four parser bugs found and fixed while writing the fixtures: strcmp suffix
check used n-4 instead of n-5 for ".conf", yaml_value() cannot tell an empty
key from a list (new yaml_has_inline_value), suricata never counted the config
file it read, and schema_registry_probe emitted an unterminated endpoints
array. Dead icinga_state.no_tls field removed instead of faking a value.

Verified: make test 1467/1467, make test-asan 1467/1467, analyze 0 warnings,
240 fuzz cases, coverage 85.0%, release-check incl. distcheck exit 0.
Red proof: disabling the rule-files check turns the new suricata check red.

393 tools, 1467 checks.
2026-11-23 15:12:30 +00:00
lotherk ea40473dc3 apex-twin 1.89.0: fapolicyd, systemd timer and yara audits, OpenBMC probe
Three blue config audits and one red probe:

- fapolicyd_audit: permissive=1, integrity=none/0, an allow-all rule before
  any deny, world-writable fapolicyd.conf.
- systemd_timer_audit: OnCalendar every minute or OnUnitActiveSec<=60s,
  Persistent=true, .service without User= (runs as root), writable unit file.
- yara_audit: scanning disabled in yara.conf, writable or empty rule file,
  no rule set at all.
- openbmc_probe: xyz.openbmc_project control tree on 443 answering without a
  session; power restore policy saved as evidence.

Checks: make test 1459/1459, test-asan 1459/1459, analyze 0 warnings,
240 fuzz cases clean, coverage 85.0%, release-check incl. distcheck exit 0.
2026-11-23 14:35:14 +00:00
lotherk c5ba9d537b apex-twin 1.88.0: freshclam and tripwire audits, CoreDNS probe
Three new tools (385 total):
- freshclam_audit (blue): UpdateChecks no, DatabaseMirror over plain http,
  Checks below 2, world-writable freshclam.conf.
- tripwire_audit (blue): no SITEKEYFILE, site key readable beyond its owner,
  no MAILTO, world-writable twcfg.txt.
- coredns_probe (red): the caddy plugin API /config/ on 2019 without a token;
  a 2xx means the DNS server blocks can be rewritten at runtime, the answer
  goes to evidence.

Proof: make test 1451/1451, test-asan 1451/1451, analyze 0 warnings,
240 fuzz cases, release-check exit 0 in 356 s incl. distcheck, coverage 85.0%.
Red proof: breaking the UpdateChecks match in freshclam_scan_file turned the
new freshclam check red and nothing else.

Not fully covered: the second remote git.hiddenbox.org still answers HTTP 502,
so this commit is pushed to kropa only.
2026-11-23 14:03:56 +00:00
lotherk 53d5084a77 apex-twin 1.87.0: smartd, tlog and abrt audits, Nomad probe
Three blue config audits: smartd_audit (device without -m, untyped
DEVICESCAN, writable -M exec hook, world-writable smartd.conf),
tlog_audit (scope without session, notice without wall, no log target,
writable config) and abrt_audit (AutoreportingEnabled=yes, non-local
report URL, upload without SSLVerify, writable abrt.conf). One red probe:
nomad_probe reads /v1/agent/self, /v1/jobs and /v1/nodes on 4646 without
a token and saves the job list as evidence.

382 tools, 1445 end-to-end checks. Verified: make test 1445/1445,
test-asan 1445/1445, analyze 0 warnings, 240 fuzz cases green,
release-check exit 0 including distcheck from the tarball, coverage 85.0%.
Reverse test: forcing the writable-exec check off turns the smartd check
red (1444/1445), restored afterwards.
2026-11-23 13:41:11 +00:00
lotherk b56687ef7f apex-twin 1.86.0: dhclient, journal-upload and fwupd audits, Vault probe
Three blue config audits and one red probe:
- dhclient_audit: domain-name-servers taken from the DHCP offer, a
  supersede/prepend domain-name-servers or domain-name/domain-search
  override, and a hook in dhclient-enter-hooks.d that runs as root and is
  world-writable.
- journal_upload_audit: Upload URL over plain http, missing ServerKeyFile,
  world-writable journal-upload.conf.
- fwupd_audit: OnlyTrusted=false (unverified firmware is installed), empty
  DisabledPlugins, world-writable daemon.conf.
- vault_probe: /v1/sys/seal-status and /v1/sys/mounts without a token; a 2xx
  on the mount list means every secret engine is readable unauthenticated,
  the body is saved as evidence.

378 tools, 1437 checks.

Verified: make test 1437/1437, test-asan 1437/1437, analyze 0 warnings,
fuzz 240 cases, coverage 85.0%, release-check exit 0 incl. distcheck.
Red proof: breaking the OnlyTrusted/seal-status detection turned exactly the
two new checks red.
2026-11-23 13:13:58 +00:00
lotherk 9ff624d145 apex-twin 1.85.0: Jetty audit, Zabbix and Datasette probes
Three additions, one of them a duplicate avoided:

- jetty_audit (blue): jetty.xml, jetty-ssl.xml and start.d/*.ini. An
  addConnector block on 0.0.0.0/:: without an sslContextFactory inside the
  same block is a clear-text connector on every interface; a start.d host
  key that sets 0.0.0.0 overrides the XML and counts the same way. Also
  flags a LoginService password as literal text, MD5 as the login hash and
  a writable configuration file.
- zabbix_probe (red): apiinfo.version is reachable before login and is not
  exposure by itself, so only user.login with the default Admin/zabbix pair
  counts. The response is saved as evidence; the session token is never
  printed.
- datasette_probe (red): /-/databases.json without a token names every
  attached SQLite file and becomes the evidence.
- varnish_audit was planned but already existed (VCL write access, purge
  ACL, -T 0.0.0.0); it was not duplicated.

Test: make test 1429/1429, test-asan 1429/1429, analyze 0 warnings, 240
fuzz cases with no sanitizer report, gate-audit 374 tools, distcheck builds
and passes from the tarball, coverage 85.0%.

Two real bugs found by the new tests: apex_http_once takes the body before
the headers (the Zabbix POST sent the header line as the body), and the
"no-findings" info entry was counted in findings_count.
2026-11-23 12:32:28 +00:00
lotherk 535ab774c0 apex-twin 1.84.0: gated wrappers for nuclei, nikto, ffuf, gobuster, sqlmap
Five external scanners behind exactly one code path (src/tools_ext.c):

- the target goes through gated_run(), so the scope gate and the audit line
  happen before anything is executed;
- every argument is checked against a per-tool allowlist, and a flag that is
  not on it is refused instead of passed through (--os-shell, -oN /etc/passwd);
- no shell: argv is built in C and handed to exec;
- stdout and stderr go to one pipe and are saved as evidence;
- a missing binary is a sentence from apex_have(), not exit 127 mid-scan, and
  capabilities lists each one as present or absent;
- gobuster dns mode gets the bare domain with -d, dir and vhost get -u.

hydra, medusa and msfvenom get no wrapper: mass credential guessing and
payload generation are outside what this project does.

gate_audit now follows the indirect path: a handler may hand argv to a shared
runner, but the runner itself must call the scope gate. Both halves are checked
(the negative test removes the gate from ext_run and expects a failure).

Tests: 371 tools, 1422 checks. make test 1422/1422, test-asan 1422/1422,
analyze 0 warnings, 240 fuzz cases with no sanitizer report, coverage 85.0%,
release-check exit 0 including distcheck from the tarball.
2026-11-23 12:06:35 +00:00
lotherk 7179772fac apex-twin 1.83.0: PHP-FPM, uWSGI and lighttpd audits, Superset probe
Three blue config audits: php_fpm_audit (pool files in /etc/php-fpm.d,
/etc/php/<ver>/fpm/pool.d and /etc/php-fpm.conf - root pool user, a 0666
listen.mode socket, display_errors in php_admin_value), uwsgi_audit (uid/gid 0,
empty module list, world-writable ini) and lighttpd_audit (document-root /,
no SSL engine, dir-listing, world-writable config). One red probe:
superset_probe reads /api/v1/dashboard and /login without a token and saves the
dashboard list as evidence.

Verified: make test 1407/1407, test-asan 1407/1407, gate-audit 366 tools OK,
analyze 0 warnings, 240 fuzz cases, coverage 85.0%, release-check exit 0
(348 s, distcheck from the tarball included). Counter-proof: removing the
root-pool check turns the php_fpm test red, restoring it green.
2026-11-23 11:30:32 +00:00
lotherk a975f59666 apex-twin 1.82.0: apt auth, aliases and netgroup audits, TeamCity probe
Three blue config audits:
- apt_auth_audit: /etc/apt/auth.conf(+.d) - credentials for a host reached
  over plain http:// and a group/world-readable or writable file.
- aliases_audit: mail piped into a command, root mail forwarded to another
  local account, writable alias file.
- netgroup_audit: member triple with an empty host field (NIS wildcard that
  matches every host), plus a writable netgroup file.

One red probe:
- teamcity_probe: /app/rest/projects and /app/rest/users on 8111 without a
  token; a 2xx list is saved as evidence.

Verified: make test 1398/1398, test-asan 1398/1398,
analyze 0 warnings (one real NULL-dereference report fixed in netgroup
continuation handling), fuzz 240 cases, distcheck 1.82.0 from the tarball,
coverage 85.0%. Red proof: renaming the root-forward finding id makes the
aliases check fail, rolled back.
2026-11-23 10:17:45 +00:00
lotherk 47b7ada7d8 apex-twin 1.81.0: nfs.conf, idmapd and netplan audits, cAdvisor probe
Three blue config audits and one red probe:

- nfs_conf_audit (blue): /etc/nfs.conf - vers2/vers3 enabled, mountd
  insecure port or no TCP, [nfsd] rdma without protection, world-writable
  file.
- idmapd_audit (blue): /etc/idmapd.conf - missing or "nobody" Domain, a
  static Local-Realms mapping, world-writable file.
- netplan_audit (blue): /etc/netplan/*.yaml - a device without addresses
  and without dhcp4/dhcp6, a gateway without a matching on-link address,
  world-writable file.
- cadvisor_probe (red): /api/v1/containers and /healthz on 8080 without
  auth; the container list is saved as evidence.

Also: the dispatch array size is now APEX_MAX_TOOLS (512) instead of a
hard-coded 384 in 14 places, so the tool table has room to grow.

Evidence: make test 1389/1389, test-asan 1389/1389, analyze 0 warnings,
240 fuzz cases clean, coverage 85.0%, release-check incl. distcheck from
the tarball exit 0. Red proof: breaking the nfs.conf checks turned the
new test red, then rolled back.
2026-11-23 09:35:17 +00:00
lotherk 28e931ea60 apex-twin 1.80.0: modules-load, depmod and adduser.conf audits, Ollama probe
Three blue config audits: modules_load_audit (/etc/modules and
modules-load.d: CIS-blacklisted names, entries that are not module names,
duplicates, world-writable), depmod_audit (depmod.d: absolute path first in
a search line, override lines, world-writable) and adduser_conf_audit
(DIR_MODE with group/other access, USERGROUPS=no, DSHELL not in /etc/shells,
world-writable). Red: ollama_probe reads /api/tags on 11434 without
credentials and saves the pulled model list as evidence.

Verified: make test 1380/1380, test-asan 1380/1380, analyze 0 warnings,
fuzz 240 cases without a sanitizer report, gate-audit 354 tools,
version-check 1.80.0 in 5 places, release-check incl. distcheck exit 0,
coverage 84.9%. Red proof: neutralising the CIS blacklist check made the new
modules_load_audit check fail; rolled back.
2026-11-23 08:52:54 +00:00
lotherk 39dd608291 apex-twin 1.79.0: ufw, monit and ClamAV audits, Jira probe
Three blue config audits and one red probe:

- ufw_audit: ENABLED=no, a default input policy that is not DROP/REJECT,
  and every ACCEPT in user.rules that reaches a database, remote access or
  mail port with no -s restriction; a world-writable ufw.conf or user.rules.
- monit_audit: an httpd block not bound to localhost, allow user:password
  with a literal password, a world-writable monitrc.
- clamav_audit: TCPSocket on, a TCPAddr beyond loopback, a VirusEvent or
  OnUpdateExecute hook, LogRotate off, a world-writable clamd.conf.
- jira_probe: /rest/api/2/project on 8080 without credentials; the project
  list is saved as evidence.

Two parser bugs found by the new checks: clamav_audit read only "false"/"0"
for LogRotate (not "no"), and the Jira probe parsed the status line with
atoi instead of apex_status_code.

Tests: make test 1371/1371, test-asan 1371/1371, analyze 0 warnings,
240 fuzz cases clean, coverage 84.9%, release-check exit 0 including
distcheck. Red proof: breaking the LogRotate branch turns the ClamAV
check red.
2026-11-23 08:16:49 +00:00
lotherk af628de86b apex-twin 1.78.0: crypttab, useradd and AIDE audits, Jupyter probe
Three blue config audits: crypttab_audit (readable key file, 'none' key,
discard/allow-discards, world-writable table), useradd_audit
(/etc/default/useradd plus login.defs UID_MIN, /etc/skel dotfiles that are
group/world-writable or are shell rc files) and aide_audit (writable
config, database under /tmp, excluded trees, md5-only rules). Red:
jupyter_probe reads /api/kernels and /api/sessions on 8888 without a token
and saves the session list as evidence.

Verified: make test 1362/1362, test-asan 1362/1362, analyze 0 warnings,
240 fuzz cases, coverage 84.9%, release-check incl. distcheck 1.78.0 green.
2026-11-23 00:41:48 +00:00
lotherk e1703cfa4d apex-twin 1.77.0: networkd, pam_namespace and SSH client audits
Three blue config audits, no new red tool (memcached_probe already existed
in tools_db.c and a duplicate registration was caught and removed):

- networkd_audit: /etc/systemd/network/*.network, *.netdev, *.link - a
  [Match] without Name=/MACAddress=/Type=/Path=/Driver= applies to every
  interface; DHCP=yes with IPv6AcceptRA=yes and no UseDNS=no lets DHCP and
  RA pick the resolver; DNS= with a public resolver; world-writable unit.
- namespace_audit: /etc/security/namespace.conf - no /tmp, /var/tmp or
  /dev/shm entry (shared tmp), empty or unknown method field, user list
  starting with "~" (isolation only for the listed users), world-writable.
- ssh_client_audit: /etc/ssh/ssh_config plus ssh_config.d/*.conf -
  StrictHostKeyChecking no, UserKnownHostsFile /dev/null or none,
  GlobalKnownHostsFile none, ssh-rsa/ssh-dss in the algorithm lists.
  ssh_config_audit reads only the server side.

Test evidence: make test 1354/1354, test-asan 1354/1354, analyze 0 warnings,
fuzz 240 cases, coverage 85.0%, release-check exit 0 including distcheck of
apex-twin-1.77.0. Red proof: disabling the DHCP= branch in networkd_scan_file
turned the networkd check red, then rolled back.
2026-11-23 00:13:27 +00:00
lotherk ecfb18cf97 apex-twin 1.76.0: nscd and faillock audits, GitLab probe
Three new tools, 13 new checks:
- nscd_audit (blue): persistent/shared cache, TTL above an hour,
  world-writable /etc/nscd.conf.
- faillock_audit (blue): deny=0 turns the lockout off, a non-zero
  unlock_time under a minute, missing even_deny_root. unlock_time=0 is
  strict (counter never cleared) and is not flagged.
- gitlab_probe (red): /api/v4/projects decides, /api/v4/version alone
  answers to anyone; a non-empty project array is the exposure and
  becomes the evidence.

Verification: 339 tools / 1348 checks in make test and test-asan,
gate-audit 339 tools, analyze 0 warnings, 240 fuzz cases, distcheck from
the 1.76.0 tarball, coverage 84.9 %. Red proof: disabling the unlock_time
check turned faillock_audit's check red.
2026-11-22 23:47:23 +00:00
lotherk 022086f474 apex-twin 1.75.0: inetd, ld.so.conf and rc.local audits, Airflow probe
Three blue config audits and one red probe, 336 tools, 1342 checks.

- inetd_audit: shell/login/exec/rsh services, cleartext legacy daemons
  (telnet, ftp, tftp, pop3), world-writable inetd.conf.
- ld_so_conf_audit: library path under /tmp, /var/tmp, /home or /dev/shm,
  world-writable library directory, world-writable config.
- rc_local_audit: curl/wget piped into a shell, /tmp reference, missing
  final exit.
- airflow_probe: /api/v1/dags 2xx without a token, DAG list as evidence.

Evidence: make test 1342/1342, test-asan 1342/1342, analyze 0 warnings,
240 fuzz cases, coverage 84.9% (unchanged), release-check exit 0 in 322 s
including distcheck from the tarball. Red proof: disabling the
unsafe-libdir branch turns the ld_so_conf check red.
2026-11-22 23:26:36 +00:00
lotherk 4159d5305c apex-twin 1.74.0: syslog-ng and ntpd audits, Rundeck probe
Three new tools:
- syslog_ng_audit (blue): syslog-ng.conf and conf.d fragments; a network()
  source without ip() listens on every address, one without tls() takes
  logs in clear, and a writable config is flagged.
- ntpd_audit (blue): ntp.conf; missing "restrict default", a non-local
  restrict without all of nomodify notrap nopeer noquery, missing
  "disable monitor" (mode-6 monlist amplifier), world-writable config.
- rundeck_probe (red): /api/14/projects and /api/1/projects without a
  token; the project list is saved as evidence.

332 tools, 1334 end-to-end checks.

Test evidence: make test 1334/1334, test-asan 1334/1334, analyze 0
warnings, coverage 84.9%, release-check exit 0 in 318 s including
distcheck from the tarball.
2026-11-22 23:02:08 +00:00
lotherk defe13f3df apex-twin 1.73.0: anacrontab and MOTD audits, Keycloak probe
Three additions in this tranche:

- anacrontab_audit (blue): /etc/anacrontab and /etc/cron.d with a root
  prefix. Flags a job command that runs out of /tmp, /var/tmp or
  /dev/shm, a curl/wget piped into a shell, and a world-writable file.
  NAME=value lines are environment settings and are not counted as jobs.
- motd_audit (blue): /etc/update-motd.d. Flags a world-writable script,
  one without a shebang and one that fetches a URL at login time.
- keycloak_probe (red): /realms/master, its OpenID configuration and the
  admin console. The realm JSON is public by design, so only
  registrationAllowed:true counts as a finding; the body is evidence.

Test evidence: make test 1328/1328 checks, make test-asan 1328/1328,
analyze 0 warnings, 240 fuzz cases without a sanitizer report,
coverage 84.8%, release-check exit 0 including distcheck from the
tarball. Red proof: disabling the fetch detection in motd_audit turned
"motd_audit flags a writable fetch script and a missing shebang" red,
then the change was rolled back.

329 tools, version consistent in 5 places.
2026-11-22 22:25:52 +00:00
lotherk 979b605ff1 apex-twin 1.72.0: pam_env, hosts and dnf repo audits, SonarQube probe
Three blue config audits and one red API probe (+4 tools, 322 -> 326):

- pam_env_audit: LD_PRELOAD/LD_LIBRARY_PATH in /etc/environment or
  pam_env.conf (code injection into every login), a world-writable PATH
  entry, a world-writable file. The pam_env.conf variable name is the
  first token before DEFAULT=/OVERRIDE=, not the text before the '='.
- hosts_audit: a dotted name pinned to loopback/private/link-local, the
  same name with two different addresses, a world-writable /etc/hosts.
- dnf_repo_audit: gpgcheck=0, repo_gpgcheck=0, sslverify=0, a plain http
  baseurl, a world-writable .repo file.
- sonarqube_probe: /api/system/status answers even with anonymous access
  off, so only a 2xx on /api/projects/search counts as open; the project
  list becomes the evidence.

Evidence: make test 1322/1322, test-asan 1322/1322, analyze 0 warnings,
240 fuzz cases, coverage 84.8%, release-check exit 0 including distcheck
of the 1.72.0 tarball. Red proof: disabling the gpgcheck branch turned
the dnf check red, then the change was reverted.
2026-11-22 21:19:19 +00:00
lotherk e8d2e4ccd6 apex-twin 1.71.0: limits, access.conf and pwquality audits, Kafka Connect probe
Three blue config audits: limits_audit (nofile/nproc/memlock unlimited, core
dumps above zero, world-writable files; only a literal "unlimited" counts),
access_conf_audit (+ rule for ALL, a + rule without tty/host restriction and a
trailing "+ : ALL : ALL" default-allow) and pwquality_audit (minlen below 8,
minclass 0, dictcheck=0, enforcing=0, commented defaults stay silent).

One red probe: kafka_connect_probe queries /, /connectors and
/connector-plugins on 8083; a 2xx connector list is an unauthenticated Kafka
Connect worker and is saved as evidence.

Corrected the tranche plan: login_defs_audit and nsswitch_audit already
existed, so the scope moved to the three genuinely missing files.

Tests: 1314 end-to-end checks green, 240 fuzz cases, analyze clean,
coverage 84.8%, distcheck from the tarball passes (313 s).
2026-11-22 20:54:03 +00:00
lotherk 357c6575e9 apex-twin 1.70.0: fstab, modprobe and grub audits, Argo CD probe
New blue tools: fstab_audit (/tmp and friends without nosuid/nodev/noexec,
user-mountable mounts, world-writable fstab), modprobe_audit (install hooks
that run a command as root, world-writable config) and grub_audit
(mitigations=off, nosmap, nokaslr, missing init_on_alloc/init_on_free/
slab_nomerge). New red tool: argocd_probe (/api/v1/applications without a
token, saved as evidence).

Tests: 1302 end-to-end checks green, 240 fuzz cases, analyze clean,
coverage 84.7%, distcheck from the tarball passes.
2026-11-22 20:00:22 +00:00
lotherk e2cd449d60 apex-twin 1.69.0: Podman, BuildKit and Supervisor audits, Portainer probe
- podman_audit: registries.conf [[registry]] with insecure=true or an
  http:// location, short-name-mode=disabled, missing unsigned policy;
  policy.json without signedBy; world-writable files.
- buildkitd_audit: [registry] insecure=true, tcp:// without CA, no
  rootless worker, world-writable buildkitd.toml.
- supervisor_audit: [inet_http_server] beyond localhost, same without
  username/password, [program:*] running as root.
- portainer_probe: /api/status and /api/users/admin/check without
  credentials; a 2xx admin check (204 on real Portainer) becomes evidence,
  setup-open is reported separately.
- Two TOML bugs found by the new fixtures: a key kept its trailing space
  so `insecure ` never matched, and short_name_mode was emitted unquoted.
- 314 tools, 1290 checks, 240 fuzz cases, 84.7% line coverage.

Verified: make release-check (version-check, gate-audit, test 1290/1290,
test-asan 1290/1290, analyze 0 warnings, fuzz 240 + proxy 60 + http 40
cases, distcheck from tarball), make coverage 84.7%.
2026-11-22 19:39:01 +00:00
lotherk 98c7ae7023 apex-twin 1.68.0: gitconfig, npmrc and pip.conf audits, Harbor probe
gitconfig_audit (blue): http.sslVerify=false, a url.*.insteadOf rewrite to
http://, credential.helper=store and a world-writable /etc/gitconfig.

npmrc_audit (blue): strict-ssl=false, a plain-HTTP registry, a cleartext
_authToken and world-writable npmrc files.

pip_conf_audit (blue): a plain-HTTP index-url, a trusted-host override and
world-writable pip.conf files.

harbor_probe (red): GET /api/v2.0/health and /api/v2.0/projects without
credentials; a 2xx project list is an open Harbor API and is saved as
evidence.

Verified: make test 1278/1278, make test-asan 1278/1278, make analyze 0
warnings, make coverage 84.6%, make version-check 1.68.0 in 5 places,
make gate-audit 310 tools, make release-check builds and passes from the
tarball.
2026-11-22 18:43:00 +00:00
lotherk 7b853ad392 apex-twin 1.67.0: passwd, authorized_keys and ld.so.preload audits, Gitea probe
Blue:
- passwd_audit: /etc/passwd and /etc/shadow: duplicate UID 0, empty shadow
  hashes, system accounts with a login shell and world-writable files.
- authorized_keys_audit: root and home keys: world-writable files or .ssh
  directories and command= hooks piping a download into a shell.
- ld_preload_audit: a non-empty preload list, a world-writable file and
  world-writable libraries.

Red:
- gitea_api_probe: /api/v1/version and /api/v1/admin/users without
  credentials; a 2xx admin list is an open admin API with evidence.

Tests with passwd/shadow, authorized_keys and ld.so.preload trees plus two
Gitea fixtures (open and 403). 1266 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.67.0.
2026-11-22 17:54:04 +00:00
lotherk 03c8a63a0f apex-twin 1.66.0: Bluetooth, NetworkManager and D-Bus audits, Nexus probe
Blue:
- bluetooth_audit: main.conf: AutoEnable, Privacy=off, JustWorksRepairing
  always, a missing LE controller mode, world-writable.
- networkmanager_audit: NetworkManager.conf and system-connections: WEP, a
  PSK file readable beyond its owner, 802.1X without a CA, world-writable.
- dbus_audit: system policy: allow own=* and send_destination=* wildcards,
  world-writable.

Red:
- nexus_probe: /service/rest/v1/status and /service/rest/v1/repositories
  without credentials; a 2xx repository list is an open API with evidence.

Tests with Bluetooth/NetworkManager/D-Bus trees and two Nexus fixtures (open
and 401). 1254 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.66.0.
2026-11-22 17:34:36 +00:00
lotherk 8a81fb1e4e apex-twin 1.65.0: USBGuard, certbot and WPA audits, Jenkins API probe
Blue:
- usbguard_audit: allow rules without with-interface, implicit and present
  device policy allow, world-writable files.
- certbot_audit: renewal configs: manual authenticator, a renew/pre/post hook
  piping a download into a shell, world-writable files.
- wpa_supplicant_audit: key_mgmt=NONE, WEP keys, a PSK file readable beyond
  its owner.

Red:
- jenkins_api_probe: /api/json and /whoAmI/api/json without credentials; a 2xx
  with jobs is an anonymous read API and is saved as evidence.

Two bugs the fixture caught: a bare 'allow' line (no trailing space) was not
matched, and the policy values were emitted without quotes, producing invalid
JSON.

Tests with USBGuard/certbot/WPA trees and two Jenkins fixtures (open and 403).
1242 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.65.0.
2026-11-22 17:11:49 +00:00
lotherk 5775248153 apex-twin 1.64.0: resolved, udev and issue audits, SMTP AUTH probe
Blue:
- resolved_audit: resolved.conf: public resolvers, DNSSEC off/allow-downgrade,
  DNS-over-TLS off, LLMNR and MulticastDNS on, world-writable.
- udev_audit: rules from /etc and /usr/lib: MODE 0666/0777, RUN+= hooks that
  pipe a download into a shell, world-writable files.
- issue_audit: /etc/issue and /etc/issue.net: \r/\v escapes, uname -r or a
  literal kernel version, world-writable files.

Red:
- smtp_auth_probe: EHLO features; PLAIN/LOGIN offered without STARTTLS means
  credentials cross the wire in clear. No login is attempted.

SMTP EHLO lines are parsed in full: reply_feature returns only the first
token, so 'AUTH PLAIN LOGIN' had to be read from the rest of the line.

Tests with resolved/udev/issue trees and two SMTP fixtures (AUTH without
STARTTLS, AUTH with STARTTLS). 1230 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.64.0.
2026-11-22 16:47:38 +00:00
lotherk ea281386ba apex-twin 1.63.0: OpenSSL, curl and wget config audits, TLS chain probe
Blue:
- openssl_cnf_audit: openssl.cnf: MinProtocol TLSv1/TLSv1.1, a CipherString
  with SECLEVEL=0/1, a missing system_default_sect and a world-writable file.
- curlrc_audit: /etc/curlrc: insecure, a plain-HTTP proxy, world-writable.
- wgetrc_audit: /etc/wgetrc: check_certificate=off, a plain-HTTP proxy,
  world-writable.

Red:
- tls_chain_probe: one -showcerts handshake; a one-certificate chain whose
  subject differs from its issuer means a missing intermediate. Self-signed
  certificates are accepted.

Tests with OpenSSL/curlrc/wgetrc trees and three TLS servers (leaf only,
leaf+CA, self-signed). 1218 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.63.0.
2026-11-22 16:23:43 +00:00
lotherk 7a3fc47b8f apex-twin 1.62.0: Compose, K8s manifest and Dockerfile audits, AMQP probe
Blue:
- compose_audit: privileged, host network/PID, a mounted Docker socket,
  plaintext passwords/tokens and a world-writable file.
- k8s_manifest_audit: privileged, hostNetwork/PID/IPC, runAsUser 0 (numeric,
  so 1000 is not flagged), hostPath /, missing securityContext.
- dockerfile_audit: root or missing USER, :latest/untagged base, ADD from a
  URL, RUN piping a download into a shell.

Red:
- amqp_probe: sends the 0-9-1 header, reads Connection.Start, reports product,
  version and mechanisms. No login; a closed endpoint is a negative result.

Two real defects caught by the gates: runAsUser: 1000 matched a substring '0',
and the analyzer found a short-frame over-read before reading the table length
(payload is also zeroed so the read is provably initialized).

Tests with Compose/manifest/Dockerfile fixtures and an AMQP frame fixture.
1205 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.62.0.
2026-11-22 16:01:15 +00:00
lotherk a118a8d226 apex-twin 1.61.0: atd, securetty and tmpfiles audits, Logstash API probe
Blue:
- atd_audit: at.allow/at.deny: world-writable lists and an empty at.deny
  that opens scheduling to every user. Both files missing is the safe case
  (root only) and is not flagged.
- securetty_audit: serial or virtual console entries (ttyS0, ttyS1, console,
  hvc0, ttyAMA0) that allow root login, and a world-writable file.
- tmpfiles_audit: tmpfiles.d/*.conf from /etc and /usr/lib: 0777/0666 modes,
  z/Z rules on /tmp or /var/tmp, world-writable files.

Red:
- logstash_api_probe: /_node/info and /_node/stats without credentials; a 2xx
  is an open monitoring API with the stats answer saved as evidence.

Tests with atd/securetty/tmpfiles trees and two Logstash fixtures (open and
401). 1193 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.61.0.
2026-11-22 15:32:32 +00:00
lotherk ddb99c0609 apex-twin 1.60.0: sshd_config, hosts_access and profile audits, Kibana probe
Blue:
- sshd_config_audit: sshd_config and sshd_config.d/*.conf with OpenSSH's
  first-value-wins order (drop-ins read before the main file): root login,
  password auth, empty passwords, X11, MaxAuthTries above 3, no
  AllowUsers/AllowGroups, world-writable files.
- hosts_access_audit: hosts.allow with ALL: ALL, a missing hosts.deny,
  world-writable files.
- profile_audit: /etc/profile, bash.bashrc and profile.d/*.sh: world-writable
  scripts, a umask that leaves group/other write, a PATH with . or an empty
  entry.

Red:
- kibana_api_probe: /api/status and /api/saved_objects/_find?type=dashboard
  without credentials; the saved-objects answer is evidence.

Tests with sshd/hosts.allow/profile trees (including a drop-in overriding the
main sshd_config) and two Kibana fixtures. 1181 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.60.0.
2026-11-22 15:10:05 +00:00
lotherk f1fbf9d8fe apex-twin 1.59.0: Telegraf, Graylog and Netdata audits, ClickHouse probe
Blue:
- telegraf_audit: telegraf.conf: an HTTP output URL, insecure_skip_verify,
  credentials in the file and a world-writable file.
- graylog_audit: server.conf: the REST API on 0.0.0.0, plain HTTP, a
  password_secret shorter than 64, an empty root_password_sha2 and a
  world-writable file.
- netdata_audit: netdata.conf: bind to IP 0.0.0.0, an allow list of *, a
  missing allow list and a world-writable file.

Red:
- clickhouse_probe: /ping and /?query=SELECT version() without credentials; a
  2xx with a version is an open HTTP API and is saved as evidence.

Tests with Telegraf/Graylog/Netdata trees and two ClickHouse fixtures (open
and 403 with a public ping). 1168 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.59.0.
2026-11-22 14:46:55 +00:00
lotherk 827ff97441 apex-twin 1.58.0: Logstash, Filebeat and Fluentd audits, InfluxDB probe
Blue:
- logstash_audit: logstash.yml: api.http.host 0.0.0.0, xpack monitoring
  disabled, missing path.data and a world-writable file.
- filebeat_audit: filebeat.yml: an HTTP Elasticsearch output,
  ssl.verification_mode none (both key forms), credentials in the file, no
  output and a world-writable file.
- fluentd_audit: fluent.conf/td-agent.conf: a forward source without
  shared_key, an HTTP output without TLS and a world-writable file.

Red:
- influxdb_probe: /ping and /query?q=SHOW+DATABASES without credentials; a 2xx
  query is an open database API and is saved as evidence.

Tests with Logstash/Filebeat/Fluentd trees and two InfluxDB fixtures (open and
401 with a public ping). 1156 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.58.0.
2026-11-22 14:25:37 +00:00
lotherk ea69d8d92f apex-twin 1.57.0: Kibana, Nagios and Synapse audits, NATS monitoring probe
Blue:
- kibana_audit: kibana.yml: server.host 0.0.0.0, xpack.security disabled,
  Elasticsearch credentials in the file, no TLS, world-writable.
- nagios_audit: nagios.cfg and the cgi.cfg beside it: external commands,
  use_ssl_authentication=0, wildcard CGI authorization, a default user.
- synapse_audit: homeserver.yaml: open registration without a token, no TLS
  listener, no trusted key servers.

Red:
- nats_monitoring_probe: /varz and /connz without credentials; a 2xx with a
  version is an open monitoring endpoint with evidence saved.

Tests with Kibana/Nagios/Synapse trees and two NATS monitoring fixtures (open
and 401). 1144 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.57.0.
2026-11-22 14:02:58 +00:00
lotherk 2bbe0c206e apex-twin 1.56.0: Webmin, Cockpit and phpMyAdmin audits, MinIO admin probe
Blue:
- webmin_audit: miniserv.conf: ssl=0, an allow list covering every address
  (token-wise, so 10.0.0.0/8 is not mistaken for 0.0.0.0), an empty or default
  password and a world-writable file.
- cockpit_audit: cockpit.conf: AllowUnencrypted=true, a missing Origins
  allow-list and a world-writable file.
- phpmyadmin_audit: config.inc.php: a short or empty blowfish secret,
  AllowNoPassword, auth_type=config and a world-writable file.

Red:
- minio_admin_probe: /minio/health/live and /minio/admin/v3/info without a
  signature; a 2xx admin answer is unsigned admin access with evidence.

The allow-list check found a real substring bug during the run: 10.0.0.0/8
contains '0.0.0.0', so the list is now split into tokens first.

Tests with Webmin/Cockpit/phpMyAdmin trees and two MinIO fixtures (unsigned
admin and 403). 1132 checks, ASan suite green, analyze clean, release-check
green including distcheck 1.56.0.
2026-11-22 13:41:58 +00:00
lotherk 5611c5fe0f apex-twin 1.55.0: GitLab, Vaultwarden and keepalived audits, Grafana probe
Blue:
- gitlab_audit: gitlab.rb: an HTTP external_url, no redirect_http_to_https,
  open signup, disabled Let's Encrypt. Commented defaults are ignored.
- vaultwarden_audit: SIGNUPS_ALLOWED=true, a default ADMIN_TOKEN, an HTTP
  DOMAIN, missing SMTP.
- keepalived_audit: auth_type PASS, a default auth_pass, a notify hook piping
  a download into a shell.

Red:
- grafana_api_probe: /api/health, /api/datasources and /api/admin/users
  without credentials; datasources or admin users 2xx is anonymous access,
  with the datasource list saved as evidence.

The tool table hit its 256-slot cap at 258 tools; g_tools is now 384.
A double-escaped '\n' in line_value's continuation tokenizer made the whole
file one token; only the first line parsed until both calls used a real
newline escape.

Tests with GitLab/Vaultwarden/keepalived trees and two Grafana fixtures (open
and 401). 1120 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.55.0.
2026-11-22 13:20:00 +00:00
lotherk a388415735 apex-twin 1.54.0: Zabbix, NRPE and unattended-upgrades audits, RabbitMQ probe
Blue:
- zabbix_audit: zabbix_agentd.conf: Server=0.0.0.0/0, remote commands and
  their logging, TLSConnect unencrypted, shell metacharacters in a
  UserParameter.
- nrpe_audit: nrpe.cfg: allowed_hosts covering every address,
  dont_blame_nrpe=1 and check commands with shell metacharacters.
- unattended_upgrades_audit: 50unattended-upgrades: security-only origins,
  automatic reboot disabled or unset, no mail recipient.

Red:
- rabbitmq_management_probe: /api/overview and /api/queues without
  credentials; a 2xx overview with rabbitmq_version is an open management API
  and is saved as evidence.

Tests with Zabbix/NRPE/unattended-upgrades trees and two RabbitMQ fixtures
(open and 401). 1108 checks, ASan suite green, analyze clean, release-check
green including distcheck 1.54.0.
2026-11-22 12:54:51 +00:00
lotherk 34ac87b20f apex-twin 1.53.0: Gitea, MinIO and Nextcloud audits, Prometheus probe
Blue:
- gitea_audit: app.ini from three homes: PROTOCOL=http, INSTALL_LOCK=false,
  an empty or default SECRET_KEY, REQUIRE_SIGNIN_VIEW=false.
- minio_audit: /etc/default/minio: default or missing root credentials,
  MINIO_BROWSER=on and a plain-HTTP MINIO_SERVER_URL.
- nextcloud_audit: config.php: debug=true, a wildcard trusted domain,
  missing/HTTP overwriteprotocol and a world-writable data directory.

Red:
- prometheus_api_probe: /-/ready and /api/v1/query?query=up without
  credentials; a 2xx query is an open API and is saved as evidence.

Tests with Gitea/MinIO/Nextcloud trees and two Prometheus fixtures (open and
401). 1096 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.53.0.
2026-11-22 12:33:09 +00:00
lotherk d925e11b7b apex-twin 1.52.0: Caddy, Traefik and autofs audits, CouchDB probe
Blue:
- caddy_audit: Caddyfile: a site on :80 or http://, auto_https off, tls
  internal and an admin API beyond localhost.
- traefik_audit: traefik.yml/yaml/toml: api insecure, an HTTP entry point
  without a redirect and no TLS section.
- autofs_audit: auto.master and auto.master.d plus the maps they reference:
  wildcard map keys, world-writable maps and --timeout=0.

Red:
- couchdb_probe: / and /_all_dbs without credentials; the database list is
  the decisive answer and is saved as evidence. The root welcome is reported
  but is public on protected servers too.

Tests with Caddy/Traefik/autofs trees and two CouchDB fixtures (open and 401
with a public welcome). 1084 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.52.0.
2026-11-22 12:11:51 +00:00
lotherk b221d26e35 apex-twin 1.51.0: FreeRADIUS, containerd and NATS audits, Consul probe
Blue:
- freeradius_audit: clients.conf, radiusd.conf and users: a well-known
  shared secret, require_message_authenticator=no (BlastRADIUS),
  Auth-Type := Accept and world-writable files.
- containerd_audit: config.toml: a TCP gRPC address without cert_file,
  sandbox_image without a digest, no_pivot_root=true and world-writable.
- nats_audit: nats-server.conf: no authorization block, no TLS, an http
  monitoring listener on every address, debug logging and world-writable.

Red:
- consul_api_probe: /v1/agent/self and /v1/catalog/services without an ACL
  token; a 2xx JSON answer is unauthenticated access with evidence saved.

Two parser bugs the suite caught: the '=' truncation in the RADIUS scanner hid
'Accept' in 'Auth-Type := Accept', and the NATS http check read the key's own
colon as an empty bind host, flagging 127.0.0.1 as every address.

Tests with FreeRADIUS/containerd/NATS trees and two Consul fixtures (open and
403). 1072 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.51.0.
2026-11-22 11:50:09 +00:00
lotherk ead28d4bba apex-twin 1.50.0: Kafka, PowerDNS and Varnish audits, registry probe
Blue:
- kafka_audit: server.properties: a PLAINTEXT listener on 0.0.0.0, a
  missing authorizer.class.name, auto.create.topics.enable and a
  world-writable file.
- powerdns_audit: pdns.conf/recursor.conf: allow-from 0.0.0.0/0,
  webserver=yes, an API key stored in the file, security-polling=no.
- varnish_audit: default.vcl and the daemon defaults: an acl purge covering
  0.0.0.0/0, a management interface on 0.0.0.0, world-writable files.

Red:
- docker_registry_probe: /v2/ and /v2/_catalog without credentials; a catalog
  listing is an open registry and is saved as evidence.

The VCL acl block spans lines, so the purge check looks for the ACL and the
0.0.0.0/0 entry anywhere in the file instead of on one line.

Tests with Kafka/PowerDNS/Varnish trees and two registry HTTP fixtures (open
and 401). 1060 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.50.0.
2026-11-22 11:28:22 +00:00
lotherk 185aa07b7e apex-twin 1.49.0: iSCSI, rpcbind and kdump audits, etcd API probe
Blue:
- iscsi_audit: iscsid.conf: node.startup=automatic, a session or discovery
  auth method of None (or missing) and a world-writable file.
- rpcbind_audit: /etc/default/rpcbind and /etc/sysconfig/rpcbind: -w warm
  start, -i insecure, a missing -l bind address and a world-writable file.
- kdump_audit: kdump.conf and /etc/default/kdump-tools: a remote dump target,
  core_collector without -c, a shell or dump_to_rootfs action and a
  world-writable file.

Red:
- etcd_api_probe: GET /version, /health and /v2/keys/?recursive=true without a
  token; a 2xx answer is unauthenticated access, audited, with the first two
  answers saved as evidence.

Tests with iSCSI/rpcbind/kdump trees and two etcd HTTP fixtures (open and
401). 1048 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.49.0.
2026-11-22 11:08:46 +00:00
lotherk f1ef790709 apex-twin 1.48.0: avahi, logind and tftpd-hpa audits, ZooKeeper 4lw probe
Blue:
- avahi_audit: avahi-daemon.conf: publish-workstation, publish-addresses,
  a missing or wildcard allow-interfaces and a world-writable file.
- logind_audit: logind.conf: IdleAction=ignore, HandleLidSwitch=ignore,
  IdleActionSec=0, KillUserProcesses=no and a world-writable file.
- tftpd_hpa_audit: the Debian defaults: --create, a missing --secure, a TFTP
  directory of /, a world-writable directory and file.

Red:
- zookeeper_4lw_probe: sends the four-byte commands stat and mntr; any answer
  without authentication leaks version and connection state. Reads once per
  command with a short timeout instead of waiting for EOF.

Tests with avahi/logind/tftpd trees and two ZooKeeper servers (commands
answered and refused). 1035 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.48.0.
2026-11-22 10:49:04 +00:00
lotherk 5c028a60c9 apex-twin 1.47.0: pgbouncer, xinetd and SSSD audits, FTP TLS probe
Blue:
- pgbouncer_audit: pgbouncer.ini: auth_type trust/plain, listen_addr on
  every interface (token-wise, so ::1 is not a wildcard), an auth_file
  readable beyond its owner and a world-writable config.
- xinetd_audit: xinetd.conf and xinetd.d files: enabled legacy services,
  a service without only_from, a service running as root and world-writable
  files. Missing 'disable' means enabled in xinetd.
- sssd_audit: sssd.conf: enumerate, cache_credentials,
  ldap_id_use_start_tls=false, ldap_tls_reqcert never/allow and a
  world-writable file.

Red:
- ftp_tls_probe: read the banner and send AUTH TLS; 234 means explicit
  FTPS, 500/502/530 means credentials would cross in clear text.

Tests with pgbouncer/xinetd/sssd trees and two FTP servers (AUTH TLS
accepted and refused). 1023 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.47.0.
2026-11-22 10:29:30 +00:00
lotherk b4996fd55d apex-twin 1.46.0: dnsmasq, nsswitch and Jenkins audits, TLS hostname check
Blue:
- dnsmasq_audit: dnsmasq.conf and dnsmasq.d/*.conf: wildcard or missing
  interface restriction, no bind-interfaces, missing bogus-priv or
  domain-needed and world-writable files.
- nsswitch_audit: nsswitch.conf: compat/NIS in passwd/group/shadow, direct
  LDAP without sssd, hosts lookups that skip files, world-writable.
- jenkins_audit: config.xml from three usual homes: security disabled, an
  unsecured authorization strategy, missing CSRF protection, a fixed agent
  port and a world-writable file.

Red:
- tls_hostname_check: one handshake with the name as SNI; matches SAN DNS
  names (one-label wildcard), IP SANs and falls back to CN only when no DNS
  SAN exists.

extract_first_pem returns 0 on success, not a length; the first version
tested > 0 and always reported 'no certificate presented'. tools_proto.c
also needed <arpa/inet.h> for inet_pton.

Tests with dnsmasq/nsswitch/Jenkins trees and a certificate carrying
other.test, *.wild.test and IP:127.0.0.1. 1011 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.46.0.
2026-11-22 10:09:46 +00:00
lotherk 38ce77698d apex-twin 1.45.0: journald, coredump and nftables audits, HSTS check
Blue:
- journald_audit: journald.conf: Storage=volatile/none, ForwardToSyslog=no,
  SystemMaxUse above 1G, Seal=no and a world-writable file.
- coredump_audit: coredump.conf: explicit or default Storage=external (cores
  persist on disk), Compress=no and a world-writable file. ProcessSizeMax=0
  is not flagged: it means unlimited processing, not disabled storage.
- nftables_audit: nftables.conf and nftables.d/*.nft: policy accept, no
  established/related rule, admin ports (22/3306/5432/6379/27017/9200) opened
  without a saddr check and world-writable files.

Red:
- hsts_audit: one TLS GET: missing Strict-Transport-Security, max-age zero or
  below six months, missing includeSubDomains and preload.

Tests with journald/coredump/nftables trees and a TLS server serving weak,
strong and absent HSTS headers. 996 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.45.0.
2026-11-22 09:46:12 +00:00
lotherk 3a6e1e4a83 apex-twin 1.44.0: certificate, timesyncd and resolv.conf audits, SOA MNAME
Blue:
- ssl_cert_audit: every certificate under /etc/ssl/certs (root prefix)
  through openssl x509: expired or not yet valid, SHA-1 signature, RSA below
  2048 or EC below 256 bits, a non-critical CA:TRUE and world-writable
  files. Bundles and unparsable files count as skipped.
- timesyncd_audit: timesyncd.conf: no NTP or fallback server, a public
  fallback pool, RootDistanceMaxSec above five and poll intervals outside
  16..2048 seconds.
- resolv_conf_audit: resolv.conf: no nameserver, a single nameserver, a
  well-known public resolver, a missing search domain, world-writable.

Red:
- dns_soa_mname_check: the SOA primary must be one of the zone's NS records.

OpenSSL prints dates as 'Nov 22 08:00:00 2026 GMT' and strptime is not
exposed by the project's feature macros; cert_parse_time parses the fields and
uses timegm instead.

Tests with five generated certificates (expired, SHA-1, RSA-1024,
non-critical CA, good), timesyncd/resolv.conf trees and a DNS agent with
delegated and stray SOA primaries. 983 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.44.0.
2026-11-22 09:27:04 +00:00
lotherk e5f634bfe1 apex-twin 1.43.0: pg_hba, polkit and LDAP client audits, FCrDNS check
Blue:
- pg_hba_audit: every /etc/postgresql/<version>/main pg_hba.conf plus the
  flat paths: a trust method, a rule matching 0.0.0.0/0 or ::/0 and a
  world-writable file.
- polkit_audit: rules.d/*.rules and localauthority/50-local.d/*.pkla:
  polkit.Result.YES, ResultAny=yes/ResultInactive=yes and world-writable
  files.
- ldap_client_audit: ldap.conf from Debian and OpenLDAP: a plaintext ldap://
  URI, TLS_REQCERT never/allow and a world-writable file.

Red:
- dns_fcrdns_check: PTR via dig -x, then A/AAAA of the PTR name; a missing
  PTR or a forward answer that never returns the address fails FCrDNS.
  Addresses are compared binary, so compressed IPv6 forms match.

Tests with pg_hba/polkit/ldap.conf trees and a DNS agent answering matching,
mismatching and absent PTR records. 970 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.43.0.
2026-11-22 09:07:32 +00:00
lotherk a194ace80c apex-twin 1.42.0: chrony, APT and login.defs audits, WebSocket origins
Blue:
- chrony_config_audit: both chrony.conf paths: allow 0.0.0.0/0, ::/0 or all,
  a cmdallow/bindcmdaddress beyond localhost, and a world-writable file.
- apt_config_audit: apt.conf.d, sources.list and sources.list.d:
  AllowUnauthenticated, AllowInsecureRepositories, trusted=yes, plain-HTTP
  repositories and world-writable files.
- login_defs_audit: PASS_MAX_DAYS above 365, PASS_MIN_DAYS/PASS_WARN_AGE of 0,
  a loose UMASK, DES/MD5 hashing and a world-writable file.

Red:
- websocket_origin_check: opens the upgrade twice with two unrelated Origin
  headers; both 101 means Origin is not enforced (CSWSH risk).

The UMASK test caught an inverted rule during the run: a umask masks bits,
so 022 denies writes and only leaks read; 002 leaves the group writable. The
code now treats allowed = ~umask.

Tests with chrony/APT/login.defs trees and two WebSocket servers (any origin,
allowlist). 956 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.42.0.
2026-11-22 08:48:28 +00:00
lotherk ac36d21857 apex-twin 1.41.0: cron, fail2ban and redirect audits, Samba globals
Blue:
- cron_audit: /etc/crontab, /etc/cron.d and the user crontabs (root
  prefix): a world-writable file or directory and job lines that pipe a
  curl/wget download into a shell.
- fail2ban_audit: jail.local and jail.conf: a disabled sshd jail, ignoreip
  covering every address, maxretry 0, bantime 0 and no banaction anywhere.
- samba_audit extended: null passwords, map to guest = bad user, an SMB1
  minimum protocol and a world-writable config. No second Samba tool: the
  existing audit already parsed smb.conf and its shares.

Red:
- http_redirect_audit: follows up to five hops, re-checks the scope of every
  hop, and reports the chain, a cross-host hop and any HTTPS-to-HTTP
  downgrade. cors_check already covered reflected-origin CORS, so no
  duplicate http_cors_check was added.

Tests with Samba, cron and fail2ban trees and three HTTP servers (plain
chain, TLS downgrade with a CA-flagged cert via CURL_CA_BUNDLE, out-of-scope
hop). 944 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.41.0.
2026-11-22 08:27:46 +00:00
lotherk 32c08b6f94 apex-twin 1.40.0: WireGuard, IPsec and OpenLDAP audits, dangling CNAME check
Blue:
- wireguard_config_audit: every /etc/wireguard/*.conf: a private key file
  readable beyond its owner, AllowedIPs of 0.0.0.0/0 or ::/0, a missing
  ListenPort and PostUp hooks that pipe a curl/wget download into a shell.
- ipsec_config_audit: ipsec.conf and ipsec.secrets: a subnet of 0.0.0.0/0,
  authby=secret, a missing leftid and secret files readable beyond their
  owner.
- openldap_config_audit: slapd.conf (Debian, OpenLDAP and /usr/local paths):
  a cleartext rootpw, allow bind_anon and an access to * rule that grants
  read to everyone.

Red:
- dns_dangling_cname: follows a CNAME chain of up to eight hops, resolves the
  final target over A and AAAA, and reports a chain that ends in NXDOMAIN:
  the target is free to register and can be taken over.

Tests with vulnerable and hardened WireGuard/IPsec/slapd trees and a DNS
agent that answers CNAME chains and NXDOMAIN. 932 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.40.0.
2026-11-22 07:57:32 +00:00
lotherk e8f5cbf42d apex-twin 1.39.0: Kubernetes API probe, Grafana/Prometheus audits, NS consistency
Red:
- kubernetes_api_probe: GET /version, /api, /apis and /healthz without a
  token; a 2xx answer is unauthenticated access, audited, with the first two
  responses saved as evidence.
- dns_ns_consistency: compares the parent NS set with the set served by the
  domain's own first nameserver (resolved to an address) and reports names
  missing on either side.

Blue:
- grafana_audit: grafana.ini with section-aware INI parsing: anonymous access,
  default/empty admin password, plain HTTP and the default secret key.
- prometheus_audit: prometheus.yml/web.yml: missing basic_auth_users, missing
  external_labels, plain-HTTP scrape targets and world-writable files.

The tool table hit its 192-slot cap at 195 tools; g_tools is now 256.

Tests with a Kubernetes HTTP fixture (open and 401), Grafana/Prometheus trees
and two DNS agents on different loopback addresses (consistent and stale
delegation). 918 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.39.0.
2026-11-22 07:37:42 +00:00
lotherk ebb046c7b1 apex-twin 1.38.0: Consul, Vault and ZooKeeper audits, mTLS probe
Blue:
- consul_config_audit: consul.hcl and consul.d/*.hcl (root prefix): ACL
  default policy allow, bind_addr on every interface, incoming/outgoing
  verification off, missing gossip encryption, enabled UI and world-writable
  files.
- vault_config_audit: vault.hcl: tls_disable 1/true, UI enabled, disable_mlock
  and a Shamir seal without auto-unseal.
- zookeeper_audit: zoo.cfg: an open 4lw whitelist (stat/mntr/envi),
  clientPortAddress on every interface and a missing authProvider.

Red:
- tls_client_auth_probe: one openssl s_client -msg handshake; a
  CertificateRequest means the server requires a client certificate. Reports
  protocol and cipher and presents no certificate.

Tests with vulnerable and hardened Consul/Vault/ZooKeeper trees plus a
client-cert-required TLS server and a plain one. 905 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.38.0.

Note: two unrelated nmap timeout checks failed once under system load and
passed on the immediate rerun (905/905), so they are recorded as environmental.
2026-11-22 07:18:12 +00:00
lotherk ba1796a7ee apex-twin 1.37.0: kubelet, etcd and RabbitMQ audits, SNI vhost check
Blue:
- kubelet_config_audit: /var/lib/kubelet/config.yaml (root prefix): anonymous
  authentication enabled, authorization mode AlwaysAllow, readOnlyPort above
  zero and a world-writable config.
- etcd_config_audit: etcd.conf.yml/etcd.conf//etc/default/etcd: client URLs on
  0.0.0.0 or plain HTTP, client and peer cert auth off, auto-tls and
  world-writable files. Reads both YAML and KEY=value forms.
- rabbitmq_audit: rabbitmq.conf and advanced.config: guest loopback
  restriction removed, default guest/guest credentials, management without a
  TLS port and world-writable files.

Red:
- sni_vhost_check: one s_client -servername handshake per in-scope name,
  comparing certificate subject, SAN and SHA-256 fingerprint; different
  certificates on one address mean SNI virtual hosts.

Tests with vulnerable and hardened kubelet/etcd/RabbitMQ trees and a TLS
server selecting certificates per SNI. 893 checks, ASan suite green, analyze
clean (an analyzer NULL-dereference report in etcd_value was fixed), release
check green including distcheck 1.37.0.
2026-11-22 06:46:19 +00:00
lotherk b1165c5556 apex-twin 1.36.0: BIND, Tomcat and ProFTPD audits, CAA check
Blue:
- bind9_config_audit: named.conf plus .options/.local (root prefix):
  allow-query any, recursion yes without allow-recursion, allow-transfer any,
  a visible version and world-writable files.
- tomcat_audit: server.xml and tomcat-users.xml under /etc/tomcat*: an
  enabled shutdown port, a Connector on 0.0.0.0, manager/admin roles, a
  plaintext manager password and world-writable files.
- proftpd_audit: proftpd.conf: AllowAll, an Anonymous block without
  AnonReadOnly, RootLogin on, TLS not required and world-writable files.

Red:
- dns_caa_check: gated dig CAA; flags, tag and value per record, and whether
  issue/issuewild/iodef are present.

Tests with vulnerable and hardened BIND/Tomcat/ProFTPD trees and a DNS agent
serving CAA records. 880 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.36.0.
2026-11-21 21:45:28 +00:00
lotherk 3b1a88487a apex-twin 1.35.0: MongoDB, memcached and NTPD audits, wildcard DNS check
Blue:
- mongodb_config_audit: mongod.conf: net.bindIp on every interface (absent
  counts as default), security.authorization disabled or missing, net.tls
  mode disabled and a world-writable config.
- memcached_config_audit: memcached.conf: -l on every interface (absent
  counts), UDP left enabled when -U 0 is missing, a memory limit of 8 GiB or
  more and a world-writable config.
- ntpd_config_audit: ntp.conf: missing or weak restrict default (no
  kod/limited), missing disable monitor (monlist), drift file in /tmp or
  /dev/shm and a world-writable config.

Red:
- dns_wildcard_check: one gated dig for a random label under an in-scope
  domain; an answer means wildcard DNS.

Tests with vulnerable and hardened mongod/memcached/ntp trees and a DNS agent
with and without a wildcard. 867 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.35.0.
2026-11-21 21:25:38 +00:00
lotherk 4306da88ea apex-twin 1.34.0: rsync, DHCPD and Kerberos audits, WebDAV probe
Blue:
- rsync_audit: rsyncd.conf (root prefix): missing or wildcard hosts allow,
  uid/gid 0, use chroot = no, a world-readable secrets file and a
  world-writable config.
- dhcpd_audit: dhcpd.conf: authoritative, ddns-update-style none/ad-hoc,
  missing domain-name-servers, a range outside its subnet and a
  world-writable config.
- krb5_conf_audit: krb5.conf: missing default_realm, dns_lookup_kdc false,
  rdns true, des/arcfour/rc4 enctypes and a world-writable config.

Red:
- webdav_probe: OPTIONS plus a Depth: 0 PROPFIND; 207 Multistatus means
  WebDAV is enabled, the Allow list shows DAV methods, evidence on a hit.

Tests with vulnerable and hardened rsync/dhcpd/krb5 trees and a WebDAV HTTP
fixture. 855 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.34.0.
2026-11-21 21:08:07 +00:00
lotherk cb8b4ac498 apex-twin 1.33.0: Squid, Unbound and CUPS audits, ALPN matrix
Blue:
- squid_audit: squid.conf (root prefix): http_access allow all, an http_port
  on every interface, a cache_dir in /tmp or /dev/shm and a world-writable
  config.
- unbound_audit: unbound.conf and unbound.conf.d: interface on every address,
  access-control 0.0.0.0/0 or ::/0 allow, a missing DNSSEC trust anchor and
  world-writable files.
- cups_audit: cupsd.conf: Listen on every interface, Browsing On, a Location
  block with Allow All and a world-writable config.

Red:
- alpn_probe: one openssl s_client -alpn handshake per protocol (h2,
  http/1.1, spdy/3.1 by default) and which one the server selects.

Tests with vulnerable and hardened Squid/Unbound/CUPS trees and an ALPN server
offering h2 and http/1.1. 842 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.33.0.
2026-11-21 20:50:31 +00:00
lotherk 1a5a7bcc3d apex-twin 1.32.0: PostgreSQL, Exim and Elasticsearch audits, OCSP probe
Blue:
- postgresql_config_audit: /etc/postgresql/<ver>/<cluster> (root prefix)
  postgresql.conf and pg_hba.conf: listen_addresses on every interface,
  ssl = off, trust and md5/password entries, world-writable files.
- exim_audit: exim4.conf/exim.conf and conf.d: relay_from_hosts covering every
  host, an accept rule for any host, an empty or missing tls_advertise_hosts
  and world-writable files.
- elasticsearch_config_audit: elasticsearch.yml: network.host on every
  interface, xpack.security.enabled false, single-node discovery and a
  world-writable config.

Red:
- tls_ocsp_probe: one openssl s_client -status handshake; reports stapled or
  not, the OCSP response status and the certificate status (good/revoked/
  unknown), plus protocol and cipher.

conf_value now also strips single quotes (PostgreSQL writes listen_addresses
as '*'), and the 36-tool table is unchanged at 192 slots.

Tests with vulnerable and hardened PostgreSQL, Exim and Elasticsearch trees
plus a TLS server without stapling. 830 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.32.0.
2026-11-21 20:33:36 +00:00
lotherk 409c80faf2 apex-twin 1.31.0: PHP, Dovecot and OpenVPN audits, SMTP STARTTLS probe
Blue:
- php_config_audit: /etc/php.ini or /etc/php/*/*/php.ini (root prefix):
  expose_php, display_errors, allow_url_include/fopen, empty
  disable_functions, session.cookie_secure Off and world-writable files.
- dovecot_audit: dovecot.conf and conf.d: ssl = no,
  disable_plaintext_auth = no, PLAIN in auth_mechanisms and world-writable
  drop-ins.
- openvpn_audit: server.conf and server/*.conf: missing tls-auth/tls-crypt,
  BF-CBC/DES/none cipher, SHA1/MD5 HMAC, duplicate-cn and world-writable
  files.

Red:
- smtp_starttls_probe: EHLO, STARTTLS, 220 and a real upgrade verified with
  openssl s_client -starttls smtp; reports the negotiated TLS version and
  cipher. No authentication and no mail.

Tests with vulnerable and hardened PHP/Dovecot/OpenVPN trees and a Python SMTP
server that upgrades to TLS plus one that does not. 817 checks, ASan suite
green, analyze clean, release-check green including distcheck 1.31.0.
2026-11-21 20:14:12 +00:00
lotherk 874a32de08 apex-twin 1.30.0: MySQL, Apache and HAProxy audits, DNSSEC check
Blue:
- mysql_config_audit: my.cnf and my.cnf.d/conf.d (root prefix): bind-address
  on every interface, skip-grant-tables, local-infile, an empty
  secure-file-priv and world-writable files. conf_value now also matches
  valueless directives.
- apache_audit: apache2.conf/httpd.conf, sites-enabled and conf-enabled:
  ServerTokens Full/OS/Minor, Options Indexes, AllowOverride All,
  SSLv3/TLSv1 (including +TLSv1), ServerSignature On and world-writable files.
- haproxy_audit: stats socket without mode 600, stats page without stats auth,
  bind on 443 without ssl and a world-writable config.

Red:
- dnssec_check: dig +dnssec DNSKEY/DS, signed and DS presence, algorithm and
  decoded key size; flags unsigned domains, RSASHA1 and RSA keys under 2048
  bits. dig wraps long DNSKEY base64 with spaces, so the parser joins them.

Tests with vulnerable and hardened daemon trees plus a DNS agent serving a
2048-bit RSA key, a 1024-bit RSASHA1 key and an unsigned zone. 802 checks,
ASan suite green, analyze clean, release-check green including distcheck
1.30.0.
2026-11-21 19:57:24 +00:00
lotherk 9c9fa1e3d4 apex-twin 1.29.0: postfix, nginx and redis config audits
Blue:
- postfix_audit: main.cf (root prefix) mynetworks covering 0.0.0.0/0 or ::/0,
  relay restrictions without reject_unauth_destination (relay list, recipient
  list or neither), an optional TLS level (unset/none/may) and world-writable
  configuration.
- nginx_audit: nginx.conf, conf.d/*.conf and sites-enabled/*.conf:
  server_tokens not off, autoindex on, TLSv1/TLSv1.1 in ssl_protocols, legacy
  ciphers (RC4/3DES/NULL/EXPORT/MD5) and world-writable files.
- redis_config_audit: redis.conf: missing requirepass, protected-mode no, bind
  on 0.0.0.0/*/::, enabled debug command, data dir in /tmp or /dev/shm and
  world-writable config. The password value is never echoed.

One shared conf_value reader accepts 'key value' and 'key = value', skips
comments and strips semicolons and quotes; conf_has_word gives token-exact
matching so ::1 is not mistaken for all interfaces.

Tests with vulnerable and hardened trees for all three daemons. 786 checks,
ASan suite green, analyze clean, release-check green including distcheck
1.29.0.
2026-11-21 19:37:46 +00:00
lotherk 4d21af6535 apex-twin 1.28.0: WinRM probe, snmpd and rsyslog audits
Red:
- winrm_probe: one unauthenticated GET to /wsman (5985; TLS on 5986);
  401/405 with a Negotiate/NTLM/Kerberos challenge identifies WinRM, the
  response is saved as evidence.

Blue:
- snmpd_audit: snmpd.conf (root prefix) rocommunity/rwcommunity/community/
  com2sec; lists communities with mode and flags rw, public/private/default and
  com2sec rules accepting any source.
- rsyslog_audit: rsyslog.conf and rsyslog.d (root prefix): remote targets
  (@@ TCP, @ UDP), world-writable configs and a dedicated auth rule; flags
  missing auth logging and missing remote forwarding.

Tests: WinRM 401 fixture, plain HTTP server, snmpd.conf and full/sparse rsyslog
trees. 776 checks, ASan suite green, analyze clean, release-check green
including distcheck 1.28.0.

Fixture note: the community mode buffer was 8 bytes and truncated com2sec to
com2se; it is 16 now.
2026-11-21 19:20:01 +00:00
lotherk 0bfd94519d apex-twin 1.27.0: Kerberos discovery, NFS exports, Samba audit
Red:
- kerberos_discovery: gated dig SRV queries for _kerberos._tcp,
  _kerberos._udp and _kpasswd._tcp; reports priority, weight, port and target
  for each KDC (trailing dot trimmed).

Blue:
- nfs_exports_audit: /etc/exports and /etc/exports.d (root prefix): export
  count, world exports (*), writable exports without ro and no_root_squash,
  with file and line.
- samba_audit: smb.conf (root prefix): shares exposing /, guest access,
  writable shares and guest shares without valid users.

Tests: DNS SRV agent, exports tree and smb.conf. 765 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.27.0.
2026-11-21 18:57:57 +00:00
lotherk 19b3696238 apex-twin 1.26.0: HTTP/2 probe, SSH host-key fingerprints, logrotate audit
Red:
- http2_probe: over TLS, openssl s_client -alpn h2 and the negotiated ALPN
  protocol; over cleartext, the HTTP/2 client preface plus SETTINGS frame,
  reporting the first frame type.
- ssh_hostkey_fingerprint: ssh-keyscan (rsa, ecdsa, ed25519) or a saved scan
  output; decodes each base64 blob and reports key type, bits and the SHA256
  fingerprint (base64, unpadded).

Blue:
- logrotate_audit: /etc/logrotate.conf and logrotate.d (root prefix):
  world-writable configs, rotate <= 2, missing compress and postrotate commands
  from /tmp or downloading code.

Tests: ALPN h2 TLS server, h2c SETTINGS server, constructed SSH blobs with
independently computed fingerprints and a logrotate tree. 756 checks, ASan
suite green, analyze clean, release-check green including distcheck 1.26.0.
2026-11-21 18:34:58 +00:00
lotherk 492b29d494 apex-twin 1.25.0: OIDC discovery, security.txt, known_hosts audit
Red:
- oidc_discovery: fetches /.well-known/openid-configuration and the OAuth
  authorization-server metadata; reports issuer, authorization, token, JWKS
  and userinfo endpoints with the document as evidence.
- security_txt: fetches /.well-known/security.txt and /security.txt; reports
  Contact entries, Expires and Policy and flags an Expires date in the past.

Blue:
- ssh_known_hosts_audit: /etc/ssh/ssh_known_hosts(2), root and user
  known_hosts (root prefix): entry count, hashed vs plain hosts, ssh-rsa/
  ssh-dss key types and duplicate host keys.

Tests: OIDC metadata, fresh vs expired security.txt, known_hosts tree with
hashed/plain/weak/duplicate entries. 747 checks, ASan suite green, analyze
clean, release-check green including distcheck 1.25.0.
2026-11-21 18:12:48 +00:00
lotherk 2afb34eb89 apex-twin 1.24.0: NTP monlist, DNS version disclosure, USB audit
Red:
- ntp_monlist_probe: 8-byte mode-7 MON_GETLIST; a mode-7 reply larger than
  the request means monlist is enabled, with entry estimate ((len-8)/72) and
  the amplification factor. One request.
- dns_version_bind: gated dig for CHAOS TXT version.bind and hostname.bind;
  any answer is a version/hostname disclosure.

Blue:
- usb_audit: /sys/bus/usb/devices (root prefix): vendor/product IDs,
  manufacturer, product, serial and bInterfaceClass 08 (mass storage);
  storage devices are flagged, nothing is opened or mounted.

Tests: mode-7 agent (active and silent), CHAOS TXT agent and USB sysfs tree.
737 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.24.0.
2026-11-21 17:55:56 +00:00
lotherk 260fe8cac6 apex-twin 1.23.0: ESP image verify, CRLF injection, audit rules
Hardware:
- esp_image_verify: walks the segment table (load/length), XORs the segment
  data against the stored checksum, aligns to 16 bytes and, when
  hash_appended is set, compares the appended SHA-256 with the computed digest
  up to the padding. Reports segments, entry, checksums and a valid flag; the
  offset supports OTA partitions.

Red:
- crlf_probe: injects an encoded CRLF + X-Apex-Injected: yes through one
  parameter (GET/POST) and checks whether the response carries the header;
  the response is evidence on a hit.

Blue:
- audit_rules: parses /etc/audit/audit.rules and rules.d/*.rules (root
  prefix): rule count, -e 2, an execve rule and watches on /etc/passwd,
  /etc/shadow, /etc/sudoers and /etc/group; reports missing watches, missing
  execve and unlocked rules.

Tests: generated valid/corrupted ESP images, CRLF-reflecting and filtering
endpoints, full and sparse audit rule sets. 728 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.23.0.

Fixture lesson: the ESP image header is exactly 24 bytes; three extra filler
bytes shift every segment.
2026-11-21 17:36:58 +00:00
lotherk 6c618bf372 apex-twin 1.22.0: SMTP relay, DNS resolver, AppArmor and SELinux audits
Red:
- smtp_open_relay: EHLO, MAIL FROM an .invalid sender, RCPT TO an external
  recipient; 250/251/252 means open relay. DATA is never sent, so no mail
  leaves the server; 530 is reported as an auth requirement.
- dns_open_resolver: one gated recursive dig against an in-scope server; an
  answer means the resolver is open (amplification risk).

Blue:
- apparmor_audit: profile list (root prefix), enforce/complain counts and
  complain profile names; flags an AppArmor with no active profile.
- selinux_audit: enforce file, SELINUX=/SELINUXTYPE= and boolean count; flags
  disabled, permissive and a host without SELinux.

Tests: SMTP relay/refusing fixtures, DNS recursive/refusing agents, AppArmor
profile and SELinux trees. 717 checks, ASan suite green, analyze clean,
release-check green including distcheck 1.22.0.

Fixture note: the smtp_open_relay table entry was first appended after the
wrong table entry and the function was unused; it now sits at the end of
TOOLS_PROTO.
2026-11-21 17:18:30 +00:00
lotherk 930b356a2e apex-twin 1.21.0: SMB shares, e-mail security, web-root audit
Red:
- smb_shares: after the anonymous SMB 2.1 session, TREE_CONNECT for 14 common
  share names (IPC$, C$, ADMIN$, users, data, backup, public, www, home, share,
  files, tmp, downloads, media); reports reachable shares and NT status. No
  listing and no file access.
- email_security_audit: gated dig for SPF, DMARC (_dmarc), DKIM
  (selector._domainkey) and MX; reports records, SPF policy, DMARC p= and gaps
  (missing records, +all, p=none).

Blue:
- www_audit: /var/www, /srv/www, /usr/share/nginx/html (root prefix):
  world-writable files and dirs, .env/wp-config/config.php/.htpasswd/id_rsa,
  backups, .git directories and directories without an index.

The tool table hit its 128-slot cap at 130 tools; g_tools is now 192.

Tests: SMB share fixture (allow/deny), UDP DNS TXT/MX agent, web-root tree.
706 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.21.0.
2026-11-21 16:59:47 +00:00
lotherk 99649e2108 apex-twin 1.20.0: TLS cipher matrix, SMB null session, Docker audit
Red:
- tls_cipher_matrix: one openssl s_client per weak cipher (3DES, RC4, NULL,
  EXPORT, CBC by default) for TLS 1.2 or 1.3; reports which suites negotiate.
  The gate is checked once, then the handshakes run.
- smb_null_session: negotiate SMB 2.1, anonymous SESSION_SETUP with an empty
  security buffer, TREE_CONNECT to IPC$ on success; reports status/id and IPC$
  access. No share enumeration and no file access.

Blue:
- docker_audit: docker.sock mode (world-writable critical), docker group
  members from /etc/group, daemon.json TCP hosts, TLS and insecure registries;
  no daemon call.

Tests: a TLS server accepting AES128-SHA, SMB2 servers that allow and refuse
the anonymous session, and a Docker fixture tree. 695 checks, ASan suite green,
analyze clean, release-check green including distcheck 1.20.0.

Fixture lessons: the SMB negotiate helper already adds a NetBIOS header (double
wrapping shifts the SMB2 header by four bytes), and the Docker JSON closed the
daemon object twice.
2026-11-21 16:37:54 +00:00
lotherk 5392f911d1 apex-twin 1.19.0: ESP app info, API auth and cache audits, log timeline
Hardware:
- esp_app_info: app image header (magic 0xE9, segment count, entry) and the
  esp_app_desc_t at 0x20 (magic 0xABCD5432): version, project name, build
  time/date, IDF version and ELF SHA-256; offset can point at an OTA partition.

Red:
- api_auth_audit: unauthenticated GETs over an endpoint list, reporting status,
  size, 2xx vs 401/403, JSON content type, evidence for open responses.
- cache_audit: clean vs parameterized URL, comparing Cache-Control/Pragma/Age/
  Vary/X-Cache; flags parameterized-cacheable and missing Vary.

Blue:
- log_timeline: normalises auth and access log timestamps (auth gets the
  current year), merges and sorts them and returns the first N entries with
  source tags; paths limited to /var/log and the state dir.

Tests with an app image, API/cache HTTP fixtures and two log files. 686 checks,
ASan suite green, analyze clean, release-check green including distcheck
1.19.0.
2026-11-21 16:15:26 +00:00
lotherk d966fa9600 apex-twin 1.18.0: RPC and NTP probes, sshd_config and PAM audits
Red:
- rpc_probe: one ONC RPC CALL to the portmapper (program 100000, version 2,
  procedure DUMP) with a hand-built XDR message; decodes program/version/
  protocol/port mappings and names common services. No export is mounted.
- ntp_probe: one NTPv4 client packet (mode 3); parses version, mode, leap,
  stratum, reference id (trailing NUL trimmed), root delay/dispersion in ms and
  the transmit time. No monlist.

Blue:
- ssh_config_audit: scores sshd_config for root login, password auth, empty
  passwords, X11, GatewayPorts, PermitTunnel, MaxAuthTries and legacy
  Ciphers/MACs/KexAlgorithms; optional root prefix.
- pam_audit: scans /etc/pam.d for pam_permit, pam_unix nullok, pam_exec and
  reports when neither pam_faillock nor pam_tally2 provides lockout.

Tests: UDP portmapper agent, UDP NTP agent, sshd_config tree and pam.d tree.
674 checks, ASan suite green, analyze clean, release-check green including
distcheck 1.18.0.
2026-11-21 15:57:13 +00:00
lotherk 816fd0fb57 apex-twin 1.17.0: kernel, sudoers, CSRF and auditd audits
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.
2026-11-21 15:38:56 +00:00
lotherk 4018eb0ea4 apex-twin 1.16.0: SNMP walk, LDAP search, OpenAPI discovery, systemd audit
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.
2026-11-21 15:18:01 +00:00
lotherk c38cbccd60 apex-twin 1.15.0: HTTP methods, WebSocket, IKEv2 and firewall audit
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.
2026-11-21 14:56:19 +00:00
lotherk d829955d88 apex-twin 1.14.0: ESP32 flash analysis and mount audit
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.
2026-11-21 14:38:18 +00:00
lotherk 4962002e13 apex-twin 1.13.0: POP3, SIP and Telnet probes, package integrity
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.
2026-11-21 14:22:32 +00:00
lotherk c8598f8ce5 apex-twin 1.12.0: Docker, Elasticsearch and IMAP probes, module audit
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.
2026-11-21 14:05:14 +00:00
lotherk 48ca583c5c apex-twin 1.11.0: VNC, MQTT and GraphQL probes, capability baseline
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.
2026-11-21 13:48:28 +00:00
lotherk f2a1fb4b59 apex-twin 1.10.0: RDP and SMB negotiation, SUID baseline
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.
2026-11-21 13:30:38 +00:00
lotherk 60075eb30f apex-twin 1.9.0: SSTI, XXE, LDAP probes and SSH key audit
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.
2026-11-21 13:13:14 +00:00
lotherk dfcc5340e0 apex-twin 1.8.0: parameter fuzzing, redirect and Host checks, net baseline
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.
2026-11-21 12:55:20 +00:00
lotherk 276283d535 apex-twin 1.7.0: MySQL, PostgreSQL, MongoDB and Memcached probes
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.
2026-11-21 12:39:42 +00:00
lotherk 539b552c3d apex-twin 1.6.0: TLS, Redis, SNMP and DNS zone-transfer checks
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.
2026-11-21 12:23:56 +00:00
lotherk b35500f0be apex-twin 1.5.0: FTP, SMTP and SSH probes, persistence audit
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.
2026-11-21 12:02:48 +00:00
lotherk 4de26b9b84 apex-twin 1.4.0: JWT audit, hash identification, ATT&CK mapping, process snapshot
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.
2026-11-21 11:46:10 +00:00
lotherk 8e6f075e0c apex-twin 1.3.0: SSRF probe, detection rules, integrity baseline, ESP flash
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.
2026-11-21 11:29:14 +00:00
lotherk 2935b75fa6 apex-twin 1.2.0: vhost discovery, path brute force, access-log audit
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.
2026-11-21 11:14:56 +00:00