secbot 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- secbot-1.0.0/MANIFEST.in +13 -0
- secbot-1.0.0/PKG-INFO +506 -0
- secbot-1.0.0/README.md +436 -0
- secbot-1.0.0/config/__init__.py +99 -0
- secbot-1.0.0/controller/__init__.py +15 -0
- secbot-1.0.0/controller/authorization.py +119 -0
- secbot-1.0.0/controller/controller.py +244 -0
- secbot-1.0.0/controller/network_discovery.py +232 -0
- secbot-1.0.0/controller/remote_control.py +251 -0
- secbot-1.0.0/controller/session_manager.py +90 -0
- secbot-1.0.0/core/agents/__init__.py +2 -0
- secbot-1.0.0/core/agents/base.py +120 -0
- secbot-1.0.0/core/agents/hackbot_agent.py +92 -0
- secbot-1.0.0/core/agents/planner_agent.py +588 -0
- secbot-1.0.0/core/agents/qa_agent.py +216 -0
- secbot-1.0.0/core/agents/router.py +85 -0
- secbot-1.0.0/core/agents/summary_agent.py +567 -0
- secbot-1.0.0/core/agents/superhackbot_agent.py +91 -0
- secbot-1.0.0/core/agents/tool_calling_agent.py +559 -0
- secbot-1.0.0/core/agents/web_research_agent.py +423 -0
- secbot-1.0.0/core/attack_chain/__init__.py +16 -0
- secbot-1.0.0/core/attack_chain/attack_chain.py +121 -0
- secbot-1.0.0/core/attack_chain/exploitation.py +35 -0
- secbot-1.0.0/core/attack_chain/post_exploitation.py +35 -0
- secbot-1.0.0/core/attack_chain/reconnaissance.py +149 -0
- secbot-1.0.0/core/memory/__init__.py +29 -0
- secbot-1.0.0/core/memory/manager.py +324 -0
- secbot-1.0.0/core/memory/vector_store.py +296 -0
- secbot-1.0.0/core/models.py +125 -0
- secbot-1.0.0/core/patterns/__init__.py +2 -0
- secbot-1.0.0/core/patterns/react.py +84 -0
- secbot-1.0.0/core/patterns/security_react.py +1152 -0
- secbot-1.0.0/core/session.py +627 -0
- secbot-1.0.0/crawler/__init__.py +15 -0
- secbot-1.0.0/crawler/base.py +270 -0
- secbot-1.0.0/crawler/crawler_tool.py +68 -0
- secbot-1.0.0/crawler/extractor.py +182 -0
- secbot-1.0.0/crawler/realtime.py +194 -0
- secbot-1.0.0/crawler/scheduler.py +175 -0
- secbot-1.0.0/database/__init__.py +22 -0
- secbot-1.0.0/database/manager.py +718 -0
- secbot-1.0.0/database/models.py +89 -0
- secbot-1.0.0/defense/__init__.py +20 -0
- secbot-1.0.0/defense/countermeasure.py +234 -0
- secbot-1.0.0/defense/defense_manager.py +159 -0
- secbot-1.0.0/defense/info_collector.py +249 -0
- secbot-1.0.0/defense/intrusion_detector.py +234 -0
- secbot-1.0.0/defense/network_analyzer.py +225 -0
- secbot-1.0.0/defense/report_generator.py +289 -0
- secbot-1.0.0/defense/vulnerability_scanner.py +313 -0
- secbot-1.0.0/docs/API.md +485 -0
- secbot-1.0.0/docs/APP.md +284 -0
- secbot-1.0.0/docs/CHANGELOG.md +69 -0
- secbot-1.0.0/docs/DATABASE_GUIDE.md +212 -0
- secbot-1.0.0/docs/DEPLOYMENT.md +311 -0
- secbot-1.0.0/docs/DOCKER_SETUP.md +203 -0
- secbot-1.0.0/docs/OLLAMA_SETUP.md +95 -0
- secbot-1.0.0/docs/PROMPT_GUIDE.md +226 -0
- secbot-1.0.0/docs/QUICKSTART.md +203 -0
- secbot-1.0.0/docs/RELEASE.md +83 -0
- secbot-1.0.0/docs/SECURITY_WARNING.md +72 -0
- secbot-1.0.0/docs/SKILLS_AND_MEMORY.md +140 -0
- secbot-1.0.0/docs/SPEECH_GUIDE.md +294 -0
- secbot-1.0.0/docs/SQLITE_SETUP.md +175 -0
- secbot-1.0.0/env.example +59 -0
- secbot-1.0.0/hackbot/__init__.py +6 -0
- secbot-1.0.0/hackbot/cli.py +1598 -0
- secbot-1.0.0/hackbot/run_interactive.py +687 -0
- secbot-1.0.0/main.py +1747 -0
- secbot-1.0.0/prompts/__init__.py +11 -0
- secbot-1.0.0/prompts/chain.py +139 -0
- secbot-1.0.0/prompts/manager.py +203 -0
- secbot-1.0.0/prompts/templates/hackbot_security.yaml +216 -0
- secbot-1.0.0/pyproject.toml +152 -0
- secbot-1.0.0/router/__init__.py +3 -0
- secbot-1.0.0/router/dependencies.py +190 -0
- secbot-1.0.0/router/main.py +78 -0
- secbot-1.0.0/router/routers/__init__.py +3 -0
- secbot-1.0.0/router/routers/agents.py +56 -0
- secbot-1.0.0/router/routers/chat.py +237 -0
- secbot-1.0.0/router/routers/database.py +90 -0
- secbot-1.0.0/router/routers/defense.py +95 -0
- secbot-1.0.0/router/routers/network.py +148 -0
- secbot-1.0.0/router/routers/system.py +87 -0
- secbot-1.0.0/router/schemas.py +224 -0
- secbot-1.0.0/secbot.egg-info/PKG-INFO +506 -0
- secbot-1.0.0/secbot.egg-info/SOURCES.txt +212 -0
- secbot-1.0.0/secbot.egg-info/dependency_links.txt +1 -0
- secbot-1.0.0/secbot.egg-info/entry_points.txt +3 -0
- secbot-1.0.0/secbot.egg-info/requires.txt +47 -0
- secbot-1.0.0/secbot.egg-info/top_level.txt +14 -0
- secbot-1.0.0/setup.cfg +4 -0
- secbot-1.0.0/skills/__init__.py +17 -0
- secbot-1.0.0/skills/injector.py +140 -0
- secbot-1.0.0/skills/loader.py +181 -0
- secbot-1.0.0/skills/workflow.py +85 -0
- secbot-1.0.0/system/__init__.py +13 -0
- secbot-1.0.0/system/commands.py +385 -0
- secbot-1.0.0/system/controller.py +126 -0
- secbot-1.0.0/system/detector.py +123 -0
- secbot-1.0.0/tests/test_agents.py +32 -0
- secbot-1.0.0/tests/test_all_tools.py +312 -0
- secbot-1.0.0/tests/test_api.py +33 -0
- secbot-1.0.0/tests/test_db_connection.py +72 -0
- secbot-1.0.0/tests/test_debug.py +39 -0
- secbot-1.0.0/tests/test_interactive_response.py +348 -0
- secbot-1.0.0/tests/test_sqlite_connection.py +130 -0
- secbot-1.0.0/tests/test_think.py +36 -0
- secbot-1.0.0/tools/__init__.py +2 -0
- secbot-1.0.0/tools/base.py +35 -0
- secbot-1.0.0/tools/cloud/__init__.py +17 -0
- secbot-1.0.0/tools/cloud/cloud_metadata_tool.py +144 -0
- secbot-1.0.0/tools/cloud/container_info_tool.py +234 -0
- secbot-1.0.0/tools/cloud/s3_bucket_tool.py +135 -0
- secbot-1.0.0/tools/defense/__init__.py +22 -0
- secbot-1.0.0/tools/defense/defense_scan_tool.py +51 -0
- secbot-1.0.0/tools/defense/intrusion_detect_tool.py +64 -0
- secbot-1.0.0/tools/defense/network_analyze_tool.py +84 -0
- secbot-1.0.0/tools/defense/self_vuln_scan_tool.py +63 -0
- secbot-1.0.0/tools/defense/system_info_tool.py +66 -0
- secbot-1.0.0/tools/offense/control/__init__.py +7 -0
- secbot-1.0.0/tools/offense/control/command_tool.py +144 -0
- secbot-1.0.0/tools/offense/exploit/__init__.py +16 -0
- secbot-1.0.0/tools/offense/exploit/exploit_engine.py +91 -0
- secbot-1.0.0/tools/offense/exploit/network_exploits.py +128 -0
- secbot-1.0.0/tools/offense/exploit/post_exploitation.py +107 -0
- secbot-1.0.0/tools/offense/exploit/web_exploits.py +303 -0
- secbot-1.0.0/tools/offense/payload/__init__.py +5 -0
- secbot-1.0.0/tools/osint/__init__.py +19 -0
- secbot-1.0.0/tools/osint/cert_transparency_tool.py +83 -0
- secbot-1.0.0/tools/osint/credential_leak_tool.py +186 -0
- secbot-1.0.0/tools/osint/shodan_query_tool.py +104 -0
- secbot-1.0.0/tools/osint/virustotal_tool.py +116 -0
- secbot-1.0.0/tools/pentest/network/__init__.py +38 -0
- secbot-1.0.0/tools/pentest/network/arp_scan_tool.py +166 -0
- secbot-1.0.0/tools/pentest/network/banner_grab_tool.py +107 -0
- secbot-1.0.0/tools/pentest/network/dns_lookup_tool.py +78 -0
- secbot-1.0.0/tools/pentest/network/http_request_tool.py +122 -0
- secbot-1.0.0/tools/pentest/network/ping_sweep_tool.py +89 -0
- secbot-1.0.0/tools/pentest/network/ssl_analyzer_tool.py +114 -0
- secbot-1.0.0/tools/pentest/network/subdomain_enum_tool.py +91 -0
- secbot-1.0.0/tools/pentest/network/traceroute_tool.py +88 -0
- secbot-1.0.0/tools/pentest/network/whois_tool.py +80 -0
- secbot-1.0.0/tools/pentest/security/__init__.py +79 -0
- secbot-1.0.0/tools/pentest/security/attack_test_tool.py +67 -0
- secbot-1.0.0/tools/pentest/security/exploit_tool.py +52 -0
- secbot-1.0.0/tools/pentest/security/port_scan_tool.py +49 -0
- secbot-1.0.0/tools/pentest/security/recon_tool.py +39 -0
- secbot-1.0.0/tools/pentest/security/service_detect_tool.py +49 -0
- secbot-1.0.0/tools/pentest/security/vuln_scan_tool.py +53 -0
- secbot-1.0.0/tools/protocol/__init__.py +19 -0
- secbot-1.0.0/tools/protocol/mysql_probe_tool.py +161 -0
- secbot-1.0.0/tools/protocol/redis_probe_tool.py +129 -0
- secbot-1.0.0/tools/protocol/smb_enum_tool.py +145 -0
- secbot-1.0.0/tools/protocol/snmp_query_tool.py +259 -0
- secbot-1.0.0/tools/reporting/__init__.py +13 -0
- secbot-1.0.0/tools/reporting/report_generator_tool.py +219 -0
- secbot-1.0.0/tools/system_tool.py +86 -0
- secbot-1.0.0/tools/utility/__init__.py +35 -0
- secbot-1.0.0/tools/utility/cve_lookup_tool.py +138 -0
- secbot-1.0.0/tools/utility/dependency_audit_tool.py +234 -0
- secbot-1.0.0/tools/utility/encode_decode_tool.py +116 -0
- secbot-1.0.0/tools/utility/file_analyze_tool.py +168 -0
- secbot-1.0.0/tools/utility/hash_tool.py +127 -0
- secbot-1.0.0/tools/utility/ip_geo_tool.py +68 -0
- secbot-1.0.0/tools/utility/log_analyze_tool.py +149 -0
- secbot-1.0.0/tools/utility/password_audit_tool.py +233 -0
- secbot-1.0.0/tools/utility/payload_generator_tool.py +206 -0
- secbot-1.0.0/tools/utility/secret_scanner_tool.py +186 -0
- secbot-1.0.0/tools/web/__init__.py +30 -0
- secbot-1.0.0/tools/web/cors_check_tool.py +145 -0
- secbot-1.0.0/tools/web/dir_bruteforce_tool.py +130 -0
- secbot-1.0.0/tools/web/header_analyze_tool.py +203 -0
- secbot-1.0.0/tools/web/jwt_analyze_tool.py +181 -0
- secbot-1.0.0/tools/web/param_fuzzer_tool.py +187 -0
- secbot-1.0.0/tools/web/ssrf_detect_tool.py +195 -0
- secbot-1.0.0/tools/web/tech_detect_tool.py +154 -0
- secbot-1.0.0/tools/web/waf_detect_tool.py +175 -0
- secbot-1.0.0/tools/web_research/__init__.py +28 -0
- secbot-1.0.0/tools/web_research/api_client_tool.py +295 -0
- secbot-1.0.0/tools/web_research/deep_crawl_tool.py +299 -0
- secbot-1.0.0/tools/web_research/page_extract_tool.py +348 -0
- secbot-1.0.0/tools/web_research/smart_search_tool.py +275 -0
- secbot-1.0.0/tools/web_research/web_research_tool.py +211 -0
- secbot-1.0.0/tools/web_search.py +139 -0
- secbot-1.0.0/tui/__init__.py +4 -0
- secbot-1.0.0/tui/components/__init__.py +20 -0
- secbot-1.0.0/tui/components/content.py +174 -0
- secbot-1.0.0/tui/components/execution.py +326 -0
- secbot-1.0.0/tui/components/planning.py +195 -0
- secbot-1.0.0/tui/components/reasoning.py +252 -0
- secbot-1.0.0/tui/components/report.py +246 -0
- secbot-1.0.0/tui/components/task_status.py +146 -0
- secbot-1.0.0/tui/utils.py +57 -0
- secbot-1.0.0/tui/widgets/__init__.py +3 -0
- secbot-1.0.0/tui/widgets/collapsible.py +82 -0
- secbot-1.0.0/tui/widgets/todo_list.py +61 -0
- secbot-1.0.0/utils/__init__.py +6 -0
- secbot-1.0.0/utils/audit.py +104 -0
- secbot-1.0.0/utils/confirmation.py +82 -0
- secbot-1.0.0/utils/context_info.py +97 -0
- secbot-1.0.0/utils/embeddings.py +79 -0
- secbot-1.0.0/utils/enhanced_input.py +248 -0
- secbot-1.0.0/utils/event_bus.py +181 -0
- secbot-1.0.0/utils/hackbot_banner.py +40 -0
- secbot-1.0.0/utils/loading.py +37 -0
- secbot-1.0.0/utils/logger.py +50 -0
- secbot-1.0.0/utils/model_selector.py +160 -0
- secbot-1.0.0/utils/opencode_layout.py +99 -0
- secbot-1.0.0/utils/output_components.py +256 -0
- secbot-1.0.0/utils/root_policy.py +53 -0
- secbot-1.0.0/utils/slash_commands.py +178 -0
- secbot-1.0.0/utils/speech.py +203 -0
- secbot-1.0.0/utils/tool_caller.py +118 -0
secbot-1.0.0/MANIFEST.in
ADDED
secbot-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: secbot
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Hackbot: AI-powered automated penetration testing robot
|
|
5
|
+
Author-email: 赵明俊 <wisewater5419@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/iammm0/hackbot
|
|
8
|
+
Project-URL: Documentation, https://github.com/iammm0/hackbot/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/iammm0/hackbot
|
|
10
|
+
Project-URL: Issues, https://github.com/iammm0/hackbot/issues
|
|
11
|
+
Keywords: ai,agent,security,automation,llm,langchain
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: System :: Systems Administration
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: langchain>=0.1.0
|
|
25
|
+
Requires-Dist: langchain-community>=0.0.20
|
|
26
|
+
Requires-Dist: langchain-core>=0.1.23
|
|
27
|
+
Requires-Dist: langchain-experimental>=0.0.50
|
|
28
|
+
Requires-Dist: langchain-ollama>=0.1.0
|
|
29
|
+
Requires-Dist: langchain-openai>=0.2.0
|
|
30
|
+
Requires-Dist: aiohttp>=3.9.1
|
|
31
|
+
Requires-Dist: httpx>=0.26.0
|
|
32
|
+
Requires-Dist: typer>=0.9.0
|
|
33
|
+
Requires-Dist: rich>=13.7.0
|
|
34
|
+
Requires-Dist: pydantic>=2.5.3
|
|
35
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
36
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
37
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
38
|
+
Requires-Dist: numpy>=1.24.0
|
|
39
|
+
Requires-Dist: requests>=2.31.0
|
|
40
|
+
Requires-Dist: beautifulsoup4>=4.12.2
|
|
41
|
+
Requires-Dist: selenium>=4.17.0
|
|
42
|
+
Requires-Dist: playwright>=1.41.0
|
|
43
|
+
Requires-Dist: sqlalchemy>=2.0.25
|
|
44
|
+
Requires-Dist: sqlite-vec>=0.1.0
|
|
45
|
+
Requires-Dist: sqlite-vss>=0.1.0
|
|
46
|
+
Requires-Dist: psutil>=5.9.0
|
|
47
|
+
Requires-Dist: distro>=1.8.0
|
|
48
|
+
Requires-Dist: loguru>=0.7.2
|
|
49
|
+
Requires-Dist: pytest>=8.0.0
|
|
50
|
+
Requires-Dist: pytest-asyncio>=0.23.3
|
|
51
|
+
Requires-Dist: python-multipart>=0.0.6
|
|
52
|
+
Requires-Dist: websockets>=12.0
|
|
53
|
+
Requires-Dist: tiktoken>=0.5.2
|
|
54
|
+
Requires-Dist: faster-whisper>=1.0.0
|
|
55
|
+
Requires-Dist: gtts>=2.5.0
|
|
56
|
+
Requires-Dist: pyttsx3>=2.90
|
|
57
|
+
Requires-Dist: pydub>=0.25.1
|
|
58
|
+
Requires-Dist: paramiko>=3.4.0
|
|
59
|
+
Requires-Dist: pywinrm>=0.4.3
|
|
60
|
+
Requires-Dist: fastapi>=0.115.0
|
|
61
|
+
Requires-Dist: uvicorn[standard]>=0.34.0
|
|
62
|
+
Requires-Dist: sse-starlette>=2.0.0
|
|
63
|
+
Requires-Dist: prompt_toolkit>=3.0.43
|
|
64
|
+
Provides-Extra: dev
|
|
65
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
66
|
+
Requires-Dist: pytest-asyncio>=0.23.3; extra == "dev"
|
|
67
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
68
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
69
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
70
|
+
|
|
71
|
+
# hackbot: Automated Penetration Testing Robot
|
|
72
|
+
|
|
73
|
+
<div align="center">
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+

|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
**An intelligent automated penetration testing robot with AI-powered security testing capabilities**
|
|
80
|
+
|
|
81
|
+
[English](#hackbot-automated-penetration-testing-robot) | [中文](README_CN.md)
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## ⚠️ Security Warning
|
|
88
|
+
|
|
89
|
+
**This tool is intended for authorized security testing only. Unauthorized use of this tool for network attacks is illegal.**
|
|
90
|
+
|
|
91
|
+
- ✅ Only use on systems you own or have explicit written authorization to test
|
|
92
|
+
- ✅ Ensure you comply with all applicable laws and regulations
|
|
93
|
+
- ✅ Use responsibly and ethically
|
|
94
|
+
|
|
95
|
+
## 🚀 Features
|
|
96
|
+
|
|
97
|
+
### Core Capabilities
|
|
98
|
+
|
|
99
|
+
- 🤖 **Multiple Agent Patterns**: ReAct, Plan-Execute, Multi-Agent, Tool-Using, Memory-Augmented
|
|
100
|
+
- 🌐 **AI Web Research Agent**: Independent sub-agent with ReAct loop for internet research—smart search, page extraction, multi-page crawling, and API interaction
|
|
101
|
+
- 💻 **CLI Interface**: Built with Typer for intuitive command-line interaction
|
|
102
|
+
- 🎤 **Voice Interaction**: Complete speech-to-text and text-to-speech functionality
|
|
103
|
+
- 🕷️ **AI Web Crawler**: Real-time web information capture and monitoring
|
|
104
|
+
- 💻 **OS Control**: File operations, process management, system information
|
|
105
|
+
|
|
106
|
+
### Penetration Testing
|
|
107
|
+
|
|
108
|
+
- 🔍 **Reconnaissance**: Automated information gathering (hostname, IP, ports, services)
|
|
109
|
+
- 🔍 **Vulnerability Scanning**: Port scanning, service detection, vulnerability identification
|
|
110
|
+
- ⚔️ **Exploit Engine**: Automated exploitation of SQL injection, XSS, command injection, file upload, path traversal, SSRF
|
|
111
|
+
- 🔗 **Automated Attack Chain**: Complete penetration testing workflow automation
|
|
112
|
+
- Information Gathering → Vulnerability Scanning → Exploitation → Post-Exploitation
|
|
113
|
+
- 📦 **Payload Generator**: Automatic generation of attack payloads
|
|
114
|
+
- 🎯 **Post-Exploitation**: Privilege escalation, persistence, lateral movement, data exfiltration
|
|
115
|
+
- ⚔️ **Network Attacks**: Brute force, DoS testing, buffer overflow (authorized testing only)
|
|
116
|
+
|
|
117
|
+
### Security & Defense
|
|
118
|
+
|
|
119
|
+
- 🛡️ **Active Defense**: Information collection, vulnerability scanning, network analysis, intrusion detection
|
|
120
|
+
- 📊 **Security Reports**: Automated detailed security analysis reports
|
|
121
|
+
- 🔍 **Network Discovery**: Automatic discovery of all hosts in the network
|
|
122
|
+
- 🎯 **Authorization Management**: Manage legal authorization for target hosts
|
|
123
|
+
- 🖥️ **Remote Control**: Remote command execution and file transfer on authorized hosts
|
|
124
|
+
|
|
125
|
+
### Web Research (Internet Capabilities)
|
|
126
|
+
|
|
127
|
+
- 🔎 **Smart Search**: DuckDuckGo search → fetch result pages → AI summarization and synthesis
|
|
128
|
+
- 📄 **Page Extract**: Extract page content by mode—plain text, structured (tables/lists), or custom AI schema
|
|
129
|
+
- 🕸️ **Deep Crawl**: BFS multi-page crawling from a start URL with depth/URL filter and optional AI extraction
|
|
130
|
+
- 🔌 **API Client**: Generic REST client with presets (weather, IP info, GitHub, exchange rates, DNS, etc.)
|
|
131
|
+
- 🤖 **Web Research Tool**: Delegate to the Web Research sub-agent for autonomous research or call tools directly
|
|
132
|
+
|
|
133
|
+
### Additional Features
|
|
134
|
+
|
|
135
|
+
- 📝 **Prompt Chain Management**: Flexible agent prompt configuration
|
|
136
|
+
- 💾 **SQLite Database**: Persistent storage for conversation history, prompt chains, configurations
|
|
137
|
+
- 🐳 **Docker Compose**: Quick start for ChromaDB and Redis development environment
|
|
138
|
+
- ⏰ **Task Scheduling**: Support for scheduled penetration testing tasks
|
|
139
|
+
- 🎨 **Beautiful Terminal Output**: Rich formatting with Rich library
|
|
140
|
+
|
|
141
|
+
## 📋 Requirements
|
|
142
|
+
|
|
143
|
+
- Python 3.10+
|
|
144
|
+
- [uv](https://github.com/astral-sh/uv) - Fast Python package manager
|
|
145
|
+
- Ollama (for LLM inference)
|
|
146
|
+
- Dependencies are managed in `pyproject.toml`
|
|
147
|
+
|
|
148
|
+
## 🛠️ Installation
|
|
149
|
+
|
|
150
|
+
### 1. Clone the Repository
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
git clone https://github.com/iammm0/hackbot.git
|
|
154
|
+
cd hackbot
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 2. Install Dependencies
|
|
158
|
+
|
|
159
|
+
[uv](https://github.com/astral-sh/uv) is a fast Python package installer and resolver.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install uv if not already installed
|
|
163
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
164
|
+
|
|
165
|
+
# Install dependencies using uv
|
|
166
|
+
uv sync
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 3. Install and Start Ollama
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Install Ollama from https://ollama.ai
|
|
173
|
+
|
|
174
|
+
# Pull required models
|
|
175
|
+
ollama pull gpt-oss:20b
|
|
176
|
+
ollama pull nomic-embed-text
|
|
177
|
+
|
|
178
|
+
# Ollama service runs on http://localhost:11434 by default
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 4. Configure Environment
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
cp .env.example .env
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Edit `.env` file:
|
|
188
|
+
- `OLLAMA_MODEL`: Inference model (default: `gpt-oss:20b`)
|
|
189
|
+
- `OLLAMA_EMBEDDING_MODEL`: Embedding model (default: `nomic-embed-text`)
|
|
190
|
+
|
|
191
|
+
### 5. Build and Install (Optional)
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Build package using uv
|
|
195
|
+
uv run python -m build
|
|
196
|
+
|
|
197
|
+
# Install package
|
|
198
|
+
uv pip install dist/hackbot-1.0.0-py3-none-any.whl
|
|
199
|
+
|
|
200
|
+
# Now you can use 'hackbot' command directly
|
|
201
|
+
hackbot --help
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 🎯 Quick Start
|
|
205
|
+
|
|
206
|
+
### Basic Usage
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# View help
|
|
210
|
+
hackbot --help
|
|
211
|
+
|
|
212
|
+
# Interactive chat
|
|
213
|
+
hackbot interactive
|
|
214
|
+
|
|
215
|
+
# Text chat
|
|
216
|
+
hackbot chat "Hello, introduce yourself"
|
|
217
|
+
|
|
218
|
+
# List available agents
|
|
219
|
+
hackbot list-agents
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Web Research (via Chat)
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Delegate to Web Research sub-agent (auto search → crawl → summarize)
|
|
226
|
+
hackbot chat "Research the latest CVE-2024 vulnerabilities and summarize"
|
|
227
|
+
|
|
228
|
+
# Direct smart search
|
|
229
|
+
hackbot chat "Use smart_search to find Python asyncio best practices"
|
|
230
|
+
|
|
231
|
+
# Extract content from a URL
|
|
232
|
+
hackbot chat "Use page_extract to get the main content from https://example.com"
|
|
233
|
+
|
|
234
|
+
# Call a public API (e.g. weather)
|
|
235
|
+
hackbot chat "Use api_client with preset weather and query Beijing"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Penetration Testing Commands
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Network discovery
|
|
242
|
+
hackbot discover
|
|
243
|
+
|
|
244
|
+
# Port scanning (via chat)
|
|
245
|
+
hackbot chat "Scan ports on 192.168.1.1"
|
|
246
|
+
|
|
247
|
+
# List authorized targets
|
|
248
|
+
hackbot list-targets
|
|
249
|
+
|
|
250
|
+
# Revoke authorization
|
|
251
|
+
hackbot revoke 192.168.1.100
|
|
252
|
+
|
|
253
|
+
# Note: Advanced exploitation commands (exploit, attack-chain, generate-payload)
|
|
254
|
+
# are available in experimental versions. Run 'hackbot --help' for full command list.
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Remote Control Commands
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Execute remote command on authorized host
|
|
261
|
+
hackbot remote-execute 192.168.1.100 "ls -la"
|
|
262
|
+
|
|
263
|
+
# Upload file to remote host
|
|
264
|
+
hackbot upload-file 192.168.1.100 local.txt /remote/path/
|
|
265
|
+
|
|
266
|
+
# Download file from remote host
|
|
267
|
+
hackbot download-file 192.168.1.100 /remote/file.txt local_copy.txt
|
|
268
|
+
|
|
269
|
+
# List all authorizations
|
|
270
|
+
hackbot list-authorizations
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Defense System Commands
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Perform comprehensive security scan
|
|
277
|
+
hackbot defense-scan
|
|
278
|
+
|
|
279
|
+
# Start defense monitoring
|
|
280
|
+
hackbot defense-monitor --start --interval 60
|
|
281
|
+
|
|
282
|
+
# View defense status
|
|
283
|
+
hackbot defense-monitor --status
|
|
284
|
+
|
|
285
|
+
# List blocked IPs
|
|
286
|
+
hackbot defense-blocked --list
|
|
287
|
+
|
|
288
|
+
# Generate defense report
|
|
289
|
+
hackbot defense-report --type vulnerability
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### System Operations
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# System information
|
|
296
|
+
hackbot system-info
|
|
297
|
+
|
|
298
|
+
# System status
|
|
299
|
+
hackbot system-status
|
|
300
|
+
|
|
301
|
+
# List processes
|
|
302
|
+
hackbot list-processes --filter python
|
|
303
|
+
|
|
304
|
+
# Execute command
|
|
305
|
+
hackbot execute "ls -la"
|
|
306
|
+
|
|
307
|
+
# List files in directory
|
|
308
|
+
hackbot file-list /path/to/dir --recursive
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Database Management
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# View statistics
|
|
315
|
+
hackbot db-stats
|
|
316
|
+
|
|
317
|
+
# View conversation history
|
|
318
|
+
hackbot db-history --limit 20
|
|
319
|
+
|
|
320
|
+
# Clear history (requires confirmation)
|
|
321
|
+
hackbot db-clear --yes
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Voice Interaction Commands
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# Speech-to-text transcription
|
|
328
|
+
hackbot transcribe audio.wav --output transcript.txt
|
|
329
|
+
|
|
330
|
+
# Text-to-speech synthesis
|
|
331
|
+
hackbot synthesize "Hello world" --output speech.wav --language en
|
|
332
|
+
|
|
333
|
+
# Voice chat with agent
|
|
334
|
+
hackbot voice audio.wav --agent hackbot
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Prompt Management Commands
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
# List available prompt templates and chains
|
|
341
|
+
hackbot prompt-list
|
|
342
|
+
|
|
343
|
+
# Create a new prompt chain
|
|
344
|
+
hackbot prompt-create my_chain --role "Security Expert" --instruction "Perform penetration testing"
|
|
345
|
+
|
|
346
|
+
# Load prompt chain from file
|
|
347
|
+
hackbot prompt-load my_prompt.yaml
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## 📁 Project Structure
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
hackbot/
|
|
354
|
+
├── main.py # CLI application entry
|
|
355
|
+
├── config/ # Configuration management
|
|
356
|
+
├── core/ # Core runtime logic
|
|
357
|
+
│ ├── agents/ # Agent implementations
|
|
358
|
+
│ │ ├── base.py # Base agent class
|
|
359
|
+
│ │ ├── hackbot_agent.py
|
|
360
|
+
│ │ └── ...
|
|
361
|
+
│ ├── patterns/ # Design patterns (ReAct, Plan-Execute)
|
|
362
|
+
│ ├── attack_chain/ # Automated attack chain
|
|
363
|
+
│ ├── memory/ # Memory system (3-layer: short-term, episodic, long-term)
|
|
364
|
+
│ │ ├── manager.py
|
|
365
|
+
│ │ └── vector_store.py # SQLite vector storage (sqlite-vec)
|
|
366
|
+
│ └── models.py # Shared models (TodoItem, PlanResult, etc.)
|
|
367
|
+
├── tools/ # Tools and plugins
|
|
368
|
+
│ ├── pentest/ # Penetration testing tools
|
|
369
|
+
│ │ ├── security/ # Security scanning (port scan, vuln scan, etc.)
|
|
370
|
+
│ │ └── network/ # Network enumeration (DNS, HTTP, SSL, etc.)
|
|
371
|
+
│ ├── offense/ # Offensive tools
|
|
372
|
+
│ │ ├── exploit/ # Exploitation modules
|
|
373
|
+
│ │ ├── payload/ # Payload generators
|
|
374
|
+
│ │ ├── control/ # Remote control (command execution)
|
|
375
|
+
│ │ └── crawler/ # Web crawler
|
|
376
|
+
│ ├── defense/ # Defense tools
|
|
377
|
+
│ ├── osint/ # OSINT tools
|
|
378
|
+
│ ├── protocol/ # Protocol analysis
|
|
379
|
+
│ ├── reporting/ # Report generation
|
|
380
|
+
│ ├── web/ # Web security tools
|
|
381
|
+
│ └── web_research/ # Web research tools
|
|
382
|
+
├── skills/ # Markdown-based skills (OpenAI Agent Skills format)
|
|
383
|
+
│ ├── loader.py # Skill loader
|
|
384
|
+
│ ├── injector.py # Skill injector for agents
|
|
385
|
+
│ └── base/ # Base skills (nmap-usage, etc.)
|
|
386
|
+
├── prompts/ # Prompt management
|
|
387
|
+
├── database/ # SQLite database management
|
|
388
|
+
├── controller/ # Remote control (authorization, network discovery)
|
|
389
|
+
├── system/ # OS control
|
|
390
|
+
└── utils/ # Utility functions
|
|
391
|
+
```
|
|
392
|
+
hackbot/
|
|
393
|
+
├── main.py # CLI application entry
|
|
394
|
+
├── config/ # Configuration management
|
|
395
|
+
├── hackbot/ # Package CLI module
|
|
396
|
+
├── agents/ # Agent implementations
|
|
397
|
+
│ ├── base.py # Base agent class
|
|
398
|
+
│ ├── tool_calling_agent.py # Tool-calling agent (LLM + tools)
|
|
399
|
+
│ └── web_research_agent.py # Web research sub-agent (ReAct + smart_search/page_extract/deep_crawl/api_client)
|
|
400
|
+
├── patterns/ # Design patterns
|
|
401
|
+
│ └── security_react.py # ReAct pattern for security agents
|
|
402
|
+
├── exploit/ # Exploitation module
|
|
403
|
+
│ ├── exploit_engine.py # Exploit engine
|
|
404
|
+
│ ├── web_exploits.py # Web exploits
|
|
405
|
+
│ ├── network_exploits.py # Network exploits
|
|
406
|
+
│ └── post_exploitation.py # Post-exploitation
|
|
407
|
+
├── attack_chain/ # Automated attack chain
|
|
408
|
+
│ ├── attack_chain.py # Main attack chain
|
|
409
|
+
│ ├── reconnaissance.py # Information gathering
|
|
410
|
+
│ └── exploitation.py # Exploitation coordination
|
|
411
|
+
├── payloads/ # Payload generators
|
|
412
|
+
│ ├── web_payloads.py # Web payloads
|
|
413
|
+
│ └── network_payloads.py # Network payloads
|
|
414
|
+
├── scanner/ # Scanning tools
|
|
415
|
+
│ ├── port_scanner.py # Port scanning
|
|
416
|
+
│ ├── service_detector.py # Service detection
|
|
417
|
+
│ └── vulnerability_scanner.py # Vulnerability scanning
|
|
418
|
+
├── defense/ # Defense system
|
|
419
|
+
├── controller/ # Remote control
|
|
420
|
+
├── crawler/ # Web crawler
|
|
421
|
+
├── database/ # Database management
|
|
422
|
+
├── memory/ # Memory management
|
|
423
|
+
├── prompts/ # Prompt management
|
|
424
|
+
├── system/ # OS control
|
|
425
|
+
├── tools/ # Tools and plugins
|
|
426
|
+
│ ├── security/ # Core security tools (port scan, vuln scan, etc.)
|
|
427
|
+
│ ├── network/ # Network tools (HTTP, DNS, SSL, etc.)
|
|
428
|
+
│ ├── web_research/ # Web research tools (smart_search, page_extract, deep_crawl, api_client, web_research)
|
|
429
|
+
│ └── ... # Other tool categories
|
|
430
|
+
└── utils/ # Utility functions
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
## 🔧 Development
|
|
434
|
+
|
|
435
|
+
### Running Tests
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
pytest tests/
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Building Package
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
# Using uv (recommended)
|
|
445
|
+
uv run python -m build
|
|
446
|
+
|
|
447
|
+
# Or using the build script
|
|
448
|
+
./build.sh
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
## 📚 Documentation
|
|
452
|
+
|
|
453
|
+
- [Quick Start Guide](docs/QUICKSTART.md)
|
|
454
|
+
- [API Documentation](docs/API.md)
|
|
455
|
+
- [Mobile App Guide](docs/APP.md)
|
|
456
|
+
- [Skills & Memory System](docs/SKILLS_AND_MEMORY.md)
|
|
457
|
+
- [Database Guide](docs/DATABASE_GUIDE.md)
|
|
458
|
+
- [Docker Setup](docs/DOCKER_SETUP.md)
|
|
459
|
+
- [Ollama Setup](docs/OLLAMA_SETUP.md)
|
|
460
|
+
- [Security Warning](docs/SECURITY_WARNING.md)
|
|
461
|
+
- [Prompt Guide](docs/PROMPT_GUIDE.md)
|
|
462
|
+
- [Speech Guide](docs/SPEECH_GUIDE.md)
|
|
463
|
+
- [SQLite Setup](docs/SQLITE_SETUP.md)
|
|
464
|
+
- [Deployment Guide](docs/DEPLOYMENT.md)
|
|
465
|
+
|
|
466
|
+
## 🤝 Contributing
|
|
467
|
+
|
|
468
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
469
|
+
|
|
470
|
+
1. Fork the repository
|
|
471
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
472
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
473
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
474
|
+
5. Open a Pull Request
|
|
475
|
+
|
|
476
|
+
## 📝 License
|
|
477
|
+
|
|
478
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
479
|
+
|
|
480
|
+
## 👤 Author
|
|
481
|
+
|
|
482
|
+
**赵明俊 (Zhao Mingjun)**
|
|
483
|
+
|
|
484
|
+
- GitHub: [@iammm0](https://github.com/iammm0)
|
|
485
|
+
- Email: wisewater5419@gmail.com
|
|
486
|
+
|
|
487
|
+
## 🙏 Acknowledgments
|
|
488
|
+
|
|
489
|
+
- Built with [LangChain](https://github.com/langchain-ai/langchain)
|
|
490
|
+
- Powered by [Ollama](https://ollama.ai)
|
|
491
|
+
- CLI built with [Typer](https://typer.tiangolo.com)
|
|
492
|
+
- Beautiful output with [Rich](https://github.com/Textualize/rich)
|
|
493
|
+
|
|
494
|
+
## ⚠️ Disclaimer
|
|
495
|
+
|
|
496
|
+
This tool is provided for educational and authorized security testing purposes only. The authors and contributors are not responsible for any misuse or damage caused by this tool. Users must ensure they have proper authorization before using this tool on any system.
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
<div align="center">
|
|
501
|
+
|
|
502
|
+
**⭐ If you find this project useful, please consider giving it a star! ⭐**
|
|
503
|
+
|
|
504
|
+
</div>
|
|
505
|
+
|
|
506
|
+
|