graph LR
A[NFS Scanning Tools] --> B[Network Scanners]
A --> C[Specialized NFS Tools]
A --> D[Scripting Solutions]
## Basic NFS service discovery
nmap -sV -p 111,2049 192.168.1.0/24
## Detailed NFS script scanning
nmap --script nfs-ls,nfs-showmount 192.168.1.100
2. Showmount - NFS Export Listing
## List all exported shares
showmount -e 192.168.1.100
## List remote exports in verbose mode
showmount -e 192.168.1.100 -v
Advanced Scanning Techniques
Automated NFS Discovery Script
#!/bin/bash
## Advanced NFS Share Discovery
NETWORKS=("192.168.1.0/24" "10.0.0.0/16")
for network in "${NETWORKS[@]}"; do
echo "Scanning Network: $network"
nmap -sV -p 111,2049 $network | grep -B4 "111/tcp\|2049/tcp"
done
Tool |
Pros |
Cons |
Use Case |
Nmap |
Comprehensive |
Complex configuration |
Network-wide scanning |
Showmount |
Simple |
Limited functionality |
Quick share listing |
RPCInfo |
Low-level detection |
Technical complexity |
Service-level scanning |
Specialized NFS Scanning Utilities
1. NFSShell
Provides interactive NFS exploration capabilities:
## Connect to NFS server
nfsshell -h 192.168.1.100
## List available commands
?
## Use Metasploit NFS auxiliary modules
msfconsole
use auxiliary/scanner/nfs/nfsmount
set RHOSTS 192.168.1.0/24
run
Security Considerations
Detection Best Practices
- Use multiple scanning tools
- Verify results cross-referentially
- Implement continuous monitoring
LabEx Scanning Workflow
graph TD
A[Network Identification] --> B[Port Scanning]
B --> C[NFS Service Detection]
C --> D[Share Enumeration]
D --> E[Vulnerability Assessment]
Advanced Configuration
Custom Scanning Parameters
## Combine multiple scanning techniques
nmap -sV -p 111,2049 --script nfs-ls,nfs-showmount \
-oX nfs_scan_results.xml 192.168.1.0/24
Practical Recommendations
- Use diverse scanning methodologies
- Automate discovery processes
- Maintain updated scanning tools
- Respect network usage policies
At LabEx, we emphasize a comprehensive approach to NFS share detection, combining multiple tools and techniques for thorough network exploration.