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
Execute Specific Command
How It Works
- Authenticates to the target via SMB (port 445).
- Connects to the
ADMIN$share (C:\Windows). - Uploads a service binary (
RemComSvc) toADMIN$. - Creates a Windows service pointing to the uploaded binary via the Service Control Manager (SCM).
- Starts the service, which spawns
cmd.exeas SYSTEM. - Communicates I/O through named pipes over SMB.
- 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\