On this pageWhat a Penetration Test ShowsTypes of Penetration TestChoosing a Test By ObjectiveBlack, Gray and White Box TestingPhases of a Penetration TestThe Phases in One EngagementRules of Engagement and AuthorizationScope, Sampling and Test EnvironmentSelecting a Test TeamPreparing for a TestDuring the TestContents of a Penetration Test ReportRemediation and RetestMeasures Across Successive TestsPenetration Testing With ThreatDefenceFrequently Asked Questions What a Penetration Test ShowsA penetration test shows which weaknesses in a system can be used in practice, and how far an attacker could get by using them. NIST describes it in its Technical Guide to Information Security Testing and Assessment (SP 800-115) as security testing in which assessors mimic real-world attacks to find ways around the security features of an application, system or network. Most tests look for combinations of weaknesses. A single flaw may give little, while several used in sequence may give more access than any one of them. According to the NIST guide, a test can also help determine the following. Tolerance of attack: A test shows how well the system holds up against real-world attack patterns. Attacker effort: It indicates the level of sophistication an attacker would likely need to compromise the system. Further countermeasures: It points to additional controls that could reduce the threats to the system. Detection and response: It shows whether defenders detect the activity and respond appropriately. A vulnerability scan reports weaknesses that may be present, and a penetration test confirms them by using them. The guide to penetration testing vs vulnerability scanning compares the two in detail. The UK National Cyber Security Centre, in its penetration testing guidance, advises treating a test as a way to gain assurance in the organization’s own vulnerability management. Types of Penetration TestTests are usually named for the target, and each target calls for different access and different techniques. An engagement often combines several of them under one scope. Type What the tester examines Usual starting position External network Internet-facing hosts and services, such as remote access gateways, mail servers and exposed administration interfaces. The internet, with no credentials. Internal network What an intruder or a malicious insider could reach from inside: system configuration, authentication, access control and privilege escalation. A connection inside the perimeter, often with a standard user account. Web application Authentication, session handling, access control between accounts, input handling and business logic. A browser, first without an account and then with test accounts for each role. API The interfaces behind web and mobile applications: authentication, authorization on each object and input handling. The API documentation and test credentials. Cloud The configuration of a cloud tenant: identity and access policies, storage exposure, keys and published services. An account or read access in the tenant, within the provider’s testing rules. Wireless Wireless networks at a site: authentication, encryption, separation of guest networks and unauthorized access points. On site, within radio range. Social engineering People and procedures, through phishing email or calls to the help desk under a pretext. Agreed pretexts and an agreed list of targets. Physical Entry controls for buildings and rooms, and access to network ports and equipment. On site, carrying signed authorization. External penetration testing covers what anyone on the internet can reach. Where both external and internal tests are planned, NIST notes that the external test usually takes place first, so the testers do not begin with inside knowledge that an outside attacker would lack. Web application penetration testing depends on test accounts. Access control between users can only be checked by signing in as more than one of them. For physical tests, NIST advises that security guards should know how to verify a tester’s activity, for example through a point of contact or documentation. Choosing a Test By ObjectiveThe objective decides the type of test, the starting position and the knowledge level. NIST advises an organization to determine its assessment objectives first, and then to select the techniques and the tester’s viewpoint that support them. Exposure to outsiders: An external network test answers what a person on the internet with no account can reach and use. A compromised account or device: An internal test from a standard user account shows how far an intruder could go after one mailbox or laptop is taken over. A customer-facing application: A web application penetration test of the application and its API, with accounts for each role, shows whether one customer can reach another customer’s data. Detection and response: An external test followed by a review of the audit logs shows how much of the tester’s activity was captured, a combination NIST gives as an example. The NCSC describes scenario-driven testing for cases that start part of the way into an intrusion. Its examples are a lost laptop, an unauthorized device connected to the internal network and a compromised host in the DMZ. Black, Gray and White Box TestingThe box terms describe how much the tester knows about the target before starting. The choice changes where the test time goes and what the test is likely to find. Black box: The tester starts with little more than the names or addresses of the targets, as an outside attacker would. The result is a realistic outside view, and part of the test window is spent on discovery. Gray box: The tester receives partial information, such as user accounts, API documentation or a network diagram. More of the time goes to testing, which suits applications where most of the functions sit behind the sign-in page. White box: The tester has full information, which may include source code, configuration and administrator access. Coverage is deepest, and the result depends less on what happens to be found in the time available. The NCSC uses the terms opaque box and transparent box for the same idea. It notes that an opaque box test models an external attacker, and that weaknesses may go undiscovered within the test window. A separate decision is who inside the organization knows that a test is under way. Testing that the defenders are unaware of belongs with red teaming, which the guide to red teaming vs penetration testing explains. Phases of a Penetration TestA penetration test moves through planning, discovery, attack and reporting, the phases set out in NIST SP 800-115. Other methodologies divide the same work into more stages, and NIST presents its model as one acceptable way of grouping the activity. Planning. The rules are identified, management approval is finalized and documented, and the goals of the test are set. No testing takes place in this phase. Discovery. The tester gathers information and scans for host names and addresses, open ports and services, and application versions. Vulnerability analysis follows, where the results are compared with vulnerability databases and the tester’s own knowledge. Attack. The tester attempts to exploit the potential weaknesses, which confirms the ones that are real. A successful attempt may yield higher privileges or access to further systems, and each is examined to establish the true level of risk. Reporting. Reporting runs alongside the other phases. Logs are kept and periodic reports are made during discovery and attack, and a final report describes the weaknesses, rates the risk and gives guidance on fixing them. The attack phase loops back to discovery. New access reveals systems and information that were invisible from the starting position, so the tester repeats discovery from the new foothold and continues. This loop is how a minor weakness on one host can end as access to another. AI agents now carry out parts of the discovery and attack phases, as the guide to AI penetration testing explains. The Phases in One EngagementAn example shows the phases and the loop at work. A professional services firm commissions an external test with one question: whether an outsider can reach the client files held on its internal file server. Planning. The rules of engagement list the firm’s public address range, permit the testers to continue inward from any foothold, and set the stop point at reading folder names on the file server. Discovery. Registration records confirm that each listed address belongs to the firm. DNS records and port and service identification show a website, a mail gateway, a remote access gateway and a forgotten test copy of the client portal. Vulnerability analysis. The test copy runs an older release of the portal software, and its administrator account still has the password set by the installer. Attack. The testers sign in as the administrator and read the portal’s table of user accounts. One staff password, cracked from the stored hashes, also opens the remote access gateway, where that account was exempt from multi-factor authentication. Additional discovery. From inside the network the testers repeat discovery and find that the file server grants read access to every signed-in user. Stop and report. The testers list the folder names, open no files, and phone the named contact the same day. The report rates each weakness on its own and rates the path through them as critical. Each weakness alone is ordinary: a default password, a reused password and a permissive file share. NIST lists misconfigured settings, particularly insecure defaults, and incorrect file and directory permissions among the categories that penetration tests most often exploit. Rules of Engagement and AuthorizationThe rules of engagement are the written agreement that sets what the test team may do, and the signatures on them are what make the test authorized. NIST defines them as detailed guidelines and constraints for the execution of security testing, established before a test starts, which give the test team authority to conduct defined activities without further permission. Appendix B of SP 800-115 holds a template for the document, with these main parts. Part What it settles Scope and targets The systems, networks and applications authorized for testing, by address or other identifier, and an exclude list of systems that must be left alone. Permitted and prohibited activity The types of testing allowed, and whether files may be installed, created, modified or executed on the targets. Schedule The test dates and hours, for example evenings for a site that is busy during the day. Test origin The locations and equipment the test runs from, so the organization can tell the test systems from its own. Contacts Named people on both sides, including management and the incident response team. Incident handling The criteria for halting the test, the course of action if a test harms a system or a real attacker appears, and the way testing resumes. Data handling How test data is gathered, stored, transmitted and destroyed. Reporting What each report must contain and how often reports are delivered. Signatures At a minimum, the test team leader and the organization’s senior management. Authorization has to come from someone with authority over each system. Where part of the environment sits on a third party’s network, NIST notes that the owner of that network usually must also consent in writing. NIST also recommends that legal advisors are always involved for intrusive tests such as penetration testing. Cloud providers publish their own terms. Microsoft, for example, publishes rules of engagement for security testing that allow a customer to test its own tenant and prohibit denial of service testing. The signed rules stay in force while the test runs. Changes during the test: The rules are followed unless permission to deviate is obtained, normally in writing, from the person who signed them. Authorization memorandum: NIST suggests a memorandum of one or two pages that testers can present to users or system owners, naming the permitted activities and a contact in the security group. Scope, Sampling and Test EnvironmentThe scope sets how much is tested and how deeply, and it is sized against the time and people available. Where a gap exists between the two, NIST suggests adding resources or reducing the scope, and it names the elements that drive the effort. Size: Effort grows with the number of components and network locations, from a single database to the entire architecture. Complexity: Mixed environments generally take more effort, because they call for more varied skills and tools. Sampling: Scanning a sample of hosts may be far more efficient and nearly as effective where the hosts are managed and configured alike. The NCSC expects scoping to end in a plan that states the technical boundaries, the types of test expected, the timeframe and effort, any compliance or legislative requirements, and the reporting requirements. A second decision is whether to test production systems or a copy of them. NIST gives these factors. Impact on production: A technique likely to cause a denial of service belongs on a non-production system. Personal data: Where a test could expose sensitive personal information to the testers, a non-production system loaded with test data is the safer target. Similarity: Test and production environments usually differ, and the differences can hide weaknesses that exist only in production. Selecting a Test TeamA test team is selected for skill, experience and integrity. NIST notes that properly vetted, skilled and experienced assessors lower the risks involved in conducting a test, and the NCSC ties the quality of a test closely to the abilities of the testers. Technical depth: NIST’s baseline for penetration testing is extensive networking and operating system knowledge, advanced knowledge of vulnerabilities and exploits, and knowledge of techniques for evading detection. Familiarity with the target: Unusual systems call for a specialist. NIST gives SCADA systems as its example, and the NCSC asks buyers to highlight mainframes, uncommon networking protocols and bespoke hardware during the bid. Vetting: Testers see the network architecture and its weaknesses, so some organizations require background checks and a signed nondisclosure agreement. Separation of duties: NIST warns of the conflict of interest that arises when one person conducts a formal assessment and is also responsible for addressing its findings. Some organizations keep a dedicated internal team, and others commission a third party for an independent view or for skills they lack. NIST advises vetting an external firm and asking it to carry part of the risk of the test. Preparing for a TestPreparation decides how much of the test window is spent on testing. The steps below follow the order in which they are usually needed. Set the objective. State the question the test must answer, such as whether an outsider can reach customer records through the public portal. Define the scope. List the targets by hostname and address, confirm that each belongs to the organization, and write the exclude list. The NCSC advises involving the risk owners, technical staff who know the target and a representative of the test team. Arrange access. Create test accounts for each role, and gather the documentation, network access and any allow-list entries the testers need. Obtain authorization. Have the rules of engagement signed, and collect written consent from any third party that hosts systems in scope. Brief the people affected. Tell the system owners and the monitoring team the dates and source addresses, and agree how alerts raised by the test are handled. Share what is known. Give the testers the current vulnerability assessment, as the NCSC advises, along with any earlier test reports. Plan for the results. Name an owner for remediation and agree how fixes are retested before the test begins. The work divides by role. Security lead: The security lead owns the objective, the scope and the exclude list, and receives urgent findings. IT manager and system owners: They provide accounts and access, supply the technical contact and carry out the fixes. Monitoring team: The monitoring team holds the test dates and source addresses, and keeps its own record of what it saw. Managed service provider: An MSP that runs systems for a client needs that client’s written authorization for each scope, which white label penetration testing covers. During the TestDuring the test the organization keeps a technical contact available, and the testers keep a record of everything they do. The NCSC recommends that the contact is available at all times during the test phase. Risk during testing: NIST states that experienced testers can reduce the risk to targeted systems but can never fully remove it. A test can be designed to stop at the point where a further action would cause damage. Status reports: For a test lasting one month, NIST’s example is a weekly status meeting with daily reports while systems are being exploited. Urgent findings: NIST expects a critical weakness, such as administrator rights gained on a critical system, to be reported to the named contact immediately. Incidents: If the test causes a fault or a real attacker appears, NIST recommends that testing of the affected systems stops until the organization approves a restart. Out-of-scope discoveries: Testers may find components that were missing from the scope. The NCSC leaves the choice with the risk owner: extend the scope, or record the exclusion as a limitation. The testers’ records let the organization tell test activity from an attack, and NIST sets out what they hold. Record What it holds How the organization uses it Activity log The date and time, the tester’s name, the identifiers of the test system and the target, the tool, the command executed and comments. The monitoring team uses it to separate the testers’ actions from a real attacker’s. Tool output The audit logs and raw results of each automated tool. It shows what a tool reported before a person confirmed or dismissed it. Stored test data The rules of engagement, system documentation, tool results, the report and the corrective action plan. The rules of engagement set where it is kept, how long it is retained and how it is destroyed. NIST advises that stored test data is isolated from day-to-day systems and encrypted. Contents of a Penetration Test ReportA penetration test report records what was tested, what was found, the evidence for each finding and how to fix it. NIST describes a final report that sets out the weaknesses identified, presents a risk rating and gives guidance on mitigation. Report part What it records How to check it Executive summary The overall result and the most serious routes to data or control, in business terms. A manager can act on it without reading the technical sections. Scope and method The targets, test dates, source addresses, knowledge level and techniques used. Compare it with the signed rules of engagement. Findings Each weakness, the affected asset and a severity rating, often with a CVSS score. Every finding names a host, URL or account that the system owner recognizes. Proof The requests and responses, screenshots or command output showing that the weakness was exploited. Match the timestamps and source addresses against web server, firewall and sign-in logs. Attack paths The sequence in which separate weaknesses were combined, from entry to the furthest point reached. Each step refers to a finding in the report. Remediation A recommended fix for each finding. Each recommendation is specific enough to assign to an owner. Limitations What was left untested and why, including components excluded from scope. Compare it with the asset inventory to see what remains unexamined. Retest results The state of each finding after the fixes. Each closed finding carries a retest date and result. Matching the proof against the organization’s own logs has a second use. It shows whether monitoring recorded the tester’s activity and whether anyone responded. NIST calls for a mitigation recommendation for every finding. Some are technical, such as applying a patch, and some address process, such as updating the patch management process. The NCSC adds that a report should give the testers’ opinion on the accuracy of the organization’s own vulnerability assessment. The NCSC notes that a debriefing can also be useful, in which the test team goes through its findings and the organization asks for clarification. Remediation and RetestAfter the report, the organization decides what to fix, and each fix is verified. The NCSC assigns the report to the organization’s vulnerability management group. NIST describes a tracked plan of action and milestones, and a process for carrying it out. Record the plan. Each finding receives a task, the resources it needs, milestones and a scheduled completion date, and the plan is updated as actions are completed. Try the fix first. A technical change is tried on comparable systems in a test environment before it reaches production, which reduces the chance of an adverse reaction without removing it. Approve the change. The plan goes through configuration control, and the system owner approves each action before it is carried out. Implement and verify. The fix is applied and then verified by an audit of the system or by a retest. A retest counts as verification when it repeats the original test exactly, which is the condition NIST sets. A fix can take forms other than a patch. The NCSC suggests uninstalling software that is no longer required, limiting exposure with other controls, or adding monitoring of the vulnerable component. Findings also point to causes. NIST advises tracing each finding to its root cause, which often sits at program level. Patch management: Patches are applied late or reach only some of the vulnerable systems. Security baselines: Similar systems carry inconsistent configuration settings. Development practice: Security requirements are missing, or the organization’s own code contains vulnerabilities. Incident response: The response to the testers’ activity was delayed. Measures Across Successive TestsResults are measured by comparing one test with the next, since a single report describes one scope at one time. NIST notes that records kept over time allow trend analysis of measures such as vulnerability type, frequency of occurrence and mean time to remediation. Findings known beforehand: This is the share of findings that the organization’s own vulnerability assessment had already recorded. In the NCSC’s ideal, the organization knows what the testers will find before they find it. Recurring findings: These are weaknesses of the same type or root cause that appear again after an earlier report. Recorded test activity: This is the share of entries in the testers’ activity log that the organization’s monitoring also recorded, and the share that raised an alert. Changes made after the test window wait for the next test, which is the subject of the guide to continuous penetration testing. Penetration Testing With ThreatDefenceOf the types of test in this guide, the ThreatDefence testing agent covers those that start from the internet. It runs as agentic penetration testing inside an AI SOC platform that automates security monitoring, compliance and cyber risk management, with a 24x7 SOC behind it. External network: The agent tests the internet-facing hosts and services that the ASM agent maps, including remote access and management consoles. Web application and API: It checks authentication, session handling, access control between accounts and input handling. Sign-in and identity: It examines self-registration, account recovery, single sign-on configuration and multi-factor authentication. Cloud: It checks for storage left public, keys exposed in pages or files, and services still running on default settings. A finding from the agent holds the parts of the report described above: proof, the affected asset, severity rated by exploitability and fix steps. SOC analysts check significant findings, and a reported fix starts a retest. Internal network, wireless, social engineering and physical tests remain work for people, and an independent human-led test can run alongside for them. Frequently Asked QuestionsIs a pentest the same as a penetration test?Yes. Pentest is the short form of penetration test, and the two words describe the same activity: an authorized attempt to break into a system in order to find and prove its weaknesses. Pen test, written as two words, is a third spelling of the same term.What are the phases of a penetration test?NIST SP 800-115 describes planning, discovery, attack and reporting. Planning sets the rules and the approval, discovery gathers information and identifies potential weaknesses, attack confirms them by exploitation, and reporting runs throughout and ends with the final report. Attack loops back to discovery whenever new access reveals more of the environment.What is the difference between black box and white box penetration testing?The difference is how much the tester is told before starting. In a black box test the tester knows little beyond the target names or addresses and works as an outside attacker would. In a white box test the tester has full information, which may include source code and administrator access. Gray box testing sits between them, typically with user accounts and documentation.What are rules of engagement in a penetration test?Rules of engagement are the written, signed agreement that sets what the test team may do. NIST defines them as detailed guidelines and constraints established before a test starts. They name the targets and the excluded systems, the permitted and prohibited activities, the schedule, the contacts, the handling of incidents and test data, and the reporting.What should a penetration test report include?A report should include an executive summary, the scope and method, each finding with its affected asset and severity rating, the proof that the weakness was exploited, a recommended fix for each finding, and the limitations of the test. Proof with timestamps and source addresses lets the organization confirm each finding against its own logs.Can a penetration test disrupt production systems?Yes, it can. NIST states that a test often involves real attacks on real systems, and that experienced testers reduce the risk but can never fully remove it. The risk is managed through the rules of engagement: excluded systems, prohibited techniques, agreed test hours, criteria for halting the test and a technical contact who can be reached throughout.Is offensive security the same as penetration testing?No. Offensive security is the wider field of examining defenses from the attacker’s position, and penetration testing is one discipline within it. The field also includes red teaming and the research that produces new attack techniques. A penetration test has a defined scope, an agreed test window and a written report.Does a penetration test find every vulnerability?No. A test is limited to its scope and its time window, and the NCSC notes that a result holds only for known issues and only for the day of testing. An opaque box test in particular may leave weaknesses undiscovered in the time allowed. The limitations section of the report records what was left untested.Who should carry out a penetration test?A test should be carried out by vetted testers with operational experience of the type of system in scope. NIST notes that skilled and experienced assessors lower the risk of the test itself, and it warns against one person both assessing a system and being responsible for fixing its findings. Organizations without an internal team typically commission a third party.