Living Off the Land: Windows Post-Exploitation

Living Off the Land: Windows Post-Exploitation Workflow & Cheatsheet

🎯 Quick Reference Workflow

Initial Access → Reconnaissance → Credential Harvesting → Lateral Movement → Persistence → Exfiltration

đź“‹ PHASE 1: INITIAL RECONNAISSANCE

System Information

# OS Information
Get-WmiObject -Class Win32_OperatingSystem | Select-Object Caption, Version, BuildNumber, OSArchitecture

# Domain Check
(Get-WmiObject -Class Win32_ComputerSystem).PartOfDomain
(Get-WmiObject -Class Win32_ComputerSystem).Domain

# Current User Privileges
whoami /all

Local Enumeration

Network Reconnaissance

Software Enumeration


đź“‹ PHASE 2: ACTIVE DIRECTORY ENUMERATION

PowerShell Method

ADSI Method (No Module Required)

Native Tools Method

Remote System Enumeration (WMI)


đź“‹ PHASE 3: CREDENTIAL HARVESTING

LSASS Memory Dump

Registry Credential Extraction

PowerShell History

Browser Credentials

Credential Manager

Kerberoasting


đź“‹ PHASE 4: LATERAL MOVEMENT

PowerShell Remoting

WMI Execution

DCOM Execution

Scheduled Tasks

Service-Based Movement

netsh Pivoting


đź“‹ PHASE 5: PERSISTENCE

Registry Run Keys

Startup Folder

Scheduled Tasks

WMI Event Subscriptions


đź“‹ PHASE 6: DATA EXFILTRATION

PowerShell Web Upload

certutil

BITS Transfer

SMB Exfiltration

DNS Exfiltration

Email Exfiltration


đź“‹ BYPASSING APPLICATION WHITELISTING

MSBuild Execution

Regsvr32 Scriptlet

Mshta Execution


🛡️ OPSEC CONSIDERATIONS

High-Risk Actions (Likely to Trigger Alerts)

  • ❌ Disabling Windows Defender/Firewall completely

  • ❌ Ping sweeps of entire subnets

  • ❌ Dumping LSASS in monitored environments

  • ❌ Creating services with suspicious names

  • ❌ Large data transfers in single bursts

  • ❌ Executing from TEMP/Downloads directories

Lower-Risk Alternatives

  • âś… Use specific firewall rules instead of disabling

  • âś… Use ARP cache and existing connections for recon

  • âś… Time LSASS dumps during maintenance windows

  • âś… Use legitimate-looking service/task names

  • âś… Chunk and throttle data transfers

  • âś… Execute from standard Windows directories

Cleanup Checklist


📚 DETECTION INDICATORS

Event IDs to Monitor

  • 4688 - Process Creation (with command-line auditing)

  • 4624 - Successful Logon (Type 3 = Network, Type 10 = RemoteInteractive)

  • 4648 - Explicit Credential Use

  • 4672 - Special Privileges Assigned

  • 7045 - New Service Installed

  • 106/200 - Scheduled Task Registered/Executed

  • 4103/4104 - PowerShell Script Block Logging

Suspicious Patterns

  • PowerShell with -EncodedCommand, -NoProfile, -WindowStyle Hidden

  • Rundll32 with comsvcs.dll (LSASS dumping)

  • MSBuild/Regsvr32/Mshta from unusual parent processes

  • WMI/DCOM connections to multiple systems

  • Certutil with -urlcache and URLs

  • Netsh with portproxy or advfirewall

  • Scheduled tasks running as SYSTEM with PowerShell

  • Processes accessing LSASS memory


🎯 QUICK WINS CHECKLIST

First 5 Minutes:

  1. whoami /all - Check privileges

  2. Check domain membership

  3. List local admins

  4. Check for security products

  5. PowerShell history check

First 15 Minutes:

  1. Search for credentials in files

  2. Check Credential Manager

  3. Enumerate domain if domain-joined

  4. Check for unquoted service paths

  5. List installed software

First Hour:

  1. Attempt LSASS dump if admin

  2. Kerberoasting if domain environment

  3. Establish persistence mechanism

  4. Begin lateral movement recon

  5. Identify high-value targets


đź“– Key References

Last updated