Blog / Penetration Testing

How to Prepare for a Penetration Test: A Practical Guide for UK Organisations

A practical guide to scoping and preparing for a penetration test, from assurance goals and attack surface to access, safety, reporting and retesting.

· Ptest Security · 10 min read

In this article

A useful penetration test starts before testing begins. This guide explains how to define the assurance goal, identify the real attack surface, agree meaningful trust boundaries, prepare access and rules of engagement, and make sure the resulting assessment answers the questions your organisation actually cares about.

Ptest Security flow diagram showing the stages of preparing for a penetration test, from defining the assurance objective through scoping, testing, reporting and retesting.

How to Prepare for a Penetration Test

A penetration test is most useful when everyone understands what question the assessment is intended to answer. That sounds obvious, but many engagements begin with a list of IP addresses, hostnames or application URLs before anyone has clearly described the security boundary that matters. The result can be technically sound testing of the supplied assets while an important integration, user role or administrative path sits outside the scope.

Preparation should therefore do more than make targets reachable. It should give the tester enough context to examine the right attack surface, define what is authorised, protect operationally sensitive systems and produce findings that can be acted on. The UK National Cyber Security Centre describes penetration testing as a method of gaining assurance by attempting to breach a system's security using adversary-like tools and techniques, and emphasises the importance of well scoped testing. UK government guidance likewise says testing scope should be broad enough to consider the whole system rather than only the obvious software component.

A good scope is not simply a longer asset list. It connects the assets to the assurance objective.

Start With the Assurance Question

Before deciding what the tester can touch, decide what the organisation needs to know. A SaaS provider may want assurance that one customer cannot access another customer's records. A business introducing a new administration portal may care most about whether ordinary users can reach privileged functions. An organisation exposing a new API may need to know whether identifiers, tokens and workflow decisions enforce ownership correctly across every request.

Those are more useful starting points than a generic instruction to "test the website". They describe a property the system is expected to maintain. The technical scope can then be built around the components involved in maintaining that property.

This matters because the obvious application is rarely the whole attack surface. A browser facing service may depend on an API, identity provider, object store, cloud role, management interface and internal service. If the objective concerns customer data isolation, excluding an API that performs the actual authorisation decision can leave the central question unanswered even if the website itself receives thorough testing.

Identify the Real Attack Surface

Build the scope from the way the service actually operates. Public applications and IP ranges are a useful beginning, but also consider APIs, alternate hostnames, administrative interfaces, identity services, cloud resources, mobile back ends and supporting systems that participate in the tested workflows.

This is where technical owners and the test team should talk before the engagement. The people operating the service know which components are critical and which integrations are unusual; the tester can identify where those components create security boundaries worth examining. NCSC guidance describes model scoping as involving risk owners, technical staff knowledgeable about the target system and the penetration test team. That combination helps prevent a scope that is commercially neat but technically incomplete.

The goal is not to include everything by default. It is to understand what is being excluded and whether that exclusion weakens the assurance the test can provide.

Define the Trust Boundaries That Matter

Security failures often occur where a system moves from one level of trust to another. Preparing for a test is an opportunity to write those boundaries down explicitly.

An Internet facing service may have a boundary between unauthenticated and authenticated users. A multi tenant application has boundaries between customers. An internal platform may distinguish an ordinary employee from an administrator. A cloud application may rely on boundaries between workloads, identities, subscriptions or accounts. A payment or approval workflow may contain boundaries between someone requesting an action and someone authorised to approve it.

These boundaries give a tester something more valuable than a checklist: they provide hypotheses to challenge. Does customer A remain separated from customer B when identifiers are modified? Does a role change actually alter server side authorisation, or only what the interface displays? Does an administrative API enforce the same controls as the management interface? Does an internal integration trust data simply because it came from another service?

For web applications, OWASP's testing guidance separately addresses identity, authentication, authorisation and business logic testing. That reflects a practical reality: knowing who a user is does not mean that user should be allowed to perform every technically possible action.

Provide the Right Accounts and Roles

Authenticated testing is often essential when the security questions concern authorisation, tenant isolation or business workflows. A single user account may not be enough. Testing the separation between two customers requires at least two relevant identities; testing vertical privilege boundaries may require both ordinary and privileged roles.

Providing these accounts does not make a penetration test less realistic. It changes the starting position. If the objective is to understand what an unauthenticated Internet attacker can achieve, an external starting point is appropriate. If the objective is to examine what a compromised user account could expose, authenticated access is the relevant position. Many engagements benefit from both perspectives.

Accounts should be clearly identified as test identities, with their roles and expected permissions documented. Testers should know whether data can safely be created, modified or deleted and whether particular workflows trigger real world actions such as emails, payments, provisioning or notifications.

Decide Whether Production or a Test Environment Is Appropriate

There is no universal answer to whether penetration testing belongs in production. A production environment has the advantage of representing the controls, integrations and configuration users actually depend on. A test environment can provide greater freedom to exercise potentially disruptive workflows or manipulate data without affecting customers.

The important question is how representative the chosen environment is of the security properties being assessed. A staging instance with different identity integration, cloud permissions or supporting services may be safer to test but provide less assurance about production. Conversely, an assessment in production may need explicit restrictions around denial of service behaviour, destructive operations or high volume requests.

Document those differences rather than pretending they do not exist. If a control can only be assessed in staging, say so. If a production only integration remains outside the test, record that limitation in the final report.

Confirm Third Party Authorisation

A system can depend on infrastructure that your organisation does not own. Hosting providers, SaaS platforms, payment services and managed integrations can appear within an application's technical attack surface without automatically becoming authorised targets.

UK government guidance specifically states that explicit consent should be obtained from third party suppliers when their software is to be reviewed as part of a test, and recommends checking contractual permission. Cloud providers can also have provider specific penetration testing policies and restrictions.

The safest approach is simple: identify third party components during scoping, establish what the organisation is authorised to test, and document exclusions. Never rely on the fact that a system is technically reachable as evidence that it is authorised or contractually in scope.

Agree the Rules of Engagement Before Testing Starts

Rules of engagement convert a scope into an operationally safe test. They should define who can authorise changes to the scope, how urgent findings are communicated, which activities are prohibited, how incidents are escalated and what to do if testing appears to affect service availability.

Fragile systems deserve explicit discussion. So do actions that may send emails or messages, create financial transactions, provision resources, modify real records or trigger defensive controls. If social engineering, wireless testing or physical activity is part of a wider engagement, those activities require their own clearly defined authorisation and boundaries.

The objective is not to remove all risk from testing. Meaningful security testing deliberately exercises controls in unusual ways. The objective is to ensure that both sides understand the acceptable risk and have a fast escalation path when the environment behaves unexpectedly.

Share Enough Context to Make the Test Useful

Some organisations deliberately withhold information because they want the tester to experience the system exactly as an external attacker would. That can be a valid objective, but secrecy should not become an automatic measure of test quality.

A black box assessment can tell you what a tester can discover and achieve from a low knowledge starting point. A more informed assessment can spend less time rediscovering architecture and more time examining difficult trust relationships, specialised workflows and controls that matter to the organisation. Neither approach is inherently superior; each answers a different question.

The decision should return to the assurance goal. If you want to know whether an Internet attacker can identify and compromise an exposed service, limited prior knowledge is useful. If you want confidence in a subtle multi tenant authorisation model, providing architecture, role information and representative accounts may produce much deeper assurance.

Plan for Critical Findings Before They Happen

Do not wait until a serious issue is discovered to decide who should hear about it. Agree an urgent notification route before testing starts, including an operational contact who can assess whether immediate action is required.

The process should also account for evidence. A tester may need enough information to demonstrate a finding, but evidence can itself contain sensitive information. Agree how it will be handled, how long it will be retained and whether particular data should never be captured unless strictly necessary.

Immediate remediation can also affect the assessment. Fixing a critical issue quickly may be the right operational decision, but the test team should know that the environment has changed so subsequent observations are interpreted correctly.

Make Reporting and Retesting Part of the Scope

A penetration test is not complete when the last request is sent. The report should explain what was tested, important exclusions and limitations, what was observed, why each significant issue matters and what security property the remediation should restore.

Retesting should be defined at the beginning rather than negotiated as an afterthought. When a high impact issue is fixed, verification should determine whether the original weakness is actually gone and whether equivalent paths still bypass the intended control. Where appropriate, the organisation should also use the finding to improve its wider vulnerability management and engineering processes. The NCSC explicitly recommends using penetration test findings to improve internal vulnerability assessment and management rather than treating the engagement as an isolated exercise.

What a Useful Scope Looks Like

Consider an organisation launching a customer portal backed by an API. Its objective is to determine whether an authenticated customer can gain access to another customer's data or privileged administrative functions. The application, API and authentication service are included, with test accounts for two separate customer tenants and an administrator. The external payment provider is excluded because it is third party infrastructure, while the integration points within the organisation's own application remain in scope.

The important boundaries are clear: unauthenticated to authenticated, customer to customer, user to administrator, and application to supporting services. The rules of engagement exclude denial of service activity and real payment execution, while allowing ordinary workflow manipulation and controlled test data changes. Critical findings have a named escalation path, and high severity fixes will be retested.

That scope is useful because it tells the tester what the organisation wants assurance about, not merely where to point tools.

Key Takeaways

A productive penetration test begins with a security question and then builds the scope around the systems, identities and trust boundaries involved in answering it. Asset lists matter, but they are not a substitute for understanding how the service works and what the organisation needs to protect.

Good preparation also makes testing safer. Explicit authorisation, representative accounts, documented exclusions, rules of engagement and an urgent notification path allow the tester to examine meaningful behaviour without guessing where the operational boundaries lie.

Finally, treat the report and retest as part of the assurance process. The highest value comes when the organisation understands not only which weakness was found, but why the control failed and how to improve the wider process that allowed it to exist.

Sources and References

Research Notes and Limitations

This article is general preparation guidance for organisations commissioning authorised security testing. The appropriate scope, test environment and rules of engagement depend on the architecture, operational risk, contractual position and assurance objective of each engagement. Provider specific testing policies and applicable contractual or regulatory requirements should be checked before testing begins.

Share

Share this publication

Found this useful? Share it with your network or copy the link.

Ready to put your security to the test?

Ptest Security provides hands-on penetration testing across web applications, APIs, networks, cloud, mobile, wireless and authorised social engineering.

Tell us what you need tested and we’ll help define the right scope and approach.