aiptx 2.0.7__py3-none-any.whl
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.
- aipt_v2/__init__.py +110 -0
- aipt_v2/__main__.py +24 -0
- aipt_v2/agents/AIPTxAgent/__init__.py +10 -0
- aipt_v2/agents/AIPTxAgent/aiptx_agent.py +211 -0
- aipt_v2/agents/__init__.py +46 -0
- aipt_v2/agents/base.py +520 -0
- aipt_v2/agents/exploit_agent.py +688 -0
- aipt_v2/agents/ptt.py +406 -0
- aipt_v2/agents/state.py +168 -0
- aipt_v2/app.py +957 -0
- aipt_v2/browser/__init__.py +31 -0
- aipt_v2/browser/automation.py +458 -0
- aipt_v2/browser/crawler.py +453 -0
- aipt_v2/cli.py +2933 -0
- aipt_v2/compliance/__init__.py +71 -0
- aipt_v2/compliance/compliance_report.py +449 -0
- aipt_v2/compliance/framework_mapper.py +424 -0
- aipt_v2/compliance/nist_mapping.py +345 -0
- aipt_v2/compliance/owasp_mapping.py +330 -0
- aipt_v2/compliance/pci_mapping.py +297 -0
- aipt_v2/config.py +341 -0
- aipt_v2/core/__init__.py +43 -0
- aipt_v2/core/agent.py +630 -0
- aipt_v2/core/llm.py +395 -0
- aipt_v2/core/memory.py +305 -0
- aipt_v2/core/ptt.py +329 -0
- aipt_v2/database/__init__.py +14 -0
- aipt_v2/database/models.py +232 -0
- aipt_v2/database/repository.py +384 -0
- aipt_v2/docker/__init__.py +23 -0
- aipt_v2/docker/builder.py +260 -0
- aipt_v2/docker/manager.py +222 -0
- aipt_v2/docker/sandbox.py +371 -0
- aipt_v2/evasion/__init__.py +58 -0
- aipt_v2/evasion/request_obfuscator.py +272 -0
- aipt_v2/evasion/tls_fingerprint.py +285 -0
- aipt_v2/evasion/ua_rotator.py +301 -0
- aipt_v2/evasion/waf_bypass.py +439 -0
- aipt_v2/execution/__init__.py +23 -0
- aipt_v2/execution/executor.py +302 -0
- aipt_v2/execution/parser.py +544 -0
- aipt_v2/execution/terminal.py +337 -0
- aipt_v2/health.py +437 -0
- aipt_v2/intelligence/__init__.py +194 -0
- aipt_v2/intelligence/adaptation.py +474 -0
- aipt_v2/intelligence/auth.py +520 -0
- aipt_v2/intelligence/chaining.py +775 -0
- aipt_v2/intelligence/correlation.py +536 -0
- aipt_v2/intelligence/cve_aipt.py +334 -0
- aipt_v2/intelligence/cve_info.py +1111 -0
- aipt_v2/intelligence/knowledge_graph.py +590 -0
- aipt_v2/intelligence/learning.py +626 -0
- aipt_v2/intelligence/llm_analyzer.py +502 -0
- aipt_v2/intelligence/llm_tool_selector.py +518 -0
- aipt_v2/intelligence/payload_generator.py +562 -0
- aipt_v2/intelligence/rag.py +239 -0
- aipt_v2/intelligence/scope.py +442 -0
- aipt_v2/intelligence/searchers/__init__.py +5 -0
- aipt_v2/intelligence/searchers/exploitdb_searcher.py +523 -0
- aipt_v2/intelligence/searchers/github_searcher.py +467 -0
- aipt_v2/intelligence/searchers/google_searcher.py +281 -0
- aipt_v2/intelligence/tools.json +443 -0
- aipt_v2/intelligence/triage.py +670 -0
- aipt_v2/interactive_shell.py +559 -0
- aipt_v2/interface/__init__.py +5 -0
- aipt_v2/interface/cli.py +230 -0
- aipt_v2/interface/main.py +501 -0
- aipt_v2/interface/tui.py +1276 -0
- aipt_v2/interface/utils.py +583 -0
- aipt_v2/llm/__init__.py +39 -0
- aipt_v2/llm/config.py +26 -0
- aipt_v2/llm/llm.py +514 -0
- aipt_v2/llm/memory.py +214 -0
- aipt_v2/llm/request_queue.py +89 -0
- aipt_v2/llm/utils.py +89 -0
- aipt_v2/local_tool_installer.py +1467 -0
- aipt_v2/models/__init__.py +15 -0
- aipt_v2/models/findings.py +295 -0
- aipt_v2/models/phase_result.py +224 -0
- aipt_v2/models/scan_config.py +207 -0
- aipt_v2/monitoring/grafana/dashboards/aipt-dashboard.json +355 -0
- aipt_v2/monitoring/grafana/dashboards/default.yml +17 -0
- aipt_v2/monitoring/grafana/datasources/prometheus.yml +17 -0
- aipt_v2/monitoring/prometheus.yml +60 -0
- aipt_v2/orchestration/__init__.py +52 -0
- aipt_v2/orchestration/pipeline.py +398 -0
- aipt_v2/orchestration/progress.py +300 -0
- aipt_v2/orchestration/scheduler.py +296 -0
- aipt_v2/orchestrator.py +2427 -0
- aipt_v2/payloads/__init__.py +27 -0
- aipt_v2/payloads/cmdi.py +150 -0
- aipt_v2/payloads/sqli.py +263 -0
- aipt_v2/payloads/ssrf.py +204 -0
- aipt_v2/payloads/templates.py +222 -0
- aipt_v2/payloads/traversal.py +166 -0
- aipt_v2/payloads/xss.py +204 -0
- aipt_v2/prompts/__init__.py +60 -0
- aipt_v2/proxy/__init__.py +29 -0
- aipt_v2/proxy/history.py +352 -0
- aipt_v2/proxy/interceptor.py +452 -0
- aipt_v2/recon/__init__.py +44 -0
- aipt_v2/recon/dns.py +241 -0
- aipt_v2/recon/osint.py +367 -0
- aipt_v2/recon/subdomain.py +372 -0
- aipt_v2/recon/tech_detect.py +311 -0
- aipt_v2/reports/__init__.py +17 -0
- aipt_v2/reports/generator.py +313 -0
- aipt_v2/reports/html_report.py +378 -0
- aipt_v2/runtime/__init__.py +53 -0
- aipt_v2/runtime/base.py +30 -0
- aipt_v2/runtime/docker.py +401 -0
- aipt_v2/runtime/local.py +346 -0
- aipt_v2/runtime/tool_server.py +205 -0
- aipt_v2/runtime/vps.py +830 -0
- aipt_v2/scanners/__init__.py +28 -0
- aipt_v2/scanners/base.py +273 -0
- aipt_v2/scanners/nikto.py +244 -0
- aipt_v2/scanners/nmap.py +402 -0
- aipt_v2/scanners/nuclei.py +273 -0
- aipt_v2/scanners/web.py +454 -0
- aipt_v2/scripts/security_audit.py +366 -0
- aipt_v2/setup_wizard.py +941 -0
- aipt_v2/skills/__init__.py +80 -0
- aipt_v2/skills/agents/__init__.py +14 -0
- aipt_v2/skills/agents/api_tester.py +706 -0
- aipt_v2/skills/agents/base.py +477 -0
- aipt_v2/skills/agents/code_review.py +459 -0
- aipt_v2/skills/agents/security_agent.py +336 -0
- aipt_v2/skills/agents/web_pentest.py +818 -0
- aipt_v2/skills/prompts/__init__.py +647 -0
- aipt_v2/system_detector.py +539 -0
- aipt_v2/telemetry/__init__.py +7 -0
- aipt_v2/telemetry/tracer.py +347 -0
- aipt_v2/terminal/__init__.py +28 -0
- aipt_v2/terminal/executor.py +400 -0
- aipt_v2/terminal/sandbox.py +350 -0
- aipt_v2/tools/__init__.py +44 -0
- aipt_v2/tools/active_directory/__init__.py +78 -0
- aipt_v2/tools/active_directory/ad_config.py +238 -0
- aipt_v2/tools/active_directory/bloodhound_wrapper.py +447 -0
- aipt_v2/tools/active_directory/kerberos_attacks.py +430 -0
- aipt_v2/tools/active_directory/ldap_enum.py +533 -0
- aipt_v2/tools/active_directory/smb_attacks.py +505 -0
- aipt_v2/tools/agents_graph/__init__.py +19 -0
- aipt_v2/tools/agents_graph/agents_graph_actions.py +69 -0
- aipt_v2/tools/api_security/__init__.py +76 -0
- aipt_v2/tools/api_security/api_discovery.py +608 -0
- aipt_v2/tools/api_security/graphql_scanner.py +622 -0
- aipt_v2/tools/api_security/jwt_analyzer.py +577 -0
- aipt_v2/tools/api_security/openapi_fuzzer.py +761 -0
- aipt_v2/tools/browser/__init__.py +5 -0
- aipt_v2/tools/browser/browser_actions.py +238 -0
- aipt_v2/tools/browser/browser_instance.py +535 -0
- aipt_v2/tools/browser/tab_manager.py +344 -0
- aipt_v2/tools/cloud/__init__.py +70 -0
- aipt_v2/tools/cloud/cloud_config.py +273 -0
- aipt_v2/tools/cloud/cloud_scanner.py +639 -0
- aipt_v2/tools/cloud/prowler_tool.py +571 -0
- aipt_v2/tools/cloud/scoutsuite_tool.py +359 -0
- aipt_v2/tools/executor.py +307 -0
- aipt_v2/tools/parser.py +408 -0
- aipt_v2/tools/proxy/__init__.py +5 -0
- aipt_v2/tools/proxy/proxy_actions.py +103 -0
- aipt_v2/tools/proxy/proxy_manager.py +789 -0
- aipt_v2/tools/registry.py +196 -0
- aipt_v2/tools/scanners/__init__.py +343 -0
- aipt_v2/tools/scanners/acunetix_tool.py +712 -0
- aipt_v2/tools/scanners/burp_tool.py +631 -0
- aipt_v2/tools/scanners/config.py +156 -0
- aipt_v2/tools/scanners/nessus_tool.py +588 -0
- aipt_v2/tools/scanners/zap_tool.py +612 -0
- aipt_v2/tools/terminal/__init__.py +5 -0
- aipt_v2/tools/terminal/terminal_actions.py +37 -0
- aipt_v2/tools/terminal/terminal_manager.py +153 -0
- aipt_v2/tools/terminal/terminal_session.py +449 -0
- aipt_v2/tools/tool_processing.py +108 -0
- aipt_v2/utils/__init__.py +17 -0
- aipt_v2/utils/logging.py +202 -0
- aipt_v2/utils/model_manager.py +187 -0
- aipt_v2/utils/searchers/__init__.py +269 -0
- aipt_v2/verify_install.py +793 -0
- aiptx-2.0.7.dist-info/METADATA +345 -0
- aiptx-2.0.7.dist-info/RECORD +187 -0
- aiptx-2.0.7.dist-info/WHEEL +5 -0
- aiptx-2.0.7.dist-info/entry_points.txt +7 -0
- aiptx-2.0.7.dist-info/licenses/LICENSE +21 -0
- aiptx-2.0.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1467 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AIPTX Local Tool Installer
|
|
3
|
+
==========================
|
|
4
|
+
|
|
5
|
+
Automatically installs security tools on the user's local system.
|
|
6
|
+
Adapts installation commands based on detected OS and package manager.
|
|
7
|
+
|
|
8
|
+
Features:
|
|
9
|
+
- Cross-platform support (Linux, macOS, Windows)
|
|
10
|
+
- Multiple package manager support (apt, brew, yum, pacman, choco)
|
|
11
|
+
- Parallel installation for speed
|
|
12
|
+
- Progress tracking with Rich UI
|
|
13
|
+
- Rollback on failure
|
|
14
|
+
- Prerequisite installation (Go, Ruby, etc.)
|
|
15
|
+
|
|
16
|
+
Usage:
|
|
17
|
+
installer = LocalToolInstaller()
|
|
18
|
+
await installer.install_tools(categories=["recon", "scan"])
|
|
19
|
+
# or
|
|
20
|
+
await installer.install_all()
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
import asyncio
|
|
24
|
+
import shutil
|
|
25
|
+
from dataclasses import dataclass
|
|
26
|
+
from enum import Enum
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
from typing import Dict, List, Optional, Set, Callable
|
|
29
|
+
|
|
30
|
+
from rich.console import Console
|
|
31
|
+
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TaskProgressColumn
|
|
32
|
+
from rich.table import Table
|
|
33
|
+
from rich.panel import Panel
|
|
34
|
+
from rich.prompt import Confirm
|
|
35
|
+
from rich import box
|
|
36
|
+
|
|
37
|
+
from aipt_v2.system_detector import (
|
|
38
|
+
SystemDetector,
|
|
39
|
+
SystemInfo,
|
|
40
|
+
OSType,
|
|
41
|
+
PackageManager,
|
|
42
|
+
Architecture,
|
|
43
|
+
)
|
|
44
|
+
from aipt_v2.utils.logging import logger
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
console = Console()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ToolCategory(Enum):
|
|
51
|
+
"""Security tool categories."""
|
|
52
|
+
RECON = "recon"
|
|
53
|
+
SCAN = "scan"
|
|
54
|
+
EXPLOIT = "exploit"
|
|
55
|
+
POST_EXPLOIT = "post_exploit"
|
|
56
|
+
API = "api"
|
|
57
|
+
NETWORK = "network"
|
|
58
|
+
PREREQUISITE = "prerequisite"
|
|
59
|
+
ACTIVE_DIRECTORY = "active_directory"
|
|
60
|
+
CLOUD = "cloud"
|
|
61
|
+
CONTAINER = "container"
|
|
62
|
+
OSINT = "osint"
|
|
63
|
+
WIRELESS = "wireless"
|
|
64
|
+
WEB = "web"
|
|
65
|
+
SECRETS = "secrets"
|
|
66
|
+
MOBILE = "mobile"
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@dataclass
|
|
70
|
+
class ToolDefinition:
|
|
71
|
+
"""Definition of a security tool with installation commands."""
|
|
72
|
+
name: str
|
|
73
|
+
description: str
|
|
74
|
+
category: ToolCategory
|
|
75
|
+
# Installation commands per package manager
|
|
76
|
+
install_commands: Dict[PackageManager, str]
|
|
77
|
+
# Command to verify installation
|
|
78
|
+
check_command: str
|
|
79
|
+
# Alternative check (file existence)
|
|
80
|
+
check_path: Optional[str] = None
|
|
81
|
+
# Whether this is a core tool (should be installed by default)
|
|
82
|
+
is_core: bool = False
|
|
83
|
+
# Dependencies (other tool names)
|
|
84
|
+
dependencies: List[str] = None
|
|
85
|
+
# Whether requires sudo/admin
|
|
86
|
+
requires_sudo: bool = False
|
|
87
|
+
|
|
88
|
+
def __post_init__(self):
|
|
89
|
+
if self.dependencies is None:
|
|
90
|
+
self.dependencies = []
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# =============================================================================
|
|
94
|
+
# Tool Definitions - Cross-platform installation commands
|
|
95
|
+
# =============================================================================
|
|
96
|
+
|
|
97
|
+
TOOLS: Dict[str, ToolDefinition] = {
|
|
98
|
+
# Prerequisites
|
|
99
|
+
"go": ToolDefinition(
|
|
100
|
+
name="go",
|
|
101
|
+
description="Go programming language (required for many security tools)",
|
|
102
|
+
category=ToolCategory.PREREQUISITE,
|
|
103
|
+
install_commands={
|
|
104
|
+
PackageManager.APT: "apt-get install -y golang-go",
|
|
105
|
+
PackageManager.DNF: "dnf install -y golang",
|
|
106
|
+
PackageManager.YUM: "yum install -y golang",
|
|
107
|
+
PackageManager.PACMAN: "pacman -S --noconfirm go",
|
|
108
|
+
PackageManager.BREW: "brew install go",
|
|
109
|
+
PackageManager.CHOCO: "choco install golang -y",
|
|
110
|
+
PackageManager.WINGET: "winget install GoLang.Go --accept-source-agreements --accept-package-agreements",
|
|
111
|
+
},
|
|
112
|
+
check_command="go version",
|
|
113
|
+
is_core=True,
|
|
114
|
+
),
|
|
115
|
+
"ruby": ToolDefinition(
|
|
116
|
+
name="ruby",
|
|
117
|
+
description="Ruby programming language",
|
|
118
|
+
category=ToolCategory.PREREQUISITE,
|
|
119
|
+
install_commands={
|
|
120
|
+
PackageManager.APT: "apt-get install -y ruby-full",
|
|
121
|
+
PackageManager.DNF: "dnf install -y ruby ruby-devel",
|
|
122
|
+
PackageManager.YUM: "yum install -y ruby ruby-devel",
|
|
123
|
+
PackageManager.PACMAN: "pacman -S --noconfirm ruby",
|
|
124
|
+
PackageManager.BREW: "brew install ruby",
|
|
125
|
+
PackageManager.CHOCO: "choco install ruby -y",
|
|
126
|
+
},
|
|
127
|
+
check_command="ruby --version",
|
|
128
|
+
is_core=False,
|
|
129
|
+
),
|
|
130
|
+
"rust": ToolDefinition(
|
|
131
|
+
name="rust",
|
|
132
|
+
description="Rust programming language",
|
|
133
|
+
category=ToolCategory.PREREQUISITE,
|
|
134
|
+
install_commands={
|
|
135
|
+
PackageManager.APT: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
|
|
136
|
+
PackageManager.DNF: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
|
|
137
|
+
PackageManager.BREW: "brew install rust",
|
|
138
|
+
PackageManager.PACMAN: "pacman -S --noconfirm rust",
|
|
139
|
+
PackageManager.CHOCO: "choco install rust -y",
|
|
140
|
+
},
|
|
141
|
+
check_command="cargo --version",
|
|
142
|
+
is_core=False,
|
|
143
|
+
),
|
|
144
|
+
|
|
145
|
+
# RECON Tools
|
|
146
|
+
"nmap": ToolDefinition(
|
|
147
|
+
name="nmap",
|
|
148
|
+
description="Network exploration and security auditing",
|
|
149
|
+
category=ToolCategory.RECON,
|
|
150
|
+
install_commands={
|
|
151
|
+
PackageManager.APT: "apt-get install -y nmap",
|
|
152
|
+
PackageManager.DNF: "dnf install -y nmap",
|
|
153
|
+
PackageManager.YUM: "yum install -y nmap",
|
|
154
|
+
PackageManager.PACMAN: "pacman -S --noconfirm nmap",
|
|
155
|
+
PackageManager.BREW: "brew install nmap",
|
|
156
|
+
PackageManager.CHOCO: "choco install nmap -y",
|
|
157
|
+
PackageManager.WINGET: "winget install Nmap.Nmap --accept-source-agreements --accept-package-agreements",
|
|
158
|
+
},
|
|
159
|
+
check_command="nmap --version",
|
|
160
|
+
is_core=True,
|
|
161
|
+
),
|
|
162
|
+
"subfinder": ToolDefinition(
|
|
163
|
+
name="subfinder",
|
|
164
|
+
description="Subdomain discovery using passive sources",
|
|
165
|
+
category=ToolCategory.RECON,
|
|
166
|
+
install_commands={
|
|
167
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest",
|
|
168
|
+
PackageManager.DNF: "go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest",
|
|
169
|
+
PackageManager.BREW: "brew install subfinder",
|
|
170
|
+
PackageManager.PACMAN: "go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest",
|
|
171
|
+
PackageManager.CHOCO: "go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest",
|
|
172
|
+
},
|
|
173
|
+
check_command="subfinder -version",
|
|
174
|
+
dependencies=["go"],
|
|
175
|
+
is_core=True,
|
|
176
|
+
),
|
|
177
|
+
"httpx": ToolDefinition(
|
|
178
|
+
name="httpx",
|
|
179
|
+
description="Fast HTTP toolkit for probing web servers",
|
|
180
|
+
category=ToolCategory.RECON,
|
|
181
|
+
install_commands={
|
|
182
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest",
|
|
183
|
+
PackageManager.DNF: "go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest",
|
|
184
|
+
PackageManager.BREW: "brew install httpx",
|
|
185
|
+
PackageManager.PACMAN: "go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest",
|
|
186
|
+
PackageManager.CHOCO: "go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest",
|
|
187
|
+
},
|
|
188
|
+
check_command="httpx -version",
|
|
189
|
+
dependencies=["go"],
|
|
190
|
+
is_core=True,
|
|
191
|
+
),
|
|
192
|
+
"amass": ToolDefinition(
|
|
193
|
+
name="amass",
|
|
194
|
+
description="In-depth attack surface mapping and asset discovery",
|
|
195
|
+
category=ToolCategory.RECON,
|
|
196
|
+
install_commands={
|
|
197
|
+
PackageManager.APT: "go install -v github.com/owasp-amass/amass/v4/...@master",
|
|
198
|
+
PackageManager.DNF: "go install -v github.com/owasp-amass/amass/v4/...@master",
|
|
199
|
+
PackageManager.BREW: "brew install amass",
|
|
200
|
+
PackageManager.PACMAN: "go install -v github.com/owasp-amass/amass/v4/...@master",
|
|
201
|
+
},
|
|
202
|
+
check_command="amass -version",
|
|
203
|
+
dependencies=["go"],
|
|
204
|
+
),
|
|
205
|
+
"dnsx": ToolDefinition(
|
|
206
|
+
name="dnsx",
|
|
207
|
+
description="Fast DNS toolkit for multiple DNS queries",
|
|
208
|
+
category=ToolCategory.RECON,
|
|
209
|
+
install_commands={
|
|
210
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest",
|
|
211
|
+
PackageManager.DNF: "go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest",
|
|
212
|
+
PackageManager.BREW: "brew install dnsx",
|
|
213
|
+
PackageManager.PACMAN: "go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest",
|
|
214
|
+
},
|
|
215
|
+
check_command="dnsx -version",
|
|
216
|
+
dependencies=["go"],
|
|
217
|
+
),
|
|
218
|
+
"katana": ToolDefinition(
|
|
219
|
+
name="katana",
|
|
220
|
+
description="Fast web crawler for extracting endpoints",
|
|
221
|
+
category=ToolCategory.RECON,
|
|
222
|
+
install_commands={
|
|
223
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/katana/cmd/katana@latest",
|
|
224
|
+
PackageManager.DNF: "go install -v github.com/projectdiscovery/katana/cmd/katana@latest",
|
|
225
|
+
PackageManager.BREW: "brew install katana",
|
|
226
|
+
PackageManager.PACMAN: "go install -v github.com/projectdiscovery/katana/cmd/katana@latest",
|
|
227
|
+
},
|
|
228
|
+
check_command="katana -version",
|
|
229
|
+
dependencies=["go"],
|
|
230
|
+
),
|
|
231
|
+
"whatweb": ToolDefinition(
|
|
232
|
+
name="whatweb",
|
|
233
|
+
description="Web fingerprinting tool",
|
|
234
|
+
category=ToolCategory.RECON,
|
|
235
|
+
install_commands={
|
|
236
|
+
PackageManager.APT: "apt-get install -y whatweb",
|
|
237
|
+
PackageManager.DNF: "dnf install -y whatweb",
|
|
238
|
+
PackageManager.BREW: "brew install whatweb",
|
|
239
|
+
PackageManager.PACMAN: "pacman -S --noconfirm whatweb",
|
|
240
|
+
},
|
|
241
|
+
check_command="whatweb --version",
|
|
242
|
+
),
|
|
243
|
+
"wafw00f": ToolDefinition(
|
|
244
|
+
name="wafw00f",
|
|
245
|
+
description="Web Application Firewall detection",
|
|
246
|
+
category=ToolCategory.RECON,
|
|
247
|
+
install_commands={
|
|
248
|
+
PackageManager.APT: "pip3 install wafw00f",
|
|
249
|
+
PackageManager.DNF: "pip3 install wafw00f",
|
|
250
|
+
PackageManager.BREW: "pip3 install wafw00f",
|
|
251
|
+
PackageManager.PACMAN: "pip3 install wafw00f",
|
|
252
|
+
},
|
|
253
|
+
check_command="wafw00f -h",
|
|
254
|
+
),
|
|
255
|
+
|
|
256
|
+
# SCAN Tools
|
|
257
|
+
"nuclei": ToolDefinition(
|
|
258
|
+
name="nuclei",
|
|
259
|
+
description="Fast vulnerability scanner using templates",
|
|
260
|
+
category=ToolCategory.SCAN,
|
|
261
|
+
install_commands={
|
|
262
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest && nuclei -update-templates",
|
|
263
|
+
PackageManager.DNF: "go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest && nuclei -update-templates",
|
|
264
|
+
PackageManager.BREW: "brew install nuclei && nuclei -update-templates",
|
|
265
|
+
PackageManager.PACMAN: "go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest && nuclei -update-templates",
|
|
266
|
+
},
|
|
267
|
+
check_command="nuclei -version",
|
|
268
|
+
dependencies=["go"],
|
|
269
|
+
is_core=True,
|
|
270
|
+
),
|
|
271
|
+
"nikto": ToolDefinition(
|
|
272
|
+
name="nikto",
|
|
273
|
+
description="Web server vulnerability scanner",
|
|
274
|
+
category=ToolCategory.SCAN,
|
|
275
|
+
install_commands={
|
|
276
|
+
PackageManager.APT: "apt-get install -y nikto",
|
|
277
|
+
PackageManager.DNF: "dnf install -y nikto",
|
|
278
|
+
PackageManager.BREW: "brew install nikto",
|
|
279
|
+
PackageManager.PACMAN: "pacman -S --noconfirm nikto",
|
|
280
|
+
},
|
|
281
|
+
check_command="nikto -Version",
|
|
282
|
+
is_core=True,
|
|
283
|
+
),
|
|
284
|
+
"ffuf": ToolDefinition(
|
|
285
|
+
name="ffuf",
|
|
286
|
+
description="Fast web fuzzer for directory discovery",
|
|
287
|
+
category=ToolCategory.SCAN,
|
|
288
|
+
install_commands={
|
|
289
|
+
PackageManager.APT: "go install -v github.com/ffuf/ffuf/v2@latest",
|
|
290
|
+
PackageManager.DNF: "go install -v github.com/ffuf/ffuf/v2@latest",
|
|
291
|
+
PackageManager.BREW: "brew install ffuf",
|
|
292
|
+
PackageManager.PACMAN: "go install -v github.com/ffuf/ffuf/v2@latest",
|
|
293
|
+
},
|
|
294
|
+
check_command="ffuf -V",
|
|
295
|
+
dependencies=["go"],
|
|
296
|
+
is_core=True,
|
|
297
|
+
),
|
|
298
|
+
"gobuster": ToolDefinition(
|
|
299
|
+
name="gobuster",
|
|
300
|
+
description="Directory and file brute-forcing tool",
|
|
301
|
+
category=ToolCategory.SCAN,
|
|
302
|
+
install_commands={
|
|
303
|
+
PackageManager.APT: "go install -v github.com/OJ/gobuster/v3@latest",
|
|
304
|
+
PackageManager.DNF: "go install -v github.com/OJ/gobuster/v3@latest",
|
|
305
|
+
PackageManager.BREW: "brew install gobuster",
|
|
306
|
+
PackageManager.PACMAN: "go install -v github.com/OJ/gobuster/v3@latest",
|
|
307
|
+
},
|
|
308
|
+
check_command="gobuster version",
|
|
309
|
+
dependencies=["go"],
|
|
310
|
+
),
|
|
311
|
+
"feroxbuster": ToolDefinition(
|
|
312
|
+
name="feroxbuster",
|
|
313
|
+
description="Fast content discovery tool written in Rust",
|
|
314
|
+
category=ToolCategory.SCAN,
|
|
315
|
+
install_commands={
|
|
316
|
+
PackageManager.APT: "curl -sL https://raw.githubusercontent.com/epi052/feroxbuster/main/install-nix.sh | bash -s $HOME/.local/bin",
|
|
317
|
+
PackageManager.BREW: "brew install feroxbuster",
|
|
318
|
+
PackageManager.PACMAN: "pacman -S --noconfirm feroxbuster",
|
|
319
|
+
},
|
|
320
|
+
check_command="feroxbuster --version",
|
|
321
|
+
),
|
|
322
|
+
"sslscan": ToolDefinition(
|
|
323
|
+
name="sslscan",
|
|
324
|
+
description="SSL/TLS vulnerability scanner",
|
|
325
|
+
category=ToolCategory.SCAN,
|
|
326
|
+
install_commands={
|
|
327
|
+
PackageManager.APT: "apt-get install -y sslscan",
|
|
328
|
+
PackageManager.DNF: "dnf install -y sslscan",
|
|
329
|
+
PackageManager.BREW: "brew install sslscan",
|
|
330
|
+
PackageManager.PACMAN: "pacman -S --noconfirm sslscan",
|
|
331
|
+
},
|
|
332
|
+
check_command="sslscan --version",
|
|
333
|
+
),
|
|
334
|
+
"gitleaks": ToolDefinition(
|
|
335
|
+
name="gitleaks",
|
|
336
|
+
description="Git secret scanner",
|
|
337
|
+
category=ToolCategory.SCAN,
|
|
338
|
+
install_commands={
|
|
339
|
+
PackageManager.APT: "go install github.com/gitleaks/gitleaks/v8@latest",
|
|
340
|
+
PackageManager.BREW: "brew install gitleaks",
|
|
341
|
+
PackageManager.PACMAN: "go install github.com/gitleaks/gitleaks/v8@latest",
|
|
342
|
+
},
|
|
343
|
+
check_command="gitleaks version",
|
|
344
|
+
dependencies=["go"],
|
|
345
|
+
),
|
|
346
|
+
"trivy": ToolDefinition(
|
|
347
|
+
name="trivy",
|
|
348
|
+
description="Container and filesystem vulnerability scanner",
|
|
349
|
+
category=ToolCategory.SCAN,
|
|
350
|
+
install_commands={
|
|
351
|
+
PackageManager.APT: "curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin",
|
|
352
|
+
PackageManager.BREW: "brew install trivy",
|
|
353
|
+
PackageManager.PACMAN: "pacman -S --noconfirm trivy",
|
|
354
|
+
},
|
|
355
|
+
check_command="trivy --version",
|
|
356
|
+
),
|
|
357
|
+
"wpscan": ToolDefinition(
|
|
358
|
+
name="wpscan",
|
|
359
|
+
description="WordPress vulnerability scanner",
|
|
360
|
+
category=ToolCategory.SCAN,
|
|
361
|
+
install_commands={
|
|
362
|
+
PackageManager.APT: "gem install wpscan",
|
|
363
|
+
PackageManager.BREW: "brew install wpscan",
|
|
364
|
+
PackageManager.PACMAN: "gem install wpscan",
|
|
365
|
+
},
|
|
366
|
+
check_command="wpscan --version",
|
|
367
|
+
dependencies=["ruby"],
|
|
368
|
+
),
|
|
369
|
+
|
|
370
|
+
# EXPLOIT Tools
|
|
371
|
+
"sqlmap": ToolDefinition(
|
|
372
|
+
name="sqlmap",
|
|
373
|
+
description="Automatic SQL injection tool",
|
|
374
|
+
category=ToolCategory.EXPLOIT,
|
|
375
|
+
install_commands={
|
|
376
|
+
PackageManager.APT: "apt-get install -y sqlmap",
|
|
377
|
+
PackageManager.DNF: "dnf install -y sqlmap",
|
|
378
|
+
PackageManager.BREW: "brew install sqlmap",
|
|
379
|
+
PackageManager.PACMAN: "pacman -S --noconfirm sqlmap",
|
|
380
|
+
},
|
|
381
|
+
check_command="sqlmap --version",
|
|
382
|
+
is_core=True,
|
|
383
|
+
),
|
|
384
|
+
"hydra": ToolDefinition(
|
|
385
|
+
name="hydra",
|
|
386
|
+
description="Password brute-forcing tool",
|
|
387
|
+
category=ToolCategory.EXPLOIT,
|
|
388
|
+
install_commands={
|
|
389
|
+
PackageManager.APT: "apt-get install -y hydra",
|
|
390
|
+
PackageManager.DNF: "dnf install -y hydra",
|
|
391
|
+
PackageManager.BREW: "brew install hydra",
|
|
392
|
+
PackageManager.PACMAN: "pacman -S --noconfirm hydra",
|
|
393
|
+
},
|
|
394
|
+
check_command="hydra -h",
|
|
395
|
+
),
|
|
396
|
+
"john": ToolDefinition(
|
|
397
|
+
name="john",
|
|
398
|
+
description="Password cracker",
|
|
399
|
+
category=ToolCategory.EXPLOIT,
|
|
400
|
+
install_commands={
|
|
401
|
+
PackageManager.APT: "apt-get install -y john",
|
|
402
|
+
PackageManager.DNF: "dnf install -y john",
|
|
403
|
+
PackageManager.BREW: "brew install john",
|
|
404
|
+
PackageManager.PACMAN: "pacman -S --noconfirm john",
|
|
405
|
+
},
|
|
406
|
+
check_command="john --version",
|
|
407
|
+
),
|
|
408
|
+
"hashcat": ToolDefinition(
|
|
409
|
+
name="hashcat",
|
|
410
|
+
description="Advanced GPU-based password cracker",
|
|
411
|
+
category=ToolCategory.EXPLOIT,
|
|
412
|
+
install_commands={
|
|
413
|
+
PackageManager.APT: "apt-get install -y hashcat",
|
|
414
|
+
PackageManager.DNF: "dnf install -y hashcat",
|
|
415
|
+
PackageManager.BREW: "brew install hashcat",
|
|
416
|
+
PackageManager.PACMAN: "pacman -S --noconfirm hashcat",
|
|
417
|
+
},
|
|
418
|
+
check_command="hashcat --version",
|
|
419
|
+
),
|
|
420
|
+
"commix": ToolDefinition(
|
|
421
|
+
name="commix",
|
|
422
|
+
description="Command injection exploitation tool",
|
|
423
|
+
category=ToolCategory.EXPLOIT,
|
|
424
|
+
install_commands={
|
|
425
|
+
PackageManager.APT: "pip3 install commix",
|
|
426
|
+
PackageManager.BREW: "pip3 install commix",
|
|
427
|
+
},
|
|
428
|
+
check_command="commix --version",
|
|
429
|
+
),
|
|
430
|
+
|
|
431
|
+
# NETWORK Tools
|
|
432
|
+
"masscan": ToolDefinition(
|
|
433
|
+
name="masscan",
|
|
434
|
+
description="Fast TCP port scanner",
|
|
435
|
+
category=ToolCategory.NETWORK,
|
|
436
|
+
install_commands={
|
|
437
|
+
PackageManager.APT: "apt-get install -y masscan",
|
|
438
|
+
PackageManager.DNF: "dnf install -y masscan",
|
|
439
|
+
PackageManager.BREW: "brew install masscan",
|
|
440
|
+
PackageManager.PACMAN: "pacman -S --noconfirm masscan",
|
|
441
|
+
},
|
|
442
|
+
check_command="masscan --version",
|
|
443
|
+
requires_sudo=True,
|
|
444
|
+
),
|
|
445
|
+
"naabu": ToolDefinition(
|
|
446
|
+
name="naabu",
|
|
447
|
+
description="Fast port scanner from ProjectDiscovery",
|
|
448
|
+
category=ToolCategory.NETWORK,
|
|
449
|
+
install_commands={
|
|
450
|
+
PackageManager.APT: "go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest",
|
|
451
|
+
PackageManager.BREW: "brew install naabu",
|
|
452
|
+
},
|
|
453
|
+
check_command="naabu -version",
|
|
454
|
+
dependencies=["go"],
|
|
455
|
+
),
|
|
456
|
+
|
|
457
|
+
# API Security Tools
|
|
458
|
+
"arjun": ToolDefinition(
|
|
459
|
+
name="arjun",
|
|
460
|
+
description="HTTP parameter discovery",
|
|
461
|
+
category=ToolCategory.API,
|
|
462
|
+
install_commands={
|
|
463
|
+
PackageManager.APT: "pip3 install arjun",
|
|
464
|
+
PackageManager.BREW: "pip3 install arjun",
|
|
465
|
+
},
|
|
466
|
+
check_command="arjun -h",
|
|
467
|
+
),
|
|
468
|
+
|
|
469
|
+
# =========================================================================
|
|
470
|
+
# Additional RECON Tools
|
|
471
|
+
# =========================================================================
|
|
472
|
+
"assetfinder": ToolDefinition(
|
|
473
|
+
name="assetfinder",
|
|
474
|
+
description="Find domains and subdomains from various sources",
|
|
475
|
+
category=ToolCategory.RECON,
|
|
476
|
+
install_commands={
|
|
477
|
+
PackageManager.APT: "go install -v github.com/tomnomnom/assetfinder@latest",
|
|
478
|
+
PackageManager.BREW: "go install -v github.com/tomnomnom/assetfinder@latest",
|
|
479
|
+
},
|
|
480
|
+
check_command="assetfinder -h",
|
|
481
|
+
dependencies=["go"],
|
|
482
|
+
),
|
|
483
|
+
"waybackurls": ToolDefinition(
|
|
484
|
+
name="waybackurls",
|
|
485
|
+
description="Fetch URLs from Wayback Machine for a domain",
|
|
486
|
+
category=ToolCategory.RECON,
|
|
487
|
+
install_commands={
|
|
488
|
+
PackageManager.APT: "go install -v github.com/tomnomnom/waybackurls@latest",
|
|
489
|
+
PackageManager.BREW: "go install -v github.com/tomnomnom/waybackurls@latest",
|
|
490
|
+
},
|
|
491
|
+
check_command="waybackurls -h",
|
|
492
|
+
dependencies=["go"],
|
|
493
|
+
),
|
|
494
|
+
"gau": ToolDefinition(
|
|
495
|
+
name="gau",
|
|
496
|
+
description="Fetch known URLs from AlienVault, Wayback, and Common Crawl",
|
|
497
|
+
category=ToolCategory.RECON,
|
|
498
|
+
install_commands={
|
|
499
|
+
PackageManager.APT: "go install -v github.com/lc/gau/v2/cmd/gau@latest",
|
|
500
|
+
PackageManager.BREW: "go install -v github.com/lc/gau/v2/cmd/gau@latest",
|
|
501
|
+
},
|
|
502
|
+
check_command="gau -h",
|
|
503
|
+
dependencies=["go"],
|
|
504
|
+
),
|
|
505
|
+
"hakrawler": ToolDefinition(
|
|
506
|
+
name="hakrawler",
|
|
507
|
+
description="Simple, fast web crawler for discovering endpoints",
|
|
508
|
+
category=ToolCategory.RECON,
|
|
509
|
+
install_commands={
|
|
510
|
+
PackageManager.APT: "go install -v github.com/hakluke/hakrawler@latest",
|
|
511
|
+
PackageManager.BREW: "go install -v github.com/hakluke/hakrawler@latest",
|
|
512
|
+
},
|
|
513
|
+
check_command="hakrawler -h",
|
|
514
|
+
dependencies=["go"],
|
|
515
|
+
),
|
|
516
|
+
"gospider": ToolDefinition(
|
|
517
|
+
name="gospider",
|
|
518
|
+
description="Fast web spider written in Go",
|
|
519
|
+
category=ToolCategory.RECON,
|
|
520
|
+
install_commands={
|
|
521
|
+
PackageManager.APT: "go install -v github.com/jaeles-project/gospider@latest",
|
|
522
|
+
PackageManager.BREW: "go install -v github.com/jaeles-project/gospider@latest",
|
|
523
|
+
},
|
|
524
|
+
check_command="gospider -h",
|
|
525
|
+
dependencies=["go"],
|
|
526
|
+
),
|
|
527
|
+
"shodan-cli": ToolDefinition(
|
|
528
|
+
name="shodan-cli",
|
|
529
|
+
description="Shodan command-line interface",
|
|
530
|
+
category=ToolCategory.RECON,
|
|
531
|
+
install_commands={
|
|
532
|
+
PackageManager.APT: "pip3 install shodan",
|
|
533
|
+
PackageManager.BREW: "pip3 install shodan",
|
|
534
|
+
},
|
|
535
|
+
check_command="shodan -h",
|
|
536
|
+
),
|
|
537
|
+
|
|
538
|
+
# =========================================================================
|
|
539
|
+
# Additional SCAN Tools
|
|
540
|
+
# =========================================================================
|
|
541
|
+
"dirsearch": ToolDefinition(
|
|
542
|
+
name="dirsearch",
|
|
543
|
+
description="Web path brute-forcer",
|
|
544
|
+
category=ToolCategory.SCAN,
|
|
545
|
+
install_commands={
|
|
546
|
+
PackageManager.APT: "pip3 install dirsearch",
|
|
547
|
+
PackageManager.BREW: "pip3 install dirsearch",
|
|
548
|
+
},
|
|
549
|
+
check_command="dirsearch -h",
|
|
550
|
+
),
|
|
551
|
+
"testssl": ToolDefinition(
|
|
552
|
+
name="testssl",
|
|
553
|
+
description="SSL/TLS testing tool with comprehensive checks",
|
|
554
|
+
category=ToolCategory.SCAN,
|
|
555
|
+
install_commands={
|
|
556
|
+
PackageManager.APT: "apt-get install -y testssl.sh || git clone --depth 1 https://github.com/drwetter/testssl.sh.git ~/.local/testssl",
|
|
557
|
+
PackageManager.BREW: "brew install testssl",
|
|
558
|
+
},
|
|
559
|
+
check_command="testssl.sh --version || testssl --version",
|
|
560
|
+
),
|
|
561
|
+
"dalfox": ToolDefinition(
|
|
562
|
+
name="dalfox",
|
|
563
|
+
description="Fast XSS scanner and parameter analyzer",
|
|
564
|
+
category=ToolCategory.SCAN,
|
|
565
|
+
install_commands={
|
|
566
|
+
PackageManager.APT: "go install -v github.com/hahwul/dalfox/v2@latest",
|
|
567
|
+
PackageManager.BREW: "brew install dalfox",
|
|
568
|
+
},
|
|
569
|
+
check_command="dalfox version",
|
|
570
|
+
dependencies=["go"],
|
|
571
|
+
is_core=True,
|
|
572
|
+
),
|
|
573
|
+
"whatwaf": ToolDefinition(
|
|
574
|
+
name="whatwaf",
|
|
575
|
+
description="Detect and bypass WAF/IPS/IDS",
|
|
576
|
+
category=ToolCategory.SCAN,
|
|
577
|
+
install_commands={
|
|
578
|
+
PackageManager.APT: "pip3 install whatwaf",
|
|
579
|
+
PackageManager.BREW: "pip3 install whatwaf",
|
|
580
|
+
},
|
|
581
|
+
check_command="whatwaf -h",
|
|
582
|
+
),
|
|
583
|
+
"subjack": ToolDefinition(
|
|
584
|
+
name="subjack",
|
|
585
|
+
description="Subdomain takeover vulnerability scanner",
|
|
586
|
+
category=ToolCategory.SCAN,
|
|
587
|
+
install_commands={
|
|
588
|
+
PackageManager.APT: "go install -v github.com/haccer/subjack@latest",
|
|
589
|
+
PackageManager.BREW: "go install -v github.com/haccer/subjack@latest",
|
|
590
|
+
},
|
|
591
|
+
check_command="subjack -h",
|
|
592
|
+
dependencies=["go"],
|
|
593
|
+
),
|
|
594
|
+
|
|
595
|
+
# =========================================================================
|
|
596
|
+
# WEB Application Tools
|
|
597
|
+
# =========================================================================
|
|
598
|
+
"xsstrike": ToolDefinition(
|
|
599
|
+
name="xsstrike",
|
|
600
|
+
description="Advanced XSS detection and exploitation",
|
|
601
|
+
category=ToolCategory.WEB,
|
|
602
|
+
install_commands={
|
|
603
|
+
PackageManager.APT: "pip3 install xsstrike",
|
|
604
|
+
PackageManager.BREW: "pip3 install xsstrike",
|
|
605
|
+
},
|
|
606
|
+
check_command="xsstrike -h",
|
|
607
|
+
is_core=True,
|
|
608
|
+
),
|
|
609
|
+
"jwt-tool": ToolDefinition(
|
|
610
|
+
name="jwt-tool",
|
|
611
|
+
description="JWT security testing toolkit",
|
|
612
|
+
category=ToolCategory.WEB,
|
|
613
|
+
install_commands={
|
|
614
|
+
PackageManager.APT: "pip3 install jwt-tool",
|
|
615
|
+
PackageManager.BREW: "pip3 install jwt-tool",
|
|
616
|
+
},
|
|
617
|
+
check_command="jwt_tool -h",
|
|
618
|
+
),
|
|
619
|
+
"paramspider": ToolDefinition(
|
|
620
|
+
name="paramspider",
|
|
621
|
+
description="Mining parameters from web archives",
|
|
622
|
+
category=ToolCategory.WEB,
|
|
623
|
+
install_commands={
|
|
624
|
+
PackageManager.APT: "pip3 install paramspider",
|
|
625
|
+
PackageManager.BREW: "pip3 install paramspider",
|
|
626
|
+
},
|
|
627
|
+
check_command="paramspider -h",
|
|
628
|
+
),
|
|
629
|
+
"cors-scanner": ToolDefinition(
|
|
630
|
+
name="cors-scanner",
|
|
631
|
+
description="CORS misconfiguration scanner",
|
|
632
|
+
category=ToolCategory.WEB,
|
|
633
|
+
install_commands={
|
|
634
|
+
PackageManager.APT: "pip3 install cors",
|
|
635
|
+
PackageManager.BREW: "pip3 install cors",
|
|
636
|
+
},
|
|
637
|
+
check_command="python3 -c 'import cors'",
|
|
638
|
+
),
|
|
639
|
+
|
|
640
|
+
# =========================================================================
|
|
641
|
+
# EXPLOIT Tools (Additional)
|
|
642
|
+
# =========================================================================
|
|
643
|
+
"crackmapexec": ToolDefinition(
|
|
644
|
+
name="crackmapexec",
|
|
645
|
+
description="Network exploitation and post-exploitation tool",
|
|
646
|
+
category=ToolCategory.EXPLOIT,
|
|
647
|
+
install_commands={
|
|
648
|
+
PackageManager.APT: "pip3 install crackmapexec",
|
|
649
|
+
PackageManager.BREW: "pip3 install crackmapexec",
|
|
650
|
+
},
|
|
651
|
+
check_command="crackmapexec -h",
|
|
652
|
+
),
|
|
653
|
+
"impacket": ToolDefinition(
|
|
654
|
+
name="impacket",
|
|
655
|
+
description="Python classes for network protocols (psexec, secretsdump)",
|
|
656
|
+
category=ToolCategory.EXPLOIT,
|
|
657
|
+
install_commands={
|
|
658
|
+
PackageManager.APT: "pip3 install impacket",
|
|
659
|
+
PackageManager.BREW: "pip3 install impacket",
|
|
660
|
+
},
|
|
661
|
+
check_command="impacket-psexec -h",
|
|
662
|
+
is_core=True,
|
|
663
|
+
),
|
|
664
|
+
"evil-winrm": ToolDefinition(
|
|
665
|
+
name="evil-winrm",
|
|
666
|
+
description="WinRM shell for hacking/pentesting",
|
|
667
|
+
category=ToolCategory.EXPLOIT,
|
|
668
|
+
install_commands={
|
|
669
|
+
PackageManager.APT: "gem install evil-winrm",
|
|
670
|
+
PackageManager.BREW: "gem install evil-winrm",
|
|
671
|
+
},
|
|
672
|
+
check_command="evil-winrm -h",
|
|
673
|
+
dependencies=["ruby"],
|
|
674
|
+
),
|
|
675
|
+
"responder": ToolDefinition(
|
|
676
|
+
name="responder",
|
|
677
|
+
description="LLMNR/NBT-NS/MDNS poisoner and credential capture",
|
|
678
|
+
category=ToolCategory.EXPLOIT,
|
|
679
|
+
install_commands={
|
|
680
|
+
PackageManager.APT: "apt-get install -y responder || pip3 install responder",
|
|
681
|
+
PackageManager.BREW: "pip3 install responder",
|
|
682
|
+
},
|
|
683
|
+
check_command="responder -h",
|
|
684
|
+
requires_sudo=True,
|
|
685
|
+
),
|
|
686
|
+
|
|
687
|
+
# =========================================================================
|
|
688
|
+
# POST-EXPLOIT Tools
|
|
689
|
+
# =========================================================================
|
|
690
|
+
"linpeas": ToolDefinition(
|
|
691
|
+
name="linpeas",
|
|
692
|
+
description="Linux privilege escalation scanner",
|
|
693
|
+
category=ToolCategory.POST_EXPLOIT,
|
|
694
|
+
install_commands={
|
|
695
|
+
PackageManager.APT: "curl -sL https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh -o ~/.local/bin/linpeas.sh && chmod +x ~/.local/bin/linpeas.sh",
|
|
696
|
+
PackageManager.BREW: "curl -sL https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh -o ~/.local/bin/linpeas.sh && chmod +x ~/.local/bin/linpeas.sh",
|
|
697
|
+
},
|
|
698
|
+
check_command="test -f ~/.local/bin/linpeas.sh",
|
|
699
|
+
check_path="~/.local/bin/linpeas.sh",
|
|
700
|
+
is_core=True,
|
|
701
|
+
),
|
|
702
|
+
"pspy": ToolDefinition(
|
|
703
|
+
name="pspy",
|
|
704
|
+
description="Linux process monitor without root",
|
|
705
|
+
category=ToolCategory.POST_EXPLOIT,
|
|
706
|
+
install_commands={
|
|
707
|
+
PackageManager.APT: "curl -sL https://github.com/DominicBreuker/pspy/releases/latest/download/pspy64 -o ~/.local/bin/pspy64 && chmod +x ~/.local/bin/pspy64",
|
|
708
|
+
PackageManager.BREW: "curl -sL https://github.com/DominicBreuker/pspy/releases/latest/download/pspy64 -o ~/.local/bin/pspy64 && chmod +x ~/.local/bin/pspy64",
|
|
709
|
+
},
|
|
710
|
+
check_command="test -f ~/.local/bin/pspy64",
|
|
711
|
+
check_path="~/.local/bin/pspy64",
|
|
712
|
+
),
|
|
713
|
+
"chisel": ToolDefinition(
|
|
714
|
+
name="chisel",
|
|
715
|
+
description="TCP/UDP tunneling over HTTP",
|
|
716
|
+
category=ToolCategory.POST_EXPLOIT,
|
|
717
|
+
install_commands={
|
|
718
|
+
PackageManager.APT: "go install -v github.com/jpillora/chisel@latest",
|
|
719
|
+
PackageManager.BREW: "brew install chisel",
|
|
720
|
+
},
|
|
721
|
+
check_command="chisel -h",
|
|
722
|
+
dependencies=["go"],
|
|
723
|
+
is_core=True,
|
|
724
|
+
),
|
|
725
|
+
"ligolo-ng": ToolDefinition(
|
|
726
|
+
name="ligolo-ng",
|
|
727
|
+
description="Advanced tunneling/pivoting tool",
|
|
728
|
+
category=ToolCategory.POST_EXPLOIT,
|
|
729
|
+
install_commands={
|
|
730
|
+
PackageManager.APT: "go install -v github.com/nicocha30/ligolo-ng@latest",
|
|
731
|
+
PackageManager.BREW: "go install -v github.com/nicocha30/ligolo-ng@latest",
|
|
732
|
+
},
|
|
733
|
+
check_command="ligolo-ng -h",
|
|
734
|
+
dependencies=["go"],
|
|
735
|
+
),
|
|
736
|
+
"lazagne": ToolDefinition(
|
|
737
|
+
name="lazagne",
|
|
738
|
+
description="Credential recovery from browsers, mail, wifi",
|
|
739
|
+
category=ToolCategory.POST_EXPLOIT,
|
|
740
|
+
install_commands={
|
|
741
|
+
PackageManager.APT: "pip3 install lazagne",
|
|
742
|
+
PackageManager.BREW: "pip3 install lazagne",
|
|
743
|
+
},
|
|
744
|
+
check_command="lazagne -h",
|
|
745
|
+
),
|
|
746
|
+
|
|
747
|
+
# =========================================================================
|
|
748
|
+
# ACTIVE DIRECTORY Tools
|
|
749
|
+
# =========================================================================
|
|
750
|
+
"bloodhound-python": ToolDefinition(
|
|
751
|
+
name="bloodhound-python",
|
|
752
|
+
description="BloodHound data collector for AD",
|
|
753
|
+
category=ToolCategory.ACTIVE_DIRECTORY,
|
|
754
|
+
install_commands={
|
|
755
|
+
PackageManager.APT: "pip3 install bloodhound",
|
|
756
|
+
PackageManager.BREW: "pip3 install bloodhound",
|
|
757
|
+
},
|
|
758
|
+
check_command="bloodhound-python -h",
|
|
759
|
+
is_core=True,
|
|
760
|
+
),
|
|
761
|
+
"kerbrute": ToolDefinition(
|
|
762
|
+
name="kerbrute",
|
|
763
|
+
description="Kerberos brute-forcing tool",
|
|
764
|
+
category=ToolCategory.ACTIVE_DIRECTORY,
|
|
765
|
+
install_commands={
|
|
766
|
+
PackageManager.APT: "go install -v github.com/ropnop/kerbrute@latest",
|
|
767
|
+
PackageManager.BREW: "go install -v github.com/ropnop/kerbrute@latest",
|
|
768
|
+
},
|
|
769
|
+
check_command="kerbrute -h",
|
|
770
|
+
dependencies=["go"],
|
|
771
|
+
),
|
|
772
|
+
"enum4linux-ng": ToolDefinition(
|
|
773
|
+
name="enum4linux-ng",
|
|
774
|
+
description="Next-gen Windows/Samba enumeration",
|
|
775
|
+
category=ToolCategory.ACTIVE_DIRECTORY,
|
|
776
|
+
install_commands={
|
|
777
|
+
PackageManager.APT: "pip3 install enum4linux-ng",
|
|
778
|
+
PackageManager.BREW: "pip3 install enum4linux-ng",
|
|
779
|
+
},
|
|
780
|
+
check_command="enum4linux-ng -h",
|
|
781
|
+
),
|
|
782
|
+
"ldapdomaindump": ToolDefinition(
|
|
783
|
+
name="ldapdomaindump",
|
|
784
|
+
description="LDAP information dumper for AD",
|
|
785
|
+
category=ToolCategory.ACTIVE_DIRECTORY,
|
|
786
|
+
install_commands={
|
|
787
|
+
PackageManager.APT: "pip3 install ldapdomaindump",
|
|
788
|
+
PackageManager.BREW: "pip3 install ldapdomaindump",
|
|
789
|
+
},
|
|
790
|
+
check_command="ldapdomaindump -h",
|
|
791
|
+
),
|
|
792
|
+
"adidnsdump": ToolDefinition(
|
|
793
|
+
name="adidnsdump",
|
|
794
|
+
description="Active Directory DNS zone dumper",
|
|
795
|
+
category=ToolCategory.ACTIVE_DIRECTORY,
|
|
796
|
+
install_commands={
|
|
797
|
+
PackageManager.APT: "pip3 install adidnsdump",
|
|
798
|
+
PackageManager.BREW: "pip3 install adidnsdump",
|
|
799
|
+
},
|
|
800
|
+
check_command="adidnsdump -h",
|
|
801
|
+
),
|
|
802
|
+
|
|
803
|
+
# =========================================================================
|
|
804
|
+
# CLOUD Security Tools
|
|
805
|
+
# =========================================================================
|
|
806
|
+
"prowler": ToolDefinition(
|
|
807
|
+
name="prowler",
|
|
808
|
+
description="AWS/Azure/GCP security assessment tool",
|
|
809
|
+
category=ToolCategory.CLOUD,
|
|
810
|
+
install_commands={
|
|
811
|
+
PackageManager.APT: "pip3 install prowler",
|
|
812
|
+
PackageManager.BREW: "brew install prowler",
|
|
813
|
+
},
|
|
814
|
+
check_command="prowler -h",
|
|
815
|
+
is_core=True,
|
|
816
|
+
),
|
|
817
|
+
"cloudsploit": ToolDefinition(
|
|
818
|
+
name="cloudsploit",
|
|
819
|
+
description="Cloud security scanning (AWS, Azure, GCP, Oracle)",
|
|
820
|
+
category=ToolCategory.CLOUD,
|
|
821
|
+
install_commands={
|
|
822
|
+
PackageManager.APT: "npm install -g cloudsploit",
|
|
823
|
+
PackageManager.BREW: "npm install -g cloudsploit",
|
|
824
|
+
},
|
|
825
|
+
check_command="cloudsploit -h",
|
|
826
|
+
),
|
|
827
|
+
"pacu": ToolDefinition(
|
|
828
|
+
name="pacu",
|
|
829
|
+
description="AWS exploitation framework",
|
|
830
|
+
category=ToolCategory.CLOUD,
|
|
831
|
+
install_commands={
|
|
832
|
+
PackageManager.APT: "pip3 install pacu",
|
|
833
|
+
PackageManager.BREW: "pip3 install pacu",
|
|
834
|
+
},
|
|
835
|
+
check_command="pacu -h",
|
|
836
|
+
),
|
|
837
|
+
"scoutsuite": ToolDefinition(
|
|
838
|
+
name="scoutsuite",
|
|
839
|
+
description="Multi-cloud security auditing tool",
|
|
840
|
+
category=ToolCategory.CLOUD,
|
|
841
|
+
install_commands={
|
|
842
|
+
PackageManager.APT: "pip3 install scoutsuite",
|
|
843
|
+
PackageManager.BREW: "pip3 install scoutsuite",
|
|
844
|
+
},
|
|
845
|
+
check_command="scout -h",
|
|
846
|
+
),
|
|
847
|
+
"awscli": ToolDefinition(
|
|
848
|
+
name="awscli",
|
|
849
|
+
description="AWS command-line interface",
|
|
850
|
+
category=ToolCategory.CLOUD,
|
|
851
|
+
install_commands={
|
|
852
|
+
PackageManager.APT: "pip3 install awscli",
|
|
853
|
+
PackageManager.BREW: "brew install awscli",
|
|
854
|
+
PackageManager.CHOCO: "choco install awscli -y",
|
|
855
|
+
},
|
|
856
|
+
check_command="aws --version",
|
|
857
|
+
),
|
|
858
|
+
|
|
859
|
+
# =========================================================================
|
|
860
|
+
# CONTAINER Security Tools
|
|
861
|
+
# =========================================================================
|
|
862
|
+
"docker-bench-security": ToolDefinition(
|
|
863
|
+
name="docker-bench-security",
|
|
864
|
+
description="Docker CIS benchmark checker",
|
|
865
|
+
category=ToolCategory.CONTAINER,
|
|
866
|
+
install_commands={
|
|
867
|
+
PackageManager.APT: "git clone https://github.com/docker/docker-bench-security.git ~/.local/docker-bench-security",
|
|
868
|
+
PackageManager.BREW: "git clone https://github.com/docker/docker-bench-security.git ~/.local/docker-bench-security",
|
|
869
|
+
},
|
|
870
|
+
check_command="test -d ~/.local/docker-bench-security",
|
|
871
|
+
),
|
|
872
|
+
"grype": ToolDefinition(
|
|
873
|
+
name="grype",
|
|
874
|
+
description="Container vulnerability scanner",
|
|
875
|
+
category=ToolCategory.CONTAINER,
|
|
876
|
+
install_commands={
|
|
877
|
+
PackageManager.APT: "curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b ~/.local/bin",
|
|
878
|
+
PackageManager.BREW: "brew install grype",
|
|
879
|
+
},
|
|
880
|
+
check_command="grype version",
|
|
881
|
+
is_core=True,
|
|
882
|
+
),
|
|
883
|
+
"syft": ToolDefinition(
|
|
884
|
+
name="syft",
|
|
885
|
+
description="Generate SBOM for containers",
|
|
886
|
+
category=ToolCategory.CONTAINER,
|
|
887
|
+
install_commands={
|
|
888
|
+
PackageManager.APT: "curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b ~/.local/bin",
|
|
889
|
+
PackageManager.BREW: "brew install syft",
|
|
890
|
+
},
|
|
891
|
+
check_command="syft version",
|
|
892
|
+
),
|
|
893
|
+
"kube-hunter": ToolDefinition(
|
|
894
|
+
name="kube-hunter",
|
|
895
|
+
description="Kubernetes penetration testing tool",
|
|
896
|
+
category=ToolCategory.CONTAINER,
|
|
897
|
+
install_commands={
|
|
898
|
+
PackageManager.APT: "pip3 install kube-hunter",
|
|
899
|
+
PackageManager.BREW: "pip3 install kube-hunter",
|
|
900
|
+
},
|
|
901
|
+
check_command="kube-hunter -h",
|
|
902
|
+
),
|
|
903
|
+
"kubectl": ToolDefinition(
|
|
904
|
+
name="kubectl",
|
|
905
|
+
description="Kubernetes CLI tool",
|
|
906
|
+
category=ToolCategory.CONTAINER,
|
|
907
|
+
install_commands={
|
|
908
|
+
PackageManager.APT: "snap install kubectl --classic || curl -LO 'https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl' && chmod +x kubectl && mv kubectl ~/.local/bin/",
|
|
909
|
+
PackageManager.BREW: "brew install kubectl",
|
|
910
|
+
PackageManager.CHOCO: "choco install kubernetes-cli -y",
|
|
911
|
+
},
|
|
912
|
+
check_command="kubectl version --client",
|
|
913
|
+
),
|
|
914
|
+
|
|
915
|
+
# =========================================================================
|
|
916
|
+
# OSINT Tools
|
|
917
|
+
# =========================================================================
|
|
918
|
+
"theHarvester": ToolDefinition(
|
|
919
|
+
name="theHarvester",
|
|
920
|
+
description="Email, subdomain, and name harvesting",
|
|
921
|
+
category=ToolCategory.OSINT,
|
|
922
|
+
install_commands={
|
|
923
|
+
PackageManager.APT: "pip3 install theHarvester",
|
|
924
|
+
PackageManager.BREW: "pip3 install theHarvester",
|
|
925
|
+
},
|
|
926
|
+
check_command="theHarvester -h",
|
|
927
|
+
is_core=True,
|
|
928
|
+
),
|
|
929
|
+
"spiderfoot": ToolDefinition(
|
|
930
|
+
name="spiderfoot",
|
|
931
|
+
description="OSINT automation platform",
|
|
932
|
+
category=ToolCategory.OSINT,
|
|
933
|
+
install_commands={
|
|
934
|
+
PackageManager.APT: "pip3 install spiderfoot",
|
|
935
|
+
PackageManager.BREW: "pip3 install spiderfoot",
|
|
936
|
+
},
|
|
937
|
+
check_command="spiderfoot -h",
|
|
938
|
+
),
|
|
939
|
+
"sherlock": ToolDefinition(
|
|
940
|
+
name="sherlock",
|
|
941
|
+
description="Hunt usernames across social networks",
|
|
942
|
+
category=ToolCategory.OSINT,
|
|
943
|
+
install_commands={
|
|
944
|
+
PackageManager.APT: "pip3 install sherlock-project",
|
|
945
|
+
PackageManager.BREW: "pip3 install sherlock-project",
|
|
946
|
+
},
|
|
947
|
+
check_command="sherlock -h",
|
|
948
|
+
),
|
|
949
|
+
"holehe": ToolDefinition(
|
|
950
|
+
name="holehe",
|
|
951
|
+
description="Check if email is used on various sites",
|
|
952
|
+
category=ToolCategory.OSINT,
|
|
953
|
+
install_commands={
|
|
954
|
+
PackageManager.APT: "pip3 install holehe",
|
|
955
|
+
PackageManager.BREW: "pip3 install holehe",
|
|
956
|
+
},
|
|
957
|
+
check_command="holehe -h",
|
|
958
|
+
),
|
|
959
|
+
"photon": ToolDefinition(
|
|
960
|
+
name="photon",
|
|
961
|
+
description="Fast web crawler for OSINT",
|
|
962
|
+
category=ToolCategory.OSINT,
|
|
963
|
+
install_commands={
|
|
964
|
+
PackageManager.APT: "pip3 install photon",
|
|
965
|
+
PackageManager.BREW: "pip3 install photon",
|
|
966
|
+
},
|
|
967
|
+
check_command="photon -h",
|
|
968
|
+
),
|
|
969
|
+
|
|
970
|
+
# =========================================================================
|
|
971
|
+
# SECRETS Detection Tools
|
|
972
|
+
# =========================================================================
|
|
973
|
+
"trufflehog": ToolDefinition(
|
|
974
|
+
name="trufflehog",
|
|
975
|
+
description="Find secrets in git repos and filesystems",
|
|
976
|
+
category=ToolCategory.SECRETS,
|
|
977
|
+
install_commands={
|
|
978
|
+
PackageManager.APT: "pip3 install trufflehog",
|
|
979
|
+
PackageManager.BREW: "brew install trufflehog",
|
|
980
|
+
},
|
|
981
|
+
check_command="trufflehog --version",
|
|
982
|
+
is_core=True,
|
|
983
|
+
),
|
|
984
|
+
"detect-secrets": ToolDefinition(
|
|
985
|
+
name="detect-secrets",
|
|
986
|
+
description="Yelp's secrets detection tool",
|
|
987
|
+
category=ToolCategory.SECRETS,
|
|
988
|
+
install_commands={
|
|
989
|
+
PackageManager.APT: "pip3 install detect-secrets",
|
|
990
|
+
PackageManager.BREW: "pip3 install detect-secrets",
|
|
991
|
+
},
|
|
992
|
+
check_command="detect-secrets -h",
|
|
993
|
+
),
|
|
994
|
+
"git-secrets": ToolDefinition(
|
|
995
|
+
name="git-secrets",
|
|
996
|
+
description="Prevent committing secrets to git",
|
|
997
|
+
category=ToolCategory.SECRETS,
|
|
998
|
+
install_commands={
|
|
999
|
+
PackageManager.APT: "git clone https://github.com/awslabs/git-secrets.git && cd git-secrets && make install",
|
|
1000
|
+
PackageManager.BREW: "brew install git-secrets",
|
|
1001
|
+
},
|
|
1002
|
+
check_command="git secrets -h",
|
|
1003
|
+
),
|
|
1004
|
+
"shhgit": ToolDefinition(
|
|
1005
|
+
name="shhgit",
|
|
1006
|
+
description="Find secrets in GitHub repos",
|
|
1007
|
+
category=ToolCategory.SECRETS,
|
|
1008
|
+
install_commands={
|
|
1009
|
+
PackageManager.APT: "go install -v github.com/eth0izzle/shhgit@latest",
|
|
1010
|
+
PackageManager.BREW: "go install -v github.com/eth0izzle/shhgit@latest",
|
|
1011
|
+
},
|
|
1012
|
+
check_command="shhgit -h",
|
|
1013
|
+
dependencies=["go"],
|
|
1014
|
+
),
|
|
1015
|
+
|
|
1016
|
+
# =========================================================================
|
|
1017
|
+
# MOBILE Security Tools
|
|
1018
|
+
# =========================================================================
|
|
1019
|
+
"apktool": ToolDefinition(
|
|
1020
|
+
name="apktool",
|
|
1021
|
+
description="Reverse engineer Android APK files",
|
|
1022
|
+
category=ToolCategory.MOBILE,
|
|
1023
|
+
install_commands={
|
|
1024
|
+
PackageManager.APT: "apt-get install -y apktool",
|
|
1025
|
+
PackageManager.BREW: "brew install apktool",
|
|
1026
|
+
},
|
|
1027
|
+
check_command="apktool -version",
|
|
1028
|
+
),
|
|
1029
|
+
"jadx": ToolDefinition(
|
|
1030
|
+
name="jadx",
|
|
1031
|
+
description="DEX to Java decompiler",
|
|
1032
|
+
category=ToolCategory.MOBILE,
|
|
1033
|
+
install_commands={
|
|
1034
|
+
PackageManager.APT: "apt-get install -y jadx || pip3 install jadx",
|
|
1035
|
+
PackageManager.BREW: "brew install jadx",
|
|
1036
|
+
},
|
|
1037
|
+
check_command="jadx --version",
|
|
1038
|
+
),
|
|
1039
|
+
"mobsf": ToolDefinition(
|
|
1040
|
+
name="mobsf",
|
|
1041
|
+
description="Mobile Security Framework for Android/iOS",
|
|
1042
|
+
category=ToolCategory.MOBILE,
|
|
1043
|
+
install_commands={
|
|
1044
|
+
PackageManager.APT: "pip3 install mobsfscan",
|
|
1045
|
+
PackageManager.BREW: "pip3 install mobsfscan",
|
|
1046
|
+
},
|
|
1047
|
+
check_command="mobsfscan -h",
|
|
1048
|
+
),
|
|
1049
|
+
|
|
1050
|
+
# =========================================================================
|
|
1051
|
+
# WIRELESS Tools (Linux primarily)
|
|
1052
|
+
# =========================================================================
|
|
1053
|
+
"aircrack-ng": ToolDefinition(
|
|
1054
|
+
name="aircrack-ng",
|
|
1055
|
+
description="WiFi security auditing tools",
|
|
1056
|
+
category=ToolCategory.WIRELESS,
|
|
1057
|
+
install_commands={
|
|
1058
|
+
PackageManager.APT: "apt-get install -y aircrack-ng",
|
|
1059
|
+
PackageManager.BREW: "brew install aircrack-ng",
|
|
1060
|
+
PackageManager.PACMAN: "pacman -S --noconfirm aircrack-ng",
|
|
1061
|
+
},
|
|
1062
|
+
check_command="aircrack-ng --help",
|
|
1063
|
+
requires_sudo=True,
|
|
1064
|
+
),
|
|
1065
|
+
"reaver": ToolDefinition(
|
|
1066
|
+
name="reaver",
|
|
1067
|
+
description="WPS brute force attack tool",
|
|
1068
|
+
category=ToolCategory.WIRELESS,
|
|
1069
|
+
install_commands={
|
|
1070
|
+
PackageManager.APT: "apt-get install -y reaver",
|
|
1071
|
+
PackageManager.PACMAN: "pacman -S --noconfirm reaver",
|
|
1072
|
+
},
|
|
1073
|
+
check_command="reaver -h",
|
|
1074
|
+
requires_sudo=True,
|
|
1075
|
+
),
|
|
1076
|
+
"wifite": ToolDefinition(
|
|
1077
|
+
name="wifite",
|
|
1078
|
+
description="Automated wireless auditor",
|
|
1079
|
+
category=ToolCategory.WIRELESS,
|
|
1080
|
+
install_commands={
|
|
1081
|
+
PackageManager.APT: "apt-get install -y wifite",
|
|
1082
|
+
PackageManager.PACMAN: "pacman -S --noconfirm wifite",
|
|
1083
|
+
},
|
|
1084
|
+
check_command="wifite -h",
|
|
1085
|
+
requires_sudo=True,
|
|
1086
|
+
),
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
@dataclass
|
|
1091
|
+
class InstallResult:
|
|
1092
|
+
"""Result of a tool installation."""
|
|
1093
|
+
tool_name: str
|
|
1094
|
+
success: bool
|
|
1095
|
+
message: str
|
|
1096
|
+
already_installed: bool = False
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
class LocalToolInstaller:
|
|
1100
|
+
"""
|
|
1101
|
+
Installs security tools on the local system.
|
|
1102
|
+
|
|
1103
|
+
Automatically detects the OS and package manager, then installs
|
|
1104
|
+
tools using the appropriate commands.
|
|
1105
|
+
"""
|
|
1106
|
+
|
|
1107
|
+
def __init__(self, system_info: Optional[SystemInfo] = None):
|
|
1108
|
+
"""
|
|
1109
|
+
Initialize the installer.
|
|
1110
|
+
|
|
1111
|
+
Args:
|
|
1112
|
+
system_info: Pre-detected system info (will auto-detect if not provided)
|
|
1113
|
+
"""
|
|
1114
|
+
self._system_info = system_info
|
|
1115
|
+
self._detector = SystemDetector()
|
|
1116
|
+
|
|
1117
|
+
async def detect_system(self) -> SystemInfo:
|
|
1118
|
+
"""Detect system if not already done."""
|
|
1119
|
+
if not self._system_info:
|
|
1120
|
+
self._system_info = await self._detector.detect()
|
|
1121
|
+
return self._system_info
|
|
1122
|
+
|
|
1123
|
+
async def check_tool_installed(self, tool_name: str) -> bool:
|
|
1124
|
+
"""Check if a tool is installed."""
|
|
1125
|
+
tool = TOOLS.get(tool_name)
|
|
1126
|
+
if not tool:
|
|
1127
|
+
return False
|
|
1128
|
+
|
|
1129
|
+
# Check if binary exists
|
|
1130
|
+
if shutil.which(tool_name):
|
|
1131
|
+
return True
|
|
1132
|
+
|
|
1133
|
+
# Try running check command
|
|
1134
|
+
try:
|
|
1135
|
+
proc = await asyncio.create_subprocess_shell(
|
|
1136
|
+
tool.check_command,
|
|
1137
|
+
stdout=asyncio.subprocess.PIPE,
|
|
1138
|
+
stderr=asyncio.subprocess.PIPE,
|
|
1139
|
+
)
|
|
1140
|
+
await asyncio.wait_for(proc.communicate(), timeout=10)
|
|
1141
|
+
return proc.returncode == 0
|
|
1142
|
+
except Exception:
|
|
1143
|
+
return False
|
|
1144
|
+
|
|
1145
|
+
async def get_installed_tools(self) -> Dict[str, bool]:
|
|
1146
|
+
"""Get installation status of all known tools."""
|
|
1147
|
+
results = {}
|
|
1148
|
+
for tool_name in TOOLS.keys():
|
|
1149
|
+
results[tool_name] = await self.check_tool_installed(tool_name)
|
|
1150
|
+
return results
|
|
1151
|
+
|
|
1152
|
+
async def install_tool(
|
|
1153
|
+
self,
|
|
1154
|
+
tool_name: str,
|
|
1155
|
+
use_sudo: bool = True,
|
|
1156
|
+
progress_callback: Optional[Callable[[str], None]] = None,
|
|
1157
|
+
) -> InstallResult:
|
|
1158
|
+
"""
|
|
1159
|
+
Install a single tool.
|
|
1160
|
+
|
|
1161
|
+
Args:
|
|
1162
|
+
tool_name: Name of the tool to install
|
|
1163
|
+
use_sudo: Use sudo for installation
|
|
1164
|
+
progress_callback: Callback for progress updates
|
|
1165
|
+
|
|
1166
|
+
Returns:
|
|
1167
|
+
InstallResult with installation status
|
|
1168
|
+
"""
|
|
1169
|
+
await self.detect_system()
|
|
1170
|
+
pkg_mgr = self._system_info.package_manager
|
|
1171
|
+
|
|
1172
|
+
tool = TOOLS.get(tool_name)
|
|
1173
|
+
if not tool:
|
|
1174
|
+
return InstallResult(
|
|
1175
|
+
tool_name=tool_name,
|
|
1176
|
+
success=False,
|
|
1177
|
+
message=f"Unknown tool: {tool_name}"
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1180
|
+
# Check if already installed
|
|
1181
|
+
if await self.check_tool_installed(tool_name):
|
|
1182
|
+
return InstallResult(
|
|
1183
|
+
tool_name=tool_name,
|
|
1184
|
+
success=True,
|
|
1185
|
+
message="Already installed",
|
|
1186
|
+
already_installed=True
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
# Install dependencies first
|
|
1190
|
+
for dep in tool.dependencies:
|
|
1191
|
+
dep_result = await self.install_tool(dep, use_sudo, progress_callback)
|
|
1192
|
+
if not dep_result.success and not dep_result.already_installed:
|
|
1193
|
+
return InstallResult(
|
|
1194
|
+
tool_name=tool_name,
|
|
1195
|
+
success=False,
|
|
1196
|
+
message=f"Failed to install dependency: {dep}"
|
|
1197
|
+
)
|
|
1198
|
+
|
|
1199
|
+
# Get install command for this package manager
|
|
1200
|
+
install_cmd = tool.install_commands.get(pkg_mgr)
|
|
1201
|
+
if not install_cmd:
|
|
1202
|
+
# Try to find alternative package manager command
|
|
1203
|
+
for pm, cmd in tool.install_commands.items():
|
|
1204
|
+
if cmd.startswith("pip3 ") or cmd.startswith("go install"):
|
|
1205
|
+
install_cmd = cmd
|
|
1206
|
+
break
|
|
1207
|
+
|
|
1208
|
+
if not install_cmd:
|
|
1209
|
+
return InstallResult(
|
|
1210
|
+
tool_name=tool_name,
|
|
1211
|
+
success=False,
|
|
1212
|
+
message=f"No installation method for {pkg_mgr.value}"
|
|
1213
|
+
)
|
|
1214
|
+
|
|
1215
|
+
# Prepare command with sudo if needed
|
|
1216
|
+
if use_sudo and self._system_info.capabilities.has_sudo:
|
|
1217
|
+
if install_cmd.startswith("apt") or install_cmd.startswith("dnf") or \
|
|
1218
|
+
install_cmd.startswith("yum") or install_cmd.startswith("pacman"):
|
|
1219
|
+
install_cmd = f"sudo {install_cmd}"
|
|
1220
|
+
|
|
1221
|
+
if progress_callback:
|
|
1222
|
+
progress_callback(f"Installing {tool_name}...")
|
|
1223
|
+
|
|
1224
|
+
logger.info(f"Installing tool: {tool_name}", command=install_cmd[:100])
|
|
1225
|
+
|
|
1226
|
+
try:
|
|
1227
|
+
# Set up environment for Go tools
|
|
1228
|
+
env_setup = ""
|
|
1229
|
+
if "go install" in install_cmd:
|
|
1230
|
+
go_path = Path.home() / "go" / "bin"
|
|
1231
|
+
env_setup = f"export PATH=$PATH:{go_path} && export GOPATH=$HOME/go && "
|
|
1232
|
+
|
|
1233
|
+
full_cmd = f"{env_setup}{install_cmd}"
|
|
1234
|
+
|
|
1235
|
+
proc = await asyncio.create_subprocess_shell(
|
|
1236
|
+
full_cmd,
|
|
1237
|
+
stdout=asyncio.subprocess.PIPE,
|
|
1238
|
+
stderr=asyncio.subprocess.PIPE,
|
|
1239
|
+
env={**dict(__import__('os').environ), "GOPATH": str(Path.home() / "go")},
|
|
1240
|
+
)
|
|
1241
|
+
|
|
1242
|
+
stdout, stderr = await asyncio.wait_for(
|
|
1243
|
+
proc.communicate(),
|
|
1244
|
+
timeout=600 # 10 minute timeout
|
|
1245
|
+
)
|
|
1246
|
+
|
|
1247
|
+
if proc.returncode == 0:
|
|
1248
|
+
# Verify installation
|
|
1249
|
+
if await self.check_tool_installed(tool_name):
|
|
1250
|
+
return InstallResult(
|
|
1251
|
+
tool_name=tool_name,
|
|
1252
|
+
success=True,
|
|
1253
|
+
message="Installed successfully"
|
|
1254
|
+
)
|
|
1255
|
+
else:
|
|
1256
|
+
return InstallResult(
|
|
1257
|
+
tool_name=tool_name,
|
|
1258
|
+
success=False,
|
|
1259
|
+
message="Install completed but verification failed"
|
|
1260
|
+
)
|
|
1261
|
+
else:
|
|
1262
|
+
error_msg = stderr.decode()[:200] if stderr else "Unknown error"
|
|
1263
|
+
return InstallResult(
|
|
1264
|
+
tool_name=tool_name,
|
|
1265
|
+
success=False,
|
|
1266
|
+
message=f"Installation failed: {error_msg}"
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1269
|
+
except asyncio.TimeoutError:
|
|
1270
|
+
return InstallResult(
|
|
1271
|
+
tool_name=tool_name,
|
|
1272
|
+
success=False,
|
|
1273
|
+
message="Installation timed out"
|
|
1274
|
+
)
|
|
1275
|
+
except Exception as e:
|
|
1276
|
+
return InstallResult(
|
|
1277
|
+
tool_name=tool_name,
|
|
1278
|
+
success=False,
|
|
1279
|
+
message=f"Installation error: {str(e)}"
|
|
1280
|
+
)
|
|
1281
|
+
|
|
1282
|
+
async def install_tools(
|
|
1283
|
+
self,
|
|
1284
|
+
categories: Optional[List[str]] = None,
|
|
1285
|
+
tools: Optional[List[str]] = None,
|
|
1286
|
+
core_only: bool = False,
|
|
1287
|
+
parallel: int = 3,
|
|
1288
|
+
use_sudo: bool = True,
|
|
1289
|
+
) -> Dict[str, InstallResult]:
|
|
1290
|
+
"""
|
|
1291
|
+
Install multiple tools.
|
|
1292
|
+
|
|
1293
|
+
Args:
|
|
1294
|
+
categories: Tool categories to install (recon, scan, exploit, etc.)
|
|
1295
|
+
tools: Specific tools to install (overrides categories)
|
|
1296
|
+
core_only: Only install core tools
|
|
1297
|
+
parallel: Number of parallel installations
|
|
1298
|
+
use_sudo: Use sudo for installation
|
|
1299
|
+
|
|
1300
|
+
Returns:
|
|
1301
|
+
Dict mapping tool names to InstallResult
|
|
1302
|
+
"""
|
|
1303
|
+
await self.detect_system()
|
|
1304
|
+
|
|
1305
|
+
# Determine which tools to install
|
|
1306
|
+
tools_to_install: List[str] = []
|
|
1307
|
+
|
|
1308
|
+
if tools:
|
|
1309
|
+
tools_to_install = tools
|
|
1310
|
+
elif categories:
|
|
1311
|
+
for tool_name, tool_def in TOOLS.items():
|
|
1312
|
+
if tool_def.category.value in categories:
|
|
1313
|
+
if not core_only or tool_def.is_core:
|
|
1314
|
+
tools_to_install.append(tool_name)
|
|
1315
|
+
elif core_only:
|
|
1316
|
+
tools_to_install = [
|
|
1317
|
+
name for name, tool in TOOLS.items()
|
|
1318
|
+
if tool.is_core
|
|
1319
|
+
]
|
|
1320
|
+
else:
|
|
1321
|
+
tools_to_install = list(TOOLS.keys())
|
|
1322
|
+
|
|
1323
|
+
# Remove duplicates and sort by dependencies
|
|
1324
|
+
tools_to_install = self._sort_by_dependencies(tools_to_install)
|
|
1325
|
+
|
|
1326
|
+
results: Dict[str, InstallResult] = {}
|
|
1327
|
+
|
|
1328
|
+
with Progress(
|
|
1329
|
+
SpinnerColumn(),
|
|
1330
|
+
TextColumn("[progress.description]{task.description}"),
|
|
1331
|
+
BarColumn(),
|
|
1332
|
+
TaskProgressColumn(),
|
|
1333
|
+
console=console,
|
|
1334
|
+
) as progress:
|
|
1335
|
+
task = progress.add_task(
|
|
1336
|
+
f"[cyan]Installing {len(tools_to_install)} tools...",
|
|
1337
|
+
total=len(tools_to_install)
|
|
1338
|
+
)
|
|
1339
|
+
|
|
1340
|
+
for tool_name in tools_to_install:
|
|
1341
|
+
progress.update(task, description=f"[cyan]Installing {tool_name}...")
|
|
1342
|
+
|
|
1343
|
+
result = await self.install_tool(tool_name, use_sudo)
|
|
1344
|
+
results[tool_name] = result
|
|
1345
|
+
|
|
1346
|
+
if result.success:
|
|
1347
|
+
if result.already_installed:
|
|
1348
|
+
progress.console.print(f" [dim]✓ {tool_name} (already installed)[/dim]")
|
|
1349
|
+
else:
|
|
1350
|
+
progress.console.print(f" [green]✓ {tool_name} installed[/green]")
|
|
1351
|
+
else:
|
|
1352
|
+
progress.console.print(f" [red]✗ {tool_name}: {result.message}[/red]")
|
|
1353
|
+
|
|
1354
|
+
progress.advance(task)
|
|
1355
|
+
|
|
1356
|
+
return results
|
|
1357
|
+
|
|
1358
|
+
async def install_core_tools(self) -> Dict[str, InstallResult]:
|
|
1359
|
+
"""Install only core essential tools."""
|
|
1360
|
+
return await self.install_tools(core_only=True)
|
|
1361
|
+
|
|
1362
|
+
async def install_all(self) -> Dict[str, InstallResult]:
|
|
1363
|
+
"""Install all available tools."""
|
|
1364
|
+
return await self.install_tools()
|
|
1365
|
+
|
|
1366
|
+
def _sort_by_dependencies(self, tools: List[str]) -> List[str]:
|
|
1367
|
+
"""Sort tools so dependencies come first."""
|
|
1368
|
+
sorted_tools = []
|
|
1369
|
+
visited: Set[str] = set()
|
|
1370
|
+
|
|
1371
|
+
def visit(tool_name: str):
|
|
1372
|
+
if tool_name in visited:
|
|
1373
|
+
return
|
|
1374
|
+
visited.add(tool_name)
|
|
1375
|
+
|
|
1376
|
+
tool = TOOLS.get(tool_name)
|
|
1377
|
+
if tool:
|
|
1378
|
+
for dep in tool.dependencies:
|
|
1379
|
+
visit(dep)
|
|
1380
|
+
|
|
1381
|
+
if tool_name in tools:
|
|
1382
|
+
sorted_tools.append(tool_name)
|
|
1383
|
+
|
|
1384
|
+
for tool_name in tools:
|
|
1385
|
+
visit(tool_name)
|
|
1386
|
+
|
|
1387
|
+
return sorted_tools
|
|
1388
|
+
|
|
1389
|
+
def print_tool_status(self, results: Dict[str, InstallResult]):
|
|
1390
|
+
"""Print a summary table of installation results."""
|
|
1391
|
+
table = Table(title="Installation Results", box=box.ROUNDED)
|
|
1392
|
+
table.add_column("Tool", style="cyan")
|
|
1393
|
+
table.add_column("Status", justify="center")
|
|
1394
|
+
table.add_column("Message", style="dim")
|
|
1395
|
+
|
|
1396
|
+
for tool_name, result in sorted(results.items()):
|
|
1397
|
+
if result.success:
|
|
1398
|
+
status = "[green]✓ Installed[/green]" if not result.already_installed else "[dim]✓ Already installed[/dim]"
|
|
1399
|
+
else:
|
|
1400
|
+
status = "[red]✗ Failed[/red]"
|
|
1401
|
+
|
|
1402
|
+
table.add_row(tool_name, status, result.message[:50])
|
|
1403
|
+
|
|
1404
|
+
console.print(table)
|
|
1405
|
+
|
|
1406
|
+
# Summary
|
|
1407
|
+
installed = sum(1 for r in results.values() if r.success and not r.already_installed)
|
|
1408
|
+
already = sum(1 for r in results.values() if r.already_installed)
|
|
1409
|
+
failed = sum(1 for r in results.values() if not r.success)
|
|
1410
|
+
|
|
1411
|
+
console.print(f"\n[bold]Summary:[/bold] {installed} installed, {already} already present, {failed} failed")
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
async def install_prerequisites(system_info: Optional[SystemInfo] = None) -> Dict[str, InstallResult]:
|
|
1415
|
+
"""Install prerequisite tools (Go, Ruby, etc.)."""
|
|
1416
|
+
installer = LocalToolInstaller(system_info)
|
|
1417
|
+
prereq_tools = [
|
|
1418
|
+
name for name, tool in TOOLS.items()
|
|
1419
|
+
if tool.category == ToolCategory.PREREQUISITE
|
|
1420
|
+
]
|
|
1421
|
+
return await installer.install_tools(tools=prereq_tools)
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
async def install_recommended_tools(system_info: Optional[SystemInfo] = None) -> Dict[str, InstallResult]:
|
|
1425
|
+
"""Install recommended core security tools."""
|
|
1426
|
+
installer = LocalToolInstaller(system_info)
|
|
1427
|
+
return await installer.install_core_tools()
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
def get_available_tools() -> Dict[str, ToolDefinition]:
|
|
1431
|
+
"""Get all available tool definitions."""
|
|
1432
|
+
return TOOLS.copy()
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
def get_tools_by_category(category: str) -> Dict[str, ToolDefinition]:
|
|
1436
|
+
"""Get tools in a specific category."""
|
|
1437
|
+
return {
|
|
1438
|
+
name: tool for name, tool in TOOLS.items()
|
|
1439
|
+
if tool.category.value == category
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
if __name__ == "__main__":
|
|
1444
|
+
async def main():
|
|
1445
|
+
detector = SystemDetector()
|
|
1446
|
+
system_info = await detector.detect()
|
|
1447
|
+
detector.print_summary(system_info)
|
|
1448
|
+
|
|
1449
|
+
installer = LocalToolInstaller(system_info)
|
|
1450
|
+
|
|
1451
|
+
console.print("\n[bold]Checking installed tools...[/bold]")
|
|
1452
|
+
installed = await installer.get_installed_tools()
|
|
1453
|
+
|
|
1454
|
+
table = Table(box=box.ROUNDED)
|
|
1455
|
+
table.add_column("Tool", style="cyan")
|
|
1456
|
+
table.add_column("Status", justify="center")
|
|
1457
|
+
table.add_column("Category")
|
|
1458
|
+
|
|
1459
|
+
for tool_name, is_installed in sorted(installed.items()):
|
|
1460
|
+
tool = TOOLS.get(tool_name)
|
|
1461
|
+
status = "[green]✓[/green]" if is_installed else "[red]✗[/red]"
|
|
1462
|
+
category = tool.category.value if tool else "unknown"
|
|
1463
|
+
table.add_row(tool_name, status, category)
|
|
1464
|
+
|
|
1465
|
+
console.print(table)
|
|
1466
|
+
|
|
1467
|
+
asyncio.run(main())
|