Forrest logo
tool overview
On this page you find all important commands for the CLI tool smbmap. If the command you are looking for is missing please ask our AI.

smbmap

Smbmap is a powerful command-line tool used for exploring and interacting with Windows and Samba network shares. It provides an easy way to gather information and perform various operations on these network shares.

With smbmap, you can discover available shares on a target system, revealing the accessible directories and files. It supports both anonymous and authenticated connections, allowing you to provide credentials for accessing restricted shares.

The tool provides clear and concise output, displaying relevant information such as share name, path, permissions, and whether it requires authentication. It also identifies which shares are writable, allowing you to upload or modify files if you have appropriate access.

Furthermore, smbmap can be used to recursively list files and directories within a share, making it efficient for reconnaissance purposes. It can also extract and download files from target shares, providing a convenient way to retrieve specific data of interest.

Additionally, smbmap supports various functionalities like executing commands within shares, connecting to specific IP addresses, and specifying custom domain names. It handles both IPv4 and IPv6 addresses and is compatible with multiple versions of SMB (Server Message Block) protocol.

Smbmap is an open-source tool written in Python and is available on platforms like Windows, Linux, and macOS. It is actively maintained and regularly updated to ensure compatibility with the latest versions of operating systems and network protocols. Moreover, it can be integrated into penetration testing and vulnerability assessment workflows for evaluating the security of network shares.

List of commands for smbmap:

  • smbmap:tldr:0b811 smbmap: Display SMB shares and permissions on a host, prompting for user's password or NTLM hash.
    $ smbmap -u ${username} --prompt -H ${ip}
    try on your machine
    explain this command
  • smbmap:tldr:12801 smbmap: Display SMB shares and permissions on a host, specifying the domain and passing the password NTLM hash.
    $ smbmap -u ${username} --prompt -d ${domain} -H ${ip}
    try on your machine
    explain this command
  • smbmap:tldr:1799e smbmap: Locate and download files [R]ecursively up to N levels depth, searching for filename pattern (regex), and excluding certain shares.
    $ smbmap --host-file ${filename} -u ${username} -p ${password} -q -R --depth ${number} --exclude ${sharename} -A ${filepattern}
    try on your machine
    explain this command
  • smbmap:tldr:1b348 smbmap: Display SMB shares and list a single level of directories and files.
    $ smbmap -u ${username} --prompt -H ${ip} -r
    try on your machine
    explain this command
  • smbmap:tldr:1d7c5 smbmap: Display SMB shares and recursively list directories and files, searching for file content matching a regular expression.
    $ smbmap -u ${username} --prompt -H ${ip} -R -F ${pattern}
    try on your machine
    explain this command
  • smbmap:tldr:2492e smbmap: Enumerate hosts and check SMB file permissions.
    $ smbmap --host-file ${filename} -u ${username} -p ${password} -q
    try on your machine
    explain this command
  • smbmap:tldr:3d6e5 smbmap: Display SMB shares and recursively list a defined number of levels of directories and files.
    $ smbmap -u ${username} --prompt -H ${ip} -R --depth ${3}
    try on your machine
    explain this command
  • smbmap:tldr:4de97 smbmap: Display SMB shares and recursively list directories and files, downloading the files matching a regular expression.
    $ smbmap -u ${username} --prompt -H ${ip} -R -A ${pattern}
    try on your machine
    explain this command
  • smbmap:tldr:78403 smbmap: Upload a file to a remote system.
    $ smbmap -u ${username} --prompt -H ${ip} --upload ${source} ${destination}
    try on your machine
    explain this command
  • smbmap:tldr:7c097 smbmap: Upload file through smb using username and password.
    $ smbmap -u ${username} -p ${password} -d ${domain} -H ${ip_or_hostname} --upload ${filename} '${-share_name-remote_filename}'
    try on your machine
    explain this command
  • smbmap:tldr:94259 smbmap: Connect to an ip or hostname through smb using a username and password.
    $ smbmap -u ${username} -p ${password} -d ${domain} -H ${ip_or_hostname}
    try on your machine
    explain this command
  • smbmap:tldr:b1322 smbmap: Enumerate hosts with NULL sessions enabled and open shares.
    $ smbmap --host-file ${filename}
    try on your machine
    explain this command
  • smbmap:tldr:f3f28 smbmap: Execute a shell command on a remote system.
    $ smbmap -u ${username} --prompt -H ${ip} -x ${command}
    try on your machine
    explain this command
tool overview