Practical guide · Before the test

How to prepare
for a pentest

Everything settled before the first day of testing — objective, scope, environment, accounts, rules, people — and why every skipped item costs paid testing days.

Updated 8 min read 8 cited sources
Contents
  1. Why preparation matters
  2. 1. The objective, before the scope
  3. 2. The scope, in writing and complete
  4. 3. Production or a copy
  5. 4. How much information to give the tester
  6. 5. Accounts and access
  7. 6. Rules of engagement
  8. 7. The people
  9. Preparation checklist, by test type
  10. 8. What comes after the report
  11. Frequently asked questions
  12. Sources

In 30 seconds

  • A pentest is a way to gain assurance about a system’s security, not primarily a way to find vulnerabilities; the objective is written before the scope 1.
  • The scope is set in writing, with the technical boundaries of the test and explicit exclusions 1.
  • Testing in production is possible and sometimes required (TLPT under DORA, NBM point 33.3), but planned and agreed with management 456.
  • The less information the tester gets, the more paid time goes on discovery, and vulnerabilities may remain undiscovered 1.
  • Rules for data encountered and for keeping evidence are set before the test, not after 2.
Scope
in writing 1
Accounts
2 per role 8
Evidence
rules set first 2
Results
kept 12 months (PCI) 3

Why preparation matters

A penetration test is paid for in specialist days. How many of those days go into actual testing, and how many are lost waiting for access, clarifying scope and finding the person who can approve something, is decided before the start. In our practice, the first day of an unprepared test goes almost entirely on accounts and approvals.

The NCSC, the UK’s cyber security authority, describes a penetration test as a way to gain assurance that a system withstands an attempt to breach its security, not as the primary means of finding vulnerabilities 1. The difference matters for preparation: assurance is sought for a specific objective, and the objective decides everything else.

1. The objective, before the scope

A test ordered “so we have a report” and one ordered “to find out whether someone can reach customer data” look different from day one. Put the objective in one sentence, and the provider builds the plan around it:

  • compliance with a specific framework (PCI DSS, ISO 27001, DORA, Law 48/2023);
  • checking a release or a major change;
  • a customer’s or partner’s requirement;
  • measuring detection: whether the team sees the attack and responds.

2. The scope, in writing and complete

The NCSC recommends that scoping ends with a document stating, among other things, the technical boundaries of the test 1. In practice, the document covers:

  • the domains, subdomains and IP addresses in scope — and, explicitly, those excluded;
  • the applications and APIs, with their version and environment;
  • who owns each system: if hosting is with an external provider, you need its consent;
  • integrated third-party systems — payments, identity — that are not tested without their consent.

3. Production or a copy

Testing in production gives real results, but needs precautions and an agreed window. For some organisations it is not optional:

FrameworkWhat it says about production
DORA, Art. 26TLPT is performed on live production systems, with risk controls set by the entity 4
NBM, point 33.3Penetration tests follow validated scenarios, on live production 5
ISO 27001, 8.34Tests on operational systems are planned and agreed between the tester and management 6
PCI guidanceLimitations — time windows, bandwidth, legacy systems — are stated in the report 2

A pre-production copy removes operational risk, provided it is identical: the same versions, firewall rules and authentication setup — otherwise you are testing a system that does not exist. Data matters just as much: an environment with three records does not allow testing authorisation between customers. Prepare a realistic, anonymised dataset.

4. How much information to give the tester

In practice there are three options: black box — the tester starts with no information, like an outside attacker; grey box — they get test accounts and basic documentation; white box — they also get access to code or configurations. The NCSC warns that a lack of information can leave vulnerabilities undiscovered in the time allocated 1. In our practice, grey box gives the most per paid day; black box makes sense only when you want exactly an outside attacker’s view.

5. Accounts and access

  • Two accounts for each user role: the OWASP test for insecure direct object references (IDOR) checks whether one user can reach another’s objects, which needs at least two users 78.
  • Accounts that do not expire or lock after a few failed attempts.
  • MFA sorted out in advance — otherwise the first day goes on SMS codes.
  • VPN access or addresses allowed in the firewall, if the test is internal.
  • Documentation: the architecture diagram, API specification, list of roles. It need not be pretty, it needs to be correct.

6. Rules of engagement

The rules of engagement say what the tester may and may not do. Without them, a legitimate testing action can trigger an incident procedure or a contractual issue with the hosting provider.

ItemWhat is agreed
Testing windowThe days and hours testing may happen, outside peak traffic
Excluded techniquesUsually denial of service (DoS) and data deletion
Stop criteriaWhat stops the test immediately and who decides
Immediate reportingWhich severity is reported at once, not in the final report
Testers’ addressesThe IPs test traffic comes from, so the team can tell it from a real attack
Data and evidenceWhat may be extracted, how evidence is kept and when it is destroyed — agreed before the test 2
Clean-upWhat the tester leaves behind (accounts, files) and how it is removed 2

7. The people

Three roles, with names and phone numbers: a technical contact who can fix blocked access the same day, a decision-maker who can approve extending the scope or stopping the test, and an emergency contact available out of hours. Decide too whether the operations team is told: if not, the test also measures detection, but someone in management must know.

On the provider’s side, the NCSC recommends that third-party tests be carried out only by qualified and experienced staff 1. Ask for the testers’ names and certifications before signing.

Preparation checklist, by test type

Each type of test needs something different. Pick yours and tick what you already have; the list comes with you into the quote request.

Your preparation checklist, by test type

Pick the test type and environment; tick what you have ready. The ticks stay in this open page only and are not sent anywhere.

What are you testing?
On which environment?

8. What comes after the report

A report delivered without time set aside for remediation stays a document. The NCSC recommends that the report include a way to resolve each issue found, but notes that risk assessment and the decision to apply fixes remain the organisation’s 1. Plan from the start:

  1. Report walkthrough

    A session where the technical team asks the testers directly.

  2. Remediation window

    Development capacity booked for the period after the test.

  3. Retest

    Written confirmation that issues were closed; the PCI guidance also describes a separate retest report 2.

  4. Keeping the results

    PCI DSS requires keeping test results and remediation for at least 12 months (11.4.1) 3.

Frequently asked questions

How long does it take to prepare for a penetration test?
In our practice, one to three weeks from signing to the first day of testing; accounts and hosting providers’ approvals take longest. With the scope documented, accounts ready and rules agreed, testing can start within days.
Should I tell the internal team a test is happening?
It depends on the objective. If you want to measure detection too, the operations team is not told; if the goal is strictly finding vulnerabilities, telling them saves time and avoids false alarms. Either way, at least someone in management and the emergency contact must know.
Is the test done in production or on a test environment?
Both are valid. Production gives real results but needs an agreed window and precautions; for TLPT under DORA and the tests the NBM requires, it is actually required 45. A copy removes operational risk only if it is identical to production.
Why does the tester need two accounts per role?
To check whether one user can see or change another same-level user’s data by changing an identifier in a request — the IDOR test in the OWASP guide 8. With a single account, the check cannot be done.
What happens to data the tester finds?
It is agreed before the test: what may be extracted, how evidence is kept and when it is destroyed. The PCI penetration testing guidance recommends exactly that these rules be agreed in advance and sensitive data kept to a minimum 2.

Sources

Every statement about a law or standard links to its official source. Consulted on the date shown.

  1. NCSC — Penetration testing (guidance)ncsc.gov.uk · accessed 23 October 2026
  2. PCI SSC — Information Supplement: Penetration Testing Guidance v1.1 (2017)pcisecuritystandards.org · accessed 23 October 2026
  3. PCI DSS v4.0.1 — SAQ D for Service Providers, r2 (text of requirement 11.4.1)pcisecuritystandards.org · accessed 23 October 2026
  4. Regulation (EU) 2022/2554 (DORA), Art. 26eur-lex.europa.eu · accessed 23 October 2026
  5. NBM — Regulation on minimum requirements for ICT risk management (Decision No. 29/2025)bnm.md · accessed 23 October 2026
  6. ISO/IEC 27001:2022 — Information security, requirements (control 8.34)iso.org · accessed 23 October 2026
  7. OWASP Web Security Testing Guide (WSTG) v4.2owasp.org · accessed 23 October 2026
  8. WSTG-ATHZ-04 — Insecure Direct Object References (IDOR)owasp.org · accessed 23 October 2026

About the authors

The guides are written by the team that does the testing, not a marketing department. We update them when the law, the standard or what we see in testing changes.

The Pentest.md teamSecurity engineers holding CEH, CISSP, CISA and CISM certifications

Related guides

Ready to start?

We go through the preparation checklist together and set the scope, rules and schedule.