Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 38 ยท Getting Started

What Is Penetration Testing?

Learn what a penetration test is, how it differs from a vulnerability scan and a red team, why organizations pay for it, and what a tester actually delivers.

A penetration test, or pentest, is an authorized attempt to break into a system so that its owner can fix the weaknesses before a real attacker finds them. A tester uses the same ideas an attacker would use: gather information, find a weak spot, try to use it, and see how far it goes. The difference is the paper trail. The tester has written permission, a defined scope, and a duty to report everything honestly.

This course teaches the craft from the ground up and keeps one rule in front of every lesson: only test systems you own or have explicit written permission to test. Techniques are explained so that you can recognize, assess and defend against them. The runnable examples are stand-ins that work on invented data, and the real tools appear as read-only snippets with clearly labelled sample output.

What the site can and cannot run

Real penetration tools (port scanners, exploit frameworks, packet crafters) need raw network access and live targets. The browser sandbox on this site gives you neither, and we would not point such tools at strangers anyway. So throughout the course:

  • Command-line tools are shown as read-only blocks with example output that follows the real format.
  • Python stand-ins parse logs, model scans, score risks and generate reports. The logic is real, the data is made up.
  • All hosts use reserved documentation addresses such as 192.0.2.10 and names ending in .test.

Why organizations pay for pentests

A scanner can tell you that a patch is missing. A pentest tells you what an attacker could actually do with that gap, chained together with two others. Common reasons to commission one:

  • Compliance. Standards such as PCI DSS ask for regular independent testing.
  • Assurance before launch. A new application or network is tested before real customers use it.
  • Evidence for decisions. A report with a demonstrated attack path persuades management more than a list of version numbers.
  • Checking defenses. Does monitoring notice an intruder? Does the team respond?

What a pentest is

Authorized Written permission first.
Scoped Agreed targets and limits.
Goal-driven Find real, exploitable risk.
Reported Evidence and fixes delivered.

Remove any one of these and it is no longer a pentest.

1 / 2

Pentest, vulnerability scan, red team

These terms are often mixed up. They answer different questions.

Activity Question it answers Typical depth Who sees it coming
Vulnerability scan Which known weaknesses exist? Broad, automated Usually everyone
Penetration test Can the weaknesses be used, and how far? Deep, manual plus tools Security contact only, often
Red team exercise Can our defenders detect and stop a realistic adversary? Goal-based, stealthy A very small group

A pentest sits in the middle. It is broader than a single exploit and narrower than a long campaign. When a client says "we want a pentest", it is worth asking early which of these they really need.

The shape of an engagement

Almost every engagement follows the same arc, whatever the framework name. You will study each stage in its own chapter.

flowchart LR
    A["Scoping and rules"] --> B["Reconnaissance"]
    B --> C["Scanning and enumeration"]
    C --> D["Exploitation"]
    D --> E["Post-exploitation"]
    E --> F["Reporting and remediation"]
    F -.->|"retest"| C

A pentest is a loop, not a straight line: findings in one stage send you back to earlier stages.

The deliverable matters as much as the hacking. A good tester leaves behind a report that a developer can act on, evidence that can be reproduced, and a prioritized list of fixes.

Skills a tester builds

Pentesting is wide. Nobody starts with all of it, and that is fine. Typical building blocks:

  • Networking: TCP/IP, DNS, HTTP, TLS.
  • Operating systems: Linux and Windows administration.
  • Scripting: Python and Bash for automating boring parts.
  • Web technology: how applications handle input, sessions and authentication.
  • Communication: writing clearly for both engineers and executives.

The last item is the one beginners underestimate. A finding that nobody understands does not get fixed.

A first stand-in: classify an activity

To make the table above concrete, the first example is a tiny rule-based classifier. Given a description of an activity, it decides whether it looks like a scan, a pentest or a red team exercise. It is a stand-in for the judgment call you will make when scoping.

Python Which activity is it?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second example models the arc of an engagement. It walks a list of stages and prints what each one produces, which is a useful checklist when you plan your own lab practice.

Python Engagement stages and their outputs

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common beginner misconceptions

  • "A pentest proves the system is secure." It never does. It shows what was found in the time available. Absence of findings is not proof of safety.
  • "More exploits means a better test." Value comes from impact and clarity, not from a count.
  • "Pentesting is mostly tools." Tools collect data. Judgment decides what matters.
  • "It is fine to test a little outside scope." It is not. Scope is a legal boundary, covered in Legal and Ethics.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What most clearly separates a penetration test from an attack by a criminal?

    Techniques can be identical. Permission, agreed limits and an honest report are what make it a legitimate test.
  2. 2. Which activity is automated, broad and usually does not try to exploit what it finds?

    A vulnerability scan lists known weaknesses at scale. A pentest validates and chains them.
  3. 3. A report from a test finds no critical issues. What can you conclude?

    A test samples the system. It cannot prove that no weakness exists.
  4. 4. Why does the engagement diagram have an arrow back to scanning?

    Testing is iterative: a finding may open new hosts to scan, and fixes are verified with a retest.

Summary

  • A penetration test is an authorized, scoped, evidence-based attempt to find and use weaknesses so they can be fixed.
  • It differs from a vulnerability scan (broad, automated) and a red team exercise (stealthy, goal-based).
  • Engagements run through scoping, recon, scanning, exploitation, post-exploitation and reporting, with loops back.
  • Communication is as important as technical skill.
  • On this site, tools are read-only and the runnable code consists of labelled stand-ins on invented data.

Next: Types of Penetration Tests