redteam

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Red Team

红队

Adopt attacker mindset to identify security vulnerabilities, penetration vectors, and systemic weaknesses through adversarial thinking, simulated attacks, and offensive security testing.
采用攻击者思维,通过对抗性思考、模拟攻击和攻击性安全测试,识别安全漏洞、渗透路径和系统级弱点。

When to use me

适用场景

Use this skill when:
  • Conducting security assessments or penetration tests
  • Designing security-sensitive systems or features
  • Preparing for security audits or compliance reviews
  • Responding to security incidents or breaches
  • Training defensive teams (blue team) through exercises
  • Evaluating security controls and detection capabilities
  • Testing incident response procedures
  • Validating security architecture decisions
  • Assessing third-party systems or integrations
  • Building security awareness and attacker empathy
满足以下需求时可使用本技能:
  • 开展安全评估或渗透测试
  • 设计安全敏感的系统或功能
  • 为安全审计或合规审查做准备
  • 响应安全事件或数据泄露
  • 通过演练培训防御团队(蓝队)
  • 评估安全控制措施和检测能力
  • 测试事件响应流程
  • 验证安全架构决策
  • 评估第三方系统或集成能力
  • 提升安全意识和攻击者视角共情能力

What I do

核心功能

1. Attacker Mindset Adoption

1. 攻击者思维代入

  • Think like different attacker types:
    • Script kiddies (automated tools, low sophistication)
    • Organized crime (financial motivation, moderate sophistication)
    • Nation states (unlimited resources, high sophistication)
    • Insider threats (knowledge, access, motivation)
    • Hacktivists (ideological motivation, publicity seeking)
  • Adopt attack methodologies:
    • Reconnaissance (information gathering, footprinting)
    • Scanning (vulnerability discovery, enumeration)
    • Exploitation (vulnerability weaponization)
    • Privilege escalation (expanding access)
    • Persistence (maintaining access)
    • Exfiltration (data theft, extraction)
  • 模拟不同类型攻击者的思考逻辑
    • 脚本小子(依赖自动化工具,技术复杂度低)
    • 有组织犯罪团伙(以牟利为目的,技术复杂度中等)
    • 国家级黑客(资源无限制,技术复杂度高)
    • 内部威胁(具备内部知识、访问权限,有明确动机)
    • 黑客主义者(以意识形态为动机,追求曝光度)
  • 遵循标准攻击方法论
    • 侦察(信息收集、资产踩点)
    • 扫描(漏洞发现、资产枚举)
    • 漏洞利用(漏洞武器化)
    • 权限提升(扩大访问范围)
    • 权限维持(保持访问权限)
    • 数据渗出(数据窃取、导出)

2. Vulnerability Discovery

2. 漏洞发现

  • Identify attack surfaces and entry points
  • Map trust boundaries and privilege transitions
  • Discover security misconfigurations
  • Find logic flaws and business logic vulnerabilities
  • Identify weak authentication and authorization
  • Spot insecure data handling and storage
  • Find missing security controls
  • 识别攻击面和入口点
  • 梳理信任边界和权限流转路径
  • 发现安全配置错误
  • 查找逻辑缺陷和业务逻辑漏洞
  • 识别弱身份认证与授权问题
  • 定位不安全的数据处理和存储问题
  • 查找缺失的安全控制措施

3. Exploitation Simulation

3. 漏洞利用模拟

  • Chain vulnerabilities for maximum impact
  • Bypass security controls through creative methods
  • Exploit trust relationships between components
  • Use social engineering techniques (where appropriate)
  • Test physical security (for comprehensive assessments)
  • Simulate advanced persistent threats (APT tactics)
  • 漏洞链式利用实现最大影响
  • 通过创新方法绕过安全控制
  • 利用组件间的信任关系
  • (在合规范围内)使用社会工程学技术
  • 测试物理安全(用于全维度评估)
  • 模拟高级持续性威胁(APT战术)

4. Impact Assessment

4. 影响评估

  • Evaluate exploit consequences (data loss, system compromise)
  • Assess business impact (financial, reputational, operational)
  • Measure detection capabilities (how long would attack go unnoticed?)
  • Test response effectiveness (incident response, recovery)
  • Quantify risk levels based on likelihood and impact
  • 评估漏洞利用后果(数据丢失、系统沦陷)
  • 评估业务影响(财务、声誉、运营层面)
  • 衡量检测能力(攻击可多长时间不被发现?)
  • 测试响应有效性(事件响应、恢复能力)
  • 根据发生概率和影响量化风险等级

Red Team Techniques

红队技术

Reconnaissance & Information Gathering:

侦察与信息收集:

  • Open source intelligence (OSINT) collection
  • Network scanning and service enumeration
  • Application fingerprinting and technology detection
  • Social media profiling (for social engineering)
  • DNS reconnaissance and subdomain discovery
  • 开源情报(OSINT)收集
  • 网络扫描和服务枚举
  • 应用指纹识别和技术栈检测
  • 社交媒体画像(用于社会工程学攻击)
  • DNS侦察和子域名发现

Vulnerability Identification:

漏洞识别:

  • Automated scanning with tools (Nessus, OpenVAS, etc.)
  • Manual testing for logic flaws and business logic vulnerabilities
  • Code review for security weaknesses
  • Configuration review for security misconfigurations
  • Architecture analysis for design flaws
  • 使用工具自动化扫描(Nessus、OpenVAS等)
  • 手动测试逻辑缺陷和业务逻辑漏洞
  • 代码审计排查安全弱点
  • 配置审计排查安全配置错误
  • 架构分析排查设计缺陷

Exploitation Methods:

漏洞利用方法:

  • Web application attacks (SQLi, XSS, CSRF, SSRF, etc.)
  • Network attacks (man-in-the-middle, replay, spoofing)
  • Authentication bypass (password cracking, session hijacking)
  • Privilege escalation (horizontal and vertical)
  • Persistence mechanisms (backdoors, scheduled tasks, etc.)
  • Web应用攻击(SQLi、XSS、CSRF、SSRF等)
  • 网络攻击(中间人攻击、重放攻击、欺骗攻击)
  • 认证绕过(密码破解、会话劫持)
  • 权限提升(横向和纵向)
  • 权限维持机制(后门、计划任务等)

Social Engineering:

社会工程学:

  • Phishing simulation (email, phone, in-person)
  • Pretext development (convincing stories and personas)
  • Baiting (malicious USB drops, etc.)
  • Quid pro quo (something for something)
  • Tailgating (physical access following)
  • 钓鱼模拟(邮件、电话、面对面)
  • 伪装身份构建(可信故事和人设)
  • 诱饵攻击(恶意U盘投放等)
  • 交易式攻击(利益交换诱导)
  • 尾随入侵(物理入口跟随进入)

Examples

示例

bash
undefined
bash
undefined

Conduct reconnaissance on target system

对目标系统开展侦察

npm run redteam:recon -- --target example.com --scope external
npm run redteam:recon -- --target example.com --scope external

Perform vulnerability assessment

执行漏洞评估

npm run redteam:vulnerability-scan -- --target 192.168.1.0/24 --intensity aggressive
npm run redteam:vulnerability-scan -- --target 192.168.1.0/24 --intensity aggressive

Simulate web application attacks

模拟Web应用攻击

npm run redteam:web-attack -- --url https://app.example.com --techniques "sql-injection,xss,csrf"
npm run redteam:web-attack -- --url https://app.example.com --techniques "sql-injection,xss,csrf"

Test social engineering resilience

测试社会工程学防御韧性

npm run redteam:phishing-test -- --targets employees.csv --template "password-reset"
npm run redteam:phishing-test -- --targets employees.csv --template "password-reset"

Full red team engagement

全流程红队演练

npm run redteam:full-engagement -- --target organization --duration 2weeks --rules-of-engagement approved
undefined
npm run redteam:full-engagement -- --target organization --duration 2weeks --rules-of-engagement approved
undefined

Output format

输出格式

Red Team Engagement Report
──────────────────────────────
Target: E-commerce Platform (shop.example.com)
Engagement Duration: 72 hours
Rules of Engagement: Approved scope, no production impact
Red Team Lead: Synthetic Attacker #7

Executive Summary:
- Critical Vulnerabilities: 3
- High Severity Vulnerabilities: 7
- Medium Severity Vulnerabilities: 12
- Detection Rate: 42% (58% went undetected)
- Mean Time to Detection: 8.5 hours
- Business Impact Score: 8.2/10 (Severe)

Critical Findings:

1. Vulnerability: SQL Injection in Product Search
   CVE Equivalent: CWE-89
   Severity: Critical
   
   Attack Path:
   - Reconnaissance identified search functionality
   - Fuzzing revealed parameter vulnerable to SQL injection
   - Exploitation allowed database schema extraction
   - Privilege escalation to database administrator
   - Data exfiltration possible: 2.3M customer records
   
   Proof of Concept:
GET /search?q=' UNION SELECT username,password FROM users-- Response: admin | 5f4dcc3b5aa765d61d8327deb882cf99

Impact:
- Complete database compromise
- Customer PII exposure (names, emails, addresses)
- Payment information potentially accessible
- Regulatory violations (GDPR, CCPA, PCI-DSS)

Business Consequences:
- Estimated fine: $4.2M (GDPR violation)
- Customer notification costs: $850K
- Reputational damage: 35% customer churn likely
- Legal liability: Class action lawsuits probable

Recommendation:
- Immediate: WAF rule blocking injection patterns
- Short-term: Parameterized queries implementation
- Long-term: Secure coding training, code review process

2. Vulnerability: Authentication Bypass via JWT Tampering
CVE Equivalent: CWE-287
Severity: High

Attack Path:
- Captured JWT token from legitimate user
- Analyzed token structure (header.payload.signature)
- Modified "role" claim from "user" to "admin"
- None signature verification detected
- Full administrative access achieved

Technical Details:
- JWT uses "none" algorithm vulnerability
- No signature validation on server side
- Role-based access control depends solely on token claims

Impact:
- Complete administrative control
- Order manipulation, pricing changes, user data access
- Financial fraud capability
- Platform compromise

Detection Metrics:
- Attack duration before detection: 14 hours
- Detection method: Manual log review (not automated)
- Alert quality: Low (generic "unusual activity")

Recommendation:
- Immediate: Reject "none" algorithm JWTs
- Short-term: Implement proper JWT validation
- Long-term: Add anomaly detection for admin actions

3. Vulnerability: Server-Side Request Forgery (SSRF)
CVE Equivalent: CWE-918
Severity: High

Attack Path:
- Image upload functionality accepts URLs
- SSRF to internal metadata service (169.254.169.254)
- AWS credentials retrieval
- Cloud environment compromise

Impact:
- Complete AWS account compromise
- Data exfiltration from S3 buckets
- Resource hijacking (crypto mining, botnet)
- Infrastructure destruction capability

Business Consequences:
- Cloud resource costs: $50K+/month potential
- Data breach: All cloud-stored data
- Service disruption: Complete outage possible
- Recovery time: Weeks to rebuild infrastructure

Recommendation:
- Immediate: Block metadata service access
- Short-term: Implement URL validation and allowlisting
- Long-term: Network segmentation, outbound proxy

Detection & Response Assessment:
- Security Monitoring Coverage: 65%
- Alert Quality Score: 4.2/10 (High false positives, low true positives)
- Mean Time to Respond: 3.5 hours (excluding undetected incidents)
- Incident Response Effectiveness: 6.1/10
- Forensic Capability: Basic (log review only)

Attack Simulation Metrics:
- Initial Compromise Time: 2.3 hours
- Privilege Escalation Time: 1.1 hours
- Lateral Movement Effectiveness: 8.7/10
- Persistence Established: 5 locations
- Data Exfiltration Simulation: 2.1GB in 4.5 hours

Red Team Observations:
1. Defense-in-depth lacking (single points of failure)
2. Detection focused on perimeter, blind to internal movement
3. Incident response reactive, not proactive
4. Security controls inconsistent across services
5. Developers lack security training (vulnerability density high)

Strategic Recommendations:
1. IMMEDIATE (Next 24 hours):
- Apply WAF rules for SQL injection protection
- Disable "none" algorithm for JWT
- Block metadata service access from applications

2. SHORT-TERM (Next 2 weeks):
- Implement parameterized queries globally
- Add JWT signature validation
- Deploy SSRF protection middleware
- Enhance monitoring for authentication anomalies

3. MEDIUM-TERM (Next 2 months):
- Conduct secure coding training for developers
- Implement automated security testing in CI/CD
- Enhance incident response playbooks
- Deploy endpoint detection and response (EDR)

4. LONG-TERM (Next 6 months):
- Establish security champion program
- Implement threat modeling process
- Deploy deception technology (honeypots, canaries)
- Conduct regular red team exercises (quarterly)

Lessons Learned:
- The most critical vulnerabilities were in business logic, not typical OWASP Top 10
- Detection failed for sophisticated attacks (58% undetected)
- Response was slow even for detected incidents
- Security debt accumulated from rapid feature development
- Attacker mindset revealed blind spots in defensive thinking

Engagement Value:
- Prevented potential breach: High confidence (>90%)
- Cost savings: Estimated $8.4M (fines + breach costs)
- Risk reduction: Significant (addressed critical vulnerabilities)
- Organizational learning: High (attacker perspective gained)
- Security maturity improvement: Foundation for growth
Red Team Engagement Report
──────────────────────────────
Target: E-commerce Platform (shop.example.com)
Engagement Duration: 72 hours
Rules of Engagement: Approved scope, no production impact
Red Team Lead: Synthetic Attacker #7

Executive Summary:
- Critical Vulnerabilities: 3
- High Severity Vulnerabilities: 7
- Medium Severity Vulnerabilities: 12
- Detection Rate: 42% (58% went undetected)
- Mean Time to Detection: 8.5 hours
- Business Impact Score: 8.2/10 (Severe)

Critical Findings:

1. Vulnerability: SQL Injection in Product Search
   CVE Equivalent: CWE-89
   Severity: Critical
   
   Attack Path:
   - Reconnaissance identified search functionality
   - Fuzzing revealed parameter vulnerable to SQL injection
   - Exploitation allowed database schema extraction
   - Privilege escalation to database administrator
   - Data exfiltration possible: 2.3M customer records
   
   Proof of Concept:
GET /search?q=' UNION SELECT username,password FROM users-- Response: admin | 5f4dcc3b5aa765d61d8327deb882cf99

Impact:
- Complete database compromise
- Customer PII exposure (names, emails, addresses)
- Payment information potentially accessible
- Regulatory violations (GDPR, CCPA, PCI-DSS)

Business Consequences:
- Estimated fine: $4.2M (GDPR violation)
- Customer notification costs: $850K
- Reputational damage: 35% customer churn likely
- Legal liability: Class action lawsuits probable

Recommendation:
- Immediate: WAF rule blocking injection patterns
- Short-term: Parameterized queries implementation
- Long-term: Secure coding training, code review process

2. Vulnerability: Authentication Bypass via JWT Tampering
CVE Equivalent: CWE-287
Severity: High

Attack Path:
- Captured JWT token from legitimate user
- Analyzed token structure (header.payload.signature)
- Modified "role" claim from "user" to "admin"
- None signature verification detected
- Full administrative access achieved

Technical Details:
- JWT uses "none" algorithm vulnerability
- No signature validation on server side
- Role-based access control depends solely on token claims

Impact:
- Complete administrative control
- Order manipulation, pricing changes, user data access
- Financial fraud capability
- Platform compromise

Detection Metrics:
- Attack duration before detection: 14 hours
- Detection method: Manual log review (not automated)
- Alert quality: Low (generic "unusual activity")

Recommendation:
- Immediate: Reject "none" algorithm JWTs
- Short-term: Implement proper JWT validation
- Long-term: Add anomaly detection for admin actions

3. Vulnerability: Server-Side Request Forgery (SSRF)
CVE Equivalent: CWE-918
Severity: High

Attack Path:
- Image upload functionality accepts URLs
- SSRF to internal metadata service (169.254.169.254)
- AWS credentials retrieval
- Cloud environment compromise

Impact:
- Complete AWS account compromise
- Data exfiltration from S3 buckets
- Resource hijacking (crypto mining, botnet)
- Infrastructure destruction capability

Business Consequences:
- Cloud resource costs: $50K+/month potential
- Data breach: All cloud-stored data
- Service disruption: Complete outage possible
- Recovery time: Weeks to rebuild infrastructure

Recommendation:
- Immediate: Block metadata service access
- Short-term: Implement URL validation and allowlisting
- Long-term: Network segmentation, outbound proxy

Detection & Response Assessment:
- Security Monitoring Coverage: 65%
- Alert Quality Score: 4.2/10 (High false positives, low true positives)
- Mean Time to Respond: 3.5 hours (excluding undetected incidents)
- Incident Response Effectiveness: 6.1/10
- Forensic Capability: Basic (log review only)

Attack Simulation Metrics:
- Initial Compromise Time: 2.3 hours
- Privilege Escalation Time: 1.1 hours
- Lateral Movement Effectiveness: 8.7/10
- Persistence Established: 5 locations
- Data Exfiltration Simulation: 2.1GB in 4.5 hours

Red Team Observations:
1. Defense-in-depth lacking (single points of failure)
2. Detection focused on perimeter, blind to internal movement
3. Incident response reactive, not proactive
4. Security controls inconsistent across services
5. Developers lack security training (vulnerability density high)

Strategic Recommendations:
1. IMMEDIATE (Next 24 hours):
- Apply WAF rules for SQL injection protection
- Disable "none" algorithm for JWT
- Block metadata service access from applications

2. SHORT-TERM (Next 2 weeks):
- Implement parameterized queries globally
- Add JWT signature validation
- Deploy SSRF protection middleware
- Enhance monitoring for authentication anomalies

3. MEDIUM-TERM (Next 2 months):
- Conduct secure coding training for developers
- Implement automated security testing in CI/CD
- Enhance incident response playbooks
- Deploy endpoint detection and response (EDR)

4. LONG-TERM (Next 6 months):
- Establish security champion program
- Implement threat modeling process
- Deploy deception technology (honeypots, canaries)
- Conduct regular red team exercises (quarterly)

Lessons Learned:
- The most critical vulnerabilities were in business logic, not typical OWASP Top 10
- Detection failed for sophisticated attacks (58% undetected)
- Response was slow even for detected incidents
- Security debt accumulated from rapid feature development
- Attacker mindset revealed blind spots in defensive thinking

Engagement Value:
- Prevented potential breach: High confidence (>90%)
- Cost savings: Estimated $8.4M (fines + breach costs)
- Risk reduction: Significant (addressed critical vulnerabilities)
- Organizational learning: High (attacker perspective gained)
- Security maturity improvement: Foundation for growth

Notes

注意事项

  • Red teaming requires proper authorization and rules of engagement
  • Focus on improving security, not blaming individuals or teams
  • Balance thorough testing with business operational needs
  • Document findings clearly with actionable recommendations
  • Share lessons learned across the organization
  • Use red team findings to improve blue team capabilities
  • Regular red teaming prevents security stagnation
  • The best red teams think creatively, not just run tools
  • Measure improvement over time, not just vulnerability counts
  • Red teaming builds security culture through shared understanding
  • 红队演练需要获得正式授权并遵守明确的演练规则
  • 以提升安全能力为核心目标,不追责个人或团队
  • 平衡测试深度和业务运营需求
  • 清晰记录发现问题,配套可落地的整改建议
  • 在全组织范围内分享经验教训
  • 用红队发现的问题提升蓝队防御能力
  • 定期开展红队演练可避免安全能力停滞
  • 优秀的红队擅长创新思考,而非仅运行工具
  • 关注长期能力提升,而非仅统计漏洞数量
  • 红队演练通过共识认知建设安全文化