PhishRadar
Detect phishing/scam domains from Certificate Transparency logs. Can be useful for internal security teams for monitoring company-specific domains, as well as for sectorial/national CERTs for monitoring the domains of their constituents.
Logs are retrieved via Certstream. Keywords are set in a YAML configuration file and detected via two methods:
- for common subwords, results from WordSegment are scanned
- for rarer words (e.g. brand names), we simply check if the domain contains the keyword - this is because WordSegment may not correctly separate unknown subwords.
For better customization, a minimal threshold of matching keywords can be set.
The idea was born after encountering phishing attacks and malware Command-and-Control communication involving domains impersonating Armenian government bodies (1, 2).
Installation and usage
pip install phishradar
phishradar --config ./config.yaml
Sample configuration
certstream_url: wss://certstream.calidog.io/
keywords:
- test
- keyword
- yourbrand
whitelist:
- exclude
- these
threshold: 1 # Number of matched keywords to alert for
output:
console: True
file: output.log
# Example use case of a webhook sink - a Telegram bot for alerting
# The following templates are supported in messages (URL and body):
# $domain - defanged domain name
# $matches_list - bullet point list of matched keywords
# $matches_comma - comma-separated string of matched keywords
webhook:
url: "https://api.telegram.org/bot<INSERT_YOUR_BOT_TOKEN>/sendMessage"
body: '{"chat_id": "<INSERT_YOUR_CHAT_ID>", "parse_mode": "html", "text": "<b>$domain</b> contains: <i>$matches_list</i>"}'
Further work
- Try out alternative threshold mechanism (e.g. weighted keywords)
- Experiment with word segmentation via a Small Language Model
Metadata
Release files for phishradar 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phishradar-0.3.tar.gz | 8.8 kB | Without provenance | Details for phishradar-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phishradar-0.3-py3-none-any.whl | Python 3 | none | any | Details for phishradar-0.3-py3-none-any.whl |
Total release size: 18.4 kB
Release files / phishradar-0.3.tar.gz
| Download URL | phishradar-0.3.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbf9a752409ae9b7de1646293db8ac392b8835b36d797b70caac9cdea43ff6ed
|
|
BLAKE2b-256 checksum How to use checksums |
a67951b84b2617d9a8eb5cb6809b47933150f13a106167393d79e6797d9aefa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / phishradar-0.3-py3-none-any.whl
| Download URL | phishradar-0.3-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c7e8d8ab8391fe73691272fb58a28d0873cce33d330eb8a54f6872b5c133de3
|
|
BLAKE2b-256 checksum How to use checksums |
567e5de55d5aa435b96c28da5ac17a6cef810c13fd755861bdc0e38ba0d203bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Security for phishradar 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.