Added
scan --auto-escape: after discovery, automatically attempt an export escape (subtree_check bypass) against every discovered export path and print a ready-to-runshell --handlecommand for each filesystem root reached. Runs only on a complete scan, with bounded concurrency and a per-host timeout; honours--proxyand--delay/--jitter. The escape logic is shared with theescapesubcommand via a singlefind_escapeprimitive.analyze --json [FILE]: optional file argument writes the JSON report to a file (matchingscan --json <FILE>); with no value it still emits to stdout.- NFSv4 shell honours
--aux-gids(the shadow-GID trick now works in--nfs-version 4mode, including across mid-sessionuid/gid/hostnamereconnects).
Changed
- Breaking --
scan: the "additional ports to probe" flag is renamed--nfs-portto--probe-port.--nfs-portnow means the single-value port override consistently across every subcommand, andscanfolds it into its probe set instead of ignoring it. - Breaking --
convert:--formatis long-only; the-fshort flag is removed (-fis the targets-file flag inscan/analyze). shell: removed the local--uid/--gidthat shadowed the global-u/-g; the session now uses the global identity flags consistently, soshell -u 0works like every other subcommand.- analyzer: dropped the unsound bind-mount (F-2.6) check and the tautological insecure-port (F-7.2) check (both produced false positives on well-configured servers); added a plaintext-transport check (F-3.1, Info); F-1.2 is now emitted when a forged non-root UID is honoured; F-4.1 (
no_root_squash) and F-7.5 (all_squash+anonuid=0) are disambiguated; the world-writable/symlink check includes root-owned directories; duplicate F-1.3 findings are deduplicated. - Circuit breaker: trips only on genuine transient transport outages (never on
NFS3ERR_ACCES/PERM, nor onFragmentedReply), records connection-establishment failures so a dead host opens the breaker, and escalates the cooldown once per outage rather than per failure. Every RPC also carries a per-call timeout so a stalled server cannot pin a pool connection. - NFSv2/NFSv4: NFSv2 raw RPC now uses a fresh AUTH_SYS stamp per call and feeds the circuit breaker; NFSv4 clients honour
StealthConfig; both bound directory paging and XDR allocations against hostile servers; privileged source ports are used for raw NFSv2 RPC and MOUNT v1. - FUSE:
readloops on short reads (no more zero-filled gaps);readdirpages a directory to completion with a per-inode cache;forgetbounds inode-map growth; device major/minor are encoded correctly inmknod. - CLI:
analyzeresolves hostnames and IPv6 targets;--nfs-portand--hostnameare threaded through the offensive subcommands; the connection pool re-stamps the requested credential (aux-gids/hostname) on checkout.
Fixed
- Addressed roughly one hundred correctness, robustness, and protocol findings from a two-cycle security review: short-read/short-write loops in the shell and NFSv2 read paths, unbounded directory listings and in-memory reads, escape-handle byte-layout and root-confirmation correctness (fsid_type=7 length, XFS-root candidates, identity check against the export's own inode), wildcard/netmask export-ACL detection, and numerous smaller fixes. See the commit history for the full list.
Security
shell get -rnow rejects server-controlled directory-entry names that contain a path separator or..before writing locally, preventing a malicious NFS server from escaping the chosen download directory (a zip-slip-class arbitrary local file write -- remote code execution when run undersudo).- Report renderers and the live
analyzeconsole neutralize untrusted server data: terminal control/escape sequences, Markdown/CSV/HTML injection, and Unicode bidirectional / zero-width "trojan source" characters (CVE-2021-42574 class). - Bounded every directory-listing and XDR allocation driven by an attacker-supplied length or count (memory-exhaustion DoS), and added per-call/per-host timeouts so an unresponsive server cannot hang the client.
- UDP RPC binds to the target's address family and accepts replies only from the address it sent to (drops spoofed responses).
Full Changelog: v0.4.0...v0.5.0