XXMNN is a next-generation "Silent Sentinel" security system engineered to defend digital infrastructure against sophisticated, AI-powered pentesting tools such as Shannon, Claude, GPTBot, Nuclei, Burp Suite, and other autonomous threat agents.
Operating as a dormant background process, XXMNN consumes negligible system resources and activates only upon detecting anomalous behavior. It provides a 6-layer defense strategy that evolves beyond traditional signature-based WAFs.
┌──────────────────────────────────────────────────────────────────┐
│ YOUR SERVER (Production) │
│ │
│ Nginx / Apache ──→ access.log │
│ │ │
│ ┌────▼────┐ │
│ │ XXMNN │ ← Sleeps here, 0% CPU │
│ │ DORMANT │ │
│ └────┬────┘ │
│ │ │
│ Attack detected? ──→ NO: Continue sleeping │
│ │ │
│ YES ↓ │
│ ┌────▼────┐ │
│ │ AWAKE │ Analyze → Block → Report → Sleep │
│ └─────────┘ │
└──────────────────────────────────────────────────────────────────┘
XXMNN sits right beside your web server. It reads the Nginx/Apache access log in real-time and:
- DORMANT — Sleeps and monitors log lines with near-zero CPU
- ALERT — Detects suspicious pattern, starts scoring the session
- AWAKE — Threat confirmed, activates all defense layers
- BLOCKING — Blocks IP via iptables + Cloudflare + Nginx
- REPORTING — Generates forensic reports (JSON + HTML)
- Returns to DORMANT — Goes back to sleep
| Layer | Defense | Catches |
|---|---|---|
| 0 | Automation Fingerprint | HeadlessChrome, Playwright, sqlmap, Burp, Nuclei, 50+ bot UA |
| 1 | Recon Detection | robots.txt→.env→.git chains, rapid scanning, HEAD fingerprinting |
| 2 | Session Scoring | Cumulative threat score per IP, honeypot triggers (+30) |
| 3 | Signature Detection | SQLi, XSS, SSRF, CMD Injection, Path Traversal, Brute Force |
| 4 | Payload Sequence | Sequential UNION→error→blind chains, URL-encoded WAF bypasses |
| 5 | Multi-Vector Correlation | 3+ attack types from same IP = AI pentest tool (99% confidence) |
xxmnn/
├── core/ # Sentinel engine, config, data models
├── detectors/ # 13 threat detectors + session manager
│ ├── ai_pentest # AI bot signatures
│ ├── sql_injection # SQLi patterns
│ ├── xss # XSS patterns
│ ├── command_injection # CMD/PowerShell injection
│ ├── ssrf # Server-side request forgery
│ ├── path_traversal # Directory traversal
│ ├── brute_force # Login brute force
│ ├── honeypot # Trap endpoints
│ ├── behavioral # Timing/jitter analysis
│ ├── automation_fingerprint # [v3.1] Headless browser + bot detection
│ ├── payload_sequence # [v3.1] Sequential payload chain analysis
│ ├── recon_detector # [v3.1] Recon behavior patterns
│ └── multi_vector # [v3.1] Parallel multi-vector correlation
├── responders/ # Firewall (iptables), Nginx, Cloudflare API
├── reporting/ # Forensic JSON + HTML reports
├── notifications/ # Email, Telegram, Slack
└── utils/ # Colors, log parser
XXMNN, Shannon, Claude, GPTBot, Nuclei, Burp Suite ve diğer otonom yapay zeka saldırı araçlarına karşı dijital altyapınızı koruyan yeni nesil bir "Sessiz Muhafız" güvenlik sistemidir.
XXMNN sunucunuzun yanına kurulur. Web sunucunuzun (Nginx/Apache) access log dosyasını gerçek zamanlı okur:
- DORMANT (Uyku) — %0 CPU ile log satırlarını izler
- ALERT (Alarm) — Şüpheli pattern tespit eder, oturum puanlamaya başlar
- AWAKE (Uyanık) — Tehdit doğrulandı, tüm savunma katmanlarını aktive eder
- BLOCKING (Engelleme) — IP'yi iptables + Cloudflare + Nginx ile engeller
- REPORTING (Raporlama) — Adli rapor oluşturur (JSON + HTML)
- DORMANT'a dönüş — Tekrar uyur
| Katman | Savunma | Ne Yakalar |
|---|---|---|
| 0 | Otomasyon Parmak İzi | HeadlessChrome, Playwright, sqlmap, Burp, Nuclei, 50+ bot UA |
| 1 | Keşif Tespiti | robots.txt→.env→.git zincirleri, hızlı tarama, HEAD parmak izi |
| 2 | Oturum Puanlama | IP başına kümülatif tehdit puanı, honeypot tetikleyiciler (+30) |
| 3 | İmza Tespiti | SQLi, XSS, SSRF, CMD Injection, Path Traversal, Brute Force |
| 4 | Payload Zinciri | Ardışık UNION→error→blind zincirleri, URL-encoded WAF bypass |
| 5 | Çoklu Vektör Korelasyon | Aynı IP'den 3+ saldırı tipi = AI pentest aracı (%99 güven) |
git clone https://github.com/YOUR_USERNAME/xxmnn.git
cd xxmnn
pip install -r requirements.txtpython -m xxmnn --demopython -m xxmnn --watch /var/log/nginx/access.logpython -m xxmnn --file /var/log/nginx/access.logtail -f /var/log/nginx/access.log | python -m xxmnnpython -m xxmnn --versionssh root@YOUR_SERVER
git clone https://github.com/YOUR_USERNAME/xxmnn.git /opt/xxmnn
cd /opt/xxmnn
pip install -r requirements.txtcp config.yaml.example config.yaml
nano config.yamlcat > /etc/systemd/system/xxmnn.service << 'EOF'
[Unit]
Description=XXMNN Anti-AI Pentest Defense System
After=nginx.service
[Service]
Type=simple
ExecStart=/usr/bin/python3 -m xxmnn --watch /var/log/nginx/access.log -c /opt/xxmnn/config.yaml
WorkingDirectory=/opt/xxmnn
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOFsystemctl daemon-reload
systemctl enable xxmnn
systemctl start xxmnn
systemctl status xxmnnArtık XXMNN sunucunuzda uyuyor. Saldırı başladığında otomatik uyanacak, engelleyecek ve sizi bilgilendirecek.
cp config.yaml.example config.yaml
nano config.yamlXXMNN saldırı tespit ettiğinde size otomatik email gönderir. Gmail ile kurulum:
⚠️ Normal Gmail şifresi çalışmaz! App Password oluşturman gerekiyor.
- https://myaccount.google.com/apppasswords adresine git
- Google hesabınla giriş yap
- "Select app" → Mail seç
- "Select device" → Other seç → "XXMNN" yaz
- Generate tıkla
- 16 haneli şifreyi kopyala (örn:
abcd efgh ijkl mnop)
💡 App Passwords seçeneğini görmüyorsan: Önce 2-Step Verification aktive et.
notifications:
email:
enabled: true
smtp_host: "smtp.gmail.com"
smtp_port: 587
username: "your_email@gmail.com"
password: "abcd efgh ijkl mnop" # App Password (NOT your Gmail password)
from: "your_email@gmail.com"
to: "alert_recipient@gmail.com" # Where to send alertspython -m xxmnn --demo
# Should show: [EMAIL] Bildirim gönderildi: your_email@gmail.comXXMNN saldırı tespit ettiğinde Telegram'a anlık mesaj gönderir.
- Telegram'ı aç → @BotFather ara → başlat
/newbotyaz- Bot adı ver:
XXMNN Security Bot - Username ver:
xxmnn_defense_bot(benzersiz olmalı) - Bot Token verilecek → Kopyala
✅ Done! Use this token to access the HTTP API:
7123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxx
- Oluşturduğun bota Telegram'dan bir mesaj at (herhangi bir şey yaz)
- Tarayıcıda bu URL'yi aç (TOKEN kısmını kendi token'ınla değiştir):
https://api.telegram.org/bot7123456789:AAFxxxxxxxx/getUpdates
- JSON çıktısında chat id'yi bul:
"chat": {
"id": 987654321, ← BU SENIN CHAT ID'N
"first_name": "Your Name"
}notifications:
telegram:
enabled: true
bot_token: "7123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxx"
chat_id: "987654321"python -m xxmnn --demo
# Should show: [TELEGRAM] Bildirim gönderildi| Channel | What You Need | Where to Get It | Config Key |
|---|---|---|---|
| Gmail | App Password (16 chars) | myaccount.google.com/apppasswords | notifications.email |
| Telegram | Bot Token + Chat ID | @BotFather + getUpdates API | notifications.telegram |
| Slack | Webhook URL | api.slack.com/apps | notifications.slack |
💡 Tip: Birden fazla kanalı aynı anda aktif edebilirsiniz. XXMNN tüm aktif kanallara bildirim gönderir.
XXMNN, bildirim şifrelerini (Gmail App Password, Telegram Token) korumak için 3 katmanlı config sistemi kullanır:
Katman 1: Varsayılanlar (kod içi) → En düşük öncelik
Katman 2: config.yaml (dosya) → Üzerine yazar
Katman 3: ENV variables (ortam değişkeni) → EN YÜKSEK öncelik ✅
| Saldırı | config.yaml | ENV variable |
|---|---|---|
| Path traversal ile dosya okuma | ❌ Şifreler çalınır | ✅ Dosyada şifre yok |
| SSRF ile dosya okuma | ❌ Şifreler çalınır | ✅ Dosyada şifre yok |
| Git repo sızıntısı | ❌ Şifreler çalınır | ✅ Dosyada şifre yok |
# systemd servisinde şifreleri ENV olarak tanımla:
Environment=XXMNN_EMAIL_PASS=abcdefghijklmnop
Environment=XXMNN_TG_TOKEN=7123456789:AAFxxxxxxxxxx
Environment=XXMNN_TG_CHAT_ID=987654321Desteklenen tüm ENV değişkenleri:
| ENV Variable | Config Karşılığı |
|---|---|
XXMNN_EMAIL_ENABLED |
notifications.email.enabled |
XXMNN_EMAIL_USER |
notifications.email.username |
XXMNN_EMAIL_PASS |
notifications.email.password |
XXMNN_TG_ENABLED |
notifications.telegram.enabled |
XXMNN_TG_TOKEN |
notifications.telegram.bot_token |
XXMNN_TG_CHAT_ID |
notifications.telegram.chat_id |
XXMNN_CF_TOKEN |
cloudflare.api_token |
⚠️ Önemli:config.yamlkullanıyorsan dosya izinlerini kısıtla:chmod 600 config.yaml
| Metric | Value | Result |
|---|---|---|
| Total Requests | 32 | ✅ All traffic analyzed |
| Threats Detected | 25 | ✅ AI + human attacks caught |
| AI Attacks Blocked | 22 | ✅ HeadlessChrome, sqlmap, Nuclei, Nmap blocked |
| Unique IPs Blocked | 3 | ✅ 3 different attackers stopped |
| Config Theft Attempt | 1 | ✅ Path traversal blocked |
| False Positives | 0 | ✅ Normal traffic allowed |
| Response Time | < 0.05s | ✅ Instant blocking |
| Metric | Value | Result |
|---|---|---|
| Total Requests | 12 | ✅ All traffic analyzed |
| Threats Detected | 3 | ✅ All attacks caught |
| False Positives | 0 | ✅ Normal traffic allowed |
| Response Time | < 0.05s | ✅ Instant blocking |
- ✅ Automation Fingerprint Detector: 50+ bot/araç UA imzası + SDK header tespiti
- ✅ Payload Sequence Detector: 6 saldırı tipinde ardışık payload zinciri analizi + URL decode
- ✅ Recon Detector: 30 hassas dosya zinciri + hızlı tarama + HEAD parmak izi
- ✅ Multi-Vector Detector: Paralel çoklu vektör korelasyon motoru
- ✅
--watchmodu: Gerçek zamanlı log izleme (tail -f benzeri) - ✅ 6 katmanlı savunma: Otomasyon → Keşif → Session → İmza → Payload → Korelasyon
- ✅ AI pentest analizi: Shannon, Nuclei, Burp, ZAP, sqlmap parmak izleri eklendi
- ✅ Credential Security: ENV variable desteği — şifreler dosyada değil bellekte
- ✅ 7 fazlı savaş simülasyonu: 32 saldırı, 3 farklı saldırgan, 0 false positive
- ✅ 1251 satırlık monolitten 25+ modüllü paket yapısına refactor
- ✅ Bildirim sistemi: Email (SMTP/TLS), Telegram Bot API, Slack Webhook
- ✅ Cloudflare API ile otomatik IP engelleme
- ✅ 9 dedektörde genişletilmiş saldırı imzaları
- ✅ Session Scoring v2: Honeypot (+30), rapid login (+15)
- ✅ Duplicate BehavioralDetector sorunu giderildi
- ✅ Bare
except:blokları spesifik exception handling ile değiştirildi
- ✅ Session scoring sistemi
- ✅ Honeypot dedektörü
- ✅ Davranışsal analiz (jitter + static resource)
- ✅ 7 temel dedektör (SQLi, XSS, CMD, SSRF, PathTraversal, BruteForce, AIPentest)
- ✅ Firewall + Nginx responder
- ✅ Forensic reporting (JSON + HTML)
This project is licensed under the MIT License - see the LICENSE file for details.