Skip to main content
Glama

Run Smbmap

run_smbmap

Enumerate SMB/SAMBA shares across a domain, inspect permissions and contents, transfer files, search data, and execute remote commands using credentials, hashes, or null sessions.

Instructions

SMBMap allows users to enumerate SAMBA share drives across an entire domain. It can list share permissions, drive contents, upload/download files, and execute remote commands. Tags: network, security, pentest, enumeration, exploitation, authentication, smb

Usage Guide:

  • Null Session: Provide only the target.

  • Authenticated: Provide username, password_or_hash, and optionally domain.

  • Pass-the-Hash: Provide the NTLM hash (LM:NT format) in the password_or_hash field.

  • Enumeration: Use recursive and depth to crawl shares. Use share to focus on one.

  • File Ops: Use download_path for exfiltration or upload_local/upload_remote for transfers.

  • Searching: Use auto_download_pattern (regex) to grab matching files or search_content_pattern to grep inside files.

  • Execution: Use execute_command with exec_mode ("wmi" or "psexec") for remote code execution.

Warnings:

  • This tool can perform exploitation and authentication attempts which may be logged or trigger alerts.

  • File deletion is destructive. Use delete_path with caution.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>"
    },
    "name": "run_smbmap"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoMaximum recursion depth (default: 3).
shareNoSpecific share name to enumerate (e.g., "C$", "SYSVOL").
domainNoActive Directory domain or WORKGROUP (default: WORKGROUP).WORKGROUP
targetYesIP address or hostname of the target server.
verboseNoEnable verbose output (useful for OS versioning).
usernameNoUsername for authentication.
exec_modeNoExecution method, either "wmi" (default) or "psexec".wmi
recursiveNoBoolean to recursively list directories and files.
admin_checkNoCheck if the current credentials have administrative privileges.
delete_pathNoRemote path of a file to delete (Caution: Destructive).
search_pathNoThe share/path to search within for content (default: C$).C$
upload_localNoLocal path of a file to upload.
check_signingNoCheck SMB signing requirements and OS version.
download_pathNoRemote path of a file to download.
upload_remoteNoRemote destination path for the uploaded file.
execute_commandNoCommand to execute on the remote host.
password_or_hashNoPlaintext password or NTLM hash (LMHASH:NTHASH).
auto_download_patternNoRegex pattern to find and download matching files automatically.
search_content_patternNoString pattern to search for inside file contents.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does meaningful work: it warns that auth/exploitation attempts may be logged or trigger alerts, and flags delete_path as destructive. It does not state privilege requirements for share access or whether uploads/executions are reversible, leaving some behavioral risk implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then cleanly sectioned into Usage Guide and Warnings, which makes a 19-parameter tool scannable. The 'Tags:' line is low-value metadata for an agent and the only real waste; everything else is load-bearing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 19-parameter offensive tool with no annotations, the definition covers mode selection, credential formats, destructive operations, and operational risk, and an output schema exists so return values need not be described. Gaps are minor but real: no statement of required permissions, no note on which parameters conflict, and no indication of runtime duration or network noise level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description earns more by adding cross-parameter meaning the schema cannot express — the LM:NT hash format expected in password_or_hash, the pairing of upload_local with upload_remote, recursive+depth working together, and the regex nature of auto_download_pattern. It stops short of explaining interactions like which params are ignored in null-session mode.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource: 'enumerate SAMBA share drives across an entire domain,' and then enumerates concrete capabilities (permissions, upload/download, remote command execution). This is far more specific than a tautology and clearly separates it from generic scanners like run_nmap or run_httpx, though it never explicitly contrasts itself with siblings such as run_hydra that also touch SMB auth.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Usage Guide is genuinely operational: it maps credential modes (null session, authenticated, pass-the-hash) and task modes (enumeration, file ops, searching, execution) to specific parameter combinations. What is missing is exclusion guidance — nothing says when to prefer another tool or when this tool is the wrong choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.