ELI5: What is Penetration Testing?

Have you ever asked a friend to try to sneak into your blanket fort to see if they could find a way in? Penetration testing is exactly that, but for computer systems. A company hires friendly hackers and gives them permission to try to break in. When they find a weak spot, they write a report so the company can fix it before a real bad guy finds the same hole.

Overview

Penetration testing is an authorized, simulated cyberattack performed to evaluate the security of systems, networks, and applications by attempting to exploit vulnerabilities. Unlike vulnerability scanning, pen testing actively exploits weaknesses to demonstrate real-world impact. Results inform remediation priorities and validate the effectiveness of existing security controls.

Key Concepts

  • Testing types: Black box (no prior knowledge), white box (full knowledge), gray box (partial knowledge)
  • Phases: Planning/scoping → Reconnaissance → Scanning → Exploitation → Post-exploitation → Reporting
  • Rules of engagement (ROE): Legal document defining scope, timing, allowed techniques, and emergency contacts
  • Reconnaissance: Passive (OSINT, DNS lookups) and active (port scanning, service enumeration) information gathering
  • Exploitation: Attempting to gain unauthorized access using discovered vulnerabilities
  • Lateral movement: Moving from a compromised system to other systems within the network
  • Privilege escalation: Elevating access from a normal user to administrator or root
  • Pivoting: Using a compromised system as a launchpad to attack internal networks
  • Bug bounty programs: Crowdsourced testing where external researchers report vulnerabilities for rewards
  • Red team vs. pen test: Red teams simulate real adversaries over extended periods; pen tests are time-boxed technical assessments
  • Wardriving: Scanning for wireless networks from a moving vehicle using a laptop and antenna
  • Warflying: Scanning for wireless networks using a drone for broader coverage

Exam Tips

Remember

Black box = attacker view (unknown environment). White box = full transparency (known environment). Gray box = partial info (partially known). Always get written authorization before testing.

  • Pen testing without authorization = illegal, regardless of intent
  • Know the difference: vulnerability scan (find weaknesses) vs. pen test (exploit weaknesses)
  • Red team = offensive, Blue team = defensive, Purple team = collaborative improvement

Connections

Practice Questions

Scenario

See case-penetration-testing for a practical DevOps scenario applying these concepts.