person-through-windowWindows Lateral Movement

1. Pass the Hash (PtH) Attack

Core Concept

  • Technique using password hash instead of plaintext password for authentication

  • No need to decrypt the hash

  • Exploits authentication protocol where hash remains static until password change

Windows NTLM Authentication Key Points

  • Challenge-response authentication protocol

  • Still common despite known flaws (legacy compatibility)

  • No password salting = vulnerability to PtH attacks

Requirements

  • Administrative privileges/specific privileges on target

  • Ways to obtain hashes:

    • Dumping local SAM database

    • Extracting from NTDS database (ntds.dit) on Domain Controller

    • Pulling from memory (lsass.exe)

Attack Methods & Tools

1. Mimikatz (Windows)

Required parameters:

  • /user - Target username

  • /rc4 or /NTLM - NTLM hash

  • /domain - Domain name (use computer name/localhost/. for local)

  • /run - Program to execute (default: cmd.exe)

2. PowerShell Invoke-TheHash

3. Impacket (Linux)

4. CrackMapExec (Linux)

5. Evil-WinRM (Linux)

6. RDP Pass the Hash (Linux)

Important PtH Considerations

  • UAC limits PtH for local accounts

  • LocalAccountTokenFilterPolicy affects remote admin capabilities:

    • 0 = only built-in admin (RID-500)

    • 1 = all local admins

  • Domain accounts with admin rights bypass these restrictions

2. Windows Pass the Ticket (PtT) Attack

Overview

  • Definition: A PtT attack leverages stolen Kerberos tickets (TGT or TGS) to move laterally in an Active Directory (AD) environment

  • Purpose: Exploits Kerberos authentication mechanisms without requiring NTLM password hashes or plaintext credentials

Kerberos Protocol Fundamentals

Key Concepts

  1. Ticket-Based Authentication:

    • Designed to minimize password sharing across services

    • Tickets authenticate users without transmitting passwords

  2. Kerberos Components:

    • TGT (Ticket Granting Ticket): Obtained after initial authentication; used to request service tickets (TGS)

    • TGS (Ticket Granting Service): Grants tickets for accessing specific services

Ticket Harvesting Tools

1. Mimikatz

2. Rubeus

Lateral Movement Techniques

PowerShell Remoting

3. Linux Pass the Ticket (PtT) Attack

Key Linux Kerberos Attack Concepts

  • Leveraging Kerberos tickets on Linux machines integrated with Active Directory

  • Ticket storage in keytab or ccache files

  • Often located in /tmp directory or /etc/krb5.keytab

Attack Methodology

Ticket Discovery

User Impersonation

Additional Attack Techniques

Post-Exploitation

  • Check sudo privileges with sudo -l

  • Use tools like Linikatz for credential extraction

  • Potential privilege escalation paths

Mitigation Strategies

  • Implement strong password policies

  • Use Multi-Factor Authentication (MFA)

  • Limit administrative privileges

  • Regularly update and patch systems

  • Monitor and log authentication events

  • Use advanced endpoint protection