Skip to content

noirlang/kriya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kriya v1.0 - Autonomous AI Penetration Testing Framework

AI-Powered Security Scanner - 11 güvenlik modülü, Google Gemini AI analizi, modüler CLI yapısı

Go Version AI License Tests

🎯 Kriya Nedir?

Kriya, web uygulamalarını otomatik olarak test eden, OWASP Top 10 zafiyetlerini bulan ve Google Gemini AI ile akıllı analiz yapan bir otonom penetrasyon test aracıdır.

🚀 Temel Özellikler

┌─────────────────────────────────────────────────────────┐
│  🎯 11 GÜVENLİK MODÜLÜ                                  │
│  • SQL Injection      • XSS                             │
│  • SSRF               • XXE                             │
│  • Command Injection  • IDOR                            │
│  • Port Scanning      • Directory Brute Force           │
│  • Web Technology     • Nikto Scan                      │
│  • AI Deep Analysis                                     │
│                                                         │
│  🤖 GOOGLE GEMINI AI                                    │
│  • Otomatik zafiyet analizi                             │
│  • Exploit önerileri                                    │
│  • PoC kod üretimi                                      │
│  • Risk skorlama                                        │
│                                                         │
│  ⚡ MODÜLER CLI                                         │
│  • Tek tek test çalıştırma                              │
│  • Tam otonom pentest                                   │
│  • Threading desteği                                    │
│  • Verbose mod                                          │
└─────────────────────────────────────────────────────────┘

📊 Proje İstatistikleri

📁 Toplam Kod:     ~5,723 satır Go
🔧 Backend:        ~5,723 satır Go
🔧 Ana Dosya:      1,543 satır (main.go)
🧪 Test Modülü:    11 güvenlik testi
📚 Dokümantasyon:  6 markdown dosyası
🤖 AI Model:       Gemini 2.5-flash
⚙️  Bağımlılık:    2 Go package

🔥 Hızlı Başlangıç (5 Dakika)

1️⃣ Kurulum

# Repository'yi klonla
git clone <repo-url>
cd kriya

# API key al (ücretsiz): https://aistudio.google.com/app/apikey
echo 'GEMINI_API_KEY=your-api-key-here' > .env

# Build
go build -o kriya
chmod +x kriya

2️⃣ İlk Test

# Yardımı gör
./kriya --help

# Hızlı SQL injection testi
./kriya -t http://testphp.vulnweb.com --sql

# Tam pentest (11 test)
./kriya -t http://testphp.vulnweb.com

3️⃣ Sonuçları İncele

# Rapor otomatik oluşturulur
cat pentest_report_testphp_vulnweb_com.txt

📖 Detaylı Dokümantasyon

🤖 AI'lar İçin

Başka bir yapay zeka bu projeyi geliştirmek istiyorsa: 👉 AI_DEVELOPER_GUIDE.md - Tam geliştirici rehberi (2,500+ satır)

📚 İnsan Geliştiriciler İçin


🛠️ Kurulum Detayları

Sistem Gereksinimleri

✅ Go 1.21 veya üzeri
✅ Linux / macOS / Windows
✅ Internet bağlantısı (AI için)
✅ 100MB boş alan

Opsiyonel Araçlar (Tam Özellikler İçin)

# Debian/Ubuntu
sudo apt install -y nmap nikto gobuster dirb sqlmap whatweb

# Arch Linux
sudo pacman -S nmap nikto gobuster

# macOS
brew install nmap nikto gobuster sqlmap

Go Kurulumu (Eğer yoksa)

# Linux
wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

# Doğrula
go version  # go version go1.21.0 linux/amd64

Bağımlılıkları İndirme

cd kriya
go mod download
go mod tidy

🎮 Kullanım Kılavuzu

📝 Temel Komutlar

# ════════════════════════════════════════════════════════
# YARDIM
# ════════════════════════════════════════════════════════
./kriya --help


# ════════════════════════════════════════════════════════
# TEK MODÜL TESTLERİ
# ════════════════════════════════════════════════════════

# SQL Injection
./kriya -t http://target.com --sql

# XSS (Cross-Site Scripting)
./kriya -t http://target.com --xss

# SSRF (Server-Side Request Forgery)
./kriya -t http://target.com --ssrf

# XXE (XML External Entity)
./kriya -t http://target.com --xxe

# Command Injection
./kriya -t http://target.com --cmdinj

# IDOR (Insecure Direct Object Reference)
./kriya -t http://target.com --idor

# Nmap Port Scan
./kriya -t http://target.com --nmap


# ════════════════════════════════════════════════════════
# ÇOKLU MODÜL
# ════════════════════════════════════════════════════════

# OWASP Top 3
./kriya -t http://target.com --sql --xss --ssrf

# Injection testleri
./kriya -t http://target.com --sql --xss --cmdinj

# Tüm yeni modüller (v6.0)
./kriya -t http://target.com --ssrf --xxe --cmdinj --idor


# ════════════════════════════════════════════════════════
# TAM PENTEST (11 TEST)
# ════════════════════════════════════════════════════════
./kriya -t http://target.com


# ════════════════════════════════════════════════════════
# PERFORMANS OPSİYONLARI
# ════════════════════════════════════════════════════════

# 10 thread ile hızlı test
./kriya -t http://target.com --threads 10

# Verbose mod (detaylı output)
./kriya -t http://target.com -v

# Kombine
./kriya -t http://target.com --sql --threads 10 -v

🎯 Gerçek Dünya Örnekleri

Senaryo 1: Bug Bounty Testi

# Hızlı zafiyet tarama
./kriya -t https://bugbounty-target.com --sql --xss --ssrf

# Zafiyet bulunduysa detaylı analiz
./kriya -t https://bugbounty-target.com -v

Senaryo 2: Web Uygulaması Güvenlik Değerlendirmesi

# Staging environment testi
./kriya -t https://staging.myapp.com

# Raporu kaydet
./kriya -t https://myapp.com > security_report_$(date +%Y%m%d).log

Senaryo 3: API Güvenlik Testi

# REST API zafiyetleri
./kriya -t https://api.target.com --sql --idor --ssrf

Senaryo 4: Çoklu Hedef Tarama

# Hedef listesi oluştur
cat > targets.txt << EOF
http://target1.com
http://target2.com
http://target3.com
EOF

# Tüm hedefleri tara
while read target; do
    echo "Testing: $target"
    ./kriya -t "$target" --sql --xss
    sleep 5
done < targets.txt

🧪 Test Modülleri Detayları

1. 📡 Nmap Port Scanning

• Açık portları tespit eder
• Servisleri tanımlar
• Versiyon bilgisi toplar

2. 🔍 Web Technology Detection

• Kullanılan framework'ü bulur (PHP, Node.js, vb.)
• Server bilgisi (Apache, Nginx, IIS)
• CMS tespiti (WordPress, Joomla, vb.)

3. 🛡️ Nikto Web Scan

• Bilinen web server zafiyetleri
• Güvenli olmayan konfigürasyonlar
• Eski yazılım versiyonları

4. 📁 Directory Brute Force

• Gizli dizinleri bulur
• Admin panelleri tespit eder
• Backup dosyaları arar

5. 💉 SQL Injection

• Error-based injection
• Union-based injection
• Blind SQL injection
• Time-based injection

Örnek Zafiyet:

http://target.com/user?id=1' OR '1'='1
→ Tüm kullanıcılar döner

6. 🔓 XSS (Cross-Site Scripting)

• Reflected XSS
• Stored XSS
• DOM-based XSS

Örnek Zafiyet:

http://target.com/search?q=<script>alert(1)</script>
→ JavaScript çalışır

7. 🌐 SSRF (Server-Side Request Forgery) [YENİ v6.0]

• AWS metadata erişimi (169.254.169.254)
• GCP metadata erişimi
• Internal network tarama
• File protocol kullanımı

Örnek Zafiyet:

http://target.com/redirect?url=http://169.254.169.254/latest/meta-data/
→ AWS credentials çalınabilir

8. 📄 XXE (XML External Entity) [YENİ v6.0]

• /etc/passwd okuma
• Windows sistem dosyaları
• Source code okuma
• SSRF via XXE

Örnek Zafiyet:

<?xml version="1.0"?>
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]>
<root>&xxe;</root>

9. ⚡ Command Injection [YENİ v6.0]

• OS komut çalıştırma
• Reverse shell
• Time-based detection
• Output-based detection

Örnek Zafiyet:

http://target.com/ping?ip=8.8.8.8; whoami
→ Sistem komutu çalışır

10. 🔑 IDOR [YENİ v6.0]

• Yetkilendirme bypass
• Başka kullanıcı verileri erişimi
• ID enumeration

Örnek Zafiyet:

http://target.com/profile?user_id=100  → Kendi profilin
http://target.com/profile?user_id=101  → Başkasının profili

11. 🤖 AI Deep Analysis

• Tüm bulguları analiz eder
• Exploit chain'leri bulur
• PoC kodları üretir
• Risk skorları verir (0-100)
• Remediation önerileri sunar

🤖 AI Entegrasyonu Nasıl Çalışır?

Akış Diyagramı

[Test Sonuçları]
      ↓
[Gemini AI 2.5-flash]
      ↓
┌─────────────────────┐
│ 1. İlk Analiz       │ → Zafiyet tespiti
│ 2. Deep Dive        │ → Exploit senaryoları
│ 3. PoC Üretimi      │ → Kod örnekleri
│ 4. Risk Skorlama    │ → 0-100 puan
│ 5. Remediation      │ → Çözüm önerileri
└─────────────────────┘
      ↓
[Final Rapor]

Örnek AI Analizi

═══════════════════════════════════════════════════════════
🤖 AI ANALİZİ
═══════════════════════════════════════════════════════════

Severity: CRITICAL
Risk Score: 95/100

Zafiyet: SQL Injection
Parametresi: id
Etki: Full database access

Exploitation:
1. Union-based injection kullan
2. Database içeriğini oku: ' UNION SELECT table_name FROM information_schema.tables--
3. Admin hash'ini çek: ' UNION SELECT password FROM users WHERE role='admin'--
4. Hash'i kır veya yeni admin oluştur

PoC Kodu:
```python
import requests
url = "http://target.com/user?id=1' UNION SELECT username,password FROM users--"
response = requests.get(url)
print(response.text)  # Tüm kullanıcılar

Remediation:

  1. Prepared statements kullan
  2. Input validation ekle
  3. Least privilege principle uygula
  4. WAF (Web Application Firewall) ekle

---

## 📊 Proje Yapısı (AI'lar İçin)

kriya/ │ ├── main.go # Ana giriş noktası │ ├── CLI flag parsing # (20-32. satırlar) │ ├── main() fonksiyonu # (34-90. satırlar) │ ├── showHelp() # Yardım ekranı │ ├── runSpecificModules() # Seçili modülleri çalıştır │ └── runFullPentestWithTarget() # 11 testi çalıştır │ ├── llm/ # AI entegrasyonu │ ├── gemini.go # Gemini client │ │ ├── NewGeminiClient() # Client başlatma │ │ ├── Generate() # Prompt gönderme │ │ └── GetAPIKey() # .env'den key alma │ └── iterative.go # İteratif AI analizi │ └── IterativeAnalysis() # 2-aşamalı derin analiz │ ├── utils/ # Test modülleri │ ├── ssrf.go # SSRF testi (142 satır) │ │ ├── TestSSRF() # Ana test fonksiyonu │ │ └── FormatSSRFResults() # Sonuç formatlama │ ├── xxe.go # XXE testi (120 satır) │ ├── cmdinjection.go # Command Injection (150 satır) │ ├── idor.go # IDOR testi (140 satır) │ ├── sqlinjection.go # SQL Injection │ ├── xss.go # XSS testi │ ├── nmap.go # Nmap wrapper │ ├── dirbrute.go # Directory brute force │ ├── webtech.go # Web teknoloji tespiti │ ├── url_helpers.go # URL manipülasyon │ │ ├── FindURLParams() # Parametre bulma │ │ ├── InjectPayload() # Payload enjekte etme │ │ └── ExtractBaseURL() # Base URL çıkarma │ └── helpers.go # Yardımcı fonksiyonlar │ ├── .env # Gemini API key (GİZLİ!) ├── go.mod # Go module tanımları └── go.sum # Dependency checksums


### Kod Metrikler

┌─────────────────────┬────────┐ │ Dosya │ Satır │ ├─────────────────────┼────────┤ │ main.go │ 1,543 │ │ utils/ssrf.go │ 142 │ │ utils/xxe.go │ 120 │ │ utils/cmdinjection │ 150 │ │ utils/idor.go │ 140 │ │ utils/sqlinjection │ 200+ │ │ utils/xss.go │ 180+ │ │ llm/gemini.go │ 100 │ │ llm/iterative.go │ 150+ │ │ Diğer utils │ 2,000+ │ ├─────────────────────┼────────┤ │ TOPLAM │ ~5,723 │ └─────────────────────┴────────┘


---

## 🔧 Yeni Modül Ekleme (AI Geliştiriciler İçin)

### Checklist

☐ 1. utils/newmodule.go oluştur ☐ 2. Result struct tanımla ☐ 3. TestXXX() fonksiyonu yaz ☐ 4. FormatXXXResults() fonksiyonu yaz ☐ 5. main.go'ya flag ekle ☐ 6. showHelp() güncelle ☐ 7. runSpecificModules() ekle ☐ 8. runFullPentestWithTarget() ekle ☐ 9. Build ve test et ☐ 10. Dokümantasyon güncelle


### Örnek: CORS Modülü Ekleme
```go
// 1. utils/cors.go
package utils

type CORSResult struct {
    Vulnerable bool
    Details    []string
}

func TestCORS(targetURL string) CORSResult {
    // CORS misconfiguration testi
    // ...
}

func FormatCORSResults(result CORSResult) string {
    // Sonuç formatlama
    // ...
}

// 2. main.go - flag ekle
var corsTest = flag.Bool("cors", false, "Run CORS testing")

// 3. main.go - runSpecificModules() içine ekle
if *corsTest {
    fmt.Println("🌐 CORS Testing...")
    corsResult := utils.TestCORS(target)
    // ...
}

// 4. main.go - runFullPentestWithTarget() içine ekle
fmt.Println("🌐 [12/13] CORS Testing...")
corsResult := utils.TestCORS(target)
// ...

Detaylı rehber: AI_DEVELOPER_GUIDE.md


🐛 Sorun Giderme

Hata: "nmap: command not found"

sudo apt install nmap

Hata: "GEMINI_API_KEY not found"

# .env dosyası oluştur
echo 'GEMINI_API_KEY=your-key' > .env

# API key al: https://aistudio.google.com/app/apikey

Hata: "cannot find package"

go mod download
go mod tidy
go build -o kriya

Hata: "API rate limit exceeded"

# Thread sayısını azalt
./kriya -t target.com --threads 1

# 1 dakika bekle ve tekrar dene

Build Hatası

# Go versiyonunu kontrol et
go version  # 1.21+ olmalı

# Dependency'leri temizle ve yeniden indir
rm go.sum
go mod tidy
go build -o kriya

📈 Performans İpuçları

Threading

# Varsayılan (5 thread)
./kriya -t target.com

# Hızlı (10 thread)
./kriya -t target.com --threads 10

# Çok hızlı (20 thread) - DİKKAT: WAF tetikleyebilir
./kriya -t target.com --threads 20

Verbose Mode

# Detaylı log (debugging için)
./kriya -t target.com -v

# Log dosyasına kaydet
./kriya -t target.com -v > debug.log 2>&1

⚠️ Güvenlik ve Etik

⛔ UYARI

┌─────────────────────────────────────────────────────┐
│  ⚠️  SADECE SAHİP OLDUĞUNUZ VEYA İZİN ALDIĞINIZ    │
│     SİSTEMLERİ TEST EDİN!                           │
│                                                     │
│  İzinsiz penetration testing YASADIŞTIR ve         │
│  ciddi yasal sonuçları olabilir.                   │
└─────────────────────────────────────────────────────┘

✅ Yasal Kullanım Alanları

  • Kendi web uygulamanız
  • Bug bounty programları
  • Authorized penetration testing
  • Eğitim amaçlı (izinli ortamlarda)
  • Security assessment sözleşmeleri

📜 Yasal Sorumluluk

Kriya kullanıcıları:

  1. Hedef sistemin sahibinden yazılı izin almalıdır
  2. Test kapsamını net tanımlamalıdır
  3. Test zamanlarını belirler ve uymalıdır
  4. Bulguları güvenli şekilde raporlamalıdır
  5. Yerel yasalara uygun hareket etmelidir

📚 Ek Kaynaklar

Dokümantasyon

Harici Kaynaklar

Test Siteleri (Güvenli)


🤝 Katkıda Bulunma

Yeni Modül Eklemek İstiyorsanız

  1. AI_DEVELOPER_GUIDE.md okuyun
  2. Fork edin
  3. Yeni modülü oluşturun
  4. Test edin
  5. Pull request gönderin

Bug Bildirimi

  • Issue açın
  • Detaylı açıklama yazın
  • Hata mesajlarını ekleyin
  • Go versiyonunu belirtin

📊 Versiyon Geçmişi

v6.0 (Ocak 2026) - CURRENT

✨ YENİ MODÜLLER:
   • SSRF (Server-Side Request Forgery)
   • XXE (XML External Entity)
   • Command Injection
   • IDOR (Insecure Direct Object Reference)

🔧 İYİLEŞTİRMELER:
   • Blog özelliği kaldırıldı
   • Modüler CLI sistemi
   • Threading desteği
   • Verbose mod
   • 11 test (7'den artırıldı)

📚 DOKÜMANTASYON:
   • AI_DEVELOPER_GUIDE.md (2,500+ satır)
   • Tüm modüller dokümante edildi

v5.0 (Önceki Versiyon)

• 7 test modülü
• Menu-driven interface
• Blog özelliği
• 2-fazlı test sistemi

📞 İletişim & Destek

Topluluk

  • 📧 Email: [Eklenecek]
  • 💬 Discord: [Eklenecek]
  • 🐦 Twitter: [Eklenecek]

Geliştirici

  • 👨‍💻 Maintained by: [İsim]
  • 🌐 Website: [Eklenecek]

📄 Lisans

MIT License - Detaylar için LICENSE dosyasına bakın.


🎓 Öğrenme Kaynakları

Penetration Testing 101

  1. OWASP Top 10
  2. Web Security Academy
  3. HackTheBox
  4. TryHackMe

Go Programming

  1. Go by Example
  2. Effective Go
  3. Go Security

🌟 Özellikler (Teknik Detay)

Modüler Mimari

// Her modül bağımsız çalışır
type SecurityModule interface {
    Test(target string) Result
    Format(result Result) string
}

AI Entegrasyonu

// Gemini 2.5-flash
model.SetTemperature(0.7)
model.SetMaxOutputTokens(8192)

Async Testing

// Goroutine desteği (planned)
go testModule(target)

🎯 Roadmap

v6.1 (Planned)

  • CORS Misconfiguration testi
  • JWT Token exploitation
  • CSRF testing
  • GraphQL testing
  • WebSocket testing

v7.0 (Future)

  • Web UI
  • Report export (PDF/HTML)
  • CI/CD integration
  • Docker support
  • Plugin system

💡 İpuçları

Hızlı Test

./kriya -t target.com --sql  # Sadece SQL

Kapsamlı Test

./kriya -t target.com  # Tüm testler

Debugging

./kriya -t target.com -v  # Verbose

Production

./kriya -t target.com --threads 1  # Rate limit friendly

🔱 Kriya v6.0

AI-Powered Autonomous Penetration Testing

Made with ❤️ by Security Researchers

DocumentationModulesCommands

════════════════════════════════════════════════════════════════ 🔱 Kriya - Autonomous Penetration Testing ════════════════════════════════════════════════════════════════

📡 [1/11] Nmap Port Scanning... ✓ 3 open ports found

🔍 [2/11] Web Technology Detection... ✓ Apache 2.4.7, PHP 5.6 tespit edildi

🌐 [3/7] Nikto Web Server Taraması... ✓ 12 zafiyet bulundu

📁 [4/7] Directory Brute Force... ✓ 8 gizli dizin bulundu

💉 [5/7] SQL Injection Testi... 🔴 SQL Injection zafiyeti tespit edildi!

🔓 [6/7] XSS Testi... 🔴 2 XSS zafiyeti bulundu

🤖 [7/7] AI Exploit Analizi...

AI Raporu:

🎯 SÖMÜRME RAPORU

Risk Skoru: 75/100

Kritik Zafiyetler

SQL Injection - listproducts.php

Nasıl Sömürülür:

sqlmap -u "http://testphp.vulnweb.com/listproducts.php?cat=1" --dbs
# Çıktı: acuart, information_schema

sqlmap -u "..." -D acuart -T users --dump
# Admin credentials çekildi

Exploit Kodu:

import requests
url = "http://testphp.vulnweb.com/login.php"
payload = "' OR '1'='1"
r = requests.post(url, data={'user': payload, 'pass': 'x'})
# Bypass successful

Agresif Mod Kararı:

  • Karar: HAYIR
  • Sebep: SQL injection ve XSS bulundu, risk skoru yeterli (75/100)

Rapor kaydedildi: reports/full_pentest_...md


### Düşük Risk Hedef (Agresif Mod Aktif)

```bash
./kriya
# 4

Hedef: low-risk-server.local

# PHASE 1
📡 Nmap: 22, 80 açık
🌐 Nikto: 2 düşük risk
💉 SQL: Zafiyet yok
🔓 XSS: Zafiyet yok

📊 Risk Skoru: 18/100

🤖 AI Kararı:
- Risk çok düşük (18/100)
- Kritik zafiyet bulunamadı
- **AGRESİF TESTLER GEREKLİ!**

════════════════════════════════════════════════════════════════
🔥 PHASE 2: AGRESİF TESTLER BAŞLATILIYOR
Sebep: Risk skoru çok düşük (18/100)
AI Önerisi: Daha derin testler gerekli
════════════════════════════════════════════════════════════════

⚠️  AGRESİF TESTLER hedefe ZARAR verebilir! Devam et? [y/N]: y

🎯 [1/5] Metasploit Auto-Exploit...
  Testing port 22 (SSH)...
  ✗ Exploit başarısız

💉 [2/5] SQLMap Agresif Mod...
  --level=5 --risk=3 --dump-all
  ✗ Hala zafiyet yok

🔓 [3/5] Brute Force Saldırıları...
  SSH brute force...
  🔴 KİMLİK BULUNDU: test:test123

📜 [4/5] Exploit Kodları İndiriliyor...
  CVE yoksa atlanıyor

🤖 AI Post-Exploitation Analizi...

## SSH SÖMÜRÜSÜ

### Bulunan Kimlik:
- Kullanıcı: test
- Şifre: test123

### Post-Exploitation:
```bash
# 1. Bağlan
ssh test@low-risk-server.local

# 2. Privilege escalation dene
sudo -l
find / -perm -4000

# 3. Hassas dosyalar
cat /etc/shadow
cat ~/.ssh/id_rsa

# 4. Lateral movement
ssh-copy-id test@other-server

İKİ FAZLI RAPOR KAYDEDİLDİ

✓ Rapor: reports/full_pentest_low-risk-server_2026-01-30_16-45-00.md 📊 Dosya boyutu: 87 KB


## 📚 Dokümantasyon

- **README.md** - Bu dosya
- **[AGGRESSIVE_MODE_GUIDE.md](AGGRESSIVE_MODE_GUIDE.md)** - Agresif mod detaylı rehber
- **[FULL_PENTEST_GUIDE.md](FULL_PENTEST_GUIDE.md)** - Tam pentest kullanımı
- **[SQL_INJECTION_GUIDE.md](SQL_INJECTION_GUIDE.md)** - SQL injection testleri
- **[METASPLOIT_INTEGRATION.md](METASPLOIT_INTEGRATION.md)** - Metasploit kullanımı
- **[KALI_KURULUM.md](KALI_KURULUM.md)** - Kali Linux'ta kurulum

## 🎯 4 İşlem Modu

### 1. Blog Yazısı (3 AI Agent)
```bash
./kriya → 1
Konu: "Cybersecurity Trends 2026"
# AI 600-800 kelimelik blog yazar

2. Güvenlik Taraması (4 AI Agent)

./kriya → 2
Hedef: scanme.nmap.org
# Nmap + ExploitDB + Metasploit komutları

3. SQL Injection (4 AI Agent)

./kriya → 3
Hedef: http://testphp.vulnweb.com/listproducts.php?cat=1
# SQLMap ile derin test

4. TAM PENTEST - 2 FAZLI (16 AI Agent)

./kriya → 4
Hedef: target.com
# Phase 1: 7 test + AI analiz
# Phase 2: 5 agresif test (gerekirse)

🔥 Agresif Mod

Ne Zaman Aktif Olur?

AI veya sistem şu durumlarda agresif mod önerir:

  • ✅ Risk skoru < 30
  • ✅ Kritik/Yüksek zafiyet yok
  • ✅ SQL form var ama zafiyet tespit edilmedi
  • ✅ WordPress var ama zafiyet yok

Ne Yapar?

  1. Metasploit Auto-Exploit - Her port için otomatik exploit dener
  2. SQLMap Maksimum - --level=5 --risk=3 --dump-all
  3. Hydra Brute Force - SSH, FTP, HTTP login
  4. WPScan Agresif - WordPress enumerate all
  5. ExploitDB Download - CVE'ler için exploit kodu indir

Örnek Çıktı:

🎯 Metasploit Auto-Exploit:
  🔴 SESSION ALINDI! (port 21, vsftpd backdoor)
  Shell: root@target:/# 

💉 SQLMap Agresif:
  🔴 Veritabanı dump edildi!
  Database: webapp
  Tables: users (150 rows), orders (4500 rows)
  Hashes: admin:5f4dcc3b5aa765d61d8327deb882cf99

🔓 Brute Force:
  🔴 SSH Kimlik: admin:password123

⚠️ Güvenlik Uyarısı

╔═══════════════════════════════════════════════════════════╗
║          ⚠️  YASAL UYARI - ZORUNLU OKUYUN  ⚠️             ║
║                                                           ║
║  Bu araç SADECE şu amaçlar için kullanılabilir:         ║
║  ✅ Kendi sistemlerinizi test etmek                      ║
║  ✅ İzinli penetration testing                           ║
║  ✅ CTF ve eğitim ortamları                              ║
║  ✅ Bug bounty programları (izinli)                      ║
║                                                           ║
║  İZİNSİZ kullanım YASADIDIR ve cezai sorumluluk doğurur ║
║                                                           ║
║  AGRESİF MOD özellikle tehlikelidir:                     ║
║  • Hedefi çökertebilir                                   ║
║  • Hesapları kilitleyebilir                              ║
║  • IDS/IPS alarmlarını tetikler                          ║
║  • Yasal takibata yol açar                               ║
║                                                           ║
║  KULLANICI SORUMLUDUR!                                   ║
╚═══════════════════════════════════════════════════════════╝

🧪 Test Hedefleri (Yasal)

İzinli Test Siteleri:

  • scanme.nmap.org - Nmap için
  • http://testphp.vulnweb.com - SQL, XSS için
  • http://zero.webappsecurity.com - Banking app

Kendi Lab'ınız:

# DVWA (Damn Vulnerable Web App)
sudo apt install dvwa

# Metasploitable VM
# OWASP Juice Shop
# WebGoat

📊 Performans

Mod Testler Süre CPU RAM
Blog 3 agent 1-2 dk 10% 30MB
Nmap 4 agent 3-5 dk 20% 40MB
SQL 4 agent 5-10 dk 30% 60MB
Phase 1 7 test 10-15 dk 40% 80MB
Phase 2 5 agresif +15-30 dk 60% 150MB
TOPLAM 12 test 25-45 dk 50% 150MB

🔬 Teknik Detaylar

Mimari

main.go (1014 satır)
├── Blog Writer (runBlogWriter)
├── Security Scanner (runSecurityScanner)
├── SQL Injection (runSQLInjectionTest)
└── Full Pentest (runFullPentest)
    ├── Phase 1: Normal Tests
    │   ├── Nmap
    │   ├── WebTech
    │   ├── Nikto
    │   ├── DirBrute
    │   ├── SQLMap
    │   ├── XSS
    │   └── AI Analysis
    ├── AI Decision Engine
    │   ├── Risk Score Calculation
    │   ├── Aggressive Mode Decision
    │   └── Phase 2 Trigger
    └── Phase 2: Aggressive Tests (optional)
        ├── Metasploit Auto-Exploit
        ├── SQLMap --level=5 --risk=3
        ├── Hydra Brute Force
        ├── WPScan Aggressive
        ├── ExploitDB Code Fetch
        └── AI Post-Exploitation Analysis

Kod İstatistikleri

  • Toplam: 3,600+ satır Go kodu
  • main.go: 1,014 satır
  • utils/: 2,100+ satır (10 dosya)
  • agents/: 50 satır
  • tasks/: 100 satır

AI Agent Rolleri (16)

  1. Blog: Araştırmacı, Yazar, Editör
  2. Security: Nmap Tarayıcı, Versiyon Dedektörü, Exploit Arayıcı, Güvenlik Analisti
  3. SQL: Web Tarayıcı, SQL Tester, Payload Üretici, DB Analisti
  4. Pentest: Web Scanner, XSS Tester, Dir Bruteforcer, Tech Detector, Orchestrator
  5. Aggressive: Auto-Exploiter, Brute Forcer, Post-Exploit Analyst

🎓 Kullanım Senaryoları

Senaryo 1: İlk Tarama

# Yeni bir hedefe bakıyorsunuz
./kriya → 2 → scanme.nmap.org
# Hızlıca portlar ve servisler

Senaryo 2: Web App Analizi

# Bir web uygulaması test edeceksiniz
./kriya → 4 → https://webapp.local
# Phase 1: SQL, XSS, Nikto, Dir scan
# AI: Yeterli bulgular (risk: 65/100)
# Rapor hazır

Senaryo 3: Derin Araştırma

# İlk tarama yetersiz kaldı
./kriya → 4 → target.local
# Phase 1: Düşük bulgular (risk: 25/100)
# AI: "Agresif mod gerekli!"
# Phase 2: Brute force, auto-exploit
# SSH kimliği bulundu!

Senaryo 4: CTF Yarışması

# CTF makinesini çözmek için
./kriya → 4 → 10.10.10.123
# Tüm testler çalışır
# AI exploit kodları verir
# Flag bulunur!

🤝 Katkıda Bulunma

Bu proje eğitim amaçlıdır. Geliştirme önerileri:

  • Parallel test execution
  • Web dashboard
  • PDF rapor export
  • Custom wordlist desteği
  • Exploit başarı tracking
  • OWASP Top 10 mapping

📝 Lisans

Educational Use Only - Eğitim amaçlıdır

👨‍💻 Geliştirici

ra + GitHub Copilot işbirliği ile geliştirilmiştir.


🚀 Hızlı Başlangıç

# 1. Klonla
git clone <repo> && cd kriya

# 2. API key
echo 'GEMINI_API_KEY=your-key' > .env

# 3. Compile
go build -o kriya

# 4. İlk test
./kriya
# 2 seç → scanme.nmap.org

# 5. Tam pentest
./kriya  
# 4 seç → http://testphp.vulnweb.com

# 🎉 Hazırsın!

Major Feature: 2-Fazlı Agresif Penetration Testing
AI Model: Google Gemini 2.5 Flash

Star vererek destekle!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages