A penetration test leaves behind the most dangerous document an organisation owns: a verified list of how to break in, often with working credentials attached. Screenshots, packet captures, cracked password hashes, session tokens, database extracts and the final report all describe exploitable weaknesses, and they sit on tester laptops, shared drives and email threads long after the engagement closes. This guide sets out how testers and clients should protect that material from the first scoping call to verified destruction. It is written for penetration testers, test managers and the client security teams who commission and receive tests, and it covers the contract clauses, credential rules, storage and transfer options, report classification and retention that make a test safe to run.
Key takeaways
- Agree data handling before testing starts: NIST SP 800-115 says handling requirements for collection, storage, transmission and destruction belong in the assessment plan or rules of engagement, because test results identify vulnerabilities an adversary can exploit.
- Treat captured credentials as live secrets: store them only in an encrypted, engagement-specific vault, never reuse them outside scope, and have the client rotate every one after the test.
- Collect the minimum proof: a redacted screenshot or a row count proves access to personal or card data; a full extract creates a second breach waiting to happen.
- Classify the report and limit its readers: the report is a roadmap for an attacker, so distribute it by name, through an encrypted channel, with a short executive summary for wider audiences.
- Destruction needs evidence: set a retention period in the contract, sanitise media using NIST SP 800-88 methods, and give the client a written destruction confirmation.
What sensitive data a test produces
The routine work of scanning and vulnerability triage is covered in the Vulnerability Scanning Guide. A manual or authorised adversarial test goes further and generates material that is sensitive in its own right. NIST SP 800-115 (section 7.4.1) lists the architecture and configuration data assessors gather, such as system names, IP addresses, operating systems, network positions, security configurations and vulnerabilities, and also requires a log of the assessor's own actions so the client can tell tester activity apart from a real adversary.
| Data type | Examples | Why it is sensitive | Default handling |
|---|---|---|---|
| Scope and architecture | IP ranges, network diagrams, firewall rules, cloud account IDs | Maps the attack surface | Confidential, engagement vault only |
| Captured credentials | Password hashes, cleartext passwords, Kerberos tickets, API keys, cloud access keys, session cookies | Directly usable for access | Highest sensitivity, encrypted vault, rotate after test |
| Raw tool output | Scanner exports, packet captures, proxy histories, bloodhound-style graph data | Contains hosts, versions, tokens and sometimes personal data | Encrypted at rest, purge with engagement |
| Proof of access | Screenshots, file listings, sample records | May include personal, card or health data | Redact before storing, minimum needed |
| Assessor activity log | Time, assessor, source host, target, tool, command | Shows exact attack paths | Retain with report, restricted |
| Report and retest results | Findings, severity, reproduction steps, remediation status | A tested attack plan | Classified, named distribution |
Personal data captured during a test is still personal data. The UK ICO's data security guidance reminds controllers that processors must give sufficient guarantees about security and that the contract should require the processor to take the Article 32 measures the controller would take. A test supplier that sees customer records is usually acting as a processor for that data.
Rules of engagement and data clauses
The rules of engagement (ROE) are where data handling becomes enforceable. Appendix B of NIST SP 800-115 includes a data handling section asking for clear, unambiguous requirements for gathering, storing, transmitting and destroying test data, and a technical section stating whether files may be created or executed on targets and what happens to them after testing. The NCSC's penetration testing guidance adds that the scoping output should record compliance or legislative requirements and reporting requirements, agreed with the relevant risk owners.
| Clause | What to write | Owner |
|---|---|---|
| Data minimisation | Testers prove access with metadata, counts or redacted samples; no bulk extraction of personal or card data without written approval | Client risk owner |
| Credential handling | Captured secrets stay in an encrypted engagement vault, are used only against in-scope systems, and are listed for rotation at close | Test manager |
| Storage location | Named systems and jurisdictions where evidence may sit; no personal devices or consumer cloud storage | Supplier |
| Transfer method | Approved channel for report and evidence delivery, and how decryption keys are shared | Both |
| Artefacts on targets | List of files, accounts and implants created, and confirmation they were removed | Testers |
| Retention and destruction | Retention period per data type, sanitisation method, written confirmation | Supplier, verified by client |
| Incident notification | How quickly the supplier reports loss of test data or discovery of a live compromise | Both |
| Subcontracting | Whether subcontractors may handle evidence, with the same terms flowing down | Supplier |
Accreditation bodies expect this discipline but leave the specifics to the contract. The CREST Code of Conduct for member companies (version 26) requires members to safeguard the confidentiality of all client information, not to disclose client information or results to third parties without the client's specific approval unless law or a regulator requires it, to document scope fully and to cover assignments with appropriate contract terms. CREST also audits member data handling procedures. The NCSC's CHECK scheme covers NCSC-assured companies testing public sector and critical national infrastructure systems. Because neither scheme sets a retention period, the ROE must. See the CREST Certifications and the CIS Control 18 Penetration Testing Guide for the programme side.
Handling captured credentials
Credentials are the part of a test most likely to cause harm after it ends. A cracked domain password or a cloud access key in a tester's notes stays valid until someone rotates it. Apply these rules on every engagement:
- Record, do not spread: log each captured secret once, in an encrypted vault dedicated to the engagement, with where and how it was obtained. Never paste credentials into chat, tickets, email or the report body.
- Store hashes rather than cleartext where possible: record the account name and the fact of compromise; keep cracked cleartext only while it is needed for the next test step.
- No reuse outside scope: a credential obtained on one engagement is never tried against another client, a personal account or an out-of-scope system, even if it looks reusable.
- Mask in deliverables: the report shows the account name, the source and the impact, with the secret truncated or replaced, for example the first two characters only.
- Hand over a rotation list: at close, give the client a list of every compromised account, key and token so they can reset passwords, revoke tokens and rotate keys. This includes service accounts and API keys, which are often missed because nobody owns them.
- Purge from tooling: credential stores inside testing frameworks, proxy histories and cracking rigs hold copies; clear them when the vault is closed.
Machine credentials deserve special attention. A test that finds a hard-coded API key or a service account with domain admin rights has found a non-human identity problem that rotation alone will not fix. Point the client to the Secrets Management Guide for the root cause, and make sure the rotation list names an owner for each secret.
Storing and transferring evidence
NIST SP 800-115 section 7.4.2 recommends keeping sensitive assessment data on removable media or a system isolated from everyday network resources, limiting access to those who need it, encrypting it to FIPS 140 validated standards (the 2008 text cites FIPS 140-2; FIPS 140-3 is the current standard), never leaving assessment systems unattended without safeguards, and using a separate authentication mechanism for the encrypted data.
- Per-engagement isolation: one encrypted container or vault per client, with its own key, so a mistake on one engagement cannot expose another.
- Hardened tester endpoints: full-disk encryption, multi-factor sign-in, no sync to personal cloud services, and endpoint logging the supplier actually reviews.
- Client-hosted options: for high-sensitivity tests, the client can provide a jump host or virtual desktop so evidence never leaves its estate.
- Access logging: record who opened the engagement store and when, so a loss can be investigated.
| Transfer option | Good for | Watch for |
|---|---|---|
| Client-controlled secure file share with named accounts and MFA | Reports and evidence packs | Expiring links, download logging, removing access at close |
| Supplier reporting portal | Repeat or continuous testing | Portal tenancy, who at the supplier can see findings, export controls |
| Encrypted archive with key sent out of band | One-off delivery | Never send the password in the same email; use a phone call or separate channel |
| Hand delivery of encrypted media | Classified or very sensitive work | Chain of custody record, courier handling |
| Plain email attachment | Nothing sensitive | Forwarding, mailbox retention, auto-forward rules |
NIST SP 800-115 section 7.4.3 lists encrypting individual files, encrypting the channel, and hand or postal delivery as acceptable methods, provided the plan or ROE defines which apply.
Report distribution and classification
The NCSC expects a report to cover each issue found, its risk rating, a way to resolve it and an opinion on the client's own vulnerability assessment. That makes it the most complete attack plan the organisation will ever hold. Handle it accordingly:
- Classify at creation: label the report at your highest internal classification for security information (for example "Confidential, restricted distribution") and mark every page.
- Named distribution list: agree in the ROE who receives the full report, normally the commissioning manager, the risk owner and the remediation lead. Others get the executive summary or the findings assigned to them.
- Split detail from summary: the board, auditors and customers usually need a short attestation or summary, not reproduction steps. Produce both.
- Ticket hygiene: when findings move into a ticketing system, copy the remediation detail and leave out credentials, raw payloads and screenshots of sensitive data.
- Third-party requests: customers and insurers often ask for pentest reports. Share a letter of attestation or a redacted summary under NDA rather than the full report.
- Do not hand over risk decisions: the NCSC notes that vulnerability risk assessment and mitigation should not be wholly outsourced to the test team; the client owns the report once delivered.
Retention and destruction
NIST SP 800-115 asks for retention periods to be set in the plan or ROE where the organisation has not stated them, and for media to be sanitised under NIST SP 800-88 when data is no longer needed. SP 800-88 Revision 2 was published as final in September 2025, replacing Revision 1. Third-party assessors should follow the client's sanitisation rules, and a qualified person from the client may verify the result.
| Lifecycle stage | Data | Typical control | Evidence of completion |
|---|---|---|---|
| Scoping | Scope, architecture, contacts | Engagement vault created, access list set | Signed ROE with data clauses |
| Testing | Raw output, credentials, proof of access | Encrypted store, redaction at capture, activity log | Activity log, vault access log |
| Reporting | Draft and final report | Classification, named distribution, secure transfer | Delivery record |
| Close | Credentials, target artefacts | Rotation list, artefact removal | Client rotation confirmation, clean-up statement |
| Retention | Report, activity log, minimal evidence | Kept for the agreed period, for retest and dispute | Retention register entry |
| Destruction | Everything else, then the retained set | Sanitisation per NIST SP 800-88 | Written destruction confirmation |
A practical pattern is to purge raw output and credentials shortly after the report is accepted and retests are done, and to keep only the report and activity log for the agreed period. Remember backups: an evidence store that is backed up nightly is not destroyed until the backups age out, so include backup retention in the destruction confirmation.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | CA-8 Penetration Testing; SC-8; SC-28; MP-6; SI-12; SA-9; AC-6 | Testing, data in transit and at rest, sanitisation, retention, external services, least privilege |
| NIST CSF 2.0 | ID.IM-02; PR.DS-01; PR.DS-02 | Improvements from tests; data at rest and in transit |
| CIS Controls v8.1 | Control 18; Safeguards 3.4, 3.5, 3.10, 3.11 | Penetration testing; retention, disposal, encryption in transit and at rest |
| ISO/IEC 27001:2022 Annex A | A.5.12, A.5.14, A.8.10, A.8.24, A.8.34 | Classification, information transfer, deletion, cryptography, protection during audit testing |
| UK GDPR | Article 32 | Security of personal data seen during testing, processor terms |
Detection and measurement
- Rotation completion: percentage of compromised credentials rotated or revoked within the agreed window after the report (target 100 percent, with service accounts tracked separately).
- Destruction confirmations received: share of closed engagements with written destruction evidence by the due date.
- Report distribution: number of people with access to full reports against the agreed list; investigate any growth.
- Sensitive data in evidence: count of findings where unredacted personal or card data was captured; aim for zero.
- Artefact clean-up: test accounts, files and implants left on targets after close, found by the client's own checks.
Clients should also monitor for use of compromised credentials after the test window closes. A sign-in with a tested account after rotation day is either a missed rotation or a real attacker.
Common failure patterns
- Reports by email: the full report attached to an email, forwarded to suppliers and kept in mailboxes for years.
- No rotation list: the report names compromised accounts in passing, nobody owns the reset, and service account passwords cracked during the test are still valid at the next test.
- Over-collection: testers download whole tables to prove database access, creating a store of personal data the client never approved.
- Forgotten artefacts: test accounts, web shells or scheduled tasks left on targets because the ROE never asked for a clean-up statement.
- Retention by default: evidence kept indefinitely in a supplier file share because no destruction date was agreed, including backups.
- Credentials in tickets: remediation tickets copied straight from the report, with cleartext secrets visible to everyone with ticket access.
Practitioner checklist
- Put data handling clauses for collection, storage, transfer, retention and destruction in the ROE before testing starts.
- Agree a data minimisation rule for proof of access to personal and card data.
- Create one encrypted vault per engagement with its own key and access list.
- Log every captured credential once, mask it in deliverables and never reuse it outside scope.
- Hand the client a rotation list covering human and machine credentials, and track it to 100 percent.
- Deliver reports only through an agreed encrypted channel with keys shared out of band.
- Classify the report, name its readers and produce a separate summary for wider audiences.
- Require a clean-up statement for artefacts left on targets.
- Set retention per data type, sanitise under NIST SP 800-88 and collect written destruction confirmation, including backups.
Standards and references
- NIST: SP 800-115, Technical Guide to Information Security Testing and Assessment
- NIST: SP 800-88 Rev. 2, Guidelines for Media Sanitization
- NCSC: Penetration testing
- NCSC: CHECK penetration testing
- CREST: Code of Conduct for member companies
- ICO: A guide to data security
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
Related NHI Mgmt Group resources: Vulnerability Scanning Guide, CIS Control 18 Penetration Testing Guide, Continuous Pentesting vs PTaaS, Secrets Management Guide, Data Loss Prevention (DLP) Guide