Password Cracking
Generating Password Mutations
Followig are the symbols used to create
rulesin hashcat.
: Do nothing.
l Lowercase all letters.
u Uppercase all letters.
c Capitalize the first letter and lowercase others.
sXY Replace all instances of X with Y.
$! Add the exclamation character at the end.Command to create wordlist using rules:
# Rules are available at /usr/share/hashcat/rules/
hashcat --force password.list -r rule --stdout | sort -u > mut_password.listCracking Protected Archives
# Use John to crack protected files
office2john, ssh2john, pdf2john, zip2john, bitlocker2john etc
# Cracking OpenSSL Encrypted Archives
## Using a for-loop to Display Extracted Contents
for i in $(cat rockyou.txt);do openssl enc -aes-256-cbc -d -in $NAME.gzip -k $i 2>/dev/null| tar xz;doneGenerating Wordlists Using CeWL
Windows Password Attacks
Attacking SAM
hklm\samContains the hashes associated with local account passwords. We will need the hashes so we can crack them and get the user account passwords in cleartext.hklm\systemContains the system bootkey, which is used to encrypt the SAM database. We will need the bootkey to decrypt the SAM database.hklm\securityContains cached credentials for domain accounts. We may benefit from having this on a domain-joined Windows target.
Dumping hashes remotely:
Attacking LSSAS
Attacking NTDS.dit
From windows host:
From linux host:
Enumerating users with reversible encryption enabled:
Secretsdump.py will save reversible passwords in plain text.
Credential Hunting
Windows Lateral Movement
Pass The Hash (PtH)
From windows host:
From linux host:
UAC (User Account Control) limits local users' ability to perform remote administration operations. When the registry key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicyis set to0, it means that the built-in local admin account is the only local account allowed to perform remote administration tasks. Setting it to1allows the other local admins as well.
Pass the Key or OverPass the Hash
Pass The Ticket (PtT)
From windows host:
You can also monitor Kerberos tickets using Rubeus:
From linux host:
Using Linux Attack Tools with Kerberos:
We can convert ccache files in kribi format to use them in windows:
impacket-ticketConverter krb5cc_ name.kirbi
Using linikatz to extract all creds from system
Linux Password Attacks
Credential Hunting
Reading important files
Reading important credential files in linux:
Cracking credentials in shadow file
Last updated