Skip to main content
Glama

bruteforce_rid_users

Enumerate Active Directory users by brute-forcing RID values to identify accounts for security assessments and penetration testing.

Instructions

Bruteforce rid to enumerate users

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes

Implementation Reference

  • Handler function for the 'bruteforce_rid_users' tool, decorated with @mcp.tool for registration. It executes netexec smb with --rid-brute on the provided IP list to enumerate users via RID brute force.
    @mcp.tool(name="bruteforce_rid_users",description="Bruteforce rid to enumerate users")
    def bruteforce_rid_users(ips:List[str]):
        return run_command(["netexec","smb"]+ips+["--rid-brute"])
  • Registration of the tool via @mcp.tool decorator specifying the name and description.
    @mcp.tool(name="bruteforce_rid_users",description="Bruteforce rid to enumerate users")
  • Helper function run_command used by bruteforce_rid_users to execute the netexec command.
    def run_command(command: List[str], timeout: int = 150,communicate:bool=False) -> Dict[str, Union[str, int, bool]]:
        try:
            logger.info(f"communicate :{communicate}")
            logger.info(f"Running command: {' '.join(command)}")
            if communicate:
                # Use Popen for interactive communication
                process = subprocess.Popen(
                    command,
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE,
                    stdin=subprocess.PIPE,
                    text=True
                )
                stdout, stderr = process.communicate(input="y\n", timeout=timeout)
                returncode = process.returncode
            else:
                # Use run for non-interactive commands
                result = subprocess.run(
                    command,
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE,
                    text=True,
                    check=True,
                    timeout=timeout
                )
                stdout = result.stdout
                stderr = result.stderr
                returncode = result.returncode
    
            logger.info(f"Command completed with return code {returncode}")
            return {
                "success": True,
                "stdout": stdout,
                "stderr": stderr,
                "returncode": returncode
            }
            
        except subprocess.CalledProcessError as e:
            logger.error(f"Command failed with return code {e.returncode}: {e.stderr}")
            return {
                "success": False,
                "stdout": e.stdout,
                "stderr": e.stderr,
                "returncode": e.returncode,
                "error": f"Command failed with return code {e.returncode}"
            }
        except subprocess.TimeoutExpired as e:
            logger.error(f"Command timed out after {timeout} seconds")
            return {
                "success": False,
                "error": f"Command timed out after {timeout} seconds"
            }
        except Exception as e:
            logger.error(f"Error running command: {str(e)}")
            return {
                "success": False,
                "error": str(e)
            }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'bruteforce', which suggests aggressive or potentially disruptive actions, but fails to detail critical traits like authentication needs, rate limits, network impact, or output format. This is inadequate for a tool with security implications.

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?

The description is a single, efficient sentence with no wasted words, making it appropriately sized. However, it is front-loaded with minimal detail, which limits its helpfulness despite being concise.

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

Completeness1/5

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

Given the complexity implied by 'bruteforce' (a potentially invasive security operation), no annotations, no output schema, and 0% schema coverage, the description is severely incomplete. It lacks essential details on behavior, parameters, and results, making it inadequate for safe and effective tool invocation.

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?

Schema description coverage is 0%, so the description must compensate for the undocumented parameter 'ips'. It adds no information about the parameter's meaning, such as what IPs represent (e.g., target systems), expected format, or constraints. The description does not address parameters at all, leaving significant gaps.

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 'Bruteforce rid to enumerate users' states a vague purpose with the verb 'bruteforce' and resource 'rid' to 'enumerate users', but it lacks specificity on what 'rid' refers to (e.g., RID cycling in Active Directory) and does not distinguish it from sibling tools like 'enumerate_domain_users'. It is not tautological but remains ambiguous in scope.

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 provides no guidance on when to use this tool versus alternatives such as 'enumerate_domain_users' or other enumeration methods. It implies usage for user enumeration but offers no context on prerequisites, scenarios, or exclusions, leaving the agent without clear direction.

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