Break in on purpose, with permission
Imagine you own a castle. You think the walls are strong. But how can you be sure? You could hire a locksmith to try to get in. If she finds a back door you forgot about, she tells you, you lock it, and your castle is safer.
A penetration test (also called a pen test) is the computer version of that. A security expert is hired to try to break into a school, a company, or an app. They use the same ideas a real attacker would. But they have permission, they follow rules, and at the end they write a report that helps the owner fix every problem they found.
A pen test is not the same as a scan
Vulnerability scan
A program checks for known weak spots and prints a list. It is fast and cheap. Think of a guard walking around trying every door handle.
Penetration test
A human uses that list, then tries to get through and link small problems together. Think of a locksmith who also shows what she could reach once she was inside.
How a pen test goes, step by step
Real pen tests follow a plan. Each stage has a job. Pick a stage to see what the tester does and what it looks like in the castle story. Use the arrow keys or the buttons to move.
Explore an attack surface
Here is a made-up school called Maple Ridge School. It is fictional, so nothing here is a real system. You are the pen tester, and the school has given you permission. Inspect each numbered spot on the map. Some are weak. Some are well protected. A good tester has to tell the difference.
Why the weak spots are boring: most real break-ins do not use movie-style magic. They use small, ordinary mistakes: a password that was never changed, software that was never updated, or a person who clicked a link. Fixing the basics stops a lot of attacks.
White hat, grey hat, black hat
People in hacking are often described by hat colors. The color is about permission and intent, not about how skilled someone is.
- White hat: has permission, follows the rules, and wants to help the owner. Pen testers are white hats.
- Black hat: breaks in without permission to steal, cause harm, or make money. This is a crime.
- Grey hat: breaks in without permission, but says they just wanted to help or to show off. Good intentions do not cancel the missing permission, so it can still be illegal.
What keeps a pen tester a white hat is a short agreement written before any testing starts. It is called the rules of engagement.
Try it yourself. For each case, pick the hat that fits.
Rank the findings and pick the fixes
The report is the most valuable part of a pen test. A long list of problems is hard to act on. The owner needs to know what to fix first. Testers rank each finding by two questions:
- Likelihood: how easy is it for an attacker to use this? (1 = hard, 3 = very easy)
- Impact: how bad is the damage if they do? (1 = small, 3 = big)
Multiply them. The score from 1 to 9 gives the severity: 1 to 2 is Low, 3 to 4 is Medium, 6 is High, and 9 is Critical.
Now it is your turn. These are the six weak spots from the map. For each one, choose a likelihood, an impact, and the best fix. Your ranked report builds as you go. When you are ready, press Check my report.
The last stage is not "write the report and walk away." Once the school fixes a problem, the tester retests it. That proves the door is really locked now, and that the fix did not open a new hole somewhere else.
Only test what you own or have written permission to test
The ideas in this tutorial are for understanding and defense. Trying to get into a computer, account, school system, or website that is not yours can be a crime. That is true even if you do not damage anything, and even if you plan to tell the owner afterward.
If you find a weak spot by accident, do not poke around. Stop and tell a trusted adult, a teacher, or the owner. If you want to practice, use your own devices, or practice sites and challenges that are made for learning and clearly say you may test them.
Quick answers
What is a penetration test in simple words?
A penetration test, or pen test, is a planned and legal attempt to break into a computer system. An organization hires a security expert to try the same tricks a real attacker might use, then to write down what they found so the weak spots can be fixed.
Is penetration testing legal?
It is legal when the owner of the system gives clear, written permission and the tester stays inside the agreed rules. Testing a system without permission can be a crime, even if the person means well.
What is the difference between a pen test and a vulnerability scan?
A vulnerability scan is an automatic check that lists known weak spots. A pen test goes further. A human tries to actually use the weak spots, link them together, and show what damage a real attacker could do.
What are the stages of a penetration test?
A common order is scope and permission, reconnaissance, scanning, exploitation, reporting, and then fixing and retesting. Different teams name the stages slightly differently, but the flow is the same: agree on the rules, learn about the target, look for weak spots, try them safely, report, and check the fixes.
What is the difference between white hat, grey hat, and black hat hackers?
A white hat hacker has permission and works to help. A black hat hacker breaks in without permission to cause harm or to steal. A grey hat hacker has no permission but says they mean well. Acting without permission is still not allowed, so grey hat behavior can still break the law.
How do I start learning penetration testing?
Start with the basics of how computers, networks, and websites work, and learn to program. Then practice only in places built for it, such as your own lab or legal practice challenges. Never test a system you do not own or do not have written permission to test.
Quick quiz
1. What makes a penetration test different from a real attack?
2. A tester finds an easy-to-use weak spot that could expose every student record. In the report, where should it go?
3. Someone breaks into a website they do not own, finds a bug, then emails the owner to help. Which hat is this?
Keep learning about security
Now you know how defenders test their own locks. Explore how ethical hacking works more broadly, how people get paid to report bugs, and what jobs in cybersecurity look like.
Maple Ridge School is a made-up example created for this tutorial.