jay123anta/honeypot
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jay123anta/honeypot
包简介
Laravel Honeypot Security Middleware: Protect your app with threat detection, rate limiting, AI threat analysis, and real-time alerts.
README 文档
README
Advanced Laravel Middleware for Real-Time Web Threat Detection and Protection
🚀 Features
- ✅ DDoS, SQL Injection, XSS, RCE, SSRF Detection
- ✅ AI-Based Threat Classification (via FastAPI)
- ✅ Rate Limiting & Auto IP Banning
- ✅ User-Agent & Payload Anomaly Detection
- ✅ Slack / SMS / Email Alerts (Configurable)
- ✅ Interactive Dashboard with Charts
- ✅ CSV Export of Attack Logs
- ✅ Artisan Commands for Ban/Unban IPs
- ✅ Easy Setup & Configuration
📦 Installation
composer require jay123anta/honeypot php artisan vendor:publish --tag=honeypot-security php artisan migrate # ⚙️ Configuration All Honeypot behavior is managed via `config/honeypot.php`. ### Key Options: ```php // Request Limits 'rate_limit_threshold' => 100, 'ddos_threshold_per_second' => 20, 'flood_threshold' => 30, // Storage Options 'storage' => [ 'log_to_database' => true, 'log_to_file' => true, ], // IP Auto-Ban 'auto_ban' => [ 'enabled' => true, 'ban_duration_minutes' => 60, ], // Referrer Protection 'referrer_protection' => [ 'enabled' => false, 'allowed_hosts' => ['yourdomain.com'], ], // Activity Logging 'activity_log' => [ 'enabled' => false, ], // AI Detection 'ai_detection' => [ 'enabled' => true, 'ai_model_url' => 'http://localhost:8000/predict', ], // Alerts 'alerts' => [ 'enable_slack' => true, 'slack_webhook_url' => env('HONEYPOT_SLACK_WEBHOOK'), 'enable_sms' => true, 'sms_gateway_url' => env('HONEYPOT_SMS_GATEWAY'), 'sms_to_number' => env('HONEYPOT_SMS_TO'), ], // Custom Regex Rules (optional) 'custom_patterns' => [ '/evilstring/i' => 'Custom Threat', ], ## You can also publish the config file and customize: php artisan vendor:publish --tag=honeypot-security # 🧰 Usage You can apply the Honeypot middleware globally or to selected routes. ## Global Middleware (Kernel.php) ```php protected $middleware = [ \Security\Honeypot\Middleware\HoneypotMiddleware::class, ]; # 📊 Dashboard The Honeypot Security dashboard provides a UI for monitoring attacks. ### Visit: /honeypot/dashboard ### Features: - Table of detected attacks - Charts: - Threat Trends - Top IPs - Attack Types - Export CSV - Date/Type/IP filters (coming soon) You can customize the UI in: resources/views/vendor/honeypot/
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-25