Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

How I Built a Python Phishing Detector with 92% Accuracy

"Phishing attacks account for 36% of data breaches (IBM Security 2023). As a cybersecurity enthusiast, I developed a Python-based tool that detects malicious…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

"Phishing attacks account for 36% of data breaches (IBM Security 2023). As a cybersecurity enthusiast, I developed a Python-based tool that detects malicious URLs with 92% accuracy. Here’s how you can build one too!"



Why it matters:



Real-world problem: Phishing scams cost businesses $4.9B annually (FBI IC3 2022).

Accessible solution: No expensive tools—just Python and ML.



Tools & Technologies




`# Immediately showcase code to grab attention
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report

print("Loading phishing dataset...")
data = pd.read_csv("phishing_dataset.csv")`






Step 1: Building the Dataset



Data Sources:



Malicious URLs: PhishTank, OpenPhish.

Legitimate URLs: Common Crawl.




def extract_features(url):
return {
"url_length": len(url),
"num_special_chars": sum(1 for char in url if char in "@#!$%&"),
"uses_https": 1 if "https://" in url else 0, # Phishing sites often lack HTTPS
}






Key Insight: "Phishing URLs are 3x more likely to contain special characters than legitimate ones (based on my dataset)."



Step 2: Training the Model



Why Random Forest?



Handles imbalanced data well.



Interpretable (vs. "black box" models like neural networks).




model = RandomForestClassifier(
n_estimators=100,
class_weight="balanced" # Critical for imbalanced datasets
)
model.fit(X_train, y_train)
print(classification_report(y_test, model.predict(X_test)))






Results:



Metric Score

Accuracy 0.92

Recall 0.89 (Minimizes false negatives!)



Step 3: Deploying to Production



Option 1: Flask API (for enterprise integration):




from flask import Flask, request, jsonify

app = Flask(__name__)
@app.route("/predict", methods=["POST"])
def predict():
url = request.json.get("url")
features = extract_features(url)
prediction = model.predict([features])[0]
return jsonify({"is_phishing": bool(prediction)})






Option 2: CLI Tool (for SOC teams):




python detector.py --url "https://fake-paypal-login.com"
# Output: ✅ Legitimate or ⚠️ PHISHING ATTEMPT DETECTED






Lessons Learned & Next Steps



Challenges:



Shortened URLs: Solved with requests to follow redirects.



Data Imbalance: Used class_weight="balanced" and SMOTE oversampling.



Future Improvements:



Add logo detection (OpenCV) to spot fake brand impersonations.



Publish model on Hugging Face Spaces for community use.

🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

Bedrohungsgraph · ATT&CK-Mapping · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
3 Knoten · 2 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
MITRE ATT&CK Matrix Navigator
Enterprise-Matrix · nur belegte Techniken
14 Taktiken
1 belegte Technik
T1566TA0001 · Initial Access
Phishing
Mitigation: M1054 User Training & Email Gateway Filtering
Quelle: Kontext-Klassifikation des Artikeltextes
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Defense Evasion
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How I Built a Python Phishing Detector with 92% Accuracy

Thematisch verwandte Begriffe: Built, Python, Phishing, Detector · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag