Sub topic 4
Phishing by email, text, and phone
This chapter assumes you know the basics from earlier chapters: how social engineering uses urgency and authority, and which red flags show up in most scams. It also assumes you use online banking, email, and text messages. Here you will learn how phishing differs by channel, what the attacker is trying to get, and how to check a message safely.
What phishing is
Phishing is a message that pretends to come from a trusted sender so you will hand over information, money, or access. The attacker usually wants one of four things:
- Your login details for a bank, email, or payment account.
- A one-time passcode (a short code sent to prove it is you).
- Card or bank details, or your national ID number.
- An action, such as installing an app, opening an attachment, or sending a payment.
Phishing is a delivery method, not a single scam. The same technique carries impersonation scams, account takeover, and fake invoice fraud, which later chapters cover.
The three channels
Each channel has its own technical weaknesses and its own style of pressure.
| Channel | Name | Typical lure | Technical weakness attackers use |
|---|---|---|---|
| Phishing | "Unusual sign-in", invoice, shipping notice | Forged display names, lookalike domains, links that hide the real address | |
| Text message | Smishing | "Package fee due", "Bank fraud alert" | Short links, no sender authentication, messages that blend into real threads |
| Phone call | Vishing | "Fraud department", "tax office", "tech support" | Caller ID spoofing, live pressure with no time to think |
Email lets an attacker control two things you see first: the display name and the link text. A message can show "Example Bank Security" as the sender while the real address belongs to someone else. A link can read example-bank.com while pointing somewhere else.
Providers use sender checks called SPF, DKIM, and DMARC to reject forged mail from a real domain. These checks help, but they cannot stop an attacker from registering a similar domain and passing the checks for it. A message that passes authentication is not proven safe.
Text messages
Texts feel personal and urgent. Many people read them within minutes. Attackers send them in bulk and rely on a small percentage of replies. Some fake texts land in the same conversation thread as a real message from your bank, because the sender name can be spoofed. A thread history is therefore not proof that a message is genuine.
Phone calls
Caller ID shows whatever the calling system tells your phone to show. An attacker can make a call appear to come from your bank's real number, or from a local number. Vishing also uses a live person who adapts to your answers, keeps you on the line, and moves you from step to step before you can reflect. A typical script asks you to "confirm" a code. The code is actually a real one from a login the attacker is attempting at that moment.
Anatomy of a phishing message
Most phishing messages follow the same sequence:
- A hook that gets attention: a problem, a prize, or a request from authority.
- A deadline that limits time to think.
- A path to resolve it: a link, a phone number, or a reply.
- A harvest: a fake page that records what you type, or a caller who asks you to say a code aloud.
The key decision is the one in the middle. The only reliable defense is to leave the channel the attacker controls and reach the organization through a path you already trust.
Checking where a link really goes
Looking at a link's host name (the part right after https:// and before the first /) is the fastest check. Attackers use several tricks to make a bad host look good:
- Trusted name at the start of a longer domain:
example-bank.com.login-verify.netreally belongs tologin-verify.net. Read host names from the right, not the left. - The at sign: in
https://[email protected]/, everything before@is treated as a username. The real host isevil.test. - Near-matches:
examp1e-bank.comorexample-bank.codiffer by one character. Some domains use look-alike letters from other alphabets. - Real services used as cover: links through URL shorteners, document-sharing sites, or form builders show a trusted brand but lead to attacker content.
This function applies the correct rule. It accepts a link only if the host is the official domain or a subdomain of it.
from urllib.parse import urlparse
def is_official_link(url: str, official_domain: str) -> bool:
"""Return True only if the link's host is the official domain or one of its subdomains."""
host = (urlparse(url).hostname or "").lower()
return host == official_domain or host.endswith("." + official_domain)
print(is_official_link("https://www.example-bank.com/login", "example-bank.com"))
print(is_official_link("https://example-bank.com.login-verify.net/", "example-bank.com"))
print(is_official_link("https://[email protected]/", "example-bank.com"))The output is True, False, False. The function uses hostname, which returns only the real host. A simple "does the text contain the bank's name" check would accept all three links.
Variations you will meet
- Spear phishing: a message tailored to you, using your employer, a recent purchase, or a colleague's name. It is harder to spot because it contains correct details gathered from public sources or earlier breaches.
- Quishing: a QR code in an email, letter, or on a parking meter sticker. The code hides the link, so you cannot read it before scanning. Preview the address your phone shows before opening it.
- Callback phishing: the message has no link. It says a charge of several hundred dollars was made and gives a phone number to dispute it. The number connects to the attacker.
- Code relay: the attacker enters your username on the real site, which sends you a genuine code. They then ask you to read the code to them. Treat every one-time code as a secret that no legitimate employee will ask for.
- Live proxy pages: some fake pages pass your login and code to the real site in real time. Codes sent by SMS or typed from an app can be captured this way. Passkeys and hardware security keys check the site's real address, so they resist this attack. Later chapters on account security return to this point.
Common errors
- Trusting caller ID. A matching number proves nothing. Hang up and call the number printed on your card or on the official website.
- Replying "STOP" to a suspicious text. A reply confirms that your number is active. Report the message and delete it instead.
- Calling the number in the message. Attackers set up the number to answer in the organization's name.
- Judging by design. Logos and layouts are easy to copy. Spelling mistakes are a weak signal, because some attackers write well.
- Staying on the line. A real organization will not mind if you hang up and call back. Pressure not to do so is itself a warning sign.
- Waiting to report. If you entered a password or code, change the password straight away and contact the provider. Speed matters more than embarrassment.
Safe habits to practice
- Treat any message that asks you to act quickly as unverified until you check it another way.
- Open the official app or type the address yourself rather than tapping a link.
- Never read a one-time code aloud or type it into a page you reached from a message.
- Use the report option in your email or phone app. It trains filters and protects others.
Exercise
You get a text: "Example Bank: suspicious payment of $480 blocked. Reply YES to confirm or call 555-0142 now." The text arrived inside your existing thread with the bank. List three reasons not to trust it and the two steps you should take instead.
Show answer
Reasons: (1) the thread does not prove the sender is genuine, because sender names can be spoofed into an existing conversation; (2) it creates urgency and asks you to reply or call a number supplied by the message, which the attacker may control; (3) you did not start the contact and cannot confirm the payment exists. Steps: first, do not reply or call that number. Second, open the bank's official app or call the number printed on your card, and ask whether any payment was blocked. If nothing is there, report the text as spam or phishing and delete it.