Tool Comparison
| Tool | Protocol | Context | Stealth | Requirements |
|---|---|---|---|---|
| psexec.py | SMB + RemComSvc | SYSTEM | Low | Admin, SMB access |
| smbexec.py | SMB + Service | SYSTEM | Low | Admin, SMB access |
| wmiexec.py | WMI/DCOM | User | Medium | Admin, DCOM ports |
| dcomexec.py | DCOM Objects | User | Medium | Admin, DCOM ports |
| atexec.py | Task Scheduler | SYSTEM | Medium | Admin, Task Scheduler |
psexec.py
PsExec-like functionality using RemComSvc. Executes commands as SYSTEM through a temporary service.Basic Usage
- Interactive Shell
- Single Command
- File Upload & Execute
Advanced Options
Custom Service Configuration
Custom Service Configuration
Copy & Execute Files
Copy & Execute Files
Port & Timeout Settings
Port & Timeout Settings
Example Output
smbexec.py
Executes commands through a temporary service without uploading a binary. Uses local SMB server in server mode.Basic Usage
Characteristics
Advantages
- No binary upload required
- Works with any writable share
- Server mode for restricted environments
Disadvantages
- Generates event logs (service creation)
- Commands timeout if they run too long
- Not fully interactive
Example
wmiexec.py
Executes commands through WMI. Runs as the authenticated user (not SYSTEM) with less event log noise.Basic Usage
- Interactive Shell
- Single Command
- No Output Mode
Advanced Features
Shell Types
Shell Types
Custom Share
Custom Share
File Operations
File Operations
Example Session
dcomexec.py
Executes commands through DCOM objects. Supports multiple DCOM methods.DCOM Objects
- MMC20.Application
- ShellWindows
- ShellBrowserWindow
Usage Examples
atexec.py
Executes commands via Task Scheduler. Runs as SYSTEM with less noise than service-based methods.Basic Usage
- Standard Execution
- Kerberos
- Interactive Session
Example
Choosing the Right Tool
- Stealth Priority
- Reliability
- Environment
Most Stealthy to Least:
- wmiexec.py - Minimal event logs, runs as user
- dcomexec.py - DCOM-based, less common detection
- atexec.py - Task Scheduler, moderate logging
- smbexec.py - Service creation logs
- psexec.py - Service creation + binary upload
Common Issues
Access Denied
Access Denied
Connection Refused / Firewall
Connection Refused / Firewall
WMI / DCOM Errors
WMI / DCOM Errors
Next Steps
Credential Dumping
Extract credentials after gaining access
SMB Operations
Browse shares and access files
LDAP Operations
Enumerate and modify Active Directory