هذا الموديول شامل جداً — يغطي كل شي من كسر هاشات لـ lateral movement في AD
# طرق كسر كلمات المرور:
# 1. Dictionary Attack — قائمة كلمات
# 2. Brute Force — كل الاحتمالات
# 3. Rule-based — تعديل قائمة بـ rules
# 4. Rainbow Tables — جداول مسبقة الحساب
# 5. Hybrid — dictionary + brute force
# تحديد نوع الهاش تلقائياً
john hash.txt
# مع wordlist
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# تحديد النوع يدوياً
john hash.txt --format=NT --wordlist=rockyou.txt
john hash.txt --format=md5crypt --wordlist=rockyou.txt
# قائمة الـ formats
john --list=formats
john --list=formats | grep -i sha
john --list=formats | grep -i nt
# عرض النتائج
john --show hash.txt
john --show --format=NT hash.txt
# Rules
john hash.txt --wordlist=rockyou.txt --rules=Jumbo
# جدول الـ Hash Modes
# 0 = MD5
# 100 = SHA1
# 1400 = SHA256
# 1700 = SHA512
# 1000 = NTLM
# 5600 = NetNTLMv2
# 3200 = bcrypt
# 500 = md5crypt ($1$)
# 1800 = sha512crypt ($6$)
# 13100 = Kerberos TGS-REP (Kerberoasting)
# 18200 = Kerberos AS-REP (AS-REP Roasting)
# 13400 = KeePass
# 22000 = WPA2
# Dictionary Attack
hashcat -m 1000 hash.txt rockyou.txt
# Brute Force
hashcat -m 1000 hash.txt -a 3 ?u?l?l?l?l?l?d?d
# Rules
hashcat -m 0 hash.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 0 hash.txt rockyou.txt -r rules/OneRuleToRuleThemAll.rule
# Mask Attack (معرفة pattern)
# ?l = lowercase ?u = uppercase ?d = digit ?s = special ?a = all
hashcat -m 1000 hash.txt -a 3 Password?d?d?d?d
# Combination Attack
hashcat -m 0 hash.txt wordlist1.txt wordlist2.txt -a 1
# استئناف جلسة
hashcat -m 1000 hash.txt rockyou.txt --session mysession
hashcat --restore --session mysession
# CeWL — من موقع مستهدف
cewl https://target.com -m 5 -w wordlist.txt
cewl https://target.com -m 5 --with-numbers -w wordlist.txt
# Crunch — generate custom
crunch 8 8 0123456789 -o nums.txt
crunch 6 10 abcdefghijklmnopqrstuvwxyz -o alpha.txt
crunch 8 8 -t Pass@@@@ # Pass + 4 digits
# CUPP — من معلومات شخصية
cupp -i # interactive mode
# Custom Hashcat Rule
# R = تعكس الكلمة
# c = Capitalize
# $ = append
# ^prefix = prepend
# echo '$1' > my.rule → يضيف 1 لنهاية كل كلمة
echo 'c $1 $2 $3' > rule.rule # Capitalize + 123
hashcat -m 1000 hash.txt wordlist.txt -r rule.rule
# PDF
pdf2john protected.pdf > pdf.hash
john pdf.hash --wordlist=rockyou.txt
# Office Documents
office2john protected.docx > office.hash
john office.hash --wordlist=rockyou.txt
# SSH Private Key
ssh2john id_rsa > ssh.hash
john ssh.hash --wordlist=rockyou.txt
# KeePass
keepass2john database.kdbx > keepass.hash
hashcat -m 13400 keepass.hash rockyou.txt
# ZIP
zip2john archive.zip > zip.hash
john zip.hash --wordlist=rockyou.txt
# أو
hashcat -m 13600 zip.hash rockyou.txt # WinZip AES
hashcat -m 17220 zip.hash rockyou.txt # PKZIP
# RAR
rar2john archive.rar > rar.hash
john rar.hash --wordlist=rockyou.txt
hashcat -m 13000 rar.hash rockyou.txt # RAR5
hashcat -m 23700 rar.hash rockyou.txt # RAR3-hp
# 7-Zip
7z2john archive.7z > 7z.hash
hashcat -m 11600 7z.hash rockyou.txt