Insider77Circle/Red-Agent
GitHub: Insider77Circle/Red-Agent
一款 AI 驱动的代理管理平台,通过自然语言界面实现代理发现、链路构建与安全审计。
Stars: 0 | Forks: 0
nmap, curl, etc.] ``` ## 🎨 功能特性 ### 🤖 AI 驱动的自然语言界面 - **对话式命令**:“为我构建一条经过欧洲的 3 跳链路” - **上下文感知**:记住之前的命令并保持对话流畅 - **精美的终端 UI**:带有面板、表格和格式化响应的漂亮控制台输出 ### 🔄 完整的代理生命周期管理 ``` flowchart LR A[Discovery] --> B[Validation] B --> C[Organization] C --> D[Maintenance] D --> E[Optimization] E --> A style A fill:#f9f,stroke:#333 style B fill:#bbf,stroke:#333 style C fill:#bfb,stroke:#333 style D fill:#fbf,stroke:#333 style E fill:#ffb,stroke:#333 ``` ### 🛡️ 高级安全审计 - **DNS 泄露检测**:确保你的真实 IP 不会被暴露 - **TLS 劫持检测**:通过比对证书指纹识别 MITM 攻击 - **内容注入检测**:查找修改 HTTP 响应的代理 - **匿名性分类**:将代理分类为透明、匿名或高匿(精英) ### ⛓️ 复杂的链路构建 ``` ┌─────────────────────────────────────────┐ │ Multi-Hop Proxy Chain │ ├─────────────────────────────────────────┤ │ Your IP → Proxy 1 → Proxy 2 → Target │ │ ↓ ↓ ↓ ↓ │ │ [US] [DE] [FR] [Target] │ └─────────────────────────────────────────┘ ``` ### 🔌 Proxychains 集成 ``` # RedAgent 生成可直接使用的配置 proxychains nmap -sS target.com proxychains curl https://api.example.com proxychains python scanner.py ``` ### 🔍 Tor 支持 - **Tor SOCKS5 集成**:内置 Tor 代理检查 - **验证**:通过 Tor Project API 确认实际的路由 - **链路集成**:在代理链中将 Tor 用作最后一跳 ## 📁 项目结构 ``` RedAgent/ ├── main.py # Entry point with CLI interface ├── requirements.txt # Python dependencies ├── .env.example # Environment template ├── agent/ # AI chat session management │ ├── chat.py # Chat session handler │ ├── system_prompt.py # AI system instructions │ └── tools.py # Tool registry system ├── proxy/ # Proxy management core │ ├── pool.py # Proxy storage and management │ ├── checker.py # Health and anonymity checking │ ├── discovery.py # Proxy discovery from APIs │ ├── router.py # Chain building and routing │ ├── proxychains.py # Proxychains config generation │ └── models.py # Data models and schemas ├── security/ # Security auditing tools │ ├── dns_leak.py # DNS leak detection │ ├── tls_check.py # TLS interception detection │ └── analyzer.py # Comprehensive security analysis ├── observability/ # Monitoring and metrics │ ├── logger.py # Structured logging │ └── metrics.py # Performance tracking └── data/ # Persistent storage ├── proxies.json # Proxy pool database └── proxychains.conf # Generated configurations ``` ## 💬 示例命令 ### 代理发现与管理 ``` "Find 50 elite proxies from Europe" "Check all proxies for DNS leaks" "Remove dead proxies from the pool" "Show me proxy performance metrics" ``` ### 链路构建与路由 ``` "Build a 3-hop chain through US, DE, and FR" "Create a rotation chain with the fastest proxies" "Generate proxychains config for nmap scanning" "Test Tor availability and integrate into chain" ``` ### 安全操作 ``` "Run comprehensive security audit on all proxies" "Check for TLS interception on elite proxies" "Test proxy chain for content injection" "Verify anonymity levels before sensitive operation" ``` ## 🎯 使用场景 ### 适用于红队与渗透测试人员 ``` pie title Red Team Operations "Anonymous Reconnaissance" : 35 "Geographic Testing" : 25 "Rate Limit Evasion" : 20 "C2 Communication" : 15 "Data Exfiltration" : 5 ``` ### 适用于蓝队与防御者 - **威胁情报**:安全地与恶意基础设施交互 - **蜜罐管理**:通过代理收集攻击者的战术 - **控制验证**:从外部视角测试安全控制 - **事件响应**:通过干净的基础设施进行调查 ### 适用于漏洞赏金猎人 - **范围合规**:从允许的地理区域进行测试 - **匿名性保护**:在报告时保持隐私 - **持续测试**:在 IP 被封锁时继续工作 - **工具集成**:通过代理链使用喜欢的工具 ## 🔧 配置 ### 环境变量 创建一个包含以下内容的 `.env` 文件: ``` DEEPSEEK_API_KEY=your_api_key_here ``` ### 代理来源 RedAgent 支持多种代理来源: - **ProxyScrape API**:免费公共代理 - **Geonode API**:详细的代理元数据 - **手动添加**:单独或批量添加自定义代理 ### 链路类型 - **strict_chain**:按确切顺序使用代理(如果任何代理失败则失败) - **dynamic_chain**:按顺序使用代理,可以跳过失效的 - **random_chain**:从链路中随机选择代理 ## 📈 性能指标 ``` ┌─────────────────────────────────────┐ │ Proxy Performance │ ├─────────────┬─────────────┬─────────┤ │ Metric │ Average │ Goal │ ├─────────────┼─────────────┼─────────┤ │ Latency │ 142ms │ <200ms │ │ Success Rate│ 94% │ >90% │ │ Anonymity │ Elite │ Elite │ │ Uptime │ 98% │ >95% │ └─────────────┴─────────────┴─────────┘ ``` ## ⚠️ 安全注意事项 ### ✅ RedAgent 的优势 - **主动验证**:在使用前测试代理 - **透明度**:准确显示运行了哪些测试 - **警告系统**:提醒潜在的安全问题 - **干净的基础设施**:自动移除有问题的代理 ### ⚠️ 重要限制 - **免费代理**:绝不应将公共代理用于敏感数据 - **信任模型**:你必须信任代理提供商 - **性能权衡**:匿名性通常以速度为代价 - **法律合规**:确保遵守当地法律法规 ### 🔒 推荐做法 1. 在执行敏感操作前**始终审计**新代理 2. 关键任务**使用高匿(精英)代理** 3. **定期轮换**代理基础设施 4. 在长时间运行的操作中**监控泄露** 5. 通过定期健康检查**维护干净的基础设施** ## 🤝 贡献 我们欢迎各种贡献!请查看我们的[贡献指南](CONTRIBUTING.md)了解详情。 ### 开发设置 ``` # Clone 并配置开发环境 git clone https://github.com/Insider77Circle/Red-Agent.git cd Red-Agent python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt pip install -r requirements-dev.txt # Development dependencies ``` ### 运行测试 ``` pytest tests/ -v ``` ## 📄 许可证 本项目根据 MIT 许可证授权 - 详见 [LICENSE](LICENSE) 文件。 ## 🙏 致谢 - **DeepSeek** 提供支持自然语言交互的 AI API - **ProxyScrape & Geonode** 提供公共代理 API - **网络安全社区** 提供的灵感和反馈 ## 📞 支持 - **问题反馈**:[GitHub Issues](https://github.com/Insider77Circle/Red-Agent/issues) - **讨论交流**:[GitHub Discussions](https://github.com/Insider77Circle/Red-Agent/discussions) - **文档**:[Wiki](https://github.com/Insider77Circle/Red-Agent/wiki) ## 🌟 Star 历史 [](https://star-history.com/#Insider77Circle/Red-Agent&Date) **用 ❤️ 为网络安全社区打造** *“与你的代理对话,它们正在倾听。”*
标签:AI安全工具, DeepSeek, DNS泄漏检测, Proxy, Proxychains, Python, Tor路由, 代理管理, 代理链构建, 大模型安全, 安全代理, 对称加密, 无后门, 服务器监控, 流量转发, 熵值分析, 红客工具, 网络安全, 自动化审计, 请求响应过滤, 逆向工具, 隐私保护