PISA Pakistan — Community CERT

← ⚙️ Red Team Fundamentals (Ethical)

5. Privilege Escalation & Lateral Movement: Expanding Your Foothold

⏱ 12 min

The Post-Exploitation Framework

After gaining initial access through web vulnerabilities or phishing campaigns, the red teamer's real work begins. Privilege escalation (PE) and lateral movement represent the critical phases where ethical hackers demonstrate actual business risk to organizations. In Pakistan's threat landscape, attackers commonly target:

  • Domain administrator accounts in enterprise networks
  • Database administrators with NADRA data access
  • Finance team members with SWIFT/system permissions
  • IT administrators controlling backup systems

Understanding these techniques—while never using them maliciously—makes you invaluable to organizations defending against real threats.

Windows Privilege Escalation Fundamentals

Following MITRE ATT&CK's Privilege Escalation tactic (T1068), enumeration is the first step:

  • whoami /all and whoami /priv to list current privileges
  • systeminfo to gather system configuration
  • net user and net localgroup for account enumeration
  • wmic product get name,version for installed software

Common PE vectors in Pakistani enterprises:

  • Unpatched Windows vulnerabilities ( EternalBlue variants)
  • Misconfigured services running as SYSTEM
  • AlwaysInstallElevated policy exploitation
  • DLL hijacking in legacy banking applications
  • Token manipulation (Token窃取/T1076)

Linux Privilege Escalation

Linux PE follows similar enumeration principles:

  • sudo -l to list permitted commands
  • find / -perm -4000 2>/dev/null for SUID binaries
  • cat /etc/crontab for scheduled tasks
  • uname -a and kernel version analysis

In Pakistan, Linux systems commonly run in telecom billing environments and government data centers, requiring specialized enumeration approaches.

Lateral Movement Techniques

Once elevated privileges are obtained, lateral movement spreads access across the network (MITRE T1021):

  • Pass-the-Hash: Using NTLM hashes to authenticate to other systems
  • Remote Desktop Protocol (RDP): xfreerdp or remmina for GUI access
  • SSH pivoting: Using compromised hosts as jump points
  • SMB/PsExec: Executing remote processes via SMB

Tools for authorized assessments:

  • PowerView (Active Directory enumeration)
  • Mimikatz (credential extraction—use only in sanctioned labs)
  • CrackMapExec (network wide credential testing)
  • BloodHound (AD relationship visualization)

Detection Considerations

For blue team integration, ethical hackers must understand detection:

  • Windows Defender: Monitors for Mimikatz and suspicious PowerShell
  • SIEM alerts: ELK Stack or Splunk correlations for lateral movement
  • Event logging: Windows Event ID 4624 (logon) and 4672 (special privileges)
  • Sigma rules: Detect common attack patterns

Do / Don't

Do: Document all escalations with timestamps and evidence. Don't: Access or exfiltrate personal data—stick to demonstrating risk without actual data theft.

Takeaway

Practice PE techniques in TryHackMe or HackTheBox labs this week. Focus on Windows potato exploits and Linux sudo misconfigurations. Understanding these paths helps you recommend concrete remediation to Pakistani organizations defending against sophisticated attackers.

← PrevNext →