Conducting Spearphishing Simulation Campaign
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.
Overview
Spearphishing simulation is a targeted social engineering attack vector used by red teams to gain initial access. Unlike broad phishing campaigns, spearphishing uses OSINT-derived intelligence to craft highly personalized messages targeting specific individuals. This skill covers developing pretexts, building payloads, setting up email infrastructure, executing the campaign, and tracking results.
When to Use
Trigger phrases:
"conducting spearphishing simulation campaign"
"Spearphishing simulation is a targeted social engineering attack vector used by "
When conducting security assessments that involve conducting spearphishing simulation campaign
When following incident response procedures for related security events
When performing scheduled security testing or auditing activities
When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Develop convincing pretexts tailored to specific target personnel
- Create weaponized payloads that bypass email security controls
- Set up email delivery infrastructure with proper SPF/DKIM/DMARC configuration
- Execute phishing campaigns with real-time tracking and metrics
- Document results for engagement reporting and security awareness improvement
MITRE ATT&CK Mapping
- T1566.001 - Phishing: Spearphishing Attachment
- T1566.002 - Phishing: Spearphishing Link
- T1566.003 - Phishing: Spearphishing via Service
- T1598.003 - Phishing for Information: Spearphishing Link
- T1204.001 - User Execution: Malicious Link
- T1204.002 - User Execution: Malicious File
- T1608.001 - Stage Capabilities: Upload Malware
- T1608.005 - Stage Capabilities: Link Target
- T1583.001 - Acquire Infrastructure: Domains
- T1585.002 - Establish Accounts: Email Accounts
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Scope and authorize — confirm written authorization and define target boundaries
- Reconnaissance — enumerate targets, services, and potential attack surfaces
- Exploitation — attempt exploitation of identified vulnerabilities within scope
- Post-exploitation — document access level, lateral movement, and data exposure
- Report and remediate — compile findings with reproduction steps and fix recommendations
Phase 1: Pretext Development
- Review OSINT findings for target personnel profiles
- Identify current organizational events (mergers, projects, new hires)
- Select pretext theme (IT helpdesk, HR benefits, vendor communication, executive request)
- Craft email templates with appropriate urgency and authority cues
- Create landing pages that mirror target organization's branding
Phase 2: Payload Development
- Select payload type based on target security controls:
- HTML smuggling for email gateway bypass
- Macro-enabled documents (if macros not blocked)
- ISO/IMG files containing LNK payloads
- OneNote files with embedded scripts
- QR codes linking to credential harvesting pages
- Test payload against target's known security stack
- Implement payload obfuscation techniques
- Configure callback to C2 infrastructure
Phase 3: Infrastructure Setup
- Register convincing look-alike domain
- Age domain and build reputation (minimum 2 weeks recommended)
- Configure SPF, DKIM, and DMARC records
- Set up SMTP relay with GoPhish or custom mail server
- Deploy credential harvesting pages with SSL certificates
- Configure tracking pixels and click tracking
Phase 4: Campaign Execution
- Send test emails to verify delivery and rendering
- Launch campaign in waves (avoid mass sending)
- Monitor email delivery rates and opens in real-time
- Track link clicks and credential submissions
- Deploy payloads to users who interact with phishing emails
- Capture screenshots and evidence for reporting
Phase 5: Post-Campaign Analysis
- Calculate campaign metrics (delivery rate, open rate, click rate, credential capture rate)
- Identify users who reported phishing to SOC
- Document bypass of email security controls
- Map successful compromises to MITRE ATT&CK
- Compile findings for engagement report
When NOT to Use
- You don't have authorization for the assessment
- Task is about implementing findings (use implementing-* skills)
- You need to analyze results (use analyzing-* skills)
- Task is about building assessment tools (use building-* skills)
- Target is out of scope
- Task requires compliance certification (use auditing-* skills)
Red Flags
- Performing actions without explicit written authorization from the asset owner
- Testing against production systems without a defined scope and rules of engagement
- Exceeding the authorized scope of the engagement
- Leaving persistent access mechanisms without explicit approval
- Causing denial-of-service on production systems during testing
Verification
- All steps executed successfully against a test environment before production use
- Output documented with screenshots or logs demonstrating expected behavior
- All exploited vulnerabilities documented with reproduction steps
- Scope boundaries confirmed — only authorized targets were tested
- Remediation recommendations included for every finding
Tools and Resources
| Tool |
Purpose |
License |
| GoPhish |
Phishing campaign management |
Open Source |
| Evilginx2 |
Real-time credential harvesting with MFA bypass |
Open Source |
| King Phisher |
Phishing campaign toolkit |
Open Source |
| SET (Social Engineering Toolkit) |
Multi-vector social engineering |
Open Source |
| Modlishka |
Reverse proxy phishing |
Open Source |
| CredSniper |
Credential harvesting framework |
Open Source |
| Fierce Phish |
Phishing framework |
Open Source |
Validation Criteria
Process
- Analyze the task requirements
- Apply domain expertise
- Verify output quality
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: conducting-spearphishing-simulation-campaign3description: Use when spearphishing simulation is a targeted social engineering attack4 vector used by red teams to gain initial access. Unlike broad phishing campaigns,5 spearphishing uses OSINT-derived intelligence to craf. Use when working with conducting6 spearphishing simulation campaign.7domain: cybersecurity8subdomain: red-teaming9tags:10- red-team11- adversary-simulation12- mitre-attack13- exploitation14- post-exploitation15- spearphishing16- social-engineering17version: '1.0'18author: oyi7719license: Apache-2.020d3fend_techniques:21- File Metadata Consistency Validation22- Application Protocol Command Analysis23- Identifier Analysis24- Content Format Conversion25- Message Analysis26nist_csf:27- ID.RA-0128- GV.OV-0229- DE.AE-0730category: cybersecurity31metadata:32 source: https://skillmd.com/skills/oyi77/conducting-spearphishing-simulation-campaign33---3435# Conducting Spearphishing Simulation Campaign363738> **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.3940## Overview4142Spearphishing simulation is a targeted social engineering attack vector used by red teams to gain initial access. Unlike broad phishing campaigns, spearphishing uses OSINT-derived intelligence to craft highly personalized messages targeting specific individuals. This skill covers developing pretexts, building payloads, setting up email infrastructure, executing the campaign, and tracking results.434445## When to Use46**Trigger phrases:**47- "conducting spearphishing simulation campaign"48- "Spearphishing simulation is a targeted social engineering attack vector used by "495051- When conducting security assessments that involve conducting spearphishing simulation campaign52- When following incident response procedures for related security events53- When performing scheduled security testing or auditing activities54- When validating security controls through hands-on testing5556## Prerequisites5758- Familiarity with red teaming concepts and tools59- Access to a test or lab environment for safe execution60- Python 3.8+ with required dependencies installed61- Appropriate authorization for any testing activities6263## Objectives6465- Develop convincing pretexts tailored to specific target personnel66- Create weaponized payloads that bypass email security controls67- Set up email delivery infrastructure with proper SPF/DKIM/DMARC configuration68- Execute phishing campaigns with real-time tracking and metrics69- Document results for engagement reporting and security awareness improvement7071## MITRE ATT&CK Mapping7273- **T1566.001** - Phishing: Spearphishing Attachment74- **T1566.002** - Phishing: Spearphishing Link75- **T1566.003** - Phishing: Spearphishing via Service76- **T1598.003** - Phishing for Information: Spearphishing Link77- **T1204.001** - User Execution: Malicious Link78- **T1204.002** - User Execution: Malicious File79- **T1608.001** - Stage Capabilities: Upload Malware80- **T1608.005** - Stage Capabilities: Link Target81- **T1583.001** - Acquire Infrastructure: Domains82- **T1585.002** - Establish Accounts: Email Accounts8384## Workflow8586```python87# Example: IOC detection88import re8990IOC_PATTERNS = {91 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",92 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",93 "hash_md5": r"\b[a-f0-9]{32}\b",94 "hash_sha256": r"\b[a-f0-9]{64}\b",95}9697def extract_iocs(text: str) -> dict:98 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}99```1001011. **Scope and authorize** — confirm written authorization and define target boundaries1022. **Reconnaissance** — enumerate targets, services, and potential attack surfaces1033. **Exploitation** — attempt exploitation of identified vulnerabilities within scope1044. **Post-exploitation** — document access level, lateral movement, and data exposure1055. **Report and remediate** — compile findings with reproduction steps and fix recommendations106### Phase 1: Pretext Development1071. Review OSINT findings for target personnel profiles1082. Identify current organizational events (mergers, projects, new hires)1093. Select pretext theme (IT helpdesk, HR benefits, vendor communication, executive request)1104. Craft email templates with appropriate urgency and authority cues1115. Create landing pages that mirror target organization's branding112113### Phase 2: Payload Development1141. Select payload type based on target security controls:115 - HTML smuggling for email gateway bypass116 - Macro-enabled documents (if macros not blocked)117 - ISO/IMG files containing LNK payloads118 - OneNote files with embedded scripts119 - QR codes linking to credential harvesting pages1202. Test payload against target's known security stack1213. Implement payload obfuscation techniques1224. Configure callback to C2 infrastructure123124### Phase 3: Infrastructure Setup1251. Register convincing look-alike domain1262. Age domain and build reputation (minimum 2 weeks recommended)1273. Configure SPF, DKIM, and DMARC records1284. Set up SMTP relay with GoPhish or custom mail server1295. Deploy credential harvesting pages with SSL certificates1306. Configure tracking pixels and click tracking131132### Phase 4: Campaign Execution1331. Send test emails to verify delivery and rendering1342. Launch campaign in waves (avoid mass sending)1353. Monitor email delivery rates and opens in real-time1364. Track link clicks and credential submissions1375. Deploy payloads to users who interact with phishing emails1386. Capture screenshots and evidence for reporting139140### Phase 5: Post-Campaign Analysis1411. Calculate campaign metrics (delivery rate, open rate, click rate, credential capture rate)1422. Identify users who reported phishing to SOC1433. Document bypass of email security controls1444. Map successful compromises to MITRE ATT&CK1455. Compile findings for engagement report146147## When NOT to Use148149- You don't have authorization for the assessment150- Task is about implementing findings (use implementing-* skills)151- You need to analyze results (use analyzing-* skills)152- Task is about building assessment tools (use building-* skills)153- Target is out of scope154- Task requires compliance certification (use auditing-* skills)155156157## Red Flags158159- Performing actions without explicit written authorization from the asset owner160- Testing against production systems without a defined scope and rules of engagement161- Exceeding the authorized scope of the engagement162- Leaving persistent access mechanisms without explicit approval163- Causing denial-of-service on production systems during testing164165## Verification166167- All steps executed successfully against a test environment before production use168- Output documented with screenshots or logs demonstrating expected behavior169- All exploited vulnerabilities documented with reproduction steps170- Scope boundaries confirmed — only authorized targets were tested171- Remediation recommendations included for every finding172173## Tools and Resources174175| Tool | Purpose | License |176|------|---------|---------|177| GoPhish | Phishing campaign management | Open Source |178| Evilginx2 | Real-time credential harvesting with MFA bypass | Open Source |179| King Phisher | Phishing campaign toolkit | Open Source |180| SET (Social Engineering Toolkit) | Multi-vector social engineering | Open Source |181| Modlishka | Reverse proxy phishing | Open Source |182| CredSniper | Credential harvesting framework | Open Source |183| Fierce Phish | Phishing framework | Open Source |184185## Validation Criteria186187- [ ] Pretext tailored to specific targets with OSINT data188- [ ] Payload tested against email security controls189- [ ] Infrastructure configured with proper email authentication190- [ ] Campaign tracked with delivery and interaction metrics191- [ ] Evidence collected for engagement report192- [ ] Cleanup performed on infrastructure post-campaign193194## Process1951961. Analyze the task requirements1972. Apply domain expertise1983. Verify output quality199200## Anti-Rationalization Table201202| Rationalization | Reality |203|---|---|204| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |205| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |206| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |