Ansar Shaikh

Scoring reported phishing emails with SPF, DKIM, DMARC and local lure rules

· phishdesk-in on GitHub

Most phishing that users report to Indian helpdesks is a handful of local lures: "KYC pending, account will be blocked", UPI collect requests dressed up as cashback, income-tax refunds, electricity disconnection notices. Generic analysers check SPF and DKIM but don't know that sbl-netbanking.online is pretending to be SBI, or that nobody needs a UPI PIN to receive money.

PhishDesk-IN takes a reported .eml and returns a verdict (phishing, suspicious or clean), a 0–100 score and the list of rules that fired, as JSON for ticketing and Markdown for the analyst. It uses only the Python standard library.

What it checks

Results

I tested it on 69 synthetic lab emails (36 phishing, 33 legitimate, 9 built to be hard):

PrecisionRecallF1False positive rate
0.9090.8330.8700.091

All 9 errors were in the hard categories:

I wrote both the emails and the rules, so these numbers are a regression suite, not a real-world detection rate. The useful part is knowing exactly which kinds of mail it will get wrong.

← All posts