Penetration testing is an authorised exercise in which skilled testers try to break into your systems the way a real attacker would, so you can find and fix weaknesses before someone else uses them.
People often call these testers ethical hackers: they use attacker thinking, but with written permission, agreed limits and a duty to report everything they find to you. This guide is for newcomers, students, career changers and managers who need to commission, read or support a penetration test. It explains how a test works from planning to retest, the main types of test, a worked example, common myths and simple first steps. It stays at concept level: it explains what testers do and why, not how to attack anything.
By the end of this guide you will be able to:
- Explain what a penetration test is and how it differs from a vulnerability scan.
- Describe the stages of a test, from scoping and authorisation to retesting.
- Identify the main types of test and which one fits a given need.
- Understand what a good report contains and what to do with it.
Key takeaways
- Permission is what makes it ethical. A test starts with a written scope and rules of engagement signed by someone with authority over the systems.
- It checks whether weaknesses can really be used. A scan lists possible problems; a penetration test tries to show which ones lead to real access.
- It is a snapshot in time. The UK National Cyber Security Centre (NCSC) notes that a test only confirms known issues on the day it is run.[1]
- The value is in the fixes. A report that nobody acts on changes nothing; plan time to fix and retest.
- Different targets need different tests. External, internal, web application, cloud and people-focused tests answer different questions.
What it is, in plain English
The NCSC describes penetration testing as a method for gaining assurance in the security of an IT system by attempting to breach some or all of that system's security, using the same tools and techniques an adversary might.[1] In the NIST SP 800-53 security control catalogue, penetration testing is control CA-8, with enhancements for using an independent tester (CA-8(1)) and for red team exercises (CA-8(2)).[6] The Center for Internet Security (CIS) makes it Control 18 of the CIS Controls, describing it as testing the effectiveness and resiliency of enterprise assets by identifying and exploiting weaknesses in controls.[4]
Think of a bank that hires a security consultant to try to get into its vault after hours, with the manager's written agreement, a list of which doors are in bounds and a phone number to call if anything goes wrong. The consultant then writes up every door, lock and guard routine that let them get further than they should. Where the analogy breaks down: a digital test can touch live systems that customers are using, so testers must take care not to cause outages, and the "doors" can number in the thousands.
A penetration test is different from a vulnerability scan. A scan is an automated check that lists known weaknesses. A penetration test uses human judgement to see whether those weaknesses, or combinations of small ones, can actually be used to reach something valuable. The NCSC is clear that penetration testing is not a primary method for finding vulnerabilities; it is a way to check that your own vulnerability management is working, much as an external auditor checks an internal finance team.[1]
Why it matters to you
- If you run a small business: a test of your website or online shop can show whether a weakness would let someone reach customer data, before a criminal finds out.
- If you are new to a security job: you will be asked to help scope tests, give testers access, read reports and track fixes, so knowing the stages makes you useful straight away.
- If you are a manager: a test gives independent evidence of how well your defences work, which customers, insurers and auditors often ask for.
Attackers do not care whether a weakness looks minor on a list. They chain small problems together: a forgotten test page, a reused password and an over-generous permission can add up to full access. A good penetration test shows you those chains from an attacker's point of view, while you still control the outcome.
How it works, step by step
Providers use different words, but most tests follow these stages. NIST's technical guide to security testing, SP 800-115, covers the same ground of planning tests, carrying them out, analysing findings and developing mitigation strategies.[3]
- Set the goal. Decide what question the test should answer, for example "can someone on the internet reach our customer database?"
- Agree the scope. List exactly which systems, addresses and applications are in bounds, which are out, and the test dates. The NCSC suggests involving risk owners, technical staff who know the system and the testing team, and sharing your current vulnerability assessment with the testers.[1]
- Authorise in writing. Sign rules of engagement: what testers may and may not do, working hours, how data is handled, stop conditions and emergency contacts. Make sure you own or have permission for every system in scope, including cloud and hosted services.
- Choose a qualified tester. Test quality depends heavily on tester skill.[1] In the UK, the NCSC's CHECK scheme assures companies to test public sector and critical national infrastructure systems.[2]
- Test. The testers gather information, look for weaknesses and carefully try to use them within the agreed limits, recording evidence as they go. If they find something serious, such as signs a real attacker is already present, they stop and call the agreed contact.
- Report and debrief. The NCSC says a report should list the issues found, a risk rating for each, a way to resolve each one and an opinion on how accurate your own vulnerability assessment was.[1]
- Fix and retest. Your team fixes the findings in order of risk, then the testers check again to confirm each fix works. Any finding you decide to accept rather than fix is a controlled exception: approved by the risk owner, recorded and given a review date.

Main types of test
| Type | Question it answers | Typical target |
|---|---|---|
| External network test | What can someone on the internet reach and break into? | Firewalls, VPNs, email and web servers facing the internet |
| Internal network test | If an attacker gets inside, or a laptop is compromised, how far can they go? | Office network, servers, directory services |
| Web application test | Can someone misuse our website or app to reach data or other users' accounts? | Websites, online portals, APIs; OWASP's Web Security Testing Guide is a widely used reference[5] |
| Cloud test | Are our cloud accounts, permissions and services set up safely? | Cloud accounts, storage, identities and keys |
| Social engineering test | Would staff be tricked into giving access? | Phishing simulations, phone calls, building entry |
How much the testers know
| Approach | What testers are given | Trade-off |
|---|---|---|
| Black box | Nothing beyond the target names | Closest to an outside attacker, but time is spent on discovery |
| Grey box | Some access or documentation, such as a normal user account | A common balance of realism and coverage |
| White box | Full details, sometimes source code | Deepest coverage for the time spent, less like a real outsider |
A worked example
Larkfield Learning is a fictional online course provider with 25 staff. A large customer asks for evidence of an independent security test before signing a contract. Nadia, the operations manager, leads the work with Ben, the company's only developer.
- Goal and scope: they agree the question "could an outsider reach another student's data?" The scope is the course website, its login system and its API. The payment page, run by a separate payment provider, is out of scope, because Larkfield does not own it.
- Authorisation: the managing director signs the rules of engagement. Testing runs over five weekdays, with a named emergency contact and a rule to stop and call if the site slows down.
- Approach: they choose a grey box test and give the testers two ordinary student accounts, so time is not wasted on sign-up.
- Findings: the report lists one high-risk issue (a student could view another student's certificate by changing a number in the web address), two medium issues and several low ones, each with a fix.
- Fix and retest: Ben fixes the high and medium issues within three weeks. The retest confirms the high-risk issue is closed. One low issue is accepted for now, approved by the managing director and recorded with a review date.
Larkfield shares a summary letter and the retest result with the customer. Nadia is careful not to describe this as proof the site is secure: it shows what was found and fixed in that scope, on those dates.
Myths and misunderstandings
| What people think | What is true |
|---|---|
| A clean penetration test means we are secure. | It shows what testers found in that scope and time. New flaws and changes appear afterwards, so testing is repeated and combined with ongoing checks. |
| A vulnerability scan is the same as a penetration test. | A scan lists known weaknesses automatically. A penetration test uses human judgement to see which ones lead to real access. |
| Penetration testing is the best way to find all our vulnerabilities. | The NCSC says it is not a primary method for identifying vulnerabilities; ideally you already know most of what testers find.[1] |
| Testers can test anything that is connected to us. | Only systems in the signed scope, which you own or have permission to test. Third-party services need their owner's agreement. |
| Penetration testing and red teaming are the same. | A penetration test looks for as many exploitable weaknesses as possible in a defined scope. A red team exercise pursues a goal, often covertly, to test whether you can detect and respond. |
Key terms
- Penetration testing
- An authorised exercise that tries to exploit weaknesses the way a real attacker would, to show whether they lead to real access.
- Ethical hacker
- A security specialist who tests systems with permission to find weaknesses before malicious attackers do.
- Scope
- The boundary of what a test covers: which systems, addresses and dates are included and excluded.
- Rules of engagement
- The written agreement setting what testers may and may not do: scope, timing, permitted techniques, data handling, stop conditions and emergency contacts.
- Vulnerability scanning
- Automated inspection of systems and applications to find known weaknesses and exposed settings.
- Black box testing
- Testing with no internal knowledge of the system, observing only its outside behaviour.
- Grey box testing
- Testing with partial inside information, such as a user account or documentation, but not full source code.
- White box testing
- Testing with full access to source code and system details.
- Red teaming
- A goal-based, usually covert exercise that emulates a realistic attacker to test whether an organisation can detect and respond.
- Remediation
- The action taken to fix findings, such as patching, changing settings or removing excess access.
- Retest
- A repeat of a test after a fix, to confirm that a reported weakness is closed.
Common questions
Is penetration testing legal?
Yes, when the owner of the systems has given written permission and the testers stay within the agreed scope. Without permission, the same activity is an attack, and in many countries it is a criminal offence.
How often should we test?
Many organisations test at least once a year and after major changes, such as a new website or a move to the cloud. The NCSC notes that tests are often a year or more apart, which is why they should not be your only form of security checking.[1]
Will a test break our systems?
It can cause disruption, which is why the rules of engagement set working hours, stop conditions and emergency contacts. Good testers work carefully and agree in advance how to handle fragile or business-critical systems.
What is the difference between a penetration test and a bug bounty?
A penetration test is a planned engagement with chosen testers, a fixed scope and dates. A bug bounty invites outside researchers to report flaws on an ongoing basis, usually for a reward. Many organisations use both.
Should we tell our IT team the test is happening?
For most penetration tests, yes, so they do not mistake it for a real attack and so they can help. Exercises that test detection without warning are closer to red teaming and need careful planning.
What should we do with the report?
Assign an owner to each finding, fix them in order of risk, record any accepted risks with a review date, and book a retest. The NCSC adds that you should look closely at any issue your own checks had not already found, and improve those checks.[1]
First steps
Three things you can do this week:
- Write down the question. Pick the one system that would hurt most if broken into, such as your website or remote access, and write the question you want a test to answer.
- List what you own. Note the web addresses, internet-facing systems and cloud accounts that belong to you, and which are run by suppliers who would need to agree to testing.
- Run your own checks first. Make sure basic vulnerability scanning and patching are in place, so a paid test finds the harder problems rather than the obvious ones.
Checklist
- We have a clear goal for the test, written as a question.
- The scope lists in-scope and out-of-scope systems and the test dates.
- Rules of engagement are signed by someone with authority over the systems.
- We have permission for any third-party or cloud systems in scope.
- Emergency contacts and stop conditions are agreed on both sides.
- The tester's qualifications and experience suit our systems.
- Each finding in the report has an owner and a target fix date.
- Accepted risks are approved, recorded and given a review date.
- A retest is booked to confirm the fixes.
Check your understanding
1. What makes a penetration test different from an attack?
Answer: written permission from the system owner, an agreed scope and rules of engagement, and a duty to report findings to the owner.
2. How is a penetration test different from a vulnerability scan?
Answer: a scan automatically lists known weaknesses; a penetration test uses human judgement to see whether weaknesses can actually be used to gain access.
3. Why is a clean test result not proof that you are secure?
Answer: it only covers the agreed scope on the test dates. New flaws and changes appear afterwards.
4. Why is a retest important?
Answer: it confirms that each fix actually closed the weakness, rather than assuming it did.
Suggested learning pathway
- For the routine work a test checks, read Vulnerability Management for Beginners.
- For goal-based exercises that test detection, read Red Teaming for Beginners.
- For ongoing outside reports, read Bug Bounties for Beginners.
- To understand the stages testers mimic, read Cyber Kill Chain for Beginners.
- For the practitioner view of planning and running tests, see the Penetration Testing Guide.
- For testing cloud accounts, see the Cloud Penetration Testing Guide.
- For testing APIs, see the API Penetration Testing Guide.
Standards and references
- Penetration testing. National Cyber Security Centre (NCSC), published 8 August 2017, reviewed 10 January 2022. https://www.ncsc.gov.uk/guidance/penetration-testing, accessed 27 Nov 2026.
- CHECK penetration testing. National Cyber Security Centre (NCSC). https://www.ncsc.gov.uk/information/check-penetration-testing, accessed 27 Nov 2026.
- SP 800-115, Technical Guide to Information Security Testing and Assessment. National Institute of Standards and Technology (NIST), September 2008. https://csrc.nist.gov/pubs/sp/800/115/final.
- CIS Control 18: Penetration Testing. Center for Internet Security (CIS). https://www.cisecurity.org/controls/penetration-testing, accessed 27 Nov 2026.
- Web Security Testing Guide. OWASP Foundation. https://owasp.org/www-project-web-security-testing-guide/, accessed 27 Nov 2026.
- SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations (control CA-8). National Institute of Standards and Technology (NIST). https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final.
Related NHI Mgmt Group resources: Penetration Testing Guide · CIS Control 18 Penetration Testing Guide · Bug Bounty vs Penetration Testing