๐ŸŽ“Advanced Penetration Testing

Remote extraction of AD hashes

Import-Module DSInternals

$cred=Get-Credential

Get-ADReplAccount -SamAccountName <victim username> -Server <Domain IP> -Credential $cred -Protocol TCP

Carry out a Kerberos roasting

python3 GetNPUsers.py <domain/> -dc-ip <domain ip> -usersfile <username.txt> -format hashcat

Crack the Hash

john <hash file> --wordlist=/usr/share/wordlists/rockyou.txt

Run a no-preauthentication attack

Forge a golden ticket (Post Exploitation)

Prerequisite

  • Must be a local admin before doing this attack

Get the NT hash of Kerberos TGT

Copy the NT hash for the user "krbtgt"

Copy the Computer Name

Extract the Domain SID

Forge the Golden-Ticket

Use the Golden-Ticket

Note: "akatt42" is the username for which we have create the golden ticket previously.

Running a shadow attack

Certipy Tool

Pass The Hash Attack

Taking over the domain using rubeus (Privilege Escalation)

Identify a Vulnerable Certificate Template

Request the Certificate

Make sure to copy the whole body (from BEGIN RSA PRIVATE KEY to END CERTIFICATE). In order to successfully convert it we must have the private key itself.

Convert .pem file to .pfx file

Host a python http server and transfer back the .pfx.

Now the next step is to simply generate and inject ticket for the issued certificate and enjoy being Administrator.

Rubeus

Change the Domain Admin Password

Login to the domain admin account using the new password.

Relaying attacks to get a certificate

DFSCoerce

Set up a Man-In-The-Middle relay server

Using DFSCoerce

Save the baset64 encoded certificate

Decode the Certificate

Extract the Private Key hash

Using smartcards to gain privileged access

Create a Smartcard

PoshADCS

PowerView

Execute PowerView

Execute PoshADCS

Check the Access level

Requtst for Domain Admin

offsec user is the domain administrator

Enter the PIN we have created previously

Check the virtual smart card

Enter the PIN

Set the BloodHound loose

Start neo4j

Change the Credentials for neo4j

Run BloodHound

Ente the neo4j username and password

Last updated

Was this helpful?