use_module
Execute penetration testing modules with proper configuration, handling credentials and options to automate security assessments in Active Directory environments.
Instructions
Call this to use the module with the right options and make sure to satisfy the need of certain variables like credentials etc.If no credentials are needed for the module or no valid credentials are found leave the username and password default (empty). Options syntax is ["option1=value1","options2=value2",...]
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ips | Yes | ||
| prot | Yes | ||
| module | Yes | ||
| options | Yes | ||
| username | Yes | ||
| password | Yes | ||
| kerberos | No | ||
| ntlm | No |
Implementation Reference
- src/pentestmcp/server.py:329-329 (registration)Registration of the 'use_module' tool using the @mcp.tool decorator.@mcp.tool(name='use_module',description='Call this to use the module with the right options and make sure to satisfy the need of certain variables like credentials etc.If no credentials are needed for the module or no valid credentials are found leave the username and password default (empty). Options syntax is ["option1=value1","options2=value2",...]')
- src/pentestmcp/server.py:330-337 (handler)The handler function implements the tool logic by constructing and executing a netexec command based on the provided protocol, module, options, and credentials.def use_module(ips:List[str],prot:str,module:str,options:List[str],username:str,password:str,kerberos:bool=False,ntlm:bool=False): if (ntlm): return run_command(["netexec",prot]+ips+["-u",username,"-H",password,"-M",module,"-o"]+options) elif(kerberos): return run_command(["netexec",prot]+ips+["-u",username,"-p",password,'-k',"-M",module,"-o"]+options) else: return run_command(["netexec",prot]+ips+["-u",username,"-p",password,"-M",module,"-o"]+options)