Skip to content

09 Penetration Testing

Penetration testing is a controlled security assessment designed to determine whether weaknesses in the Cardholder Data Environment (CDE) can actually be exploited.

Vulnerability scanning asks:

What weaknesses may exist?

Penetration testing goes further:

Can those weaknesses
actually be exploited?
Can an attacker gain access?
Can privileges be escalated?
Can the attacker move laterally?
Can payment systems or data
be compromised?

This distinction is extremely important.

A vulnerability scanner may identify hundreds of potential weaknesses, but a penetration test evaluates whether those weaknesses can be combined into meaningful attack paths.

A practical PCI penetration testing lifecycle looks like:

PCI Scope
Test Objectives
Rules of Engagement
Target Identification
Reconnaissance
Vulnerability Analysis
Exploitation
Post-Exploitation
Segmentation Validation
Risk Analysis
Report
Remediation
Retesting

The central question is:

Could a realistic attacker exploit weaknesses in the environment and gain unauthorized access to CDE systems or cardholder data?

By the end of this lesson, you will be able to:

  • Explain penetration testing in PCI DSS.

  • Distinguish penetration testing from vulnerability scanning.

  • Understand network-layer penetration testing.

  • Understand application-layer penetration testing.

  • Understand internal and external penetration testing.

  • Define penetration-test scope.

  • Understand segmentation testing.

  • Develop Rules of Engagement.

  • Understand tester qualifications and independence.

  • Understand reconnaissance and vulnerability analysis.

  • Understand controlled exploitation.

  • Understand privilege escalation.

  • Understand lateral movement.

  • Understand cloud and Kubernetes penetration testing considerations.

  • Assess penetration-test findings.

  • Coordinate remediation.

  • Perform retesting.

  • Build penetration-test evidence.

  • Support PCI assessors during penetration-test review.

Penetration testing is an authorized attempt to identify and exploit vulnerabilities within a defined environment.

The objective is not:

Cause Damage

The objective is:

Find Security Weakness
Attempt Controlled Exploitation
Measure Impact
Improve Security

2. Vulnerability Scanning vs Penetration Testing

Section titled “2. Vulnerability Scanning vs Penetration Testing”

These activities are related but different.

Typically identifies:

Known CVEs
Missing Patches
Weak Services
Configuration Problems

It answers:

What may be vulnerable?

Attempts to:

Exploit
Chain Weaknesses
Escalate Privileges
Move Laterally
Reach Sensitive Assets

It answers:

What could an attacker actually achieve?

Area Vulnerability Scan Penetration Test
Primary Goal Find weaknesses Validate exploitability
Automation High Mix of manual + tools
Exploitation Usually No Yes, controlled
Attack Paths Limited Major focus
Human Analysis Moderate High
Output Findings Findings + attack impact

A system may appear compliant because:

Firewall Exists
MFA Exists
Segmentation Exists
Patches Applied

but penetration testing asks whether those protections can be bypassed.

Example:

Corporate Network
Expected:
Cannot Reach CDE

Penetration testing discovers:

Legacy Jump Host
Weak Password
CDE Access

That is a real attack path.

A PCI penetration test should help determine whether attackers could compromise:

CDE Systems
Payment Applications
Authentication Controls
Network Boundaries
Segmentation Controls
Security Services

The most important first step is defining the test scope.

Create:

01 PCI Penetration Test Scope

Include:

CDE Systems
Connected-to Systems
Security-Impacting Systems
Network Boundaries
Payment Applications
External Interfaces
Segmentation Controls

Use:

PCI Scope Statement
CDE Asset Inventory
Network Diagram
Data Flow Diagram
Application Inventory
Third-Party Connections

Before testing:

PCI Asset Inventory
Pen Test Scope
Compare

Ask:

Are all relevant CDE assets included?
Are new applications included?
Are cloud resources included?
Are new network connections included?
Are segmentation boundaries included?

PCI inventory:

55 CDE Systems

Penetration-test scope:

47 Systems

Difference:

8 Systems

This should be investigated before testing begins.

Internal penetration testing simulates an attacker who already has some access to the internal environment.

Potential starting points:

Compromised Workstation
Malicious Insider
Compromised Contractor
Internal Server

Example:

Corporate Workstation
Weak Service Credential
Jump Host
CDE Server

This can reveal weaknesses that external testing cannot.

External penetration testing evaluates externally reachable systems.

Examples:

Payment Website
Payment API
VPN
Remote Access Gateway
Public Cloud Endpoint
Internet
Payment API
Authentication Weakness
Unauthorized Administrative Function

Network-layer testing may evaluate:

Firewalls
Routers
Servers
Operating Systems
Network Services
Segmentation

Application testing may examine:

Authentication
Authorization
Session Management
Input Validation
Business Logic
Payment Workflows
APIs

High-value areas include:

Checkout
Refunds
Recurring Payments
Administrative Portal
Payment APIs
Customer Payment Records

Example:

User A should access:

Customer A Transaction

but changes:

transaction_id=1001

to:

transaction_id=1002

and sees Customer B data.

This is:

Authorization Failure

Automated tools often miss business logic weaknesses.

Example:

Refund Request
Normal Limit:
₹10,000

but attacker manipulates request to refund:

₹100,000

Manual testing may reveal this issue.

Modern payment environments rely heavily on APIs.

Test:

Authentication
Authorization
Rate Limits
Input Validation
Sensitive Data Exposure
Administrative Endpoints

A structured penetration test commonly follows:

Planning
Reconnaissance
Enumeration
Vulnerability Analysis
Exploitation
Post-Exploitation
Reporting

Define:

Objective
Scope
Test Window
Rules
Contacts
Success Criteria

The tester gathers information about:

Hosts
Services
Applications
Domains
Technology
Network Architecture

Testers identify:

Open Ports
Services
Users
Applications
APIs
Authentication Methods

Potential weaknesses are analyzed for:

Exploitability
Impact
Attack Path Potential

The tester may safely attempt:

Authentication Bypass
Remote Code Execution
Privilege Escalation
Injection
Weak Credential Exploitation

within the approved Rules of Engagement.

The objective is:

Demonstrate Impact

without unnecessary:

Data Loss
Service Outage
Payment Disruption

Example:

Instead of downloading:

1 Million Card Records

the tester may demonstrate access to:

Controlled Test Record

or minimal evidence sufficient to establish impact.

Once access is gained, testers may evaluate:

Privilege Escalation
Credential Access
Lateral Movement
Sensitive Data Access
Security-Control Bypass

Example:

Standard Application User
Local Vulnerability
Administrator

This significantly increases risk.

Example:

Web Server
Application Server
Database

Testing determines whether compromise of one system allows movement deeper into the CDE.

Individual findings may appear small.

Example:

Weak Developer Credential
Access to CI/CD
Modify Payment Application
Production Deployment
Cardholder Data Access

Together they form:

Critical Attack Path

Segmentation is especially important when used to reduce PCI scope.

The test asks:

Can systems classified outside the CDE reach CDE systems through unauthorized paths?

Expected:

Developer Network
Payment Database

Actual:

Developer Network
Payment Database
5432

Result:

Segmentation Failure

If segmentation fails:

Out-of-Scope Network
Potentially In Scope

This can dramatically change PCI scope.

Create:

02 PCI Segmentation Test Matrix

Use:

Source Destination Port Expected Actual

Test from:

Corporate Network
Developer Network
Guest Network
Non-CDE Server
Third-Party Network

Examples:

Payment Web
Payment API
Payment Database
Jump Host
Administrative Interface

Some communication should succeed.

Example:

Payment API
Payment Database

Expected:

Allowed

Other traffic should fail.

Example:

Guest Wi-Fi
Payment Database

Expected:

Blocked

PCI DSS penetration testing should follow applicable requirements and should also consider significant changes.

A typical program includes recurring testing and additional testing after changes that materially affect security.

New Payment Application
Major Infrastructure Upgrade
New CDE Network
Firewall Redesign
Cloud Migration
New Authentication Architecture
New Payment Provider

If a new payment API is deployed:

New Payment API
PCI Scope Change
Pen Test Scope Update

Penetration testing should be performed by personnel with appropriate:

Knowledge
Technical Skill
Experience
Methodology

The tester should have sufficient organizational independence from the implementation being tested.

Weak:

Engineer Builds Control
Same Engineer
Approves Own Pen Test

Stronger:

Independent Security Tester
Validates Control

Internal security teams may perform testing when they meet applicable requirements for:

Competence
Independence
Objectivity

External testers can provide:

Independent Perspective
Specialized Expertise
Advanced Testing Skills

Before testing begins, define:

03 Penetration Testing Rules of Engagement
Objectives
Scope
Testing Window
Authorized Techniques
Prohibited Activities
Emergency Contacts
Data Handling
Incident Escalation
Reporting

Example:

Saturday
22:00–04:00

if production testing may create operational risk.

Clearly define:

Systems That Must Not Be Tested

Examples may include systems not owned by the organization unless specific authorization exists.

Penetration testing must be explicitly authorized.

Maintain:

Written Approval

before testing.

Define:

Unexpected Outage
Stop Testing
Contact Operations

If the tester encounters CHD:

Minimize Access
Do Not Unnecessarily Copy
Secure Evidence
Follow Approved Data Handling

Where practical, use:

Synthetic Payment Data
Test Customers
Test Accounts

rather than live customer data.

Cloud environments require additional considerations.

Evaluate:

Cloud IAM
Security Groups
Storage
Metadata Services
Network Paths
Workload Identity

Understand what testing is permitted by the cloud provider.

The organization should follow:

Provider Penetration Testing Policies

where applicable.

Application Workload
Over-Permissive IAM Role
Cloud Secrets
Payment Database

For CDE Kubernetes environments, assess areas such as:

RBAC
Service Accounts
Secrets
NetworkPolicy
Container Privileges
API Server Exposure
Compromised Payment Pod
Overprivileged ServiceAccount
Kubernetes API
Secret Access
Database Credential

If deployment systems can change the CDE, test security around:

Pipeline Permissions
Repository Access
Secrets
Production Approvals
Developer Account
Repository Write
Pipeline
Production
Payment Application

If controls are weak, code changes could become a CDE compromise path.

Assess:

MFA
Password Controls
Privileged Access
Account Lockout
Session Controls
Local Accounts

Testing may include controlled assessment of:

Weak Passwords
Default Credentials
Credential Reuse

according to approved Rules of Engagement.

Test whether MFA can be bypassed through:

Legacy Authentication
Local Accounts
Alternative Access Paths

Evaluate whether emergency accounts:

Exist
Are Protected
Are Monitored

Test relevant authorized paths from:

Managed Service Providers
Payment Vendors
Support Vendors

where included in scope and authorization.

If wireless exists within or near the CDE, testing may assess:

Unauthorized Access Points
Weak Wireless Security
Unexpected Connectivity

Every validated issue should be documented.

Create:

04 Penetration Test Findings Register

Use:

ID Finding Severity Impact Owner Status

A strong finding should contain:

Affected System
Technical Description
Evidence
Attack Path
Business Impact
Severity
Recommendation

70. Example Finding — Public Administration

Section titled “70. Example Finding — Public Administration”

Finding:

SSH access to a production payment server is accessible directly from the internet.

Attack path:

Internet
SSH
Payment Server

Severity:

High / Critical

depending on authentication and exposure.

71. Example Finding — Authorization Bypass

Section titled “71. Example Finding — Authorization Bypass”

A user can manipulate an API identifier to retrieve another customer’s payment transaction metadata.

Risk:

Unauthorized Data Access

72. Example Finding — Segmentation Failure

Section titled “72. Example Finding — Segmentation Failure”

A developer subnet classified outside the PCI scope can establish direct database connectivity to the payment database.

Impact:

PCI Scope Expansion
CDE Attack Path

A CI/CD role can assume an unrestricted administrative role in the production payment account.

Impact:

Production CDE Control

Consider:

Exploitability
Privileges Required
Attack Complexity
CDE Exposure
Data Impact
Business Impact

Example:

Unauthenticated Remote Code Execution
Internet-Facing Payment Application

Example:

Corporate Network
Unauthorized CDE Admin Access

Example:

Information Disclosure

with limited direct security impact.

Before accepting a reported issue:

Reproduce
Confirm Scope
Review Evidence
Understand Impact

Not every suspected issue is exploitable.

Document validation rather than silently removing findings.

A strong workflow:

Finding
Assign Owner
Correction
Root Cause
Corrective Action
Retest

Correction:

Remove Unauthorized Rule

Corrective action:

Implement Firewall Rule Expiry
Automated Drift Detection

Correction:

Fix Authorization Check

Corrective action:

Secure Coding Standard
Automated Authorization Tests

Penetration-test findings should not be closed simply because:

Developer Says Fixed

Perform:

Independent Retest

Create:

05 Penetration Test Retest Register

Use:

Finding Fix Date Retest Result Tester

Use:

Passed
Partially Remediated
Failed

If:

Failed

then:

Finding Remains Open

Example:

Original:

5 CDE Hosts Exposed

Retest:

4 Fixed
1 Still Exposed

Conclusion:

Open

Do not test only the individual control.

If the original attack path was:

Developer
CI/CD
Production

confirm the complete path is no longer exploitable.

Create:

06 PCI Penetration Test Evidence Package

Include:

Approved Scope
Rules of Engagement
Test Methodology
Tester Qualifications
Test Dates
Test Results
Findings
Remediation
Retest Results
Final Closure

Potential evidence:

Professional Experience
Security Certifications
Methodology Documentation
Company Qualifications

depending on engagement requirements.

The final report should contain:

Executive Summary
Scope
Methodology
Attack Paths
Findings
Risk Ratings
Recommendations

Executives need:

What Was Tested?
What Was Compromised?
What Is the Business Risk?
What Must Be Fixed?

not only raw technical detail.

Technical teams need:

Affected Host
Evidence
Steps
Root Cause
Recommended Fix

Penetration-test reports may reveal:

Passwords
Network Paths
Vulnerabilities
Architecture
Attack Techniques

Store them securely.

Limit access to:

Security
GRC
System Owners
Management
Assessors

according to business need.

Create:

07 PCI Penetration Testing Calendar

Track:

Test Scope Last Completed Next Due Owner

Include:

Annual Pen Test
Segmentation Test
Post-Significant-Change Test
Retesting

as applicable.

Expected:

Annual

Actual:

Last Test:
18 Months Ago

Result:

Testing Operating Gap

Create:

08 Penetration Test Change Trigger Register

Use:

Change Pen Test Review Test Required Status
New Payment API
Major Cloud Migration
Network Redesign
New CDE Segment
New Payment Application
Major Authentication Change

Recommended dashboard:

Metric Target
Required Pen Tests Completed 100%
Critical Findings Open 0
High Findings Past SLA 0
Segmentation Tests Passed 100%
Findings Retested 100%
Failed Retests 0

Example:

Percentage of required
PCI penetration tests
completed on schedule

Target:

100%

Example:

Critical penetration-test findings
not remediated within SLA

Target:

0

Example:

Unauthorized CDE connectivity
identified during testing

Example:

Findings that fail retesting

106. Practical Activity — Build Test Scope

Section titled “106. Practical Activity — Build Test Scope”

Use fictional organization:

CloudShop

Include:

Payment Website
Payment API
Payment Database
Jump Host
Cloud Payment Account
Identity Provider
CI/CD
CDE Firewall

107. Practical Activity — Define Rules of Engagement

Section titled “107. Practical Activity — Define Rules of Engagement”

Create:

Objective
Test Window
Scope
Allowed Techniques
Prohibited Activities
Emergency Contacts
Data Handling Rules

108. Practical Activity — Network Penetration Test

Section titled “108. Practical Activity — Network Penetration Test”

Scenario:

Corporate Network
Jump Host
CDE

Tester discovers:

Weak Jump Host Credential

and gains:

CDE Access

Document:

Finding
Attack Path
Severity
Correction
Corrective Action

109. Practical Activity — Application Test

Section titled “109. Practical Activity — Application Test”

Payment API allows:

Customer A
Change Object ID
Customer B Payment Record

Classify and remediate.

110. Practical Activity — Segmentation Testing

Section titled “110. Practical Activity — Segmentation Testing”

Test:

Developer Network
Payment Database

Expected:

Blocked

Actual:

Allowed

Document:

Scope Impact
Root Cause
Correction
Retest

111. Practical Activity — Cloud Attack Path

Section titled “111. Practical Activity — Cloud Attack Path”

Tester obtains:

Application IAM Role

then discovers permission:

sts:AssumeRole

into:

PaymentAdminRole

Analyze:

Impact
Least Privilege Failure
Corrective Action

112. Practical Activity — Kubernetes Attack Path

Section titled “112. Practical Activity — Kubernetes Attack Path”

Compromised pod has:

Service Account
Can Read Secrets

Secret contains:

Payment Database Credential

Document the attack chain and remediation.

Original:

Public SSH
to Payment Server

Fix:

Restricted Security Group

Retest:

Internet
SSH

Expected:

Blocked
  • Current PCI scope reviewed.

  • test objectives defined.

  • systems identified.

  • applications identified.

  • segmentation boundaries identified.

  • testing window approved.

  • written authorization obtained.

  • allowed testing documented.

  • prohibited testing documented.

  • emergency contacts identified.

  • stop conditions defined.

  • data handling defined.

  • tester qualified.

  • independence assessed.

  • methodology documented.

  • responsibilities defined.

  • external testing performed.

  • internal testing performed.

  • CDE hosts covered.

  • connected systems considered.

  • administrative paths tested.

  • payment applications covered.

  • authentication tested.

  • authorization tested.

  • session controls tested.

  • input validation tested.

  • business logic tested.

  • APIs tested.

  • out-of-scope sources tested.

  • CDE targets tested.

  • unauthorized paths tested.

  • expected permitted paths validated.

  • failures assessed for scope impact.

  • cloud IAM tested.

  • cloud networking tested.

  • Kubernetes reviewed where applicable.

  • CI/CD attack paths considered.

  • workload identities considered.

  • affected asset identified.

  • evidence retained.

  • attack path documented.

  • severity assigned.

  • owner assigned.

  • remediation date defined.

  • critical findings retested.

  • high findings retested.

  • failed retests reopened.

  • complete attack path validated.

  • scope retained.

  • ROE retained.

  • tester qualifications retained.

  • test report retained.

  • remediation evidence retained.

  • retest report retained.

115. Common PCI Penetration Testing Mistakes

Section titled “115. Common PCI Penetration Testing Mistakes”

Mistake 1 — Vulnerability Scan Called a Penetration Test

Section titled “Mistake 1 — Vulnerability Scan Called a Penetration Test”

No exploitation or attack-path analysis occurs.

Mistake 2 — Scope Does Not Match the CDE

Section titled “Mistake 2 — Scope Does Not Match the CDE”

Important payment systems remain untested.

Mistake 3 — Only External Testing Performed

Section titled “Mistake 3 — Only External Testing Performed”

Internal attack paths are missed.

Mistake 4 — Only Network Testing Performed

Section titled “Mistake 4 — Only Network Testing Performed”

Payment application vulnerabilities remain unknown.

Scope reduction is assumed rather than proven.

Control implementation and assessment are not sufficiently separated.

Mistake 7 — New Architecture Not Retested

Section titled “Mistake 7 — New Architecture Not Retested”

Significant changes introduce unvalidated risks.

Mistake 8 — Findings Closed Without Retest

Section titled “Mistake 8 — Findings Closed Without Retest”

Remediation may be incomplete.

Mistake 9 — Only Individual Findings Tested

Section titled “Mistake 9 — Only Individual Findings Tested”

Complete attack chains remain exploitable.

Mistake 10 — Pen-Test Reports Shared Too Broadly

Section titled “Mistake 10 — Pen-Test Reports Shared Too Broadly”

Sensitive attack information is exposed.

Annual Scanner
Report
Audit Folder
Current PCI Scope
Approved Test Plan
Qualified Tester
Network Testing
Application Testing
Segmentation Testing
Controlled Exploitation
Attack Path Analysis
Findings
Root Cause
Remediation
Retesting
Continuous Improvement

A GRC professional supporting PCI penetration testing may:

  • Maintain penetration-testing requirements.

  • Coordinate test scope.

  • Reconcile test scope against PCI scope.

  • coordinate tester selection.

  • review independence.

  • maintain Rules of Engagement.

  • coordinate business approvals.

  • track significant-change testing.

  • maintain findings registers.

  • monitor remediation.

  • coordinate retesting.

  • maintain evidence.

  • review segregation-test results.

  • prepare testing dashboards.

  • support QSA review.

GRC connects:

Security Testing
Application Security
Network Security
Cloud Security
Infrastructure
DevOps
Payment Engineering
Penetration Testers
Management
Assessors
External Pen Test
Static Report
Scope
ROE
Network + Application Testing
Findings Tracking
Attack Paths
Segmentation Testing
Change Triggers
Independent Retesting
Cloud Testing
CI/CD Testing
Automated Validation
Continuous Exposure Analysis

Level 5 — Continuous Security Validation

Section titled “Level 5 — Continuous Security Validation”
Breach Simulation
Attack Path Monitoring
Continuous Segmentation Validation
Automated Control Testing

For every PCI penetration test ask:

Does the scope match
the current CDE?
Are internal and external
attack paths included?
Are payment applications tested?
Can segmentation actually be bypassed?
Can an attacker escalate privileges?
Can one compromised system
reach another?
Can cloud IAM be abused?
Can CI/CD modify production?
Can workload identities
access sensitive systems?
What happens after initial compromise?
Could attackers reach cardholder data?
Was remediation retested?
Can we prove the original attack path
is no longer possible?

The strongest penetration test does not simply produce a list of vulnerabilities.

It demonstrates:

Entry Point
Exploit
Privilege
Movement
Business Impact

and helps the organization eliminate the complete path.

  • Penetration testing validates whether vulnerabilities can actually be exploited.

  • Vulnerability scanning and penetration testing serve different purposes.

  • PCI penetration testing should align with the current PCI scope.

  • Both network-layer and application-layer testing are important.

  • Internal testing identifies risks that external testing may miss.

  • Rules of Engagement should clearly define scope, authorization, techniques, safety requirements, and data handling.

  • Testers should have sufficient technical skill and independence.

  • Exploitation should be controlled and limited to what is necessary to demonstrate risk.

  • Post-exploitation testing can identify privilege escalation and lateral movement.

  • Attack chaining can reveal critical paths that individual findings do not show.

  • Segmentation should be tested when relied upon for PCI scope reduction.

  • Failed segmentation can expand PCI scope.

  • Cloud, Kubernetes, CI/CD, and workload identities create modern attack paths that should be considered.

  • Penetration-test findings should be assigned owners and remediation targets.

  • Material findings should be independently retested before closure.

  • Penetration-test evidence should demonstrate scope, methodology, findings, remediation, and retesting.

  • GRC coordinates scope, testing governance, findings, remediation, evidence, and assessor interactions.

Before continuing, make sure you can answer:

  1. What is penetration testing?

  2. How is penetration testing different from vulnerability scanning?

  3. What is internal penetration testing?

  4. What is external penetration testing?

  5. What is network-layer penetration testing?

  6. What is application-layer penetration testing?

  7. What is controlled exploitation?

  8. What is post-exploitation?

  9. What is privilege escalation?

  10. What is lateral movement?

  11. What is an attack path?

  12. Why is segmentation testing important?

  13. What happens when segmentation fails?

  14. What are Rules of Engagement?

  15. Why is written authorization required?

  16. Why does tester independence matter?

  17. Why should significant changes trigger testing?

  18. Why should findings be retested?

  19. What should a PCI penetration-test evidence package contain?

  20. What role does GRC play in PCI penetration testing?

➡️ Next: 10 — PCI Assessment

In the next lesson, you will move from individual PCI security controls into the complete PCI DSS assessment lifecycle.

You will learn how to bring together:

PCI Scope
Applicable Requirements
Control Owners
Evidence
Interviews
Observation
Technical Testing
Findings
Remediation
Assessment Validation

You will also build practical artifacts including a PCI Assessment Plan, Requirement Applicability Matrix, Evidence Request List, Control Testing Workbook, Assessment Finding Register, Remediation Tracker, Assessment Status Dashboard, and PCI Assessment Readiness Checklist.