Phishing, Spear Phishing, and Whaling
Distinguish mass phishing from targeted spear phishing and executive-level whaling attacks, and learn the red flags in malicious emails.
Phishing, Spear Phishing, and Whaling is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Social Engineering Through Email
Email remains the most common initial access vector in cyberattacks. Phishing exploits human psychology — creating urgency, authority, or fear — to trick recipients into clicking malicious links, opening infected attachments, or surrendering credentials. Unlike technical vulnerabilities that can be patched, human susceptibility to social pressure cannot be eliminated with a software update. Security+ candidates must understand the spectrum of phishing attacks, from mass campaigns targeting millions of random recipients to highly targeted messages crafted for a specific individual.
Mass Phishing: Volume Over Precision
Mass phishing (or bulk phishing) sends the same malicious email to thousands or millions of addresses simultaneously, relying on the sheer volume of targets to achieve a small percentage of success. Common lures include fake banking alerts, package delivery notifications, password expiration warnings, and tax refund offers. The emails are generic — the attacker does not know the recipients personally. Despite low sophistication, mass phishing campaigns generate enormous numbers of victims globally and are responsible for the majority of credential theft incidents.
# Typical mass phishing email red flags:
# - Sender domain differs from claimed company (paypa1.com vs paypal.com)
# - Generic salutation ('Dear Customer' instead of name)
# - Urgency trigger ('Your account will be closed in 24 hours')
# - Mismatched URL (displayed text differs from actual hyperlink)
# - Poor grammar/spelling (though AI has reduced this indicator)
# - Unexpected attachment (.exe, .zip, .docm with macros)Spear Phishing: Targeted and Personal
Spear phishing is a targeted form of phishing where the attacker customizes the message for a specific individual or small group. Attackers research their targets on LinkedIn, social media, company websites, and breach databases to craft convincing messages that reference real names, job titles, projects, or colleagues. A spear phishing email might appear to come from the target's manager requesting urgent wire transfer approval, or from HR with a 'benefits update' attachment. The personalization dramatically increases the success rate compared to generic phishing.
# Spear phishing anatomy example:
# From: michael.johnson@financecompany.com (spoofed)
# To: sarah.chen@targetorg.com
# Subject: Q3 Budget Review - Sarah please approve
#
# 'Hi Sarah,
# Following up on our meeting yesterday about the Q3 budget,
# please review the attached figures from Kevin's team.
# We need your sign-off by EOD. [malicious attachment]
# Thanks, Mike'
#
# Personalized, references real names, creates urgencyWhaling: Targeting C-Suite Executives
Whaling is spear phishing specifically targeting high-value individuals — CEOs, CFOs, board members, and other C-suite executives. These targets have authority to approve large financial transactions, access sensitive data, and override security policies. A successful whaling attack might trick a CFO into authorizing a multi-million dollar wire transfer to an attacker-controlled account, a scheme known as Business Email Compromise (BEC). The FBI estimated BEC losses exceeded $3 billion annually. Executives are also targeted for their access to intellectual property, M&A information, and strategic plans.
# Business Email Compromise (BEC) variants:
# CEO Fraud: attacker spoofs CEO email to CFO requesting wire transfer
# Vendor Impersonation: spoofs trusted supplier requesting updated bank details
# Attorney Impersonation: targets legal matters with fake attorney request
# Employee W-2 Scam: HR target asked to forward all employee W-2 forms
#
# Key indicator: request involves money, credentials, or sensitive data
# + urgency + instructions to bypass normal processAngler Phishing and Clone Phishing
Angler phishing targets users on social media platforms — attackers create fake customer service accounts for major brands and respond to users who post complaints, luring them to fake login pages. Clone phishing duplicates a legitimate email (a recent invoice or newsletter) and replaces links or attachments with malicious versions, then re-sends it from a spoofed address claiming it is a corrected version. Clone phishing is particularly effective because the recipient recognizes the email format and sender, lowering their suspicion considerably.
Pharming: Redirect Without a Click
Pharming redirects victims to malicious websites without requiring them to click a phishing link. This is typically achieved through DNS cache poisoning (injecting false DNS records into a resolver so the legitimate domain resolves to an attacker's server) or by modifying the victim's local hosts file. Unlike phishing, which requires the victim to take action, pharming works even if the user types the correct URL directly into their browser. DNSSEC and HTTPS certificate validation are the primary technical defenses.
# Detecting pharming via hosts file manipulation:
# Attackers may modify: C:\Windows\System32\drivers\etc\hosts (Windows)
# Or: /etc/hosts (Linux/macOS)
#
# Malicious hosts file entry:
# 1.2.3.4 www.mybank.com <- redirects to attacker's server
#
# Defense: monitor hosts file integrity with FIM tools (Tripwire, OSSEC)
# Defense: HTTPS certificate pinning detects IP mismatchURL Analysis and Link Spoofing
One of the most critical phishing skills is analyzing URLs to identify spoofing techniques. Attackers use several methods: typosquatting (paypa1.com, g00gle.com), subdomain tricks (paypal.com.attacker.com — the real domain is attacker.com), URL shorteners that hide the true destination, and homograph attacks using Unicode characters that look like ASCII (xn--pple-43d.com uses a Cyrillic 'а' to spoof apple.com). Security professionals should always hover over links before clicking and use URL analysis tools to expand shortened URLs safely.
# URL analysis techniques:
# Hovering: reveals real URL in browser status bar
# URL expanders: unshorten.me for bit.ly/tinyurl links
# VirusTotal URL scan: virustotal.com/gui/url
# WHOIS lookup: check domain registration date (new domain = suspicious)
# Subdomain trick:
# paypal.com.malicious-site.xyz/login
# Read right-to-left from first '/': domain is malicious-site.xyzIndicators of a Phishing Email
Training users to recognize phishing requires teaching specific red flags. Examine: the sender address (does the display name match the actual email domain?), email headers (does the Return-Path or Reply-To differ from the From address?), the urgency or threat language that pressures quick action, unsolicited attachments or unexpected password reset requests, and links that do not match the stated destination. The presence of one flag should raise suspicion; multiple flags together strongly indicate phishing. Organizations should define a clear process for reporting suspicious emails.
# Email header analysis (look for spoofing indicators):
# View raw headers in email client (Ctrl+U in Thunderbird)
#
# Check these fields:
# From: Displayed sender address
# Reply-To: Where replies go (may differ from From)
# Return-Path: Bounce address (should match From domain)
# Received: Server hops (trace origin)
# SPF result: PASS/FAIL in Authentication-Results header
# DKIM result: pass/fail signature verificationCredential Harvesting Sites
Many phishing campaigns direct victims to fake login pages that look identical to legitimate websites. Attackers clone the HTML/CSS of real sites and host them on lookalike domains or compromised websites. Modern evilginx2 and Modlishka tools act as reverse proxies, forwarding the victim to the real site while intercepting session tokens in real time — bypassing even MFA. Users should look for the padlock icon (HTTPS) but remember that HTTPS only confirms the connection is encrypted, not that the site is legitimate. Certificate Transparency logs expose phishing sites using look-alike domains.
# Detecting phishing infrastructure:
# Certificate Transparency: crt.sh (search for look-alike certs)
# VirusTotal domain scan
# PhishTank database lookup
# Google Safe Browsing API
#
# Browser-side defense:
# FIDO2/WebAuthn (hardware security keys) are phishing-resistant
# because the key's response is bound to the specific origin URLAttachment-Based Phishing
Malicious attachments deliver malware directly to the victim's endpoint. Common formats include macro-enabled Office documents (.docm, .xlsm) that run VBA scripts when the user enables macros, PDF files with embedded JavaScript or links, ISO/IMG disk images (used to bypass Windows' Mark of the Web protections), and compressed archives (.zip, .rar) containing executables renamed with misleading extensions. Organizations should disable Office macros by default through Group Policy and configure email gateways to block high-risk file types.
# Group Policy: disable macros in Office
# User Configuration -> Administrative Templates ->
# Microsoft Office -> Security Settings
# 'Block macros from running in Office files from the Internet'
# Email gateway: block dangerous attachments
# Block extensions: .exe, .bat, .ps1, .vbs, .hta, .iso
# Sandbox: detonate .docm, .xlsm, .pdf in sandbox before deliveryExecutive Protection from Whaling
Protecting executives from whaling attacks requires a combination of technical and process controls. Technically: enforce DMARC to reject spoofed emails claiming to come from the organization's domain, configure the email gateway to add banners to external emails, and enroll executives in phishing-resistant MFA (FIDO2). Process-wise: establish out-of-band verification procedures (call the requestor directly using a known phone number) before approving wire transfers or sharing sensitive data, no matter how urgent the email sounds. Train executives specifically on whaling scenarios since generic security awareness training often does not reach the C-suite.
# DMARC policy to prevent domain spoofing:
# DNS TXT record: _dmarc.company.com
# v=DMARC1; p=reject; rua=mailto:dmarc@company.com;
# ruf=mailto:forensics@company.com; adkim=s; aspf=s;
#
# p=reject: emails failing SPF+DKIM alignment are rejected
# rua: aggregate reports
# ruf: forensic failure reports
#
# This blocks attackers from spoofing @company.com in From: headerQuick Check
Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.
Lesson Recap
In this lesson you learned: mass phishing relies on volume to catch a small percentage of random recipients, spear phishing is targeted and personalized using OSINT research to craft convincing messages for specific individuals, and whaling targets executives with authority over finances and sensitive data — defended with DMARC, phishing-resistant MFA, and out-of-band verification procedures. Next up we explore voice and SMS-based attacks through vishing, smishing, and pretexting.
Frequently asked questions
Is the “Phishing, Spear Phishing, and Whaling” lesson free?
Yes — the full text of “Phishing, Spear Phishing, and Whaling” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.
What will I learn in “Phishing, Spear Phishing, and Whaling”?
Distinguish mass phishing from targeted spear phishing and executive-level whaling attacks, and learn the red flags in malicious emails. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cloud & IT Cert Prep?
No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Phishing, Spear Phishing, and Whaling” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cloud & IT Cert Prep lesson?
Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Phishing, Spear Phishing, and Whaling
- Vishing, Smishing, and Pretexting
- Physical Social Engineering: Tailgating and Baiting
- Security Awareness Training and Anti-Phishing Controls