← Blog
Career2026-04-1511 min read

What Is Penetration Testing? (And How It Actually Works)

Penetration testing is not just running vulnerability scanners. Here's what professional pentesters actually do, how engagements are structured, and what separates a useful pentest from a checkbox exercise.

Penetration testing — pentesting — is the practice of attacking a system with the owner's permission to find vulnerabilities before someone malicious does. It's not theoretical. A penetration tester uses the same techniques, tools, and mindset as an attacker. The only difference is the authorisation and the report at the end.

Companies pay for this because the alternative — waiting to find out about vulnerabilities when they appear in a breach notification — is considerably more expensive.

What actually happens during a pentest

A penetration test follows a structured methodology. The specifics vary by firm and engagement type, but the phases look like this:

Types of penetration testing

Pentesting covers more than just web applications. The main categories:

Black box, white box, grey box

These terms describe how much information the tester is given before the engagement starts.

Black box — the tester gets a target (a URL or IP range) and nothing else. They approach it the way an external attacker would, with no knowledge of internal architecture, credentials, or source code. Realistic but slower.

White box — the tester gets full access: source code, architecture diagrams, credentials, documentation. More thorough and efficient. Often used for code review alongside active testing.

Grey box — somewhere between. The tester gets some information — maybe a user account, or knowledge of which technologies are used — but not full internals. The most common real-world engagement type.

Penetration testing vs vulnerability scanning

These are not the same thing and the distinction matters. A vulnerability scan runs automated tools that check for known vulnerabilities — unpatched software, default credentials, common misconfigurations. It produces a list of findings based on signatures.

A penetration test involves human judgment. A skilled tester identifies the vulnerabilities a scanner would miss: logic flaws in how the application works, chained vulnerabilities that are only dangerous in combination, business logic issues that require understanding the application's intent.

A vulnerability scanner will tell you your login page lacks account lockout. A penetration tester will brute-force the admin account, pivot to the internal admin panel, and demonstrate exactly what an attacker would do with that access. The difference is evidence.

What good pentest reporting looks like

The report is the output. A good pentest report has two audiences: the technical team who will fix the issues and the executives who approved the budget. It needs to serve both.

Each finding should include:

How to get into penetration testing as a career

The practical path is: build technical skills in labs and CTFs, get the OSCP certification, then apply to consulting firms or in-house security teams. Many people also move into pentesting from other IT roles — developers and sysadmins have a significant advantage because they already understand how systems are built.

Bug bounty hunting is also a legitimate parallel path. Several people have been hired directly by companies they found significant vulnerabilities in, and a strong public track record on HackerOne or Bugcrowd substitutes for credentials in many hiring conversations.

The OSCP remains the benchmark certification for getting hired. CEH (Certified Ethical Hacker) is less respected in technical circles because it's primarily multiple choice — it tests knowledge of hacking concepts rather than the ability to actually hack. Employers who know the difference know the difference.

Is it legal?

Penetration testing without written authorisation is illegal in most jurisdictions under computer fraud laws. The Computer Fraud and Abuse Act (US), Computer Misuse Act (UK), and equivalent laws elsewhere define unauthorised access broadly. "I was just testing" is not a defence.

Professional engagements are covered by a signed Statement of Work or Rules of Engagement document that specifies the scope, permitted techniques, and liability. Bug bounty programmes publish a policy that grants permission within defined boundaries. Both provide the legal cover that makes the work legitimate.

If you're learning, practice on systems you own or on platforms explicitly designed for it — CTF environments, intentionally vulnerable apps, lab platforms. The legal and ethical path is also the faster path: deliberate practice in controlled environments beats poking at random sites with no permission and no feedback.

// Practice this

Put this into practice on hackr.gg. Real vulnerable machines, real attack tools, right in your browser. No setup, no VPN — get your first flag in under 10 minutes.

Start hacking free →
More posts
Web Security
SQL Injection: How One Quote Character Breaks a Database
9 min
Web Security
XSS: From alert(1) to Session Hijack
11 min
Career
How to Start Bug Bounty With Zero Experience (Realistic Guide)
14 min