Skip to main content

Overview

impacket-psexec uploads an executable to the ADMIN$ share, creates a Windows service to run it, and returns a SYSTEM-level interactive shell over SMB (port 445). It is the noisiest of the Impacket exec tools but provides full interactive access.

Authentication Methods


Basic Usage — Interactive Shell

Local admin (no domain):

Execute Specific Command

Run a PowerShell command:

How It Works

  1. Authenticates to the target via SMB (port 445).
  2. Connects to the ADMIN$ share (C:\Windows).
  3. Uploads a service binary (RemComSvc) to ADMIN$.
  4. Creates a Windows service pointing to the uploaded binary via the Service Control Manager (SCM).
  5. Starts the service, which spawns cmd.exe as SYSTEM.
  6. Communicates I/O through named pipes over SMB.
  7. On exit, stops the service, deletes it, and removes the uploaded binary.

OPSEC Considerations

Artifacts to expect:
  • System Event ID 7045 (new service installed)
  • Security Event ID 4624 (network logon type 3)
  • Security Event ID 4672 (special privileges assigned)
  • File creation under C:\Windows\

Pass-the-Hash

With both LM and NT hash:

Kerberos Authentication

Requires a valid ccache file or keytab.
With explicit DC IP:
Using AES key directly:

Target Specific Port


Common Errors and Fixes


Quick Reference