SMBMAP(1)
π NAME π
smbmap β the SMB enumeration tool, bestie. Like, the whole point of it. π¦
π¦ SYNOPSIS π¦
smbmap [-h] (-H HOST | --host-file FILE) [-u USERNAME] [-p PASSWORD
|--prompt] [-s SHARE] [-d DOMAIN] [-P PORT] [-v] [--admin] [--no-banner]
[--no-color] [--no-update] [-x COMMAND][--mode CMDMODE] [-L | -r [PATH]]
[-A PATTERN | -g FILE | --csv FILE] [--dir-only][--no-write-check] [-q]
[--depth DEPTH] [--exclude SHARE [SHARE ...]] [-F PATTERN] [--search-
path PATH] [--search-timeout TIMEOUT] [--download PATH] [--upload SRC
DST] [--delete PATH TO FILE] [--skip]
πΈ DESCRIPTION πΈ
okay so picture this: SMBMap lets you enumerate samba share drives across an entire domain. An entire domain!! π
It can list share drives, list drive permissions, list share contents, do the whole upload/download thing, do file name auto-download pattern matching, and it can literally execute remote commands. The way that this tool was designed with pen testing in mindβ¦ it's giving "let me simplify searching for potentially sensitive data across large networks." Periodt. π
β¨ OPTIONS β¨
π Main arguments:
-HHOST β IP of host π«Ά--host-fileFILE β a file containing a list of hosts-uUSERNAME,--usernameUSERNAME β the username. If you omit it, a null session is assumed, bestie-pPASSWORD,--passwordPASSWORD β password, or an NTLM hash π₯--promptβ prompts you for a password-sSHARE β specify a share (defaultC$), ex'C$'-dDOMAIN β domain name (defaultWORKGROUP)-PPORT β SMB port (default445)-v,--versionβ return the OS version of the remote host β--signingβ check if host has SMB signing disabled, enabled, or required--adminβ just report if the user is an admin, nothing more, no crumbs--no-bannerβ removes the banner from the top of the output--no-colorβ removes the color from output π--no-updateβ removes the"Working on it"message--timeoutSCAN_TIMEOUT β set port scan socket timeout. Default is.5seconds
Kerberos settings:
-k,--kerberosβ use Kerberos authentication β¨--no-passβ use CCache file (export KRB5CCNAME='~/current.ccache')--dc-ipIP or Host β IP or FQDN of DC
Command Execution:
Options for executing commands on the specified host π
-xCOMMAND β execute a command ex.'ipconfig /all'--modeCMDMODE β set the execution method,wmiorpsexec, defaultwmi
Shard drive Search:
Options for searching/enumerating the filesystem of the specified host π
-Lβ list all drives on the specified host, requires ADMIN rights. no cap-r[PATH] β recursively list dirs and files (with no PATH it lists the root of ALL shares), ex.'email/backup'-gFILE β output to a file in a grep friendly format, used with-r(otherwise it outputs nothing), ex-g grep_out.txt-APATTERN β define a file name pattern (regex) that auto downloads a file on a match (requires-r), not case sensitive, ex'(web|global).(asax|config)'--csvFILE β output to a CSV file, ex--csv shares.csv--dir-onlyβ list only directories, omit files--no-write-checkβ skip check to see if drive grants WRITE access-qβ quiet verbose output. Only shows shares you have READ or WRITE on, and suppresses file listing when performing a search (-A)--depthDEPTH β traverse a directory tree to a specific depth. Default is1(root node)--excludeSHARE [SHARE ...] β exclude share(s) from searching and listing, ex.--exclude ADMIN$ C$'
File Content Search:
Options for searching the content of files (must run as root), kind of experimental π
-FPATTERN β file content search,-F '[Pp]assword'(requires admin access to execute commands, and powershell on victim host)--search-pathPATH β specify drive/path to search (used with-F, defaultC:\Users), ex'D:\HR\'--search-timeoutTIMEOUT β specify a timeout (in seconds) before the file search job gets killed. Default is300seconds
Filesystem interaction:
Options for interacting with the specified host's filesystem π§
--downloadPATH β download a file from the remote system, ex.'C$\temp\passwords.txt'--uploadSRC DST β upload a file to the remote system ex.'/tmp/payload.exe C$\temp\payload.exe'--deletePATH_TO_FILE β delete a remote file, ex.'C$\temp\msf.exe'--skipβ skip delete file confirmation prompt
π EXAMPLES: π
$ python smbmap.py -u jsmith -p password1 -d workgroup -H 192.168.0.1
$ python smbmap.py -u jsmith -p 'aad3b435b51404eeaad3b435b51404ee:da76f2c4c96028b7a6111aef4a50a94d' -H 172.16.0.20
$ python smbmap.py -u 'apadmin' -p 'asdf1234!' -d ACME -H 10.1.3.30 -x 'net group "Domain Admins" /domain'
look at that NTLM hash in example two. iconic. π
π AUTHOR π
smbmap was developed by ShawnDEvans <ShawnDEvans@gmail.com> π«Ά
This manual page was written by Samuel Henrique <samueloph@debian.org> for the Debian project, it was based on smbmap -h output and can be used by other projects as well. slay.
and that's the whole page bestie!! this is smbmap 1.10.7, dated January 2025, from the User Commands manual β mwah, go enumerate something responsibly πβ¨π
π¦ where this page comes from
- debian trixie: smbmap 1.10.7-1 Β· GPL-3.0-only
- ubuntu questing: smbmap 1.10.7-1
- ubuntu resolute: smbmap 1.10.7-1build1 Β· GPL-3.0-only
- ubuntu stonking: smbmap 1.10.7-1build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms