Skip to content

Add NFS spidering module to enumerate readable files#1058

Open
sheikhshaheerimran wants to merge 1 commit intoPennyw0rth:mainfrom
sheikhshaheerimran:feat/nfs-spider
Open

Add NFS spidering module to enumerate readable files#1058
sheikhshaheerimran wants to merge 1 commit intoPennyw0rth:mainfrom
sheikhshaheerimran:feat/nfs-spider

Conversation

@sheikhshaheerimran
Copy link

@sheikhshaheerimran sheikhshaheerimran commented Jan 2, 2026

Adds NFS spider functionality to recursively enumerate NFS shares and identify readable/downloadable files.

  • Uses ACCESS3_READ permission checks to verify actual accessibility
  • Supports root escape technique for full filesystem traversal
  • Pattern and regex filtering for targeted searches

Closes #1023

Usage:

# Spider using root escape
nxc nfs <target> --spider

# Spider specific path with depth limit
nxc nfs <target> --spider /home --depth 3

# Spider specific share
nxc nfs <target> --share /exports --spider

Type of change

  • New feature

Setup guide for the review

Test environment:

  • Linux with Python 3.10+
  • Target: Any NFS server with exported shares

To test:

  1. Set up an NFS server with exported shares
  2. Run nxc nfs --spider to enumerate readable files
  3. Verify results by attempting to download or mount manually

Screenshots (if appropriate):
Screenshot 2026-01-02 at 7 24 45 PM

Checklist:

  • I have ran Ruff against my changes
  • I have added or updated the tests/e2e_commands.txt file
  • New and existing e2e tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@termanix
Copy link
Contributor

termanix commented Jan 2, 2026

Good job! Can you also share some example screenshots?

@NeffIsBack
Copy link
Member

Yes, thanks for the PR! But please use the PR template.

@NeffIsBack NeffIsBack added the enhancement New feature or request label Jan 2, 2026
    Implements NFS spidering functionality by recursively traverses NFS shares and identifies truly readable files using ACCESS3_READ permission checks, helping users understand which paths are accessible when using root escape technique.

      Features:
      - --spider [PATH] to start spidering from a path
      - --depth to limit recursion depth
      - --pattern/--regex for filename filtering
      - --exclude-dirs to skip directories
      - --all-items to show non-readable files
      - --include-dirs to include directories in output
      - Uses root escape when available, otherwise requires --share
@sheikhshaheerimran
Copy link
Author

@NeffIsBack i have updated PR. Apologies for missing template. Can you review and guide if any further changes are required?

@NeffIsBack
Copy link
Member

@NeffIsBack i have updated PR. Apologies for missing template. Can you review and guide if any further changes are required?

No worries, we'll work with what we've got. I don't have much time at the moment and there are a lot of other PRs that i have to review first, but eventually i will get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: NFS Spidering to Identify Accessible Files

3 participants