Finding Shared Resources
SMB and NFS are network protocols used for sharing files and printers. Misconfigured shares often expose sensitive data or provide an easy entry point for attackers.
SMB (Server Message Block) - Windows
SMB runs on TCP ports 139 and 445.
- Tool:
smbclientorenum4linux(Kali tool). - Goal: Identifying shares accessible by guest/anonymous users, listing user accounts, and determining the OS version.
bash
Check for null session access (anonymous access)
smbclient -L 192.168.1.100 -N
NFS (Network File System) - Linux
NFS allows file sharing between Unix/Linux systems.
- Tool:
showmount(Kali tool). - Goal: Listing which directories are being exported by the target server and which IP addresses are permitted to mount them.
bash showmount -e 192.168.1.100
If shares are misconfigured to allow 'world' access, attackers can dump files or potentially introduce malicious executable files.