githubEdit

Active Directory Methodology

TIP: When you want to transfer files and scripts within an enterprise network using HTTP, ONLY USE PORTS 80 AND 443 because firewalls deny traffic from other ports by default and activity blends better with legitimate traffic.

TIP 2: When you find credentials for an account, check if these credentials are reused across multiple machines with various protocols.

    netexec smb IP_RANGE -u USER -p PASSWORD

TIP 3: If you gain administrator access on any host, EXTRACT EVERYTHING! (LSASS, SAM AND SYSTEM HIVES, ETC)

TIP 4: When you want to do lateral movement, start with WinRM or PSSession — they’re modern and often enabled by default. Fall back to WMI when stealth is important or WinRM is blocked. Avoid PsExec unless necessary — it’s often monitored or flagged. Use RunAs for local user switching, not lateral movement.

1) Unauthenticated

  1. User Enumeration

Enumerate possible names you might encounter, then use kerbrute to verify the validity of the users within the AD Domain

    kerbrute userenum -d DOMAIN --dc DC_IP users.txt

Blind user enumeration (No info)

    kerbrute userenum -d DOMAIN --dc DC_IP xato-10million-users.txt

Do the RID Cycling attack to enumerate users

    netexec smb IP -u anonymous -p '' --rid-brute > rid.txt

    cat rid.txt | grep SidTypeUser | awk '{print $6}' | awk -F\ '{print $2}' > users.txt

OR

2) LLMNR poisoning

Use responder to capture Net-NTLMv2 hash, then crack it with hashcat. The scenario could be mentioned somewhere in a CTF setup.

Then upload a .lnk file or similar to the target share/folder that points to our responder IP so that the victim will trigger the file and finally capture his hash.

3) PetitPotam (Unauth) CVE-2022-26925

If SMB signing is not enabled/enforced, you can conduct relay attacks. PetitPotam is one of them

4) LDAP Enumeration

If LDAP port is open, try to do an unauthenticated LDAP query.

Tools: ldapsearch, windapsearch, netexec, ldapdomaindump

Verify if you can use LDAP

Use tools like ldapdomaindump or ldapsearch to dump LDAP information

5) SMB Enumeration

Enumerate SMB shares for gathering information like AD credentials, users, etc

Tools: enum4linux, smbclient, netexec, smbmap

2) Valid Username Only

Try to further enumerate the domain, or even conduct some attacks with only a valid username

  1. Password Spray

If we managed to find a password, but we do not know which user, we can spray the password on different users we have enumerated until we get a hit

Enumerate Password Policy first

Conduct a password spray attack

2) ASREPRoasting

Use tools like Impacket-GetNPUsers and Rubeus to do an ASREPRoasting attack

Linux

Windows

Then crack the hash with hashcat

3) Blind Kerberoasting

Linux

Windows

3) Valid Credentials (Assumed Breach Scenarios)

TIP: If NTLM does not work for pass-the-hash scenarios or you dont have any clear-text credentials for lateral movenemt/initial access, use Kerberos ticket to authenticate.

In assumed breach scenarios, we can test various protocols and check for various misconfigurations and vulnerabilities if we have valid credentials on a domain.

  1. Automation

Tools: adPEAS, Powerview/Sharpview, pingcastle

  1. Bloodhound

Run bloodhound against a target domain controller to query any data via LDAP, then upload the data found to the bloodhound GUI and analyze your findings for privilege escalation and/or lateral movement.

Linux

Windows

Then download the bloodhound.zip file generated by the tool to our local machine.

Now, run bloodhound on our machine with the following commands:

Then login to your instance with your credentials, upload your files either by dragging the zip file, or unzip the file and select the .json files containing the data and you are good to go!

  1. Kerberoasting

Enumerate Kerberoastable users

Get TGS hash

Linux

Windows

Then, crack the hash with hashcat

4) SMB enumeration

User enumeration

In Impacket-smbclient shell

5) LDAP enumeration

Do an LDAP enumeration authenticated this time

Dump all enumerated users into a usernames list to use for other attacks

6) MSSQL

Database commands

You can use other tools like netexec for mssql exploitation/enumeration

  1. DNS Enumeration

  2. ADCS Enumeration

Last updated