Password Cracking and Brute Force: practice machines and key commands

By Daniel Dayan ยท Updated

Many boxes fall to a password that is weak, default or reused. Offline cracking turns a captured hash into plaintext: identify the hash type first, then choose the matching hashcat mode or John format, starting with rockyou and a rules file before heavier masks. Online attacks with Hydra or NetExec are slower and noisier, so use targeted username lists and watch for lockouts. Always try default credentials for the product you identified, and test every password you find against every service and user, because reuse is common. Build custom wordlists from site content with a tool like cewl when generic lists fail. Keep a running list of credentials in your notes. The machines below involve cracking or guessing a secret to progress.

Key commands

Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.

Hashcat NTLM Hashes (Mode 1000)

High-speed GPU cracking of Windows NTLM hashes dumped from SAM or NTDS.dit.

hashcat -m 1000 ntlm.hashes /usr/share/wordlists/rockyou.txt -O

Hashcat Linux /etc/shadow Hashes (Mode 1800)

Crack SHA512crypt ($6$) passwords dumped from Linux /etc/shadow.

hashcat -m 1800 shadow.hashes /usr/share/wordlists/rockyou.txt -O

Hydra Multi-Threaded SSH Brute Force

Brute-force SSH service credentials using rockyou password list.

hydra -l {USER} -P /usr/share/wordlists/rockyou.txt {TARGET_IP} ssh -t 4

Hydra Web Login Form Brute Force

Target HTTP POST web login endpoint with username and password dictionary.

hydra -l admin -P /usr/share/wordlists/rockyou.txt {TARGET_IP} http-post-form "/login:username=^USER^&password=^PASS^:F=Invalid credentials"

JWT Secret Key HMAC-SHA256 Cracking

Crack HS256 signed JSON Web Token secrets offline using rockyou wordlist.

hashcat -m 16500 jwt.txt /usr/share/wordlists/rockyou.txt

Keep going

Password Cracking and Brute Force machines (37)

16 of these are machines I solved myself and are listed first within each difficulty. 30 Linux, 7 Windows.

Listed when a machine has a catalog tag that is one of: dictionary attack, no auth, admin bypass, authentication bypass, hashcat, john, password cracking, hash cracking, hydra, brute force, bruteforce, default credentials, credential reuse, wordlist; or a tag that contains the word hydra, john or hashcat. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row. "Editor-mapped" marks machines assigned to this topic by hand because none of their tags match.

Password Cracking and Brute Force at a glance

Very Easy (7)

MachinePlatformOSTags
CrocodileFTPAdmin PanelgobusterHTBLinuxEditor-mapped, FTP, Admin Panel, gobuster
ExplosionDefault CredentialsRDPRemote DesktopHTBWindowsDefault Credentials, RDP, Remote Desktop
IgnitionHTTPHTBLinuxEditor-mapped, HTTP
MeowDefault CredentialsTelnetHTBLinuxDefault Credentials, Telnet
PennyworthDefault CredentialsJenkinsGroovyRCEHTBLinuxDefault Credentials, Jenkins, Groovy, RCE
SequelDefault CredentialsMySQLMariaDBHTBLinuxDefault Credentials, MySQL, MariaDB
GuardPassword-CrackingSSHSudoHTBLinuxPassword-Cracking, SSH, Sudo

Easy (20)

MachinePlatformOSTags
Basic PentestingHydraJohn The RipperSMB-EnumerationTHMLinuxHydra, John The Ripper, SMB-Enumeration
Bounty HackerHydraFTP-AnonymousTar-SUIDTHMLinuxHydra, FTP-Anonymous, Tar-SUID
CyberHeroesAuthentication-BypassReverse-EngineeringJavaScriptTHMLinuxAuthentication-Bypass, Reverse-Engineering, JavaScript
Jerry IppSecBasic-script-debuggingHTBWindowsEditor-mapped, Basic-script-debugging
MongodMongoDBHTBLinuxMongoDB
NeighbourIDORTHMLinuxEditor-mapped, IDOR
PreignitionAdmin-BypassHTTPHTBLinuxAdmin-Bypass, HTTP
SyncedRsyncHTBLinuxEditor-mapped, Rsync
W1seGuyCryptographyXORPythonTHMLinuxEditor-mapped, Cryptography, XOR, Python
Agent SudoBrute-ForceUser-Agent-SpoofingSteganographyCVE-2019-14287THMLinuxBrute-Force, User-Agent-Spoofing, Steganography, CVE-2019-14287
AnonforceJohn The RippernmapTHMLinuxJohn The Ripper, nmap
Brooklyn Nine NineHydraSteganographySUIDTHMLinuxHydra, Steganography, SUID
Crack the hashHashcatTHMLinuxHashcat
CyborgPassword-CrackingBorg BackupSudoersTHMLinuxPassword-Cracking, Borg Backup, Sudoers
GamingServerHydraJohn The RippernmapgobusterTHMLinuxHydra, John The Ripper, nmap, gobuster
LibraryHydranmapgobusterTHMLinuxHydra, nmap, gobuster
Net Sec ChallengeHydranmapTHMLinuxHydra, nmap
Perfection IppSecHashcatSSTIRubyERBHTBLinuxHashcat, SSTI, Ruby, ERB
ToolsRusHydradirbusternmapNiktoTHMLinuxHydra, dirbuster, nmap, Nikto
UnderPass IppSecPassword-CrackingSNMPDaloradiusFreeRADIUSHTBLinuxPassword-Cracking, SNMP, Daloradius, FreeRADIUS

Medium (3)

MachinePlatformOSTags
Mr Robot CTFDictionary-AttackWordPressWp-loginNmap-SUIDTHMLinuxDictionary-Attack, WordPress, Wp-login, Nmap-SUID
HackParkHydraBlogEngineCVE-2019-6714THMWindowsHydra, BlogEngine, CVE-2019-6714
SmolJohn The RippernmapwpscanTHMLinuxJohn The Ripper, nmap, wpscan

Hard (4)

MachinePlatformOSTags
Control IppSecPassword-CrackingSQLiCVE-2019-11043HTBWindowsPassword-Cracking, SQLi, CVE-2019-11043
FlightHashcatActive DirectoryPivotingResponderHTBWindowsHashcat, Active Directory, Pivoting, Responder
Reel2 IppSecPassword-CrackingJEA-BypassPhishingSticky-NotesHTBWindowsPassword-Cracking, JEA-Bypass, Phishing, Sticky-Notes
Year of the PigBrute-ForceCapabilitiesTHMLinuxBrute-Force, Capabilities

Insane (3)

MachinePlatformOSTags
Dyplesher IppSecPassword-CrackingAMQPCuberiteHTBLinuxPassword-Cracking, AMQP, Cuberite
Multimaster IppSecPassword-CrackingCVE-2020-1472SQLiVS-CodeHTBWindowsPassword-Cracking, CVE-2020-1472, SQLi, VS-Code
Response IppSecAuthentication-BypassDirectory-TraversalSource-Code-ReviewHTBLinuxAuthentication-Bypass, Directory-Traversal, Source-Code-Review

Related techniques

Related guides: TJ Null OSCP list, OSCP exam scoring and time budget, OSCP vs CPTS, OSCP report template.

Practise it, then track it.

Log every box and the commands you used in ZeroBox.