Executing red team exercise

From AgentFlocks/flocks · View interactive version

Executing red team exercise is an AI agent skill from the GitHub repository AgentFlocks/flocks. Executes comprehensive red team exercises that simulate real-world adversary operations against an organization''s people, processes, and technology. The red team operates with stealth as a primary objective, employing the full attack lifecycle from initial reconnaissance through objective completio

How to use this skill

Skill file

Executing Red Team Exercise

When to Use

Do not use without executive-level authorization and a detailed Rules of Engagement document, against systems where disruption could affect safety or critical operations, or as a replacement for basic vulnerability management (fix known vulnerabilities first).

Prerequisites

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Adversary Emulation Planning

Develop the operation plan based on a realistic threat model:

1. Initial Access (TA0001): Phishing, exploiting public-facing applications, or supply chain compromise

2. Execution (TA0002): PowerShell, scripting, exploitation for client execution

3. Persistence (TA0003): Scheduled tasks, registry modifications, implant deployment

4. Privilege Escalation (TA0004): Token impersonation, exploitation for privilege escalation

5. Defense Evasion (TA0005): Process injection, timestomping, indicator removal

6. Credential Access (TA0006): LSASS dumping, Kerberoasting, credential stuffing

7. Lateral Movement (TA0008): Remote services, pass-the-hash, remote desktop

8. Collection/Exfiltration (TA0009/TA0010): Data staging, exfiltration over C2

Step 2: Infrastructure Preparation

Build OPSEC-hardened attack infrastructure:

Step 3: Initial Access

Gain initial foothold in the target environment:

Step 4: Post-Exploitation and Objective Completion

Operate within the target environment while maintaining stealth:

Step 5: Purple Team Integration and Reporting

Convert red team findings into defensive improvements:

Key Concepts

| Term | Definition |

|------|------------|

| Adversary Emulation | Simulating the specific TTPs of a known threat actor to test defenses against realistic threats relevant to the organization |

| C2 (Command and Control) | Infrastructure and communication channels used by the red team to remotely control implants deployed on compromised systems |

| OPSEC | Operational Security; practices employed by the red team to avoid detection by the defending team during the exercise |

| Domain Fronting | A technique for hiding C2 traffic behind legitimate CDN domains to evade network-based detection and domain blocking |

| Purple Teaming | Collaborative exercise where red and blue teams work together to improve detection by sharing attack techniques and defensive gaps |

| White Cell | The trusted agent or exercise control group that manages the exercise, handles deconfliction, and mediates between red and blue teams |

| Implant | Software deployed by the red team on compromised systems to maintain access, execute commands, and facilitate lateral movement |

| MTTD/MTTR | Mean Time to Detect / Mean Time to Respond; metrics measuring how long it takes the defending team to identify and contain threats |

Tools & Systems

Common Scenarios

Scenario: Adversary Emulation of FIN7 Against a Retail Company

Context: A national retail chain wants to test its defenses against FIN7, a financially motivated threat group known for targeting retail and hospitality organizations with point-of-sale malware, phishing, and data exfiltration.

Approach:

  1. Emulate FIN7 TTPs: spear-phishing with malicious document containing VBA macros that execute PowerShell
  2. Initial access achieved through spear-phishing a marketing employee; macro drops Cobalt Strike beacon using rundll32 proxy execution
  3. Internal reconnaissance with BloodHound reveals a path from the compromised user to a service account with access to the POS management server
  4. Kerberoast the service account, crack the password, and move laterally to the POS management system
  5. Demonstrate data access to cardholder data environment, staging simulated card data for exfiltration
  6. Exfiltrate staged data over DNS C2 channel to simulate data theft
  7. SOC detected the lateral movement at hour 47 but did not detect the initial phishing, macro execution, or Kerberoasting

Pitfalls:

Output Format

## Red Team Exercise Report - FIN7 Adversary Emulation

### Exercise Summary
**Duration**: November 4-22, 2025 (15 business days)
**Objective**: Access cardholder data environment and demonstrate data exfiltration capability
**Outcome**: OBJECTIVE ACHIEVED - Red team accessed POS management system and staged cardholder data for exfiltration

### ATT&CK Technique Coverage
| Technique | ID | Status | Detected? | MTTD |
|-----------|----|--------|-----------|------|
| Spear-Phishing Attachment | T1566.001 | Executed | No | - |
| Visual Basic Macro | T1059.005 | Executed | No | - |
| Process Injection | T1055 | Executed | No | - |
| Kerberoasting | T1558.003 | Executed | No | - |
| Remote Desktop Protocol | T1021.001 | Executed | YES | 47h |
| Data Staged | T1074 | Executed | No | - |
| Exfiltration Over C2 | T1041 | Executed | No | - |

### Detection Summary
- **Techniques Executed**: 14
- **Techniques Detected**: 3 (21.4%)
- **Mean Time to Detect**: 47 hours (for detected techniques)
- **Mean Time to Respond**: 4 hours (from detection to containment)

### Priority Recommendations
1. Deploy email detonation sandboxing for macro-enabled document analysis
2. Implement Kerberoasting detection via Windows Event ID 4769 monitoring
3. Enhance PowerShell logging (Script Block Logging, Module Logging)
4. Deploy memory-scanning EDR capability to detect process injection
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.