Skip to content

Runbook 03 — Penetration Testing Methodology

Penetration testing should not depend on random tools or ad hoc techniques.

A professional engagement follows a structured methodology that can be applied across:

NETWORKS
WINDOWS
LINUX
ACTIVE DIRECTORY
WEB APPLICATIONS
APIs
CLOUD
CONTAINERS
ENTERPRISE INFRASTRUCTURE

The purpose of this runbook is to provide a technology-independent penetration testing methodology that can be reused across different types of authorized security assessments.

The core workflow is:

PRE-ENGAGEMENT
SCOPE
RULES OF ENGAGEMENT
RECONNAISSANCE
DISCOVERY
ENUMERATION
VULNERABILITY ANALYSIS
ATTACK-PATH DEVELOPMENT
CONTROLLED VALIDATION
EVIDENCE COLLECTION
RISK ANALYSIS
REPORTING
REMEDIATION
RETESTING
CLOSURE

Use this runbook only in the GoHackersCloud lab, systems you own, intentionally vulnerable training environments, or environments where you have explicit authorization.

Runbook: 03 — Penetration Testing Methodology
Track: OffSec
Category: Core Penetration Testing Runbook
Difficulty: Beginner → Advanced
Primary Role: Penetration Tester / Security Consultant
Environment: Technology Independent
Primary Goal: Conduct repeatable, evidence-driven penetration tests
Primary Deliverable: Professional Penetration Testing Report

Use this runbook for:

Network Penetration Testing
Internal Penetration Testing
External Penetration Testing
Web Application Testing
Active Directory Testing
Windows Assessment
Linux Assessment
Cloud Security Testing
API Security Testing
Enterprise Penetration Testing
Purple Team Exercises

Avoid this:

TOOL
SCAN
EXPLOIT
REPORT

Use this instead:

UNDERSTAND
HYPOTHESIZE
VALIDATE
CORRELATE
MEASURE IMPACT
DOCUMENT
REMEDIATE

Before technical activity, understand:

Why Is the Test Being Performed?
What Business Problem
Are We Trying to Evaluate?
Which Assets Matter Most?
What Type of Assessment
Has Been Requested?
What Are the Customer's
Risk Concerns?

Document:

Assessment Type:
Business Objective:
Primary Security Concerns:
Critical Systems:
Critical Data:
Stakeholders:
Testing Dates:
Reporting Audience:
Compliance Requirements:
Communication Channel:

Clarify whether the engagement is:

External
Internal
Assumed Breach
Web Application
API
Cloud
Active Directory
Wireless
Enterprise
Red Team
Purple Team

Each assessment may use the same overall methodology but different technical depth.

The scope should answer:

WHAT CAN BE TESTED?

and:

WHAT CANNOT BE TESTED?

Document:

IP Addresses
Networks
Domains
Applications
APIs
Cloud Accounts
Systems
Accounts
Locations
Third Parties
Engagement:
Organization:
Assessment Type:
In-Scope Networks:
In-Scope Hosts:
In-Scope Domains:
In-Scope Applications:
In-Scope APIs:
In-Scope Accounts:
Excluded Systems:
Third-Party Systems:
Testing Window:
Emergency Contact:

Before testing:

Confirm Customer Ownership
Confirm Third-Party Authorization
Confirm Cloud Account Ownership
Confirm Domain Ownership
Confirm Application Ownership

Never assume that a publicly reachable asset belongs to the customer.

Rules of engagement define:

HOW TESTING MAY BE PERFORMED

Document:

Allowed Techniques
Restricted Techniques
Prohibited Techniques
Testing Hours
Notification Requirements
Escalation Process
Stop Conditions

Testing should stop when:

Service Instability Occurs
Unexpected Sensitive Data Appears
A Third-Party Asset Is Reached
Customer Requests a Stop
Production Operations Are Impacted
An Out-of-Scope Environment Is Found
Unexpected Account Lockouts Occur

Define:

Primary Contact
Technical Contact
Emergency Contact
Daily Update Requirements
Critical Finding Notification
Secure Evidence Transfer

Create:

Pentest/
|
+-- 01-Scope/
|
+-- 02-Recon/
|
+-- 03-Discovery/
|
+-- 04-Enumeration/
|
+-- 05-Vulnerability-Analysis/
|
+-- 06-Attack-Paths/
|
+-- 07-Evidence/
|
+-- 08-Findings/
|
+-- 09-Report/
|
+-- 10-Cleanup/
|
+-- 11-Retest/

For every important activity capture:

Timestamp
Tester
Source
Target
Current Identity
Command / Method
Expected Result
Observed Result
Security Significance
Evidence Reference
Finding Reference

Create:

TIME
ACTION
TARGET
RESULT
NEXT STEP

This is extremely useful when reconstructing the assessment later.

Reconnaissance means gathering enough context to understand the environment before deeper testing.

Depending on assessment type, investigate authorized:

Domains
IP Ranges
Applications
Technologies
Business Services
Infrastructure
Known Assets

Passive reconnaissance:

Uses Existing Information
Without Directly Interacting
With the Target

Active reconnaissance:

Directly Interacts
With In-Scope Systems

Use only methods permitted by the engagement.

Record:

Asset Type Purpose Owner Criticality
portal.example.lab Web Customer Portal App Team High
10.10.10.10 Server Identity Infra Critical
API01 API Business API App Team High

Discovery answers:

WHAT EXISTS?

For an authorized network, examples may include:

Terminal window
nmap -sn <AUTHORIZED_SUBNET>

The objective is to identify:

Hosts
Network Devices
Servers
Applications
Security Appliances

Document:

IP
Hostname
MAC if Available
OS Guess
Role
Network Zone
Criticality

Use:

Critical
High
Medium
Low

Prioritize systems that control:

Identity
Administration
Sensitive Data
Applications
Security Controls
Backups
Management

Once assets are identified, determine:

WHAT IS RUNNING?

For authorized systems:

Terminal window
nmap -sV -sC -p <PORTS> <TARGET>

Document:

Port
Protocol
Service
Version
Purpose
Authentication
Exposure

Do not think:

PORT 445
=
TRY EVERYTHING SMB

Instead:

PORT 445
SMB SERVICE
WHAT ROLE DOES IT SERVE?
WHO CAN ACCESS IT?
WHAT DATA / TRUST DOES IT EXPOSE?

Your next questions depend on the technology.

For Windows:

Users
Groups
Services
Shares
Tasks
Domain Context

For Linux:

Users
Groups
sudo
Services
Cron
Permissions

For web:

Pages
Roles
APIs
Objects
Workflows

For cloud:

Identities
Roles
Resources
Policies
Network Exposure
Logging

Instead of collecting unlimited information, ask targeted questions.

Example:

HYPOTHESIS:
This application server may use
a service account with access
to additional internal resources.

Then collect evidence specifically related to that hypothesis.

Vulnerability analysis asks:

WHAT SECURITY WEAKNESSES EXIST?

These may include:

Missing Patches
Weak Configuration
Excessive Privilege
Broken Authorization
Weak Segmentation
Insecure Services
Exposed Sensitive Information
Legacy Technology
Weak Identity Governance

22 — Separate Observation from Vulnerability

Section titled “22 — Separate Observation from Vulnerability”

Example observation:

RDP Port 3389 Is Open

This is not automatically a vulnerability.

A vulnerability might be:

RDP Management Service
Is Exposed to an Unauthorized
User Network

Context matters.

Never copy scanner output directly into a report without verification.

For each important result:

Does It Exist?
Is the Version Correct?
Is the Configuration Relevant?
Is the Asset Actually Vulnerable?
What Conditions Are Required?
What Is the Business Impact?

High-priority areas often include:

Authentication
Authorization
Administrative Interfaces
Identity Privileges
Service Accounts
File Permissions
Network Segmentation
Sensitive Data
Business Logic

Create:

ID Observation Asset Status Priority
PT-001 Excessive local admin APP01 Validate High
PT-002 Weak segmentation Network Validate High
PT-003 Missing API authorization Portal Validate Critical

A vulnerability rarely exists in isolation.

Think:

STARTING POSITION
WEAKNESS
PERMISSION
TRUST
INTERMEDIATE SYSTEM
HIGHER PRIVILEGE
TARGET

Relevant relationship types include:

CanAccess
MemberOf
AdminTo
CanModify
CanAuthenticate
CanReach
CanRead
CanWrite
Trusts
Owns

Example:

user01
|
| MemberOf
v
Support
|
| AdminTo
v
APP01
|
| Uses
v
Service Identity
|
| AccessTo
v
DB01

Evaluate:

Starting Access
Number of Steps
Required Privilege
Target Criticality
Reliability
Existing Controls
Detection
Business Impact

Before validation:

HYPOTHESIS
SCOPE CHECK
RISK CHECK
MINIMUM TEST
OBSERVE
DOCUMENT

The objective is:

PROVE THE RISK

not:

CAUSE MAXIMUM IMPACT

Use the minimum action necessary to demonstrate the issue.

Before testing, decide what constitutes sufficient proof.

Example:

Finding:
Unauthorized administrative function
Sufficient Proof:
A standard test user receives a
successful response from the restricted
function against synthetic lab data.

You do not need to perform unrelated administrative actions.

Once you have demonstrated:

The Weakness Exists
The Starting Position Can Reach It
The Security Boundary Fails
The Impact Is Understandable

stop expanding the activity unnecessarily.

If testing exposes:

Credentials
Personal Data
Business Records
Secrets
Tokens
Configuration

use:

Minimum Collection
Redaction
Secure Storage
Access Control
Documented Handling

Good evidence should prove the finding independently.

Include:

Relevant Request
Relevant Response
Command Output
Screenshot
Permission Listing
Configuration Snippet
Timestamp
Asset

Avoid:

Unexplained Screenshots
Massive Tool Output
Unredacted Secrets
Evidence Without Target Information
Evidence Without Context
Evidence ID Finding Asset Type Description
EV-001 PT-001 APP01 Output Local admin membership
EV-002 PT-002 Network Test Segmentation validation
EV-003 PT-003 Portal HTTP Unauthorized API response

A strong finding answers:

WHAT IS WRONG?
WHERE IS IT?
WHY DOES IT MATTER?
HOW WAS IT VALIDATED?
WHAT SHOULD BE DONE?
Finding ID:
Title:
Affected Asset:
Severity:
Description:
Starting Position:
Required Conditions:
Evidence:
Attack Path:
Technical Impact:
Business Impact:
Root Cause:
Recommendation:
Detection Opportunity:
Retest Procedure:

39 — Separate Technical and Business Impact

Section titled “39 — Separate Technical and Business Impact”

Technical:

A standard user can access
an administrative endpoint.

Business:

A compromised employee account
could modify application-wide
administrative settings.

Both matter.

Ask:

Why Does This Weakness Exist?
Was It a Design Problem?
Configuration Problem?
Governance Problem?
Legacy Requirement?
Privilege Creep?
Missing Review?
Missing Ownership?

Examples:

Weak Access Control
Poor Segmentation
Excessive Privilege
Configuration Drift
Legacy Systems
Missing Patch Governance
Weak Identity Governance
Lack of Ownership
Incomplete Security Testing

Risk should consider more than technical severity.

Use:

LIKELIHOOD
×
IMPACT
+
BUSINESS CONTEXT

Consider:

Starting Access Required
Authentication Required
Ease of Abuse
Exploit Reliability
Target Criticality
Data Sensitivity
Privilege Gained
Blast Radius
Detection
Existing Controls
Severity Typical Meaning
Critical Direct or near-direct compromise of a critical security boundary
High Significant privilege or sensitive-system exposure
Medium Meaningful weakness requiring additional conditions
Low Limited impact or difficult conditions
Informational Hardening or architecture observation

Suppose you identified:

Finding A:
Weak Segmentation
Finding B:
Broad Local Administrator
Finding C:
Service Account Excessive Privilege

Individually:

A + B + C

Together:

USER NETWORK
SERVER
LOCAL ADMIN
SERVICE IDENTITY
CRITICAL SYSTEM

This may represent a much larger risk.

Attack Path ID:
PT-AP-01
Starting Position:
Standard enterprise user
Step 01:
User can reach APP01 management service.
Step 02:
Support group has unnecessary local
administrative access.
Step 03:
APP01 uses an overprivileged
service identity.
Target:
Critical application environment.
Impact:
Compromise of a standard support identity
could lead to significantly broader
enterprise access.

For every path ask:

WHERE CAN WE BREAK IT?

Example:

USER
SERVER
SERVICE IDENTITY
DATABASE

Potential path breaks:

Network Segmentation
Remove Local Admin
Reduce Service Privilege
Restrict Database Access
MFA
Monitoring

48 — Prioritize Path-Breaking Remediation

Section titled “48 — Prioritize Path-Breaking Remediation”

Sometimes fixing one control can break multiple findings.

Example:

REMOVE BROAD ADMIN GROUP

may break:

AP-01
AP-03
AP-05

This is often more valuable than addressing findings individually.

Use:

IMMEDIATE
SHORT TERM
MEDIUM TERM
STRATEGIC

Example:

Immediate:
Remove unnecessary administrative rights.
Short Term:
Restrict network management access.
Medium Term:
Implement managed service accounts.
Strategic:
Deploy PAM and administrative tiering.

Your report should be useful to:

Executives
Security Leadership
Infrastructure Teams
Application Teams
Developers
Identity Teams
SOC Teams

The executive summary should answer:

What Was Tested?
What Was the Overall Risk?
What Were the Major Attack Paths?
Which Business Assets Were Exposed?
What Should Be Fixed First?
The penetration test identified multiple
security weaknesses across identity,
network, operating-system, and
application layers.
The most significant risk resulted from
several weaknesses combining into attack
paths toward high-value enterprise
systems.
Priority remediation should focus on
restricting administrative access,
strengthening network segmentation,
reducing excessive identity privilege,
and enforcing server-side authorization.

Each technical finding should contain:

Title
Severity
Affected Assets
Description
Evidence
Impact
Root Cause
Recommendation
Retest

53 — Avoid Reporting Tool Names as Findings

Section titled “53 — Avoid Reporting Tool Names as Findings”

Bad:

Nmap Found Port 22

Better:

SSH Administrative Service Is
Reachable From an Unauthorized
Network Segment

Report the security problem, not the tool output.

Bad:

Improve Security.

Better:

Restrict TCP/22 to the dedicated
administrative network and approved
management hosts.

Recommendations should be:

Specific
Actionable
Prioritized
Relevant
Priority Finding Action Owner
Immediate Broad local admin Remove group Windows Team
Short Term Weak segmentation Restrict management Network Team
Medium Service privilege Redesign identity IAM Team

Every offensive finding should create a defensive question:

HOW COULD THIS
HAVE BEEN DETECTED?

Example:

AUTHENTICATION
PRIVILEGE USE
SERVER ACCESS
APPLICATION ACCESS

Possible telemetry:

Identity Logs
Endpoint Logs
Network Logs
Application Logs
Cloud Logs
SIEM Alerts

For important findings document:

Log Source
Relevant Event
Detection Logic
Expected Baseline
Alert Condition

This improves remediation beyond configuration alone.

At engagement completion:

Remove Test Accounts
Remove Test Files
Restore Modified Configuration
Remove Temporary Memberships
Terminate Sessions
Delete Synthetic Objects
Verify Service Health
Secure Evidence
Asset:
Change:
Original State:
Final State:
Verification:
Tester:
Timestamp:

Retesting asks:

DID THE FIX
ACTUALLY REMOVE THE RISK?

Do not only verify:

Configuration Changed

Verify:

Original Security Path
No Longer Works
ORIGINAL FINDING
REPRODUCE BASELINE
VERIFY REMEDIATION
REPEAT SECURITY TEST
CHECK RELATED PATHS
CLOSE / REOPEN

Use:

Resolved
Partially Resolved
Not Resolved
Risk Accepted
Not Retested

Before closing:

Evidence Finalized
Cleanup Verified
Critical Findings Communicated
Final Report Delivered
Retest Plan Agreed
Sensitive Data Disposed Properly
Lessons Learned Recorded

Ask:

What Worked Well?
What Slowed Testing?
Which Assets Were Unknown?
Which Controls Were Effective?
Which Control Failures Repeated?
What Should the Next Assessment
Focus On?
SCOPE
DISCOVERY
PORTS
SERVICES
CONFIGURATION
SEGMENTATION
ATTACK PATH
IDENTITY
GROUPS
SERVICES
TASKS
FILES
REGISTRY
PRIVILEGE PATH
IDENTITY
GROUPS
SUDO
FILES
SUID
CAPABILITIES
SERVICES
PRIVILEGE PATH
DOMAIN
USERS
GROUPS
PERMISSIONS
GPO
DELEGATION
TRUST
ATTACK PATH
AUTHENTICATION
ROLES
OBJECTS
AUTHORIZATION
WORKFLOWS
APIs
BUSINESS IMPACT
IDENTITY
RESOURCE
POLICY
NETWORK
DATA
LOGGING
TRUST
ATTACK PATH

At the beginning of each testing day:

REVIEW SCOPE
REVIEW NOTES
REVIEW OPEN HYPOTHESES
CHECK CUSTOMER UPDATES
VERIFY TESTING POSITION

During testing:

ENUMERATE
FORM HYPOTHESIS
VALIDATE
CAPTURE EVIDENCE
UPDATE FINDINGS

At the end:

UPDATE ACTIVITY LOG
BACK UP EVIDENCE
UPDATE ATTACK PATHS
REVIEW CRITICAL FINDINGS
PLAN NEXT ACTIONS

Use:

Hypothesis ID:
Observation:
Hypothesis:
Required Conditions:
Validation Method:
Expected Result:
Actual Result:
Evidence:
Finding:
Next Step:

Before reporting a finding verify:

Is It Reproducible?
Is It In Scope?
Is the Evidence Clear?
Is the Impact Realistic?
Is the Severity Justified?
Is the Root Cause Identified?
Is the Recommendation Actionable?
Is the Retest Procedure Defined?

For each path:

Is the Starting Position Realistic?
Does Every Relationship Exist?
Are Any Assumptions Unverified?
What Security Controls Exist?
What Is the Final Target?
What Is the Business Impact?
Where Can the Path Be Broken?
  • Business objective understood
  • Assessment type confirmed
  • Stakeholders identified
  • Communication established
  • Assets documented
  • Networks documented
  • Applications documented
  • Accounts documented
  • Exclusions documented
  • Ownership confirmed
  • Allowed techniques documented
  • Restricted techniques documented
  • Stop conditions documented
  • Emergency contact documented
  • Testing window confirmed
  • Evidence directories created
  • Activity log started
  • Evidence standard established
  • Secure storage confirmed
  • Known assets reviewed
  • Domains reviewed
  • Infrastructure context reviewed
  • Initial inventory created
  • Hosts discovered
  • Systems classified
  • Unknown assets documented
  • Critical systems prioritized
  • Ports reviewed
  • Services reviewed
  • Technologies identified
  • Authentication points identified
  • Administrative interfaces identified
  • Scanner results validated
  • Configuration weaknesses reviewed
  • Privilege relationships reviewed
  • Authorization reviewed
  • Segmentation reviewed
  • Sensitive data exposure reviewed
  • Findings correlated
  • Starting positions identified
  • Relationships mapped
  • High-value targets identified
  • Path-breaking controls identified
  • Scope rechecked
  • Minimum proof defined
  • Controlled validation performed
  • Testing stopped after sufficient proof
  • Timestamps captured
  • Targets identified
  • Sensitive data redacted
  • Evidence indexed
  • Evidence linked to findings
  • Findings reproducible
  • Business impact documented
  • Root causes documented
  • Recommendations actionable
  • Remediation priorities defined
  • Temporary changes removed
  • Test accounts removed
  • Sessions terminated
  • Services verified
  • Cleanup documented
  • Original findings reproduced
  • Fixes verified
  • Attack paths retested
  • Status documented

40 Penetration Testing Methodology Review Questions

Section titled “40 Penetration Testing Methodology Review Questions”
  1. What is the purpose of penetration testing?
  2. Why is pre-engagement planning important?
  3. What is scope?
  4. What are rules of engagement?
  5. What is a stop condition?
  6. Why must asset ownership be verified?
  7. What is reconnaissance?
  8. What is the difference between passive and active reconnaissance?
  9. What is host discovery?
  10. What is service enumeration?
  11. Why is an open port not automatically a vulnerability?
  12. What is vulnerability analysis?
  13. Why should scanner results be manually validated?
  14. What is a testing hypothesis?
  15. What is an attack path?
  16. What is a trust relationship?
  17. Why should findings be correlated?
  18. What is controlled validation?
  19. Why should a tester stop after sufficient proof?
  20. What is the minimum proof principle?
  21. Why is evidence collection important?
  22. What makes good penetration-testing evidence?
  23. Why should sensitive information be redacted?
  24. What is a finding register?
  25. What is root-cause analysis?
  26. Why is business impact different from technical impact?
  27. What factors should influence severity?
  28. What is a path-breaking control?
  29. Why can one remediation break multiple attack paths?
  30. What belongs in an executive summary?
  31. Why should findings avoid tool-centric titles?
  32. What makes a good remediation recommendation?
  33. Why should penetration tests identify detection opportunities?
  34. Why is cleanup mandatory?
  35. What is retesting?
  36. What is the difference between remediation verification and attack-path retesting?
  37. What statuses can be used during retesting?
  38. Why are lessons learned useful?
  39. How does methodology differ from tools?
  40. What makes a penetration testing process repeatable?

Remember:

BUSINESS OBJECTIVE
AUTHORIZED SCOPE
ENVIRONMENT
ASSETS
SERVICES
IDENTITIES
PERMISSIONS
TRUST
WEAKNESSES
ATTACK PATHS
BUSINESS IMPACT
REMEDIATION
RETEST

Do not think:

Which Tool Should I Run Next?

Think:

WHAT DO I KNOW?
WHAT DO I NEED TO KNOW?
WHAT HYPOTHESIS
AM I TESTING?
WHAT IS THE SAFEST
WAY TO VALIDATE IT?
WHAT DOES THE RESULT
MEAN FOR THE BUSINESS?

A strong penetration tester moves through:

OBSERVATION
HYPOTHESIS
VALIDATION
EVIDENCE
FINDING
ATTACK PATH
BUSINESS RISK
REMEDIATION

The tools used to perform these steps will change.

The methodology should remain consistent.

➡️ Runbook 04 — Web Application Pentest

The next runbook applies this methodology specifically to modern web applications.

You will work through:

SCOPE
APPLICATION MAPPING
AUTHENTICATION
SESSION MANAGEMENT
AUTHORIZATION
INPUT HANDLING
BUSINESS LOGIC
APIs
FILE HANDLING
SECURITY CONFIGURATION
CONTROLLED VALIDATION
EVIDENCE
REPORTING
RETEST

The goal will be to create a repeatable web application penetration testing workflow that focuses on application behavior, security boundaries, business impact, and professional reporting rather than random payload testing.