Password Attacks Tools



Password Attacks crack password ด้วยการ brute-force

1.hashcat

คืออะไร: เครื่องมือสำหรับ crack password จาก hash อย่างรวดเร็วโดยใช้ GPU

รองรับ hash หลายแบบ เช่น NTLM, MD5, SHA1 ฯลฯ

คำสั่งพื้นฐาน:

hashcat -m 1000 -a 0 hashes.txt wordlist.txt

อธิบายคำสั่ง:

-m 1000 = ระบุ hash type (1000 = NTLM)

-a 0 = Attack mode (0 = dictionary attack)

hashes.txt = ไฟล์ที่มี hash ที่ต้องการ crack

wordlist.txt = คำศัพท์ที่ใช้ลอง เช่น จาก seclists

ตรวจสอบ hash mode ทั้งหมด:

hashcat -h | grep Hash-Types



2.john the ripper

คืออะไร: เครื่องมือ crack password ที่สามารถใช้กับหลาย hash types เช่น /etc/shadow, zip, rar ฯลฯ

ขั้นตอนการใช้งานทั่วไป:

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

ดู password ที่ crack สำเร็จ:

john --show hash.txt

อธิบาย:

--wordlist= ใช้ระบุ dictionary

hash.txt ต้องเป็น hash ที่รองรับ เช่น NTLM, MD5



3.zip2john

คืออะไร: ใช้แปลงไฟล์ zip ที่ถูกเข้ารหัสให้กลายเป็น hash เพื่อส่งไปให้ John crack

ขั้นตอน:

zip2john secret.zip > ziphash.txt

john --wordlist=/usr/share/wordlists/rockyou.txt ziphash.txt



4. dirty.c

คืออะไร: โค้ด Exploit ที่ใช้เจาะระบบ Linux ที่มีช่องโหว่ privilege escalation (Dirty COW)

ขั้นตอน:

ใช้คำสั่ง gcc คอมไพล์เป็น binary

gcc dirty.c -o dirty -pthread

./dirty

ผลลัพธ์: shell จะถูกยกระดับเป็น root



5. Pwnkit.c

คืออะไร: ใช้ Exploit ช่องโหว่ Polkit ใน Linux เพื่อยกระดับสิทธิ์ (CVE-2021-4034)

ใช้งาน:

ใช้คำสั่ง gcc คอมไพล์เป็น binary

gcc Pwnkit.c -o pwnkit

./pwnkit