Windows Management Instrumentation (WMI)
Requirements: Valid credentials, local admin access, DCOM access
Use case: You need stealthy, AV-evading lateral movement and WinRM is not an option
1: Connect to WMI through Powershell
1)
$username= 'Administrator';2)
$password= 'PASSWORD';3)
$securepassword = ConvertTo-SecureString $password -AsPlaintext -Force;4)
$credential = New-Object System.Management.Automation.PSCredential $username, $securepassword;2: Establish WMI Session
Protocols:
1) DCOM: RPC over IP. Ports: 135/TCP, 49152-65535/TCP
2) Wsman: WinRM. Ports: 5985/TCP (WinRM HTTP), 5986/TCP (WinRM HTTPS)
3: WMI Through Powershell
1)
2)
4: Remote Process Creation (WMI)
Ports: 135/TCP, 49152-65535/TCP, 5986/TCP, 5986/TCP
Group Memberships: Administrators
1)
2)
Legacy Systems
5: Remote Service Creation (WMI)
Ports: 135/TCP, 49152-65535/TCP (DCERPC) 5985/TCP or 5986/TCP
Group Memberships: Administrators
1)
6: Get handle on service and start
7: Remote scheduled tasks creation (WMI)
Ports: 135/TCP, 49152-65535/TCP, 5985/TCP or 5986/TCP
Group Memberships: Administrators
Payload must be split in Command and Args
8: MSI Packages (WMI)
Ports: 135/TCP, 49152-65535/TCP, 5985/TCP or 5986/TCP
Group Memberships: Administrators
Legacy Systems
Last updated