Information Gathering
SMBMap allows users to flash out Samba share drives across entire domains, mapping access rights, folder structural read/write lists, file downloads, and upload tests.
sudo apt install smbmap
smbmap -H <target>
SMBMap is a tool for enumerating Samba shared drives across entire domains. It can list shares, check read/write permissions, download files, and test for null session access on Windows and Samba servers.
SMBMap automates the process of discovering and testing SMB shares across networks. Instead of manually connecting to each share, SMBMap scans entire subnets and provides a comprehensive view of accessible shares and their permissions.
The tool is essential for penetration testers assessing Windows environments. It quickly identifies misconfigured shares, weak permissions, and sensitive files that could lead to further compromise of the network.
| Command | Purpose |
|---|---|
smbmap -H <host> | Enumerate shares; an omitted username requests a null session. |
smbmap -H <host> --signing | Report SMB-signing state. |
smbmap -H <host> -u <username> --prompt | Authenticate while prompting for the password. |
smbmap -H <host> -u <username> --prompt -r '<share>' | Recursively list an approved share. |
smbmap -H 192.168.1.1Null session share check - Identify permissions allowed to public unauthenticated userssmbmap -H 192.168.1.1 -u User -p PasswordAuthenticated check - Enumerate accessible shares using valid target user credentialssmbmap -H 192.168.1.1 -u user -p passAuthenticated listingsmbmap -H 192.168.1.1 -u user -p pass -r shareList files in sharesmbmap -H 192.168.1.1 -u user -p pass --download share/file.txtDownload filesmbmap -H 192.168.1.1 -u user -p pass -x "ipconfig"Execute commandsmbmap -H 192.168.1.100List shares and permissionssmbmap -H 192.168.1.100 -u admin -p passAuthenticated share listingsmbmap -H 192.168.1.100 -u admin -p pass -RRecursive directory listingsmbmap -H 192.168.1.100 -u admin -p pass -r shareList specific sharesmbmap -H 192.168.1.100 -u admin -p pass -d share -f file.txtDownload file from sharesmbmap -H 192.168.1.100 -u admin -p pass -d share --upload file.txt /share/Upload file to sharesmbmap -H 192.168.1.100 -u admin -p pass -x 'dir'Execute command via sharesmbmap -H 192.168.1.100 --share-file 'file.txt'Search for specific filesmbmap -H 192.168.1.100 -u admin -p pass -g groups.txtMap group sharessmbmap -H 192.168.1.100 -u admin -p pass --csvCSV outputsmbmap -H 192.168.1.100 -u admin -p pass --only-writeableShow only writable sharessmbmap -H 192.168.1.100 -u admin -p pass --depth 5Set recursion depthsmbmap -H 192.168.1.100 --smb-port 445Specify SMB portDiscover all SMB shares on a network and list their contents.
Check read/write permissions on discovered shares.
Test for unauthenticated access to SMB shares.
Recursively list files and identify sensitive documents.
Download and upload files on accessible shares.
Information Gathering
Learn how to use SMBClient on Kali Linux: install Samba's FTP-like SMB/CIFS client, list shares, connect as a guest or with credentials, browse folders, and upload or download files on Windows, Samba, or NAS devices. For authorized assessments, check ports 139/445 with Nmap before testing share permissions.
Information Gathering
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.
Information Gathering
enum4linux-ng is a next-generation version of the classic enum4linux script, rewritten from scratch in Python 3 to parse and enumerate Windows/Samba information efficiently with cleaner output formats.
Information Gathering
NBTScan is a program for scanning IP networks for NetBIOS name information. It sends a NetBIOS status query to each address in the supplied range and lists received information in human-readable form.
Information Gathering
Masscan is an internet-scale port scanner. It can scan the entire Internet in under 6 minutes, transmitting up to 10 million packets per second utilizing asynchronous transmit setups.
Information Gathering
Netdiscover is an active/passive ARP reconnaissance tool for discovering live hosts on a network. It sends ARP requests and listens for responses to identify devices, IP addresses, MAC addresses, and vendor information without performing port scans.
A complete beginner-to-advanced SMB enumeration guide covering discovery, NetBIOS, share access, user enumeration, automation, troubleshooting, workflow design, and SMB tool selection.
Tools · BeginnerLearn Enum4Linux for enumerating Windows and Samba systems including user lists, shares, groups, and security policy information.
Tools · BeginnerComplete guide to SMB enumeration for discovering Windows shares, users, groups, and network resources using Enum4Linux, SMBClient, NBTScan, and Nmap.
Active Directory · AdvancedComprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.
SMBMap output lists SMB shares along with their permissions (read/write), file listings, and directory structures. Authenticated scans show accessible shares with full file trees. Error messages indicate permission levels and access restrictions on each share.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.