Skip to content

Feature: nfs_spider_plus module — recursive file enumeration with JSON metadata #1208

Description

@bandrel

Please Describe The Problem To Be Solved

The SMB protocol has spider_plus, which recursively enumerates files across shares and writes a
per-host JSON metadata file (size, ctime, mtime, atime) useful for downstream triage. The NFS
protocol has no equivalent. Today the closest option is --enum-shares, which prints to the terminal
but produces no structured output.

Adding an nfs_spider_plus module would let operators collect file inventory from NFS exports in
the same shape the SMB version produces, so existing tooling that consumes spider_plus
output can be pointed at NFS targets without modification.

(Optional): Suggest A Solution

Port the SMB spider_plus worker to NFS, minus file downloads for a first cut:

  • New module nxc/modules/nfs_spider_plus.py
  • Reuse nxc.protocols.nfs.list_dir() for recursive traversal (adds raw size_bytes + epoch
    ctime/mtime/atime to entry dicts — additive change, existing callers unaffected)
  • Options: STATS_FLAG, EXCLUDE_EXTS, EXCLUDE_FILTER, MAX_FILE_SIZE, MAX_DEPTH,
    OUTPUT_FOLDER
  • Honors the global --share flag to restrict to a single export
  • JSON output shape identical to SMB spider_plus
  • Per-share error isolation (one bad export doesn't kill the run)

Explicitly out of scope for a first cut:

  • File downloads (SMB's DOWNLOAD_FLAG)
  • readdirplus cookie pagination — inherited limitation from list_dir(); large directories
    truncate silently today and should be fixed in a separate PR at the protocol layer
  • Root-escape-based whole-filesystem spidering

Working Implementation

A working implementation exists on my fork at
https://github.com/bandrel/NetExec/tree/feature/nfs-spider-plus and has been live-tested against
an NFS server with JSON output verified. I'll open a PR against this issue once it's accepted.

AI disclosure: This issue and the implementation were drafted with assistance from Claude Code
(Claude Opus 4.7). Design, code, and live testing have been reviewed by me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions