ML Phishing Detection: How Classifiers Work and How to Evaluate Them
Machine learning phishing detection trains a classifier on labelled examples of phishing and legitimate messages or URLs. The model learns from features such as sender authentication results, link and domain properties, page content and wording. It outputs a score, and a threshold decides whether to block, warn or deliver. Choosing that threshold is a trade-off: catch more phishing and you also flag more real mail.
Topic: AI in Cybersecurity in Cybersecurity & Ethical Hacking · Explainer
Quick answer: Machine learning phishing detection trains a classifier on labelled examples of phishing and legitimate messages or URLs. The model learns from features such as sender authentication results, link and domain properties, page content and wording. It outputs a score, and a threshold decides whether to block, warn or deliver. Choosing that threshold is a trade-off: catch more phishing and you also flag more real mail. Good evaluation uses precision, recall and false positive rate on recent data the model has never seen. ML works best layered with DMARC, user reporting and fast takedown.
Key takeaways
- A classifier is only as good as its labelled training data and features.
- Accuracy alone is misleading because phishing is rare compared with legitimate mail.
- Precision, recall and false positive rate tell you far more.
- Attackers adapt, so models need time-split testing and regular retraining.
- ML adds to email authentication and user reporting; it does not replace them.
Table of Contents
- How Does a Phishing Classifier Work?
- Which Features Do Phishing Models Use?
- Which Model Types Are Common?
- How Do You Evaluate a Phishing Classifier?
- Why Do False Positives Matter So Much?
- How Do Attackers Evade ML Detection?
- What Should Sit Around the Model?
- References
How Does a Phishing Classifier Work?
Phishing is listed as technique T1566 in MITRE ATT&CK, covering attachments, links and messages through third-party services. A classifier handles it in four steps: extract features from each message or URL, feed them to a trained model, get a probability score, then apply a threshold policy. Messages above a high threshold are quarantined, a middle band gets a warning banner, and the rest are delivered.
Which Features Do Phishing Models Use?
| Feature group | Examples |
|---|---|
| Authentication | SPF, DKIM and DMARC results, reply-to mismatch |
| Sender history | First time sender, unusual sending time |
| URL and domain | Domain age, look-alike characters, redirect chains |
| Text | Urgency, payment or credential requests, tone |
| Landing page | Login forms, brand logos on unrelated domains |
| Attachments | File type, embedded links or QR codes |
DMARC, defined in RFC 7489, is one of the strongest single signals because it shows whether a message really came from the domain it claims.
Which Model Types Are Common?
- Gradient boosted trees and random forests work well on structured features such as URL length or domain age, and their decisions are easier to explain.
- Transformer language models read message text and catch persuasive wording that keyword rules miss.
- Image models compare landing pages with known brand login pages.
- Ensembles combine several models so one weak signal does not decide alone.
How Do You Evaluate a Phishing Classifier?
If one message in a thousand is phishing, a model that never flags anything is 99.9 percent accurate and useless. Use these measures instead.
| Metric | Question it answers |
|---|---|
| Precision | Of the messages flagged, how many were really phishing? |
| Recall | Of the real phishing, how much did we catch? |
| False positive rate | How much legitimate mail was wrongly flagged? |
| Precision-recall curve | How do these change as the threshold moves? |
Test on messages from a later period than the training data. A random split leaks future campaigns into training and makes results look better than they will be in production.
Why Do False Positives Matter So Much?
A blocked invoice or job offer costs real money and trust. When users see too many warnings they start ignoring them, which helps attackers. Track false positives per department, offer a simple release request process, and review what the model blocked each week.
How Do Attackers Evade ML Detection?
Attackers host pages on trusted cloud services, use QR codes instead of links, hide text in images and use generative AI to vary wording. These are evasion attacks in the language of NIST AI 100-2 E2025. User reports used as training labels can also be poisoned. Defences include adversarial testing, label review and retraining on fresh samples. The APWG trends reports help teams follow current phishing patterns.
What Should Sit Around the Model?
- Enforced DMARC on your own domains.
- Phishing-resistant MFA, as CISA phishing guidance recommends.
- A report button that feeds the SOC and model labels.
- Governance of model changes under the NIST AI RMF.
- In India, victims can report fraud on 1930 or cybercrime.gov.in.
See also how AI detects and prevents phishing and anti-phishing tools for SOC analysts. To learn email security in practice, ask about cybersecurity training.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0