Skip to main content
Glama

dump_sam_hashes

Extract SAM database hashes from Windows systems using credentials or NTLM hashes for security testing and password analysis during penetration testing.

Instructions

dump sam hashes if we have some redentials using the sec dump which is similar to secretdump,use ntlm hash or normal password

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes
usernameYes
passwordYes
ntlmNo
kerberosNo

Implementation Reference

  • The handler function for the 'dump_sam_hashes' tool. It executes netexec smb with --sam secdump option using NTLM hash, Kerberos, or password authentication to dump SAM hashes.
    def dump_sam_hashes(ips:List[str],username:str,password:str,ntlm:bool=False,kerberos:bool=False):
        if (ntlm):
            return run_command(["netexec","smb"]+ips+["-u",username,"-H",password,"--sam","secdump"])
        elif(kerberos):
            return run_command(["netexec","smb"]+ips+["-u",username,"-p",password,'-k',"--sam","secdump"])
        else:
            return run_command(["netexec","smb"]+ips+["-u",username,"-p",password,"--sam","secdump"])
  • Registers the 'dump_sam_hashes' tool with MCP using the @mcp.tool decorator, including name, description, and implicit schema from function parameters.
    @mcp.tool(name="dump_sam_hashes",description="dump sam hashes if we have some redentials using the sec dump which is similar to secretdump,use ntlm hash or normal password")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool dumps SAM hashes using credentials, which implies a read operation, but doesn't clarify if it's destructive, requires specific permissions, involves network access, or has rate limits. The comparison to 'secretdump' hints at a security tool behavior, but lacks details on output format, error handling, or side effects, leaving significant gaps.

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

Conciseness2/5

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

The description is a single run-on sentence with grammatical errors ('redentials', 'quereis' in sibling tools) and unclear phrasing ('sec dump which is similar to secretdump'). It's not front-loaded with key information and lacks structure, making it inefficient for quick comprehension. While brief, it sacrifices clarity for brevity.

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

Completeness2/5

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

Given the complexity of a credential-based security tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what SAM hashes are, how the tool interacts with systems, what the output looks like, or potential risks. For a tool in a security context with siblings like 'dump_ntds_dit', more detail is needed to ensure safe and correct usage.

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

Parameters2/5

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

With 0% schema description coverage for 5 parameters, the description must compensate but only partially does so. It mentions using 'ntlm hash or normal password', which relates to the 'ntlm' and 'password' parameters, but doesn't explain 'ips', 'username', or 'kerberos'. This adds minimal meaning beyond the schema, failing to adequately document the parameters for effective tool invocation.

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

Purpose3/5

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

The description states the tool dumps SAM hashes using credentials, which indicates a specific action (dump) on a resource (SAM hashes). However, it's vague about what 'SAM hashes' are and doesn't clearly differentiate from sibling tools like 'dump_ntds_dit' or 'Kerberoast', which might involve similar credential-based attacks. The mention of 'sec dump' and 'secretdump' adds some context but lacks precision.

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

Usage Guidelines2/5

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

The description implies usage when credentials are available ('if we have some redentials'), but provides no explicit guidance on when to use this tool versus alternatives like 'dump_ntds_dit' or 'Kerberoast'. It mentions using NTLM hash or password, but doesn't specify scenarios or prerequisites, leaving the agent to infer usage from the tool name and parameters alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YoussefSahnoun/PentestMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server