LinuxCommandLibrary

impacket-psexec

executes commands on remote Windows systems via SMB

TLDR

Execute command on remote host

$ impacket-psexec [domain]/[user]:[password]@[target] [command]
copy
Get interactive shell
$ impacket-psexec [domain]/[user]:[password]@[target]
copy
Use NTLM hash instead of password
$ impacket-psexec -hashes :[hash] [domain]/[user]@[target]
copy
Specify service name
$ impacket-psexec -service-name [name] [domain]/[user]:[password]@[target]
copy

SYNOPSIS

impacket-psexec [options] target [command]

DESCRIPTION

impacket-psexec executes commands on remote Windows systems via SMB. Part of the Impacket toolkit. Works by uploading a service executable to ADMIN$ share and using Service Control Manager to start it. Requires administrator credentials. Used for authorized penetration testing and system administration.

PARAMETERS

-hashes lm:nt

Use NTLM hashes for authentication.
-k
Use Kerberos authentication.
-service-name name
Name for the service.
-codec codec
Output encoding.

CAVEATS

Requires administrator access on target. Leaves artifacts on target system. For authorized security testing only.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community