What is penetration testing? Explained with a locksmith testing your locks
A penetration test is a permitted, real-world attempt to break into your own systems so you can fix weaknesses first. Think of hiring a locksmith, with a signed note, to try every lock in your building.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- Engineering
This week Microsoft and Switzerland's cyber security centre warned that attackers are using AI agents built on penetration testing tools to break into companies (our news story), and both told defenders to run penetration tests of their own. Here is what that means.
In one sentence: A penetration test is a security check where a business gives written permission to skilled testers to try to break into its own systems, using the same tools and tricks a real attacker would, so weaknesses can be found and fixed before a criminal finds them.
The everyday picture
Imagine you own an office building. You have locks, an alarm and a reception desk. But you don't really know if they would stop a determined burglar.
So you hire a trusted locksmith. You sign a note that says which doors and windows they may test, and when. They walk around the building, try every lock with real tools, and see how far inside they get. Then they hand you a report: which locks gave way, how bad that is, and how to fix each one.
That is a penetration test, often shortened to "pen test". The building is your website, apps and network. The locksmith is a security tester. The signed note is what makes it a test and not a break-in.
You sign a note that says what the locksmith (the tester) may try. They look around, try the locks for real, and hand you a report. You change the weak locks and have them checked again.
How it works, step by step
- Planning and permission (the signed note). You and the testers agree in writing what is in scope, what is off limits, the dates, and who to call if something urgent comes up. Security guides call these the "rules of engagement".
- Discovery (walking around the building). The testers map what you have exposed to the internet: websites, login pages, open network ports and software versions. They compare what they find with lists of known weaknesses.
- Attack (trying the locks). They try to use the weaknesses for real, for example by guessing weak passwords or sending tricky input to a web form. Getting in proves a weakness exists. One way in often leads to the next door, so they repeat steps 2 and 3.
- Reporting (the locksmith's report). You get a list of what they found, how serious each issue is, and how to fix it. A short debrief meeting helps your team ask questions.
- Fixing and checking again (changing the locks). Your team decides what to fix first, makes the changes, and confirms the fixes work, for example by asking the testers to check those doors again.
Try it · Put it in order
Put the locksmith's visit in the right order
Tap the steps in the order they happen.
Where the picture stops
- A locksmith can see your building. In an "open box" test you tell the testers everything about your systems. In a "closed box" test they start with nothing, like an outsider. Each finds different things.
- Locks stay the same for years. Software changes every week, and new weaknesses are found daily. A pen test only shows what was true on the day of the test.
- Trying a lock rarely breaks it. Testing real systems can slow them down or even stop them, so good testers agree in advance how to avoid damage, and some tests are run outside working hours or on copies.
Try it · Side by side
Scanner or locksmith: which check do you need?
Tap what matters to you (pick one or more) and see which option fits.
Vulnerability scan
- Automated, so it can run on a schedule.
- Cheap to repeat once set up.
- Reports that a weakness might exist.
- Looks at each issue on its own.
Penetration test
- Takes skilled people days, so it runs less often.
- Priced by scope and days of expert time.
- Tries to use it, which confirms it.
- Chains issues to show how far an attacker could get.
Pick what matters to you and the better fit lights up.
Why it matters for your business
- Find it before attackers do. Microsoft says the AI attack tool in this week's news uses common, existing penetration testing tools and methods. Testing yourself with the same methods shows what those tools would find.
- Check your routine is working. The UK's National Cyber Security Centre (NCSC) says a pen test should mainly confirm that your normal patching and checking processes work, not be your main way of finding problems.
- Clear priorities. A report ranked by risk tells you which fixes matter this week and which can wait, so money goes where it lowers risk most.
- Proof for customers. Customers or insurers may ask whether you test your security. A recent report and a list of fixed issues gives a clear answer.
An example
Imagine a 30-person dental group with an online booking site and staff webmail. They hire a testing firm for a week and sign a scope covering both. The testers find an old test copy of the booking site that nobody uses, still running with a default password. They also find webmail accepts sign-ins with only a password. The report ranks both as high risk. The group switches off the old site, turns on two-step sign-in for webmail, and asks the testers to recheck. Neither fix needed new software.
Frequently asked questions
Is a penetration test the same as a vulnerability scan?
No. A scan is an automated check that a weakness might exist. A penetration test goes further and tries to use the weakness, which confirms it is real and shows how far an attacker could get.
Is penetration testing legal?
Yes, when the owner of the systems has given clear written permission and the testers stay inside the agreed scope. Without that permission, the same activity is an attack. Testing systems run by others, such as a cloud provider, may also need to follow that provider's rules.
How often should a business run a pen test?
There is no single rule. The NCSC notes that gaps of a year or more between tests are common and leave room for new problems to go unseen, so many teams also test after big changes and scan for known weaknesses in between.
Can AI do penetration testing?
AI agents can now run parts of a test, such as scanning and trying known attacks, quickly and around the clock. That is exactly what this week's warnings are about. People still need to set the scope, give permission, judge the risks and decide what to fix.
Related explainers
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.