Impacket SMBExec
Purpose
Use this skill for narrowly bounded SMB-based command validation only when the rules of engagement explicitly permit remote execution checks.
Phase Fit
- Primary: Validation and Controlled Impact Demonstration
- Secondary: Retest and Closure
Use When
- Need to validate SMB-backed command execution on a specific approved host.
- Need an alternative execution path to compare control boundaries.
- Need a repeatable retest after host or service hardening.
Avoid When
- Remote execution is not explicitly approved.
- Host scope, credential handling, or service impact is unclear.
Inputs
- Approved host
- Authorized credential or hash
- Stop conditions and evidence limits
Procedure
- Limit activity to the single approved host.
- Confirm only the execution boundary needed by the assessment.
- Avoid persistence, lateral expansion, or bulk command use.
- Record only the minimum proof of impact.
- Preserve the exact auth context for retest.
Command Syntax
Replace sample domains, hosts, and credentials with approved in-scope values.
# Interactive shell via service-based SMB execution
smbexec.py contoso.com/auditor:'<password>'@10.10.10.100
# Pass-the-Hash
smbexec.py -hashes :<NTLM_hash> contoso.com/administrator@10.10.10.100
# Pass-the-Ticket (Kerberos)
KRB5CCNAME=administrator.ccache smbexec.py -k -no-pass dc01.contoso.com
# Server mode (execute as SYSTEM via network share)
smbexec.py contoso.com/auditor:'<password>'@10.10.10.100 -mode SERVER
Evidence to Capture
- Whether SMB-backed execution worked on the approved host
- Exact account, host, and protocol path used
- Minimal reproduction details for retest
Safety Boundaries
- Do not expand beyond the approved host and objective.
- Stop immediately if service instability or unapproved state changes occur.