GitHub RadarBlue team tool
Zero-trust link forensics & neural phishing detection in a tactical monochrome UI. Primary language: Python. 10 stars.
Inferred from repository metadata; not a reviewed classification.
Project links:Open GitHub projectBack to radar
  ![Tests]() ![Privacy]()
A lightweight, zero-egress link forensics engine that combines character-level n-gram machine learning with topological heuristic analysis for real-time phishing detection.
---
Traditional phishing scanners typically rely on external cloud lookups, active HTTP crawling, or third-party reputation feeds. While useful, this approach introduces two key security concerns: it leaks potentially sensitive URLs (such as password-reset tokens or private workspace links) to third parties, and outbound requests can alert attackers or trigger one-time evasion mechanisms.
phish-zero operates entirely offline. It evaluates lexical syntax, domain topology, character randomness, and structural deception patterns without initiating outbound network connections. It provides security engineers and end-users with an immediate forensic breakdown of destination links prior to navigation.
---
[ Submitted URL ]
│
[ Canonical Normalization ]
(Scheme, Port, IDNA Host)
│
┌─────────────────────┴─────────────────────┐
▼ ▼
[ Lexical ML Pipeline ] [ Heuristic Rule Engine ]
- Sublinear Char N-Grams (TF-IDF) - Brand Spoofing / Lookalikes
- Logistic Regression Classifier - Deceptive Subdomain Nesting
- Probability Calibration - High-Risk TLD & Free Host Abuse
│ - Sensitive Credential Keywords
│ - Raw IP & Punycode Flags
└─────────────────────┬─────────────────────┘
▼
[ Composite Risk Synthesis ]
│
┌──────────────────────────┼──────────────────────────┐
▼ ▼ ▼
[ Syntactic Dissector ] [ Threat Surface Radar ] [ Route Topology Flow ]
- Token-level Breakdown - 6-Axis Risk Vectors - Visitor → Gateway
- Shannon Entropy - Normalized Weights - Perceived Brand vs True Host---
The evaluation engine categorizes destinations into four standardized security tiers:
| Tier | Status | Criteria | | :--- | :--- | :--- | | Danger | Confirmed Threat | Verified brand impersonation, deceptive subdomain spoofing, or composite risk score $\ge 70\%$. | | Warning | Elevated Risk | Raw IP destinations, disposable free application hosts, unencrypted authentication endpoints, or composite score $45\% - 69.9\%$. | | Caution | Standard / Low Risk | Unverified public domains, technical documentation, or blogs with minor lexical anomalies ($15\% - 44.9\%$). | | Safe | Verified Benign | Recognized global authority domains and clean URLs with composite risk score $< 15\%$. |
www. bias)..tk, .ml, .xyz, .top, etc.) and public cloud app deployments (firebaseapp.com, pages.dev, ngrok.io, weeblysite.com, etc.).---
The model was validated using GroupShuffleSplit partitioned strictly by registered hostname to prevent domain leakage between training and evaluation splits:
| Metric | Score | Details | | :--- | :--- | :--- | | Accuracy | 98.32% | Overall test set correctness | | Phishing Precision | 99.78% | Ratio of true phishing detections to all positive flags | | Phishing Recall | 96.15% | Ratio of detected phishing attacks to total actual phishing URLs | | Phishing F1 | 97.93% | Harmonic mean of precision and recall | | Benign False Positive Rate | 0.15% | Percentage of benign links incorrectly flagged | | Evaluation Split | — | 220,378 training rows / 46,215 evaluation rows (0 hostname overlap) |
---
venv)# Clone the repository
git clone https://github.com/securitygeek15/phish-zero.git
cd phish-zero
# Create and activate virtual environment
python -m venv .venv
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1
# Linux / macOS:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtA pre-trained model bundle is included in model/url_model.joblib. To retrain the pipeline using the dataset in data/urls.csv:
python train.pypython app.pyOpen your browser and navigate to:
http://127.0.0.1:5000python -m unittest discover -s tests -v---
GET /api/healthResponse (`200 OK`):
{
"status": "ok",
"model_loaded": true,
"model_name": "Normalized Canonical URL TF-IDF + Logistic Regression",
"message": "Model ready"
}---
POST /api/analyze
Content-Type: application/json
{
"url": "http://paypal-verification-account-update.tk/login"
}Response (`200 OK`):
{
"url": "http://paypal-verification-account-update.tk/login",
"hostname": "paypal-verification-account-update.tk",
"registered_domain": "paypal-verification-account-update.tk",
"prediction": "phishing",
"threat_level": "danger",
"threat_label": "DANGEROUS // THREAT CONFIRMED",
"threat_color": "#ef4444",
"phishing_score": 100.0,
"ml_score": 99.9,
"heuristic_score": 100.0,
"is_top_authority": false,
"model_name": "Normalized Canonical URL TF-IDF + Logistic Regression",
"diagnostics": {
"protocol": "HTTP",
"port": 80,
"tld": "tk",
"path": "/login",
"has_query": false,
"findings_count": 4
},
"dissection": [
{
"type": "scheme",
"label": "SCHEME",
"value": "http://",
"raw": "http",
"severity": "medium",
"entropy": 1.5,
"length": 7,
"explanation": "Unencrypted HTTP transport protocol.",
"tag": "HTTP-INSECURE"
},
{
"type": "domain",
"label": "APEX DOMAIN",
"value": "paypal-verification-account-update",
"raw": "paypal-verification-account-update",
"severity": "critical",
"entropy": 3.72,
"length": 34,
"explanation": "Brand impersonation alert: mentions 'paypal' but root registry is 'paypal-verification-account-update.tk'.",
"tag": "BRAND-SPOOF"
},
{
"type": "tld",
"label": "TLD",
"value": ".tk",
"raw": ".tk",
"severity": "high",
"entropy": 1.0,
"length": 3,
"explanation": "High-risk TLD (.tk): statistically associated with burner phishing campaigns.",
"tag": "HIGH-RISK-TLD"
},
{
"type": "path",
"label": "PATH",
"value": "/login",
"raw": "/login",
"severity": "high",
"entropy": 2.32,
"length": 6,
"explanation": "Endpoint targets authentication credentials: login.",
"tag": "CREDENTIAL-TARGET"
}
],
"graph_data": {
"risk_vectors": [
{ "id": "lexical", "name": "Lexical Entropy", "score": 91.2, "status": "critical" },
{ "id": "structure", "name": "Host Deception", "score": 40.0, "status": "warning" },
{ "id": "brand", "name": "Brand Spoofing", "score": 100.0, "status": "critical" },
{ "id": "tld", "name": "TLD Risk", "score": 95.0, "status": "critical" },
{ "id": "transport", "name": "Transport Risk", "score": 85.0, "status": "critical" },
{ "id": "intent", "name": "Credential Intent", "score": 95.0, "status": "critical" }
],
"route_topology": {
"is_diverted": true,
"detected_brand": "paypal",
"summary": "Deceptive Routing Detected: The link displays 'paypal' to impersonate an authentic service, but traffic diverts to 'paypal-verification-account-update.tk' on .tk."
}
},
"findings": [
{
"name": "Brand Impersonation Target: PAYPAL",
"detail": "Hostname contains brand keyword \"paypal\", but registered destination domain is \"paypal-verification-account-update.tk\".",
"severity": "critical"
}
],
"caveat": "Machine-learning & security signal intelligence. A low score indicates no known phishing anomalies, but always exercise caution."
}---
phish-zero/
├── app.py # Flask application server & API endpoints
├── url_features.py # Tokenizer, entropy calculations, heuristics & topology
├── train.py # Model training script with GroupShuffleSplit validation
├── requirements.txt # Python dependencies
├── data/
│ └── urls.csv # Reference dataset (URL and label)
├── model/
│ ├── url_model.joblib # Trained pipeline artifact
│ └── metrics.json # Benchmark evaluation results
├── static/
│ ├── app.js # Client-side UI logic, SVG charts & state handling
│ └── style.css # Design system & threat-tier styling
├── templates/
│ └── index.html # Application interface markup
└── tests/
└── test_app.py # Automated test suite (9 test cases)---