Date
October 12, 2026
Author
Karan Patel
,
CEO

Every ISO 27001 certification cycle ends up at the same question: "Do we actually need a penetration test?" The standard never says "you must perform a penetration test," but it doesn't let you off the hook either. Two controls in ISO/IEC 27001:2022 Annex A, 8.8 (Management of technical vulnerabilities) and 8.29 (Security testing in development and acceptance), expect you to find weaknesses before attackers do and to prove that you did. In practice, penetration testing is the most defensible way to show an auditor that you meet both.

This guide covers what each control requires, how to build a testing program that satisfies them, the commands and tooling practitioners use, and the evidence certification auditors actually ask for.

What Does ISO 27001 Actually Say About Penetration Testing?

ISO 27001 is risk-based. It tells you what outcomes your ISMS must achieve, and ISO/IEC 27002:2022 provides implementation guidance for each Annex A control. Penetration testing appears in that guidance as a recommended way to identify vulnerabilities and validate security controls.

The 2022 revision restructured Annex A into four themes (Organizational, People, Physical, Technological) with 93 controls. The testing-relevant controls are now consolidated:

  • 8.8 Management of technical vulnerabilities merges the old A.12.6.1 and parts of A.18.2.3 (technical compliance review).
  • 8.29 Security testing in development and acceptance merges the old A.14.2.8 and A.14.2.9.
  • 8.34 Protection of information systems during audit testing governs how testing is performed safely.

The transition period for ISO 27001:2013 certificates ended on 31 October 2025, so every active certificate is now assessed against the 2022 control set. If your testing evidence still references A.12.6.1, update your Statement of Applicability (SoA) mappings before your next surveillance audit.

Annex A 8.8: Management of Technical Vulnerabilities Explained

Control 8.8 requires that information about technical vulnerabilities of information systems in use is obtained, the organization's exposure is evaluated, and appropriate measures are taken. It covers the whole cycle: identify, assess, treat, verify.

What Auditors Expect to See for Annex A 8.8

A certification body auditor will typically look for:

  1. An accurate asset inventory (linked to control 5.9) that defines what is in scope for vulnerability management.
  2. Defined roles and responsibilities for monitoring, risk assessment, patching, and coordination.
  3. Sources of vulnerability intelligence, such as vendor advisories, NVD, and CISA KEV.
  4. A documented timeline for remediation based on severity and exposure.
  5. Regular technical assessments, meaning scanning plus penetration testing, with results tracked to closure.
  6. Verification that fixes worked, which usually means a retest.

The last two points are where most organizations fall short. Automated scans produce volume, not assurance. A penetration test shows whether a "medium" misconfiguration chains with a weak credential into domain compromise, and that is the kind of risk evaluation 8.8 asks for.

How to Run Vulnerability Discovery That Maps to 8.8

Start with reconnaissance and service enumeration across the in-scope estate. The workflow below combines Nmap for service fingerprinting with Nuclei for template-driven vulnerability detection, and keeps output files you can hand to an auditor as evidence.

# 1. Full TCP sweep of in-scope ranges with service and version detection
sudo nmap -sS -sV -sC -p- --min-rate 2000 -T4 \
 -iL scope_ips.txt \
 -oA evidence/2026-11_nmap_fullscope

# 2. Extract live HTTP(S) services for web-focused checks
cat evidence/2026-11_nmap_fullscope.gnmap \
 | grep -E "80/open|443/open|8080/open|8443/open" \
 | awk '{print $2}' | sort -u > live_web_hosts.txt

httpx -l live_web_hosts.txt -silent -title -tech-detect -status-code \
 -o evidence/2026-11_httpx_inventory.txt

# 3. Run Nuclei against confirmed web services, critical and high only first
nuclei -l live_web_hosts.txt \
 -severity critical,high \
 -tags cve,misconfig,exposure,default-login \
 -rate-limit 150 \
 -jsonl -o evidence/2026-11_nuclei_crit_high.jsonl

[cta]

Keep the date-stamped filenames. Clause 7.5 (documented information) means your evidence should be traceable, and auditors like seeing raw output that matches the summary in your report.

Prioritizing Findings with CVSS, EPSS, and CISA KEV

Control 8.8 explicitly asks you to evaluate exposure, not just collect CVEs. A mature program puts actively exploited vulnerabilities first. The script below enriches scanner output with CISA's Known Exploited Vulnerabilities catalog and FIRST's EPSS scores so remediation SLAs reflect real-world risk.

#!/usr/bin/env python3
"""Enrich Nuclei JSONL output with CISA KEV and EPSS for ISO 27001 A.8.8 risk triage."""
import json, sys, requests

KEV_URL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
EPSS_URL = "https://api.first.org/data/v1/epss?cve={}"

kev = {v["cveID"] for v in requests.get(KEV_URL, timeout=30).json()["vulnerabilities"]}

def epss(cve):
   r = requests.get(EPSS_URL.format(cve), timeout=15).json().get("data", [])
   return float(r[0]["epss"]) if r else 0.0

for line in open(sys.argv[1]):
   f = json.loads(line)
   cves = f.get("info", {}).get("classification", {}).get("cve-id") or []
   for cve in cves:
       cve = cve.upper()
       score = epss(cve)
       in_kev = cve in kev
       sla = "7 days" if in_kev or score >= 0.5 else "30 days"
       print(f"{f['host']:<40} {cve:<18} KEV={in_kev!s:<5} EPSS={score:.3f} SLA={sla}")

[cta]

Write SLA thresholds like these into your vulnerability management procedure. When an auditor asks "how do you decide what to fix first?", you can point to a documented, repeatable method. If you'd rather have experienced testers validate which of those findings are actually exploitable in your environment, Redfox Cybersecurity's compliance-aligned penetration testing maps every confirmed finding to the relevant ISO 27001 control.

Annex A 8.29: Security Testing in Development and Acceptance

Where 8.8 focuses on systems already in use, 8.29 targets the development lifecycle. It requires security testing processes to be defined and implemented in the development life cycle, and that new systems, upgrades, and new versions undergo security acceptance testing before going to production.

What Annex A 8.29 Requires in Practice

ISO 27002:2022 guidance for 8.29 points to several testing activities:

  • Testing of security functions such as authentication, access restriction, and cryptography.
  • Secure coding verification (linked to control 8.28).
  • Secure configuration testing of operating systems, firewalls, and other components.
  • Vulnerability scanning, code analysis, and penetration testing.
  • Acceptance testing in an environment that closely resembles production (tying into 8.31, separation of environments).
  • Testing obligations for outsourced development (control 8.30).

The key point for auditors is that testing must be planned and tied to acceptance criteria. A release that ships without a documented security gate is a nonconformity waiting to happen.

How to Build SAST, SCA, and Secrets Scanning into CI/CD

A practical way to show 8.29 compliance is a pipeline that blocks merges on critical findings and archives the results. This GitHub Actions workflow runs Semgrep for static analysis, Trivy for dependency and container scanning, and Gitleaks for secret detection.

name: iso27001-a8-29-security-gate
on:
 pull_request:
   branches: [ main, release/* ]

jobs:
 security-tests:
   runs-on: ubuntu-latest
   steps:
     - uses: actions/checkout@v4
       with:
         fetch-depth: 0

     - name: SAST (Semgrep)
       run: |
         pip install semgrep
         semgrep scan --config p/owasp-top-ten --config p/secrets \
           --severity ERROR --error --sarif -o semgrep.sarif

     - name: SCA and container scan (Trivy)
       run: |
         curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
         trivy fs . --scanners vuln,misconfig --severity CRITICAL,HIGH --exit-code 1 \
           --format sarif -o trivy.sarif

     - name: Secret scanning (Gitleaks)
       uses: gitleaks/gitleaks-action@v2
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

     - name: Archive evidence for ISMS records
       if: always()
       uses: actions/upload-artifact@v4
       with:
         name: a8-29-evidence-${{ github.sha }}
         path: "*.sarif"
         retention-days: 400

[cta]

The 400-day retention is deliberate. It covers a full surveillance cycle, so you can show historical gate results during the audit.

How to Run DAST During Acceptance Testing

Static analysis can't see runtime behavior. For acceptance testing, run an authenticated dynamic scan against a staging environment that mirrors production. OWASP ZAP's automation framework makes this reproducible:

# zap-acceptance.yaml : run with
# docker run -v $(pwd):/zap/wrk:rw ghcr.io/zaproxy/zaproxy:stable zap.sh -cmd -autorun /zap/wrk/zap-acceptance.yaml
env:
 contexts:
   - name: staging-app
     urls: [ "https://staging.example.com" ]
     authentication:
       method: browser
       parameters:
         loginPageUrl: "https://staging.example.com/login"
     users:
       - name: qa-standard-user
         credentials:
           username: "${ZAP_USER}"
           password: "${ZAP_PASS}"
jobs:
 - type: spiderAjax
   parameters: { context: staging-app, user: qa-standard-user, maxDuration: 10 }
 - type: activeScan
   parameters: { context: staging-app, user: qa-standard-user, policy: "Default Policy" }
 - type: report
   parameters:
     template: traditional-html
     reportDir: /zap/wrk/evidence
     reportTitle: "A.8.29 Acceptance DAST - Release 4.12"

[cta]

Automated DAST finds injection points and missing headers well. It reliably misses business logic flaws, broken object-level authorization, and multi-step privilege escalation, which is where manual testing earns its place.

Manual Web and API Testing: Where Automation Stops

Broken access control has topped the OWASP Top 10 for years, and scanners rarely catch it because they don't understand who should be allowed to see what. A tester checks authorization by swapping identifiers between two accounts at different privilege levels:

# Enumerate API endpoints from a captured route list
ffuf -u https://staging.example.com/api/v2/FUZZ \
 -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt \
 -H "Authorization: Bearer $TOKEN_USER_A" \
 -mc 200,201,204,401,403 -ac -o evidence/ffuf_api.json -of json

# Test for IDOR/BOLA: request User B's invoice using User A's token
curl -s -o /dev/null -w "%{http_code}\n" \
 -H "Authorization: Bearer $TOKEN_USER_A" \
 https://staging.example.com/api/v2/invoices/88412   # invoice owned by User B

# Confirm a suspected SQL injection in a tenant filter parameter (authorized scope only)
sqlmap -u "https://staging.example.com/api/v2/reports?tenant=42" \
 -H "Authorization: Bearer $TOKEN_USER_A" \
 -p tenant --level 3 --risk 2 --batch --technique=BT \
 --output-dir=evidence/sqlmap

[cta]

A 200 response returning another tenant's invoice is a critical finding under both 8.29 (it should have failed acceptance testing) and 5.15 (access control). The Redfox Cybersecurity Web App + API penetration test covers authenticated roles specifically so these cross-tenant flaws come out before release.

How Do You Test Internal Networks and Active Directory for ISO 27001?

Control 8.8 applies to all information systems in use, not just internet-facing ones. Internal testing under an assumed-breach model shows how far an attacker could move after a single endpoint is compromised, which is often the clearest way to show leadership what is really at stake.

What matters for an ISO 27001 auditor is that internal testing is scoped, authorized, and evidenced. A credible internal engagement reviews the following areas and records the outcome of each:

  • Authentication hygiene: weak, reused, or default service-account credentials, and whether password policy (control 5.17) holds up against a realistic, rate-limited guessing effort.
  • Protocol and configuration weaknesses: legacy authentication protocols, unsigned network traffic, and misconfigured shares that let an attacker move between systems.
  • Privilege and access design: whether a low-privileged foothold can reach sensitive data or administrative control, which validates least-privilege (control 8.2) and access control (control 5.15).
  • Segmentation: whether network boundaries between environments actually hold (control 8.22), tested by attempting to reach systems that should be unreachable from the starting position.

Testers working internally should operate under control 8.34, which protects live systems during testing. In practice that means read-only validation where possible, agreed change windows, rollback plans, and a named point of contact who can halt the engagement. Those safeguards are themselves audit evidence: they show testing was conducted without putting production information at risk.

Internal network and Active Directory testing is specialist work, and most teams bring in an external partner for it. The Redfox Cybersecurity internal network penetration test runs on exactly this assumed-breach model and maps the lateral-movement paths it finds back to the specific Annex A controls that failed, so the report plugs straight into your corrective-action process.

Turning Test Results into Audit Evidence

A penetration test only satisfies 8.8 and 8.29 if the output feeds your ISMS. The report that impresses an engineer is rarely the one an auditor needs. Make sure every finding carries the fields below so it can live in your risk register and corrective-action log.

Field Why the auditor cares
Finding ID and title Traceability across report, register, and retest
Affected asset Links to inventory (control 5.9)
CVSS and exploitability note Evidence of exposure evaluation (8.8)
Mapped Annex A control Shows the control gap, not just the bug
Remediation owner and due date Demonstrates accountability (clause 5.3)
Status and retest result Closes the loop, proves the fix worked

Feed each finding into your risk treatment plan (clause 6.1.3). An open critical with a documented owner, a due date, and a planned retest is defensible. An open critical with no plan is a nonconformity.

Why Retesting Matters More Than the First Test

Both controls are built around a cycle, not a one-time event. Control 8.8 asks you to verify that measures were effective, and 8.29 asks for testing before each significant release. A finding is not closed until a retest confirms it.

Structure the remediation window around a clear, repeatable sequence:

1. Test            -> findings issued, mapped to Annex A controls
2. Triage          -> severity + EPSS/KEV, SLA assigned
3. Remediate       -> owner fixes, documents the change
4. Retest          -> tester re-validates the specific finding
5. Close + archive -> risk register updated, evidence stored for audit

[cta]

Keep the "before" and "after" evidence together. During a surveillance audit, showing a critical finding that was found, fixed, and verified closed is one of the strongest demonstrations of a working ISMS you can offer.

How Often Should You Run Penetration Tests for ISO 27001?

ISO 27001 sets no fixed frequency, so you justify your cadence through risk. A defensible baseline that auditors recognize looks like this:

  • Annually at minimum, aligned to your surveillance audit, as a wide-scope test of external and internal estate.
  • After significant change, which is the direct 8.29 trigger: major releases, new infrastructure, cloud migrations, or architectural changes.
  • Continuously for high-risk surfaces, using authenticated scanning and attack-surface monitoring between full tests to keep 8.8 current.

Write the cadence and its risk justification into your vulnerability management procedure, then actually follow it. Auditors check that your documented process matches your records.

What Does ISO 27001 Penetration Testing Cost?

Pricing depends on scope, asset count, and depth, but published starting points help you budget. Redfox Cybersecurity lists the following packages, with final pricing set during scoping:

  • External network test: from $1,600, around 2 business days, covering up to 50 internet-facing IPs. A strong fit for the external half of an 8.8 program.
  • Cloud configuration and identity review: from $2,400, around 4 business days, for one cloud account. Useful where your ISMS scope includes cloud-hosted systems.
  • Web App and API test: from $4,000, around 5 business days, covering one web app and one API with authenticated roles. This is the core engagement for 8.29 acceptance testing of a product.
  • Internal network test: from $4,000, around 5 business days, covering up to 500 IPs on an assumed-breach basis including Active Directory paths.
  • Audit Bundle: custom pricing, around 15 business days, combining web, API, external, and cloud testing into a single report mapped for certification.

For organizations going through certification for the first time, the Audit Bundle usually gives the cleanest evidence set, because one report covers the breadth both controls expect. You can review current scoping and request a tailored quote from Redfox Cybersecurity based on your Statement of Applicability.

Common Mistakes That Fail the Audit

A few recurring errors turn a good testing program into an audit finding:

  • Scanning and calling it a penetration test. Automated tools support 8.8, but on their own they do not evaluate exposure or validate exploitability. Auditors increasingly know the difference.
  • No retest. An unverified "fixed" status does not close a finding under 8.8.
  • Scope that dodges risk. Excluding your most sensitive application from scope to get a clean report is transparent, and a competent auditor will ask why your highest-value asset was never tested.
  • Stale control mappings. Reports still referencing the 2013 Annex A numbering signal a program that has not kept current with the standard.
  • Evidence that lives only in the pentest PDF. If findings never reach the risk register and corrective-action log, you have a report, not a management system.

Key Takeaways

ISO 27001 does not mandate penetration testing by name, but Annex A 8.8 and 8.29 make it the most practical way to prove you find, evaluate, treat, and verify technical weaknesses across both running systems and the development lifecycle. Control 8.8 wants continuous vulnerability management with real exposure evaluation and verified remediation. Control 8.29 wants security testing built into your pipeline and enforced as an acceptance gate before release.

The organizations that sail through certification treat testing as a loop: scope by risk, test with a mix of automation and manual depth, map every finding to a control, remediate with an owner and a date, retest to confirm, and archive the evidence. Do that consistently and the audit becomes a formality rather than a scramble. If you want testing built around the Annex A control set from the start, with findings mapped for your auditor and retests included, Redfox Cybersecurity runs compliance-aligned engagements for exactly this purpose.

Copy Code