Lateral Movement

01. Common commands

01.1 OS Enumerations

## ------------------| Get Basic details
systeminfo
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
whoami /all

## ------------------| Get environment paths
##[Powershell]
Get-ChildItem Env: | ft Key,Value
dir env:

## ------------------| Get .Net Version (cmd/ps)
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP"

## ------------------| Get System Architecher 32 or 64 
##[Powershell]
$env:PROCESSOR_ARCHITECTURE
[Environment]::Is64BitProcess
[Environment]::Is64BitOperatingSystem
##[cmd]
set processor

## ------------------| Extract os patchs and updates
wmic qfe 

## ------------------| List all installed software with patches (
wmic product get name, version, vendor

## ------------------| List all disk
mountvol
wmic logicaldisk get caption,description,providername

## ------------------| List firewall state and current configuration
netsh advfirewall firewall dump
netsh firewall show state
netsh firewall show config
netsh advfirewall firewall show rule name=all

01.2 User Enumerations

  • Create user

  • Login as another user

  • Change password

  • Stored Credentials | Saved Creds

01.3 Network Enumeration

  • Turn on RDP

  • Ping sweeper

  • Export DNS Zones

01.4 Process / Service Enumeration

  • Modifiable Services

  • Dump process

  • List installed programs

01.5 File Enumeration

  • Advance search

  • Weak Permission

  • Set / Check permissions

  • Enumerate Shortcut (.lnk)

  • Compress & Extract zip file

01.6 Firewall / Defender

01.6.1 Firewall

01.6.2 Antivirus & Detections | Disable Defender

01.7 Default Locations

  • World writable directories (for AnyUsers)

01.8 Policy Bypassing

  • PowerShell Execution Policy Bypass

  • Bypass the App Locker Group Policy

  • PowerShell Constrained Language Mode Bypass.

  • UAC Bypass

01.9 Upload / Download / Execute

  • Upload file.

  • Download file

  • Execute file

01.10 Encoding / Decoding

  • Encoded Payload

  • Encode file to base64

  • Decode secure password (SecureString)

01.11 Dumping Credentials

  • Dump SAM and SYSTEM files

  • LaZagne [Firefox,Chrome]

01.12 Other

  • Copy file from smb server

  • Start SMB samba server on Linux for share files.

02. Defense Evasion Techniques

  • AV Evasion techniques (Invoke-Obfuscation)

  • Evasion with Shellter

03. Scripts

  • Add new user using c

  • Get-ServiceACL.ps1

  • Invoke-TSPingSweep.ps1

  • wget script for download file.

Last updated