How AI supercharges the oldest attack vector in cybersecurity — and how defenders can keep up.
Social engineering and phishing techniques are demonstrated for authorized red team engagements and CTF competitions ONLY. Phishing real individuals without explicit authorization is illegal and causes real harm. All examples use fictional targets.
Technical defenses have improved dramatically. Humans have not.
You don't hack the system. You hack the person who has access to the system.
Robert Cialdini identified six principles that drive human compliance. Social engineers weaponize all of them.
| Principle | Description | Phishing Example |
|---|---|---|
| Authority | We obey figures of authority | "CEO requests urgent wire transfer" |
| Urgency / Scarcity | Fear of missing out or consequences | "Account suspended — verify in 24h" |
| Reciprocity | We feel obligated to return favors | "Here's the report you asked for" (with payload) |
| Social Proof | We follow what others are doing | "Your colleagues have already updated their info" |
| Liking | We comply with people we like | Friendly, personalized tone from a "coworker" |
| Commitment | We honor prior agreements | "As discussed on our call last Tuesday..." |
Authority is the most powerful lever in business email compromise (BEC). Targets rarely question a message that appears to come from leadership.
Before LLMs, phishing had telltale signs: broken grammar, generic greetings, implausible scenarios. AI eliminates all of them.
An attacker provides context; the LLM generates a polished, believable message. The workflow is simple.
# Example: Generating a pretext with an LLM (educational demonstration)
prompt = """
Write a professional email from Sarah Chen, VP of Engineering at Nexus Corp,
to a new developer named Alex Rivera. The email should:
- Welcome them to the team
- Ask them to complete mandatory security training
- Include a link to the 'training portal' (use placeholder URL)
- Sound warm but corporate
"""
# The LLM produces a perfectly crafted, contextually appropriate email
# that is nearly impossible to distinguish from legitimate corporate mail
Below is a fictional example of what an AI-assisted phishing email might look like targeting a new employee at a fictional company.
From: Sarah Chen <s.chen@nexus-corp.com>
To: Alex Rivera <a.rivera@nexus-corp.com>
Subject: Welcome aboard! Action required: Security training
Hi Alex,
Welcome to the Nexus Corp engineering team! We're excited to have you on board.
As part of onboarding, all new engineers need to complete our mandatory security awareness training before EOD Friday. It only takes about 20 minutes.
Please sign in with your corporate credentials here:
https://nexus-corp-training.com/onboard [MALICIOUS - lookalike domain]
Let me know if you run into any issues. Looking forward to our 1:1 on Thursday!
Best,
Sarah Chen
VP of Engineering | Nexus Corp
Principles used: Authority (VP), urgency (EOD Friday), commitment (1:1 reference), liking (warm tone).
OSINT transforms generic phishing into surgical spear phishing. AI accelerates the reconnaissance-to-attack pipeline.
| Source | Intelligence Gathered | Attack Use |
|---|---|---|
| Job titles, reporting chain, tenure | Impersonate manager, reference role | |
| Company blog | Projects, launches, team names | Reference real initiatives in pretext |
| GitHub/GitLab | Tech stack, commit history, collaborators | Craft developer-specific lures |
| Social media | Interests, travel, life events | Build rapport, personalize tone |
| SEC filings / press | M&A activity, leadership changes | BEC pretexts around transitions |
| Job postings | Tools used, team structure, pain points | Pose as vendor for listed tools |
AI automates what used to be a manual, hours-long process for each target.
# Fictional demonstration of an OSINT-to-phishing pipeline
target_profile = {
"name": "Jordan Blake",
"role": "Senior DevOps Engineer",
"company": "Fictional Acme Systems",
"manager": "Pat Morgan (Director of Infrastructure)",
"tech_stack": ["Kubernetes", "Terraform", "AWS"],
"recent_activity": "Presented at KubeCon 2025 on cluster autoscaling",
"linkedin_connections": ["DevOps Weekly newsletter", "HashiCorp community"]
}
# AI generates a personalized phishing email
pretext = f"""
From: Pat Morgan <p.morgan@acme-sys.com>
Subject: KubeCon follow-up — Terraform module review
Hey {target_profile['name'].split()[0]},
Great presentation at KubeCon! I shared the slides with the team.
Quick ask: Can you review the updated Terraform modules before our
Friday deployment? I uploaded them to our new internal portal:
https://acme-infra-portal.com/terraform-review [CREDENTIAL HARVESTER]
Use your SSO credentials to access. Need your sign-off by Thursday.
Thanks,
Pat
"""
Every detail — the conference, the tech stack, the manager's name — came from publicly available information.
Voice phishing (vishing) has been transformed by AI voice cloning. A few seconds of audio can now generate a convincing voice replica.
In 2024, a finance worker in Hong Kong transferred $25 million after a video call with deepfake versions of the company's CFO and other executives. The entire call was AI-generated.
SMS phishing (smishing) exploits the inherent trust people place in text messages and the limited UI of mobile devices.
[Acme IT] Jordan, your VPN certificate expires today. Renew now to avoid losing access: https://acme-vpn-renew.co/cert [malicious]
[Package Update] Your delivery from the AWS re:Invent merch store needs address confirmation: https://shipping-confirm.co/track [malicious]
AI tailors SMS content based on OSINT — referencing real tools, events, or services the target uses.
Convincing phishing requires infrastructure that looks legitimate. Domain selection is the first critical step.
| Technique | Example | Detection Difficulty |
|---|---|---|
| Typosquatting | nexus-c0rp.com (zero for 'o') | Medium |
| Homograph attack | nexus-corp.com using Cyrillic 'o' | High |
| Subdomain abuse | nexus-corp.login.attacker.com | Low-Medium |
| Lookalike TLD | nexus-corp.co (instead of .com) | Medium |
| Compromised domain | Hijacked legitimate domain | Very High |
| Cloud hosting | nexus-corp-sso.azurewebsites.net | High |
# Tools for generating lookalike domains (authorized testing only)
# dnstwist — finds permutations of a target domain
dnstwist --registered nexus-corp.com
# urlcrazy — generates typo variations
urlcrazy nexus-corp.com
The landing page must be a pixel-perfect replica of the legitimate login portal. AI and modern tools make this trivial.
<!-- FICTIONAL EXAMPLE — for educational/CTF use only -->
<!DOCTYPE html>
<html>
<head>
<title>Nexus Corp - SSO Login</title>
<style>
body { font-family: Arial; background: #f5f5f5; display: flex;
justify-content: center; align-items: center; height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 380px; }
.logo { text-align: center; margin-bottom: 24px; }
input { width: 100%; padding: 12px; margin: 8px 0; border: 1px solid #ddd;
border-radius: 4px; }
button { width: 100%; padding: 12px; background: #0066cc; color: #fff;
border: none; border-radius: 4px; cursor: pointer; }
</style>
</head>
<body>
<div class="login-box">
<div class="logo"><h2>Nexus Corp</h2><p>Single Sign-On</p></div>
<form action="/harvest" method="POST">
<input name="email" placeholder="Email" required>
<input name="password" type="password" placeholder="Password" required>
<button type="submit">Sign In</button>
</form>
<p style="text-align:center;margin-top:16px;font-size:12px">
<a href="#">Forgot password?</a> | <a href="#">Help</a>
</p>
</div>
</body>
</html>
Modern phishing does not stop at passwords. Sophisticated attacks capture session tokens to bypass MFA entirely.
| Tool | Capability | MFA Bypass |
|---|---|---|
| GoPhish | Campaign management, email templates, landing pages | No |
| Evilginx2 | Reverse proxy, real-time credential + token capture | Yes |
| Modlishka | Transparent reverse proxy phishing | Yes |
| EvilnoVNC | Browser-in-the-browser via VNC streaming | Yes |
Pretexting is the art of creating a fabricated scenario to engage a target. AI makes pretexts richer, more consistent, and harder to detect.
# Fictional persona generation for authorized red team exercise
persona = {
"name": "Morgan Ellis",
"role": "Cloud Security Consultant",
"company": "Sentinel Advisory Group", # fictional
"linkedin_headline": "Helping enterprises secure their cloud journey | AWS | Azure",
"backstory": "10 years in cloud infra, former SRE at [fictional] TechCo",
"approach": "Connect on LinkedIn, build rapport over 2 weeks, then send
'shared resource' with tracking payload"
}
# AI generates all communication — connection requests, messages, follow-ups
# Each message maintains the persona's voice and builds trust incrementally
The most effective social engineering attacks use multiple channels to build legitimacy and create a sense of familiarity.
Day 1: LinkedIn connection request from "Morgan Ellis" — references shared KubeCon interest
Day 3: LinkedIn message — comments on target's recent post, shares a relevant article
Day 7: LinkedIn message — mentions an upcoming webinar on Kubernetes security
Day 10: Email — "Great connecting on LinkedIn! Here's the white paper I mentioned" (tracking link)
Day 12: Follow-up email — "Did you get a chance to read it? I'd love your feedback" (credential harvesting link)
Each touchpoint reinforces the persona and increases trust. AI manages all channels simultaneously and maintains consistency.
These are the most effective pretext categories used in real-world red team engagements.
| Pretext Category | Subject Line Example | Trigger Principle |
|---|---|---|
| IT / Security alert | "Mandatory: Password reset required by Friday" | Authority + Urgency |
| HR / Payroll | "Updated benefits enrollment — action needed" | Urgency + Self-interest |
| Shared document | "Q4 Strategy Deck — Comments requested" | Authority + Reciprocity |
| Delivery / Package | "Your package could not be delivered" | Urgency + Curiosity |
| Vendor / Partner | "Updated invoice attached — NET 30 terms" | Authority + Commitment |
| Conference follow-up | "Great meeting you at RSA — slides attached" | Liking + Reciprocity |
| Onboarding | "Welcome! Complete your setup in the employee portal" | Authority + Commitment |
BEC is the most financially damaging form of phishing. FBI reported $2.9 billion in BEC losses in 2023 alone.
From: David Park, CFO <d.park@nexus-c0rp.com> [typosquatted domain]
To: Maria Santos, Accounts Payable <m.santos@nexus-corp.com>
Subject: Confidential — Urgent wire transfer needed
Maria,
I need you to process an urgent wire transfer for the acquisition we discussed in the board meeting last week. This is time-sensitive and confidential — please do not discuss with other team members until the deal closes.
Amount: $287,500.00
Beneficiary: Meridian Consulting Group
Account: [redacted]
Routing: [redacted]
I'm in back-to-back meetings until 5 PM — please process today and confirm via email. I'll approve the PO retroactively.
Thanks for handling this quickly.
David
Red flags: Typosquatted domain, urgency, secrecy request, process bypass, authority pressure.
A professional red team phishing campaign involves multiple coordinated components.
PHISHING CAMPAIGN ARCHITECTURE
================================
[OSINT Recon] [AI Content Generation]
| |
v v
+----------+ +-----------+ +----------------+
| Target |--->| Persona |--->| Email/SMS |
| Profiles | | Creation | | Templates |
+----------+ +-----------+ +----------------+
|
+--------------------+
v
+---------------+
| Sending Infra | (SMTP relay, spoofed headers)
+---------------+
|
v
+-----------------------+
| Phishing Landing Page | (Credential harvester / payload)
+-----------------------+
|
v
+-----------------+
| Data Collection | (Creds, tokens, tracking pixels)
+-----------------+
|
v
+-------------+
| Reporting | (Metrics, evidence for client)
+-------------+
GoPhish is the industry-standard open-source phishing framework for red team assessments.
# Install GoPhish (authorized testing only)
wget https://github.com/gophish/gophish/releases/latest/download/gophish-v0.12.1-linux-64bit.zip
unzip gophish-v0.12.1-linux-64bit.zip
cd gophish
./gophish
// GoPhish API — Create campaign programmatically
{
"name": "Q1 Security Assessment - Nexus Corp",
"template": { "name": "IT Password Reset" },
"page": { "name": "SSO Login Clone" },
"smtp": { "name": "Assessment SMTP Relay" },
"url": "https://nexus-corp-sso.example.com",
"groups": [{ "name": "Engineering Team" }],
"launch_date": "2025-03-15T09:00:00+00:00"
}
Understanding email headers is essential for both crafting and detecting phishing.
| Header | Purpose | Attack Technique |
|---|---|---|
From: | Displayed sender | Display name spoofing |
Reply-To: | Where replies go | Route replies to attacker inbox |
Return-Path: | Bounce address | Mismatched envelope sender |
X-Mailer: | Sending software | Spoof to match legitimate client |
Message-ID: | Unique message ID | Forge to match target domain |
# Suspicious email headers — spot the red flags
From: "David Park, CFO" <d.park@nexus-c0rp.com> <-- typosquatted domain
Reply-To: d.park.cfo@gmail.com <-- external reply address
Return-Path: bounces@mail-relay-372.com <-- unrelated bounce domain
Received: from mail-relay-372.com (192.168.1.50) <-- suspicious relay
X-Mailer: Microsoft Outlook 16.0 <-- spoofed mailer
Authentication-Results: spf=fail; dkim=none; dmarc=fail <-- FAILS all checks
Understanding how defenders detect phishing makes you a better red teamer — and vice versa.
As a red teamer, you need to understand how AI helps evade each layer of defense.
| Defense Layer | AI Bypass Technique |
|---|---|
| Spam filters | AI generates unique text per recipient — no bulk signatures to match |
| URL reputation | Use legitimate services (Azure Blob, Google Docs) as redirect hops |
| Content ML classifiers | AI-generated text does not match known phishing templates |
| Grammar-based detection | LLMs produce flawless, native-quality prose |
| External email banners | Compromise internal accounts or use reply-chain hijacking |
| User awareness training | Hyper-personalization makes emails indistinguishable from real ones |
AI is simultaneously the best weapon for attackers and the best tool for defenders. The side that adapts faster wins.
Train yourself to spot these indicators — even in AI-generated messages.
Social engineering testing operates in a legal and ethical minefield. Clear boundaries are non-negotiable.
Every social engineering engagement must have a formal rules of engagement document.
SOCIAL ENGINEERING RULES OF ENGAGEMENT
========================================
Client: [Fictional Nexus Corp]
Assessor: [Your Red Team]
Date Range: [Start] to [End]
Authorization: Signed by [Name, Title] on [Date]
SCOPE
-----
- Phishing: Email-based pretexts targeting Engineering dept (50 users)
- Vishing: NOT authorized
- Physical: NOT authorized
- Smishing: NOT authorized
BOUNDARIES
----------
- No pretexts involving: health emergencies, personal tragedy, law enforcement
- No targeting: C-suite, HR personnel, contractors
- Captured credentials: Stored encrypted, destroyed within 72 hours
- Escalation: Contact [Name] at [Phone] if target shows distress
SUCCESS CRITERIA
----------------
- Click-through rate measurement
- Credential submission rate
- Time-to-report metrics
- Recommendations for security awareness improvement
REPORTING
---------
- Aggregate statistics only (no individual identification in final report)
- Raw data provided to designated security contact only
AI introduces new ethical considerations beyond traditional social engineering testing.
I test systems to make them stronger, not to exploit the people who use them. I handle every credential, every piece of personal data, and every moment of someone's trust as if it were my own.
After running a phishing assessment, red teams should provide actionable defense recommendations.
p=rejectQuantify results to demonstrate risk and justify security investment.
| Metric | What It Measures | Industry Average |
|---|---|---|
| Email open rate | How many targets opened the email | 50-70% |
| Click-through rate | How many clicked the phishing link | 10-30% |
| Credential submission | How many entered credentials | 5-15% |
| Report rate | How many reported the phish | 5-15% |
| Time to first click | How quickly the first target fell | 1-5 minutes |
| Time to first report | How quickly someone flagged it | 15-60 minutes |
Risk = (Click-through rate) x (Credential submission rate) x (Number of targets)
A 20% click rate and 10% submission rate across 500 employees = 10 compromised accounts per campaign.
A fictional walkthrough of a complete AI-assisted social engineering engagement.
Social engineering and phishing techniques are demonstrated for authorized red team engagements and CTF competitions ONLY. Phishing real individuals without explicit authorization is illegal and causes real harm. All examples use fictional targets.
You are conducting an authorized red team assessment against Pinnacle Health Technologies (fictional). Your goal: design a targeted phishing campaign against their engineering team using AI-assisted techniques.
| Criteria | Points |
|---|---|
| Pretext creativity and realism | 25 |
| Personalization using OSINT | 20 |
| Technical infrastructure design | 20 |
| Defense recommendations quality | 20 |
| Ethical considerations and RoE | 15 |
The best red teamers build better defenses. Your campaign should teach the organization something valuable about their security posture.
Social engineering and phishing techniques are demonstrated for authorized red team engagements and CTF competitions ONLY. Phishing real individuals without explicit authorization is illegal and causes real harm. All examples use fictional targets.