Saltar a contenido

Windows Active directory

INTERACTIVE CHEAT SHEET

internal pentesting "all the things" notes

Tools

Attack Vectors & Post Compromise Attacks too

More Post compromise attacks

Quick notes

Initial internal pentest attack strategy

  1. mitm6 or responder
  2. run scans to generate traffic
  3. if scans are taking too long, look for websites in scope (http_version)
  4. Look for default credentials on web logins
    • Printers
    • Jenkins
    • Etc
  5. enumerate all

Enumerations commands

Post-Compromise AD enumeration

  • Bloudhound
    • sudo bloodhound-python -d DOMAIN.local -u $USERNAME -p $PASSWORD -ns $IP -c all
  • Plumhound
  • Ldapdomaindump
    • sudo ldapdomaindump ldaps://$IP -u 'DOMAIN\username' -p $PASSWORD
    • Caso hipotetico de uso: LLMNR => conseguimos un hash => lo crackeamos => probamos la contraseña en otras maquinas => encontramos nuevo login => secrets dump those logins => local admin hashes => re-spray network with local accs
  • PingCastle
  • etc
  • Trevor Spray tool
  • SeatBelt Tool

Now we own the domain what's next?

  • Provide as much value to the client as possible
    • Put your blinders on and do it again
    • Dump the NTDS.dit and crack passwords
    • Enumarate shares for sensitive information
  • Persistence can be important
    • What happens if our DA access is lost?
    • Creating a DA account can be useful (remember we have to delete it)
    • creating a golden ticket can be useful too

NTDS.dit

  • What is it?
    • A DB used to store AD data.
      • User info.
      • Group info.
      • Security descriptors
      • Password hashes
  • Golden Ticket attack
    • When we compromise the krbtgt (kerberos target) account, we own the domain
    • We can request access to any resource or system on the domain
    • Golden tickets = complete access to every machine

Lateral movement notes

  • Tools:
    • Psexec => internal tool
    • WinRM

Persistence

  • Persistence Scripts
  • run persistence -h
  • exploit/windows/local/persistence
  • exploit/windows/local/registry_persistence

  • Scheduled Tasks

  • run scheduleme
  • run schtaskabuse

  • Add a user

  • net user hacker password123 /add