Skip to main content
Glama

impacket_psexec

Run commands on a remote Windows host via SMB by creating a temporary Windows service. Requires admin credentials.

Instructions

Execute a command remotely on a Windows host via SMB using Impacket psexec.

psexec uploads a service binary to the target via SMB admin shares, creates and starts a Windows service, and executes the specified command.

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 (e.g. "whoami"). 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: - This is a destructive operation that creates a service on the target. - Highly detectable — creates Windows Event IDs 7045, 4688. - Requires admin credentials and SMB access (port 445). - Requires explicit human authorization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
hashesNo
targetYes
commandYes
timeoutNo
passwordNo
usernameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden and excels. It discloses destructive behavior, creation of a service, high detectability (Event IDs 7045, 4688), authentication requirements, and password redaction in logs. This goes well beyond a simple 'runs a command' and fully informs the agent of consequences.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with 'Args', 'Returns', and 'WARNING' sections, front-loading the core purpose. Each sentence earns its place, and the warnings are essential for a destructive tool. No redundancy or filler.

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

Completeness5/5

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

Despite having no annotations and 7 parameters, the description covers purpose, mechanism, prerequisites, authentication methods, detection risk, and return type. An output schema exists, so the vague 'Returns' line is acceptable. This is a complete, self-sufficient description for a complex tool.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate. It does so by listing all 7 parameters with meaningful context: target, domain (with '.' for local accounts), username, command, password (redacted), hashes (LM:NT format for pass-the-hash), and timeout override. This adds value beyond bare schema fields, though some descriptions remain terse.

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 clearly states 'Execute a command remotely on a Windows host via SMB using Impacket psexec' with a specific verb, resource, and method. It also explains the underlying mechanism (uploads a service binary, creates/starts a Windows service), which distinguishes it from sibling tools like impacket_wmiexec or impacket_secretsdump.

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 provides clear context: requires admin credentials and SMB access (port 445), is destructive, and demands explicit human authorization. It implies when to use by describing the command execution scenario, but it does not explicitly contrast with alternatives such as WMI exec or mention when not to use it.

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