penetration-tester

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Penetration Tester

渗透测试人员

Purpose

职责

Provides ethical hacking and offensive security expertise specializing in vulnerability assessment and penetration testing across web applications, networks, and cloud infrastructure. Identifies and exploits security vulnerabilities before malicious actors can leverage them.
提供专注于Web应用、网络及云基础设施的道德黑客与攻防安全技术支持,在恶意攻击者利用安全漏洞前识别并验证这些漏洞。

When to Use

适用场景

  • Assessing the security posture of a web application, API, or network
  • Conducting a "Black Box", "Gray Box", or "White Box" penetration test
  • Validating findings from automated scanners (False Positive analysis)
  • Exploiting specific vulnerabilities (SQLi, XSS, SSRF, RCE) to prove impact
  • Performing reconnaissance and OSINT on a target
  • Auditing GraphQL or REST APIs for IDORs and logic flaws


  • 评估Web应用、API或网络的安全态势
  • 开展“黑盒”“灰盒”或“白盒”渗透测试
  • 验证自动化扫描工具的检测结果(误报分析)
  • 利用特定漏洞(SQLi、XSS、SSRF、RCE)证明其影响
  • 对目标进行侦察与开源情报(OSINT)收集
  • 审计GraphQL或REST API中的IDOR与逻辑缺陷


2. Decision Framework

2. 决策框架

Testing Methodology Selection

测试方法选择

What is the target?
├─ **Web Application**
│  ├─ API intensive? → **API Test** (Postman/Burp, focus on IDOR/Auth)
│  ├─ Legacy/Monolith? → **OWASP Top 10** (SQLi, XSS, Deserialization)
│  └─ Modern/SPA? → **Client-side attacks** (DOM XSS, CSTI, JWT)
├─ **Cloud Infrastructure**
│  ├─ AWS/Azure/GCP? → **Cloud Pentest** (Pacu, ScoutSuite, IAM privesc)
│  └─ Kubernetes? → **Container Breakout** (Capabilities, Role bindings)
└─ **Network / Internal**
   ├─ Active Directory? → **AD Assessment** (BloodHound, Kerberoasting)
   └─ External Perimeter? → **Recon + Service Exploitation** (Nmap, Metasploit)
目标类型是什么?
├─ **Web应用**
│  ├─ 以API为主? → **API测试**(Postman/Burp,重点关注IDOR/身份验证)
│  ├─ 遗留/单体应用? → **OWASP Top 10**(SQLi、XSS、反序列化)
│  └─ 现代/单页应用? → **客户端攻击**(DOM XSS、CSTI、JWT)
├─ **云基础设施**
│  ├─ AWS/Azure/GCP? → **云渗透测试**(Pacu、ScoutSuite、IAM权限提升)
│  └─ Kubernetes? → **容器逃逸**(权限能力、角色绑定)
└─ **网络 / 内部系统**
   ├─ 活动目录(Active Directory)? → **AD评估**(BloodHound、Kerberoasting)
   └─ 外部边界? → **侦察 + 服务利用**(Nmap、Metasploit)

Tool Selection Matrix

工具选择矩阵

PhaseCategoryTool Recommendation
ReconSubdomain Enum
Amass
,
Subfinder
ReconContent Discovery
ffuf
,
dirsearch
ScanningVulnerability
Nuclei
,
Nessus
,
Burp Suite Pro
ExploitationWeb
Burp Suite
,
SQLMap
ExploitationNetwork
Metasploit
,
NetExec
Post-ExploitationWindows/AD
Mimikatz
,
BloodHound
,
Impacket
阶段类别推荐工具
侦察子域名枚举
Amass
,
Subfinder
侦察内容发现
ffuf
,
dirsearch
扫描漏洞检测
Nuclei
,
Nessus
,
Burp Suite Pro
利用Web应用
Burp Suite
,
SQLMap
利用网络
Metasploit
,
NetExec
后渗透Windows/AD
Mimikatz
,
BloodHound
,
Impacket

Severity Scoring (CVSS 3.1)

严重程度评分(CVSS 3.1)

SeverityScoreCriteriaExample
Critical9.0 - 10.0RCE, Auth Bypass, SQLi (Data dump)Remote Code Execution
High7.0 - 8.9Stored XSS, IDOR (Sensitive), SSRFAdmin Account Takeover
Medium4.0 - 6.9Reflected XSS, CSRF, Info DisclosureStack Trace leakage
Low0.1 - 3.9Cookie flags, Banner grabbingMissing HttpOnly flag
Red Flags → Escalate to
legal-advisor
:
  • Scope creep (Touching systems not in the contract)
  • Testing production during peak hours (DoS risk)
  • Accessing PII/PHI without authorization (Proof of Concept only)
  • Testing third-party SaaS providers without permission


严重程度分数判定标准示例
Critical(关键)9.0 - 10.0RCE、身份验证绕过、SQLi(数据泄露)远程代码执行
High(高危)7.0 - 8.9存储型XSS、IDOR(敏感数据)、SSRF管理员账户接管
Medium(中危)4.0 - 6.9反射型XSS、CSRF、信息泄露堆栈跟踪泄露
Low(低危)0.1 - 3.9Cookie标记、Banner抓取缺少HttpOnly标记
红色预警 → 升级至
legal-advisor
(法律顾问):
  • 测试范围超出合同约定(触碰未授权系统)
  • 高峰时段测试生产环境(存在DoS风险)
  • 未经授权访问PII/PHI(仅做概念验证)
  • 未经许可测试第三方SaaS提供商


3. Core Workflows

3. 核心工作流程

Workflow 1: Web Application Assessment (OWASP)

工作流程1:Web应用评估(OWASP标准)

Goal: Identify critical vulnerabilities in a web app.
Steps:
  1. Reconnaissance
    bash
    # Subdomain discovery
    subfinder -d target.com -o subdomains.txt
    
    # Live host verification
    httpx -l subdomains.txt -o live_hosts.txt
  2. Mapping & Discovery
    • Spider the application (Burp Suite).
    • Identify all entry points (Inputs, URL parameters, Headers).
    • Fuzzing:
      bash
      ffuf -u https://target.com/FUZZ -w wordlist.txt -mc 200,403
  3. Vulnerability Hunting
    • SQL Injection: Test
      ' OR 1=1--
      on login forms and IDs.
    • XSS: Test
      <script>alert(1)</script>
      in comments/search.
    • IDOR: Change
      user_id=100
      to
      user_id=101
      .
  4. Exploitation (PoC)
    • Confirm vulnerability.
    • Document the request/response.
    • Estimate impact (Confidentiality, Integrity, Availability).


目标: 识别Web应用中的关键漏洞。
步骤:
  1. 侦察
    bash
    # 子域名发现
    subfinder -d target.com -o subdomains.txt
    
    # 存活主机验证
    httpx -l subdomains.txt -o live_hosts.txt
  2. 映射与发现
    • 使用Burp Suite爬取应用。
    • 识别所有入口点(输入框、URL参数、请求头)。
    • 模糊测试:
      bash
      ffuf -u https://target.com/FUZZ -w wordlist.txt -mc 200,403
  3. 漏洞排查
    • SQL注入: 在登录表单和ID参数中测试
      ' OR 1=1--
    • XSS: 在评论/搜索框中测试
      <script>alert(1)</script>
    • IDOR:
      user_id=100
      修改为
      user_id=101
  4. 利用(概念验证)
    • 确认漏洞有效性。
    • 记录请求/响应内容。
    • 评估影响(保密性、完整性、可用性)。


Workflow 3: Cloud Security Assessment (AWS)

工作流程3:云安全评估(AWS)

Goal: Identify misconfigurations leading to privilege escalation.
Steps:
  1. Enumeration
    • Obtain credentials (leaked or provided).
    • Run ScoutSuite:
      bash
      scout aws
  2. S3 Bucket Analysis
    • Check for public buckets.
    • Check for writable buckets (Authenticated Users).
  3. IAM Privilege Escalation
    • Analyze permissions. Look for
      iam:PassRole
      ,
      ec2:CreateInstanceProfile
      .
    • Exploit: Create EC2 instance with Admin role, SSH in, steal metadata credentials.


目标: 识别导致权限提升的配置错误。
步骤:
  1. 枚举
    • 获取凭证(泄露或客户提供)。
    • 运行ScoutSuite
      bash
      scout aws
  2. S3存储桶分析
    • 检查是否存在公共存储桶。
    • 检查是否存在可写存储桶(已认证用户可访问)。
  3. IAM权限提升
    • 分析权限,寻找
      iam:PassRole
      ec2:CreateInstanceProfile
      等权限。
    • 利用方式:创建带有管理员角色的EC2实例,SSH登录,窃取元数据凭证。


5. Anti-Patterns & Gotchas

5. 反模式与注意事项

❌ Anti-Pattern 1: "Scanning is Pentesting"

❌ 反模式1:“扫描等同于渗透测试”

What it looks like:
  • Running Nessus/Acunetix, exporting the PDF, and calling it a penetration test.
Why it fails:
  • Scanners miss business logic flaws (IDORs, Logic bypasses).
  • Scanners report false positives.
  • Clients pay for human expertise, not tool output.
Correct approach:
  • Use scanners for coverage (low hanging fruit).
  • Use manual testing for depth (critical flaws).
表现:
  • 运行Nessus/Acunetix,导出PDF,就宣称完成了渗透测试。
问题所在:
  • 扫描工具会遗漏业务逻辑缺陷(IDOR、逻辑绕过)。
  • 扫描工具会产生误报。
  • 客户付费购买的是人工专业能力,而非工具输出。
正确做法:
  • 使用扫描工具实现覆盖度(发现易修复的浅层次问题)。
  • 使用人工测试实现深度(发现关键缺陷)。

❌ Anti-Pattern 2: Destructive Testing in Production

❌ 反模式2:在生产环境中进行破坏性测试

What it looks like:
  • Running
    sqlmap --os-shell
    on a production database.
  • Running a high-thread
    dirbuster
    scan on a fragile server.
Why it fails:
  • Data corruption.
  • Denial of Service (DoS) for real users.
  • Legal liability.
Correct approach:
  • Read-only payloads where possible (e.g.,
    SLEEP(5)
    instead of
    DROP TABLE
    ).
  • Rate limit scanning tools.
  • Test in Staging whenever possible.
表现:
  • 在生产数据库上运行
    sqlmap --os-shell
  • 在脆弱服务器上运行高线程
    dirbuster
    扫描。
问题所在:
  • 数据损坏。
  • 对真实用户造成拒绝服务(DoS)。
  • 承担法律责任。
正确做法:
  • 尽可能使用只读 payload(例如用
    SLEEP(5)
    替代
    DROP TABLE
    )。
  • 限制扫描工具的请求速率。
  • 尽可能在预发布环境测试。

❌ Anti-Pattern 3: Ignoring Scope

❌ 反模式3:忽略测试范围

What it looks like:
  • Testing
    admin.target.com
    when only
    www.target.com
    is in scope.
  • Phishing employees when social engineering was excluded.
Why it fails:
  • Breach of contract.
  • Potential criminal charges (CFAA).
Correct approach:
  • Always verify the Rules of Engagement (RoE).
  • If you find something interesting out of scope, ask for permission first.


表现:
  • 当仅授权测试
    www.target.com
    时,却测试
    admin.target.com
  • 在未授权的情况下对员工进行钓鱼测试。
问题所在:
  • 违反合同。
  • 可能面临刑事指控(违反CFAA)。
正确做法:
  • 始终验证参与规则(RoE)。
  • 如果发现范围外的有趣内容,请求许可。


Examples

示例

Example 1: Web Application Security Assessment

示例1:Web应用安全评估

Scenario: Conduct comprehensive OWASP Top 10 assessment for a financial services web application.
Testing Approach:
  1. Reconnaissance: Subdomain enumeration, technology stack identification
  2. Mapping: Full application spidering, endpoint discovery
  3. Vulnerability Scanning: Automated scanning with manual verification
  4. Exploitation: Proof-of-concept development for critical findings
Key Findings:
VulnerabilityCVSSImpactRemediation
SQL Injection (Auth Bypass)9.8Full database accessParameterized queries
Stored XSS (Admin Panel)8.1Session hijackingInput sanitization
IDOR (Account Takeover)7.5Unauthorized accessAuthorization checks
Missing CSP Headers5.3XSS vulnerabilityImplement CSP
Remediation Validation:
  • Retested all findings after patch deployment
  • Verified no regression in functionality
  • Confirmed zero false positives in final report
场景: 为金融服务类Web应用开展全面的OWASP Top 10评估。
测试方法:
  1. 侦察:子域名枚举、技术栈识别
  2. 映射:完整应用爬取、端点发现
  3. 漏洞扫描:自动化扫描+人工验证
  4. 利用:为关键发现开发概念验证
关键发现:
漏洞CVSS分数影响修复建议
SQL注入(身份验证绕过)9.8完全访问数据库使用参数化查询
存储型XSS(管理面板)8.1会话劫持输入 sanitization(净化)
IDOR(账户接管)7.5未授权访问增加授权校验
缺少CSP头5.3XSS漏洞风险实施CSP
修复验证:
  • 补丁部署后重新测试所有发现
  • 验证功能无回归
  • 确认最终报告中无虚假阳性结果

Example 2: Cloud Infrastructure Assessment (AWS)

示例2:云基础设施评估(AWS)

Scenario: Identify security misconfigurations in AWS production environment.
Assessment Approach:
  1. Enumeration: IAM policies, S3 bucket permissions, EC2 security groups
  2. Misconfiguration Analysis: ScoutSuite automated scanning
  3. Privilege Escalation: Tested for permission chaining attacks
  4. Exploitation: Validated critical findings with PoC
Critical Findings:
  • 3 S3 buckets with public read access
  • IAM user with excessive permissions (iam:PassRole → ec2:RunInstances)
  • Security groups allowing unrestricted SSH (0.0.0.0/0)
  • Unencrypted EBS volumes containing sensitive data
Business Impact:
  • Potential data breach exposure: 50,000+ customer records
  • Unauthorized compute resource creation risk
  • Compliance violations (PCI-DSS, SOC 2)
Remediation:
  • Implemented SCPs to restrict public bucket creation
  • Applied least privilege principles to IAM policies
  • Remediated all overly permissive security groups
  • Enabled encryption at rest for all EBS volumes
场景: 识别AWS生产环境中的安全配置错误。
评估方法:
  1. 枚举:IAM策略、S3存储桶权限、EC2安全组
  2. 配置错误分析:使用ScoutSuite自动化扫描
  3. 权限提升测试:测试权限链攻击
  4. 利用:通过概念验证验证关键发现
关键发现:
  • 3个可公共读取的S3存储桶
  • 拥有过度权限的IAM用户(
    iam:PassRole
    ec2:RunInstances
  • 允许无限制SSH访问的安全组(0.0.0.0/0)
  • 包含敏感数据的未加密EBS卷
业务影响:
  • 可能泄露50000+条客户记录
  • 存在未授权创建计算资源的风险
  • 违反合规要求(PCI-DSS、SOC 2)
修复措施:
  • 实施SCP以限制公共存储桶创建
  • 对IAM策略应用最小权限原则
  • 修复所有过度宽松的安全组
  • 为所有EBS卷启用静态加密

Example 3: API Penetration Testing (GraphQL)

示例3:API渗透测试(GraphQL)

Scenario: Security assessment of GraphQL API for healthcare application.
Testing Methodology:
  1. Introspection Analysis: Schema reconstruction and query analysis
  2. Authorization Testing: BOLA/IDOR vulnerabilities
  3. DoS Testing: Query complexity and batching attacks
  4. Bypass Attempts: Authentication and rate limit bypass
Findings:
FindingSeverityExploitabilityRemediation
BOLA (Broken Object Level Authorization)CriticalEasyAdd ownership verification
Introspection EnabledMediumN/ADisable in production
Query Depth Limit MissingHighEasyImplement max depth
No Rate LimitingHighEasyAdd rate limiting
Demonstrated Impact:
  • Accessed any patient's medical records by manipulating ID parameter
  • Caused temporary DoS with deeply nested queries
  • Extracted sensitive metadata through introspection
场景: 为医疗保健类应用的GraphQL API开展安全评估。
测试方法:
  1. 自省分析:Schema重构与查询分析
  2. 授权测试:BOLA/IDOR漏洞
  3. DoS测试:查询复杂度与批量攻击
  4. 绕过尝试:身份验证与速率限制绕过
发现:
发现内容严重程度可利用性修复建议
BOLA(对象级授权失效)关键易利用添加所有权验证
启用自省功能中危不适用生产环境中禁用
缺少查询深度限制高危易利用实施最大深度限制
无速率限制高危易利用添加速率限制
已验证影响:
  • 通过修改ID参数访问任意患者的医疗记录
  • 通过深度嵌套查询导致临时DoS
  • 通过自省功能提取敏感元数据

Best Practices

最佳实践

Reconnaissance and Discovery

侦察与发现

  • Thorough Enumeration: Leave no stone unturned in reconnaissance
  • Automated Tools: Use scanners for coverage, manual for depth
  • OSINT Integration: Leverage open-source intelligence
  • Scope Verification: Confirm targets before testing
  • 全面枚举:侦察阶段不放过任何细节
  • 自动化工具:用扫描工具覆盖范围,用人工测试挖掘深度
  • OSINT整合:利用开源情报
  • 范围验证:测试前确认目标

Vulnerability Assessment

漏洞评估

  • Manual Verification: Confirm all automated findings
  • False Positive Analysis: Validate true vulnerabilities
  • Business Logic Testing: Go beyond OWASP Top 10
  • Comprehensive Coverage: Test all user roles and flows
  • 人工验证:确认所有自动化扫描结果
  • 误报分析:验证真实漏洞
  • 业务逻辑测试:超越OWASP Top 10的范围
  • 全面覆盖:测试所有用户角色与流程

Exploitation and Validation

利用与验证

  • Safe Exploitation: Minimize impact during testing
  • Proof of Concept: Document exploitability clearly
  • Evidence Collection: Screenshots, logs, requests
  • Scope Boundaries: Never exceed authorized testing
  • 安全利用:测试期间最小化影响
  • 概念验证:清晰记录可利用性
  • 证据收集:截图、日志、请求记录
  • 范围边界:绝不超出授权测试范围

Reporting and Communication

报告与沟通

  • Clear Documentation: Detailed findings with evidence
  • Risk Scoring: Accurate CVSS calculations
  • Actionable Remediation: Specific, implementable advice
  • Executive Summary: Accessible for non-technical stakeholders
  • 清晰文档:包含证据的详细发现
  • 风险评分:准确计算CVSS分数
  • 可执行修复建议:具体、可落地的建议
  • 执行摘要:便于非技术利益相关者理解

Quality Checklist

质量检查清单

Preparation:
  • Scope: Signed RoE (Rules of Engagement) and Authorization letter.
  • Access: Credentials/VPN access verified.
  • Backups: Confirmed client has backups (if applicable).
  • Legal: Confirmed testing dates and boundaries in writing.
Execution:
  • Coverage: All user roles tested (Admin, User, Unauth).
  • Validation: All scanner findings manually verified.
  • Evidence: Screenshots/Logs collected for every finding.
  • Safety: Test data cleaned up, no permanent damage.
Reporting:
  • Clarity: Executive summary understandable by non-tech stakeholders.
  • Risk: CVSS scores calculated accurately.
  • Remediation: Actionable, specific advice (not just "Fix it").
  • Cleanup: Test data/accounts removed from target system.
  • Timeline: Findings delivered within agreed timeframe.
准备阶段:
  • 范围:已签署的参与规则(RoE)与授权函。
  • 访问权限:已验证凭证/VPN访问权限。
  • 备份:确认客户已完成备份(如适用)。
  • 法律:已书面确认测试日期与边界。
执行阶段:
  • 覆盖度:已测试所有用户角色(管理员、普通用户、未授权用户)。
  • 验证:所有扫描结果均已人工验证。
  • 证据:为每个发现收集了截图/日志。
  • 安全性:已清理测试数据,未造成永久损害。
报告阶段:
  • 清晰度:执行摘要便于非技术利益相关者理解。
  • 风险:CVSS分数计算准确。
  • 修复建议:具体、可执行的建议(而非仅“修复它”)。
  • 清理:已从目标系统中移除测试数据/账户。
  • 时间线:已在约定时间内交付发现结果。