Skip to main content
Glama

impacket_wmiexec

Execute commands on remote Windows hosts via WMI, avoiding service creation for lower visibility than psexec. Requires admin credentials and WMI access on ports 135/445.

Instructions

Execute a command remotely on a Windows host via WMI using Impacket wmiexec.

wmiexec uses Windows Management Instrumentation (WMI) for remote execution, which is stealthier than psexec as it does not create a service.

Args: target: Target IP address or hostname. domain: Domain name (use "." for local accounts). username: Username for authentication. command: Command to execute on the remote host. password: Password for authentication (redacted in logs). hashes: NTLM hash for pass-the-hash (format: LM:NT). Alternative to password. timeout: Override scan timeout in seconds.

Returns: Command execution result with output.

WARNING: - Requires admin credentials and WMI access (port 135/445). - Generates Windows Event ID 4688 and WMI activity logs. - Requires explicit human authorization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
hashesNo
targetYes
commandYes
timeoutNo
passwordNo
usernameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It usefully discloses WMI access ports, admin requirements, Event ID 4688 generation, WMI activity logs, password redaction, and the need for explicit human authorization. It does not mention limitations such as command output truncation or the exact command interpreter used.

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 well-structured with a summary, args list, returns section, and warnings. The first sentence is front-loaded and precise. While slightly longer than minimal, every section adds useful information and there is no filler.

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

Completeness4/5

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

For a high-risk remote command execution tool, the description is reasonably complete: it covers purpose, prerequisites, network ports, logging side effects, return behavior, and authorization requirements. It falls slightly short by not addressing authentication precedence when both password and hashes are supplied, or whether the command runs via cmd.exe or PowerShell.

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

Parameters5/5

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

The input schema has 0% description coverage, so the description fully compensates by explaining all seven arguments. It adds meaningful details such as using '.' for local accounts, password redaction in logs, hashes format 'LM:NT' for pass-the-hash, and timeout as an override in seconds.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Execute a command remotely on a Windows host via WMI using Impacket wmiexec.' It clearly distinguishes itself from impacket_psexec by noting it is 'stealthier than psexec as it does not create a service.'

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

Usage Guidelines4/5

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

The description gives clear usage context by contrasting wmiexec with psexec and stating it avoids service creation. It also lists prerequisites such as 'admin credentials and WMI access (port 135/445)' and 'explicit human authorization.' However, it does not explicitly state when not to use this tool or mention other alternatives beyond psexec.

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/rfunix/tengu'

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