souleyez 2.43.34__py3-none-any.whl → 3.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.
Files changed (326) hide show
  1. souleyez/__init__.py +1 -1
  2. souleyez/ai/__init__.py +7 -7
  3. souleyez/ai/action_mapper.py +3 -2
  4. souleyez/ai/chain_advisor.py +2 -1
  5. souleyez/ai/claude_provider.py +2 -2
  6. souleyez/ai/context_builder.py +4 -2
  7. souleyez/ai/executor.py +9 -6
  8. souleyez/ai/feedback_handler.py +4 -2
  9. souleyez/ai/llm_provider.py +2 -2
  10. souleyez/ai/ollama_provider.py +2 -2
  11. souleyez/ai/ollama_service.py +10 -26
  12. souleyez/ai/path_scorer.py +2 -1
  13. souleyez/ai/recommender.py +6 -4
  14. souleyez/ai/report_context.py +2 -2
  15. souleyez/ai/report_service.py +5 -5
  16. souleyez/ai/result_parser.py +3 -2
  17. souleyez/ai/safety.py +5 -2
  18. souleyez/auth/__init__.py +6 -6
  19. souleyez/auth/audit.py +2 -2
  20. souleyez/auth/engagement_access.py +5 -7
  21. souleyez/auth/permissions.py +1 -1
  22. souleyez/auth/session_manager.py +5 -5
  23. souleyez/auth/user_manager.py +4 -5
  24. souleyez/commands/audit.py +6 -5
  25. souleyez/commands/auth.py +6 -5
  26. souleyez/commands/deliverables.py +2 -3
  27. souleyez/commands/engagement.py +3 -3
  28. souleyez/commands/license.py +3 -2
  29. souleyez/commands/screenshots.py +5 -4
  30. souleyez/commands/user.py +10 -8
  31. souleyez/config.py +4 -2
  32. souleyez/core/credential_tester.py +4 -2
  33. souleyez/core/cve_mappings.py +2 -1
  34. souleyez/core/cve_matcher.py +2 -1
  35. souleyez/core/msf_auto_mapper.py +2 -0
  36. souleyez/core/msf_chain_engine.py +3 -1
  37. souleyez/core/msf_database.py +7 -13
  38. souleyez/core/msf_integration.py +2 -2
  39. souleyez/core/msf_rpc_client.py +3 -2
  40. souleyez/core/msf_rpc_manager.py +4 -4
  41. souleyez/core/msf_sync_manager.py +7 -7
  42. souleyez/core/network_utils.py +1 -1
  43. souleyez/core/parser_handler.py +2 -1
  44. souleyez/core/pending_chains.py +4 -3
  45. souleyez/core/templates.py +5 -2
  46. souleyez/core/tool_chaining.py +297 -230
  47. souleyez/core/version_utils.py +1 -0
  48. souleyez/core/vuln_correlation.py +3 -2
  49. souleyez/core/web_utils.py +2 -1
  50. souleyez/detection/__init__.py +1 -1
  51. souleyez/detection/attack_signatures.py +1 -1
  52. souleyez/detection/mitre_mappings.py +1 -2
  53. souleyez/detection/validator.py +5 -4
  54. souleyez/devtools.py +4 -2
  55. souleyez/docs/README.md +2 -2
  56. souleyez/engine/background.py +168 -7
  57. souleyez/engine/base.py +2 -1
  58. souleyez/engine/loader.py +4 -2
  59. souleyez/engine/log_sanitizer.py +1 -0
  60. souleyez/engine/manager.py +3 -1
  61. souleyez/engine/result_handler.py +50 -67
  62. souleyez/engine/worker_manager.py +6 -4
  63. souleyez/export/evidence_bundle.py +1 -0
  64. souleyez/handlers/base.py +1 -0
  65. souleyez/handlers/bash_handler.py +1 -0
  66. souleyez/handlers/bloodhound_handler.py +1 -0
  67. souleyez/handlers/certipy_handler.py +1 -0
  68. souleyez/handlers/crackmapexec_handler.py +2 -20
  69. souleyez/handlers/dnsrecon_handler.py +2 -1
  70. souleyez/handlers/enum4linux_handler.py +65 -37
  71. souleyez/handlers/evil_winrm_handler.py +1 -0
  72. souleyez/handlers/ffuf_handler.py +3 -1
  73. souleyez/handlers/gobuster_handler.py +7 -6
  74. souleyez/handlers/gpp_extract_handler.py +1 -0
  75. souleyez/handlers/hashcat_handler.py +1 -0
  76. souleyez/handlers/hydra_handler.py +5 -1
  77. souleyez/handlers/impacket_getuserspns_handler.py +1 -0
  78. souleyez/handlers/impacket_psexec_handler.py +1 -0
  79. souleyez/handlers/impacket_secretsdump_handler.py +1 -0
  80. souleyez/handlers/john_handler.py +1 -0
  81. souleyez/handlers/katana_handler.py +39 -2
  82. souleyez/handlers/kerbrute_handler.py +1 -0
  83. souleyez/handlers/ldapsearch_handler.py +90 -17
  84. souleyez/handlers/lfi_extract_handler.py +1 -0
  85. souleyez/handlers/msf_auxiliary_handler.py +2 -0
  86. souleyez/handlers/msf_exploit_handler.py +1 -0
  87. souleyez/handlers/nikto_handler.py +2 -1
  88. souleyez/handlers/nmap_handler.py +2 -1
  89. souleyez/handlers/nuclei_handler.py +2 -1
  90. souleyez/handlers/nxc_handler.py +50 -19
  91. souleyez/handlers/rdp_sec_check_handler.py +1 -0
  92. souleyez/handlers/registry.py +1 -0
  93. souleyez/handlers/responder_handler.py +1 -0
  94. souleyez/handlers/service_explorer_handler.py +2 -1
  95. souleyez/handlers/smbclient_handler.py +1 -0
  96. souleyez/handlers/smbmap_handler.py +3 -2
  97. souleyez/handlers/sqlmap_handler.py +6 -4
  98. souleyez/handlers/theharvester_handler.py +2 -1
  99. souleyez/handlers/web_login_test_handler.py +1 -0
  100. souleyez/handlers/whois_handler.py +3 -2
  101. souleyez/handlers/wpscan_handler.py +2 -1
  102. souleyez/history.py +4 -3
  103. souleyez/importers/msf_importer.py +5 -3
  104. souleyez/importers/smart_importer.py +6 -4
  105. souleyez/integrations/siem/__init__.py +6 -6
  106. souleyez/integrations/siem/base.py +1 -1
  107. souleyez/integrations/siem/elastic.py +3 -3
  108. souleyez/integrations/siem/factory.py +1 -2
  109. souleyez/integrations/siem/googlesecops.py +4 -4
  110. souleyez/integrations/siem/rule_mappings/wazuh_rules.py +1 -1
  111. souleyez/integrations/siem/sentinel.py +3 -3
  112. souleyez/integrations/siem/splunk.py +3 -3
  113. souleyez/integrations/siem/wazuh.py +4 -4
  114. souleyez/integrations/wazuh/__init__.py +1 -1
  115. souleyez/integrations/wazuh/client.py +3 -2
  116. souleyez/integrations/wazuh/config.py +3 -2
  117. souleyez/integrations/wazuh/host_mapper.py +3 -1
  118. souleyez/integrations/wazuh/sync.py +4 -1
  119. souleyez/intelligence/__init__.py +1 -1
  120. souleyez/intelligence/correlation_analyzer.py +6 -5
  121. souleyez/intelligence/exploit_knowledge.py +4 -4
  122. souleyez/intelligence/exploit_suggestions.py +4 -3
  123. souleyez/intelligence/gap_analyzer.py +5 -3
  124. souleyez/intelligence/gap_detector.py +2 -0
  125. souleyez/intelligence/sensitive_tables.py +1 -1
  126. souleyez/intelligence/service_parser.py +1 -0
  127. souleyez/intelligence/surface_analyzer.py +9 -9
  128. souleyez/intelligence/target_parser.py +1 -0
  129. souleyez/licensing/__init__.py +3 -3
  130. souleyez/main.py +25 -18
  131. souleyez/migrations/fix_job_counter.py +2 -1
  132. souleyez/parsers/bloodhound_parser.py +1 -0
  133. souleyez/parsers/crackmapexec_parser.py +2 -1
  134. souleyez/parsers/dalfox_parser.py +3 -2
  135. souleyez/parsers/dnsrecon_parser.py +2 -1
  136. souleyez/parsers/enum4linux_parser.py +2 -1
  137. souleyez/parsers/ffuf_parser.py +2 -1
  138. souleyez/parsers/gobuster_parser.py +2 -1
  139. souleyez/parsers/hashcat_parser.py +3 -2
  140. souleyez/parsers/http_fingerprint_parser.py +2 -1
  141. souleyez/parsers/hydra_parser.py +2 -1
  142. souleyez/parsers/impacket_parser.py +2 -1
  143. souleyez/parsers/john_parser.py +4 -3
  144. souleyez/parsers/katana_parser.py +134 -2
  145. souleyez/parsers/msf_parser.py +2 -1
  146. souleyez/parsers/nikto_parser.py +2 -1
  147. souleyez/parsers/nmap_parser.py +14 -3
  148. souleyez/parsers/nuclei_parser.py +3 -2
  149. souleyez/parsers/responder_parser.py +1 -0
  150. souleyez/parsers/searchsploit_parser.py +3 -2
  151. souleyez/parsers/service_explorer_parser.py +1 -0
  152. souleyez/parsers/smbmap_parser.py +2 -1
  153. souleyez/parsers/sqlmap_parser.py +36 -2
  154. souleyez/parsers/theharvester_parser.py +2 -1
  155. souleyez/parsers/whois_parser.py +2 -1
  156. souleyez/parsers/wpscan_parser.py +3 -2
  157. souleyez/plugins/afp.py +3 -1
  158. souleyez/plugins/afp_brute.py +3 -1
  159. souleyez/plugins/ard.py +3 -1
  160. souleyez/plugins/bloodhound.py +3 -2
  161. souleyez/plugins/certipy.py +1 -0
  162. souleyez/plugins/crackmapexec.py +11 -7
  163. souleyez/plugins/dalfox.py +5 -2
  164. souleyez/plugins/dns_hijack.py +3 -1
  165. souleyez/plugins/dnsrecon.py +3 -1
  166. souleyez/plugins/enum4linux.py +3 -1
  167. souleyez/plugins/evil_winrm.py +1 -0
  168. souleyez/plugins/ffuf.py +3 -1
  169. souleyez/plugins/firmware_extract.py +3 -2
  170. souleyez/plugins/gobuster.py +6 -3
  171. souleyez/plugins/gpp_extract.py +1 -0
  172. souleyez/plugins/hashcat.py +2 -1
  173. souleyez/plugins/http_fingerprint.py +149 -40
  174. souleyez/plugins/hydra.py +5 -3
  175. souleyez/plugins/impacket_common.py +40 -0
  176. souleyez/plugins/impacket_getnpusers.py +19 -2
  177. souleyez/plugins/impacket_getuserspns.py +158 -0
  178. souleyez/plugins/impacket_psexec.py +19 -2
  179. souleyez/plugins/impacket_secretsdump.py +19 -2
  180. souleyez/plugins/impacket_smbclient.py +19 -2
  181. souleyez/plugins/john.py +2 -1
  182. souleyez/plugins/katana.py +48 -6
  183. souleyez/plugins/kerbrute.py +1 -0
  184. souleyez/plugins/lfi_extract.py +1 -0
  185. souleyez/plugins/macos_ssh.py +3 -1
  186. souleyez/plugins/mdns.py +3 -1
  187. souleyez/plugins/msf_auxiliary.py +3 -2
  188. souleyez/plugins/msf_exploit.py +6 -5
  189. souleyez/plugins/nikto.py +5 -2
  190. souleyez/plugins/nmap.py +6 -4
  191. souleyez/plugins/nuclei.py +3 -1
  192. souleyez/plugins/nxc.py +1 -0
  193. souleyez/plugins/plugin_base.py +3 -2
  194. souleyez/plugins/plugin_template.py +3 -2
  195. souleyez/plugins/rdp_sec_check.py +1 -0
  196. souleyez/plugins/responder.py +2 -1
  197. souleyez/plugins/router_http_brute.py +3 -1
  198. souleyez/plugins/router_ssh_brute.py +3 -1
  199. souleyez/plugins/router_telnet_brute.py +3 -1
  200. souleyez/plugins/routersploit.py +5 -3
  201. souleyez/plugins/routersploit_exploit.py +5 -3
  202. souleyez/plugins/searchsploit.py +1 -0
  203. souleyez/plugins/service_explorer.py +2 -1
  204. souleyez/plugins/smbmap.py +3 -1
  205. souleyez/plugins/smbpasswd.py +1 -0
  206. souleyez/plugins/sqlmap.py +3 -1
  207. souleyez/plugins/theharvester.py +3 -1
  208. souleyez/plugins/tr069.py +3 -1
  209. souleyez/plugins/upnp.py +3 -1
  210. souleyez/plugins/upnp_abuse.py +4 -2
  211. souleyez/plugins/vnc_access.py +4 -2
  212. souleyez/plugins/vnc_brute.py +3 -1
  213. souleyez/plugins/web_login_test.py +1 -0
  214. souleyez/plugins/whois.py +3 -1
  215. souleyez/plugins/wpscan.py +49 -1
  216. souleyez/reporting/attack_chain.py +2 -1
  217. souleyez/reporting/charts.py +1 -0
  218. souleyez/reporting/compliance_mappings.py +1 -0
  219. souleyez/reporting/detection_report.py +10 -10
  220. souleyez/reporting/formatters.py +7 -12
  221. souleyez/reporting/generator.py +34 -46
  222. souleyez/reporting/metrics.py +2 -1
  223. souleyez/scanner.py +6 -3
  224. souleyez/security/__init__.py +7 -5
  225. souleyez/security/scope_validator.py +5 -4
  226. souleyez/security/validation.py +14 -0
  227. souleyez/security.py +5 -2
  228. souleyez/storage/credentials.py +14 -19
  229. souleyez/storage/crypto.py +7 -4
  230. souleyez/storage/database.py +6 -6
  231. souleyez/storage/db.py +8 -8
  232. souleyez/storage/deliverable_evidence.py +2 -1
  233. souleyez/storage/deliverable_exporter.py +3 -2
  234. souleyez/storage/deliverable_templates.py +2 -1
  235. souleyez/storage/deliverables.py +2 -1
  236. souleyez/storage/engagements.py +6 -4
  237. souleyez/storage/evidence.py +5 -4
  238. souleyez/storage/execution_log.py +4 -2
  239. souleyez/storage/exploit_attempts.py +3 -2
  240. souleyez/storage/exploits.py +3 -1
  241. souleyez/storage/findings.py +3 -1
  242. souleyez/storage/hosts.py +5 -2
  243. souleyez/storage/migrate_to_engagements.py +14 -24
  244. souleyez/storage/migrations/_001_add_credential_enhancements.py +12 -21
  245. souleyez/storage/migrations/_003_add_execution_log.py +8 -13
  246. souleyez/storage/migrations/_005_screenshots.py +2 -4
  247. souleyez/storage/migrations/_006_deliverables.py +2 -4
  248. souleyez/storage/migrations/_007_deliverable_templates.py +4 -8
  249. souleyez/storage/migrations/_008_add_nuclei_table.py +2 -4
  250. souleyez/storage/migrations/_010_evidence_linking.py +6 -12
  251. souleyez/storage/migrations/_012_team_collaboration.py +12 -24
  252. souleyez/storage/migrations/_013_add_host_tags.py +2 -4
  253. souleyez/storage/migrations/_014_exploit_attempts.py +10 -20
  254. souleyez/storage/migrations/_015_add_mac_os_fields.py +4 -8
  255. souleyez/storage/migrations/_016_add_domain_field.py +2 -4
  256. souleyez/storage/migrations/_017_msf_sessions.py +8 -16
  257. souleyez/storage/migrations/_018_add_osint_target.py +4 -8
  258. souleyez/storage/migrations/_019_add_engagement_type.py +4 -8
  259. souleyez/storage/migrations/_020_add_rbac.py +9 -17
  260. souleyez/storage/migrations/_021_wazuh_integration.py +4 -8
  261. souleyez/storage/migrations/_023_fix_detection_results_fk.py +2 -4
  262. souleyez/storage/migrations/_024_wazuh_vulnerabilities.py +4 -8
  263. souleyez/storage/migrations/_026_add_engagement_scope.py +4 -8
  264. souleyez/storage/migrations/_027_multi_siem_persistence.py +8 -16
  265. souleyez/storage/migrations/__init__.py +1 -4
  266. souleyez/storage/migrations/migration_manager.py +6 -9
  267. souleyez/storage/msf_sessions.py +1 -1
  268. souleyez/storage/osint.py +3 -1
  269. souleyez/storage/recommendation_engine.py +3 -2
  270. souleyez/storage/screenshots.py +2 -1
  271. souleyez/storage/smb_shares.py +3 -1
  272. souleyez/storage/sqlmap_data.py +6 -4
  273. souleyez/storage/team_collaboration.py +3 -2
  274. souleyez/storage/timeline_tracker.py +2 -1
  275. souleyez/storage/wazuh_vulns.py +3 -1
  276. souleyez/storage/web_paths.py +3 -1
  277. souleyez/testing/credential_tester.py +2 -0
  278. souleyez/ui/__init__.py +2 -1
  279. souleyez/ui/ai_quotes.py +1 -1
  280. souleyez/ui/attack_surface.py +50 -28
  281. souleyez/ui/chain_rules_view.py +6 -3
  282. souleyez/ui/correlation_view.py +3 -2
  283. souleyez/ui/dashboard.py +85 -139
  284. souleyez/ui/deliverables_view.py +1 -1
  285. souleyez/ui/design_system.py +5 -3
  286. souleyez/ui/errors.py +3 -1
  287. souleyez/ui/evidence_linking_view.py +2 -1
  288. souleyez/ui/evidence_vault.py +11 -6
  289. souleyez/ui/exploit_suggestions_view.py +11 -7
  290. souleyez/ui/export_view.py +3 -1
  291. souleyez/ui/gap_analysis_view.py +6 -3
  292. souleyez/ui/help_system.py +4 -1
  293. souleyez/ui/intelligence_view.py +7 -3
  294. souleyez/ui/interactive.py +1512 -584
  295. souleyez/ui/interactive_selector.py +3 -2
  296. souleyez/ui/log_formatter.py +1 -0
  297. souleyez/ui/menu_components.py +3 -1
  298. souleyez/ui/msf_auxiliary_menu.py +4 -1
  299. souleyez/ui/pending_chains_view.py +15 -12
  300. souleyez/ui/progress_indicators.py +5 -2
  301. souleyez/ui/recommendations_view.py +4 -2
  302. souleyez/ui/rule_builder.py +4 -1
  303. souleyez/ui/setup_wizard.py +10 -8
  304. souleyez/ui/shortcuts.py +1 -1
  305. souleyez/ui/splunk_gap_analysis_view.py +7 -4
  306. souleyez/ui/splunk_vulns_view.py +4 -1
  307. souleyez/ui/team_dashboard.py +7 -5
  308. souleyez/ui/template_selector.py +2 -1
  309. souleyez/ui/terminal.py +3 -2
  310. souleyez/ui/timeline_view.py +2 -1
  311. souleyez/ui/tool_setup.py +92 -31
  312. souleyez/ui/tutorial.py +7 -4
  313. souleyez/ui/tutorial_state.py +3 -2
  314. souleyez/ui/wazuh_vulns_view.py +5 -2
  315. souleyez/ui/wordlist_browser.py +4 -3
  316. souleyez/ui.py +13 -7
  317. souleyez/utils/tool_checker.py +61 -12
  318. souleyez/utils.py +4 -4
  319. souleyez/wordlists.py +1 -0
  320. {souleyez-2.43.34.dist-info → souleyez-3.0.7.dist-info}/METADATA +2 -2
  321. souleyez-3.0.7.dist-info/RECORD +445 -0
  322. souleyez-2.43.34.dist-info/RECORD +0 -443
  323. {souleyez-2.43.34.dist-info → souleyez-3.0.7.dist-info}/WHEEL +0 -0
  324. {souleyez-2.43.34.dist-info → souleyez-3.0.7.dist-info}/entry_points.txt +0 -0
  325. {souleyez-2.43.34.dist-info → souleyez-3.0.7.dist-info}/licenses/LICENSE +0 -0
  326. {souleyez-2.43.34.dist-info → souleyez-3.0.7.dist-info}/top_level.txt +0 -0
souleyez/plugins/hydra.py CHANGED
@@ -4,13 +4,15 @@ souleyez.plugins.hydra
4
4
 
5
5
  Hydra network login brute-forcer plugin.
6
6
  """
7
+
7
8
  import subprocess
8
9
  import time
9
10
  from typing import List
10
11
  from urllib.parse import urlparse
11
12
 
13
+ from souleyez.security.validation import ValidationError, validate_target
14
+
12
15
  from .plugin_base import PluginBase
13
- from souleyez.security.validation import validate_target, ValidationError
14
16
 
15
17
  HELP = {
16
18
  "name": "Hydra — Network Login Brute-Forcer",
@@ -840,8 +842,8 @@ class HydraPlugin(PluginBase):
840
842
  return None
841
843
 
842
844
  # If multiple targets, create a temporary file and use -M flag
843
- import tempfile
844
845
  import os
846
+ import tempfile
845
847
 
846
848
  # Hydra syntax: hydra [OPTIONS] target service [SERVICE-OPTIONS]
847
849
  # Need to split args into: global options, service type, and service options
@@ -983,8 +985,8 @@ class HydraPlugin(PluginBase):
983
985
  raise ValueError(f"Invalid target: {e}")
984
986
 
985
987
  # If multiple targets, create a temporary file and use -M flag
986
- import tempfile
987
988
  import os
989
+ import tempfile
988
990
 
989
991
  if len(validated_targets) > 1:
990
992
  # Create temp file with targets
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ souleyez.plugins.impacket_common - Shared utilities for Impacket plugins
4
+
5
+ Handles differences between Kali (apt) and Ubuntu (pipx) installations.
6
+ """
7
+
8
+ import shutil
9
+ from typing import Optional
10
+
11
+
12
+ def find_impacket_command(tool_name: str) -> Optional[str]:
13
+ """
14
+ Find the correct Impacket command (varies by install method).
15
+
16
+ On Kali (apt install python3-impacket):
17
+ - Commands are: impacket-GetNPUsers, impacket-secretsdump, etc.
18
+
19
+ On Ubuntu (pipx install impacket):
20
+ - Commands are: GetNPUsers.py, secretsdump.py, etc.
21
+ - Or without .py: GetNPUsers, secretsdump
22
+
23
+ Args:
24
+ tool_name: Base tool name like "GetNPUsers", "secretsdump", "psexec"
25
+
26
+ Returns:
27
+ The actual command that exists on the system, or None if not found
28
+ """
29
+ # Possible command names in order of preference
30
+ candidates = [
31
+ f"impacket-{tool_name}", # Kali apt style
32
+ f"{tool_name}.py", # Ubuntu pipx style
33
+ tool_name, # Direct name
34
+ ]
35
+
36
+ for cmd in candidates:
37
+ if shutil.which(cmd):
38
+ return cmd
39
+
40
+ return None
@@ -2,10 +2,12 @@
2
2
  """
3
3
  souleyez.plugins.impacket_getnpusers - AS-REP Roasting attack
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
8
9
 
10
+ from .impacket_common import find_impacket_command
9
11
  from .plugin_base import PluginBase
10
12
 
11
13
  HELP = {
@@ -164,9 +166,14 @@ class ImpacketGetNPUsersPlugin(PluginBase):
164
166
  # Replace <target> placeholder
165
167
  args = [arg.replace("<target>", target) for arg in args]
166
168
 
169
+ # Find the correct command (varies by install: apt vs pipx)
170
+ getnpusers_cmd = find_impacket_command("GetNPUsers")
171
+ if not getnpusers_cmd:
172
+ return None # Tool not installed
173
+
167
174
  # Build command - GetNPUsers expects: domain/ -dc-ip <ip> [options]
168
175
  # Check if first arg is a domain (contains / or looks like domain.tld)
169
- cmd = ["impacket-GetNPUsers"]
176
+ cmd = [getnpusers_cmd]
170
177
 
171
178
  # If args starts with domain/, use that as positional arg (not target IP)
172
179
  if args and ("/" in args[0] or args[0].count(".") >= 1):
@@ -191,8 +198,18 @@ class ImpacketGetNPUsersPlugin(PluginBase):
191
198
  # Replace <target> placeholder
192
199
  args = [arg.replace("<target>", target) for arg in args]
193
200
 
201
+ # Find the correct command (varies by install: apt vs pipx)
202
+ getnpusers_cmd = find_impacket_command("GetNPUsers")
203
+ if not getnpusers_cmd:
204
+ if log_path:
205
+ with open(log_path, "w", encoding="utf-8") as fh:
206
+ fh.write("ERROR: GetNPUsers not found. Install with:\n")
207
+ fh.write(" Kali: sudo apt install python3-impacket\n")
208
+ fh.write(" Ubuntu: pipx install impacket\n")
209
+ return 1
210
+
194
211
  # Build command - GetNPUsers expects: domain/ -dc-ip <ip> [options]
195
- cmd = ["impacket-GetNPUsers"]
212
+ cmd = [getnpusers_cmd]
196
213
 
197
214
  # If args starts with domain/, use that as positional arg (not target IP)
198
215
  if args and ("/" in args[0] or args[0].count(".") >= 1):
@@ -0,0 +1,158 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ souleyez.plugins.impacket_getuserspns - Kerberoasting attack (GetUserSPNs)
4
+ """
5
+
6
+ import subprocess
7
+ import time
8
+ from typing import List
9
+
10
+ from .impacket_common import find_impacket_command
11
+ from .plugin_base import PluginBase
12
+
13
+ HELP = {
14
+ "name": "Impacket GetUserSPNs - Kerberoasting",
15
+ "description": (
16
+ "Need to extract Kerberos TGS hashes for offline cracking?\n\n"
17
+ "GetUserSPNs performs Kerberoasting, extracting TGS tickets for service accounts "
18
+ "that can be cracked offline with hashcat or john.\n\n"
19
+ "Use GetUserSPNs after getting domain credentials to:\n"
20
+ "- Find service accounts with SPNs (Service Principal Names)\n"
21
+ "- Extract TGS tickets/hashes for offline cracking\n"
22
+ "- Identify weak service account passwords\n"
23
+ "- Escalate privileges via cracked service accounts\n\n"
24
+ "Quick tips:\n"
25
+ "- Requires valid domain credentials (from GPP, password spray, etc.)\n"
26
+ "- Output format compatible with hashcat mode 13100\n"
27
+ "- Use -request to actually request TGS tickets\n"
28
+ ),
29
+ "usage": 'souleyez jobs enqueue impacket-getuserspns <domain>/<user>:<pass>@<dc> --args "-request"',
30
+ "examples": [
31
+ 'souleyez jobs enqueue impacket-getuserspns "active.htb/svc_tgs:GPPstillStandingStrong2k18@10.129.5.167" --args "-request"',
32
+ 'souleyez jobs enqueue impacket-getuserspns "corp.local/admin:Password1@dc01.corp.local" --args "-dc-ip 192.168.1.10 -request"',
33
+ ],
34
+ "flags": [
35
+ ["-dc-ip <ip>", "IP address of the domain controller"],
36
+ ["-request", "Request TGS tickets (required for cracking)"],
37
+ ["-outputfile <file>", "Save TGS hashes to file"],
38
+ ],
39
+ }
40
+
41
+
42
+ class ImpacketGetUserSPNsPlugin(PluginBase):
43
+ name = "Impacket GetUserSPNs"
44
+ tool = "impacket-getuserspns"
45
+ category = "credential_access"
46
+ HELP = HELP
47
+
48
+ def build_command(
49
+ self, target: str, args: List[str] = None, label: str = "", log_path: str = None
50
+ ):
51
+ """Build command for background execution with PID tracking."""
52
+ args = args or []
53
+
54
+ # Replace <target> placeholder
55
+ args = [arg.replace("<target>", target) for arg in args]
56
+
57
+ # Find the correct command (varies by install: apt vs pipx)
58
+ getuserspns_cmd = find_impacket_command("GetUserSPNs")
59
+ if not getuserspns_cmd:
60
+ return None # Tool not installed
61
+
62
+ # Build command - GetUserSPNs expects: domain/user:pass@host [options]
63
+ cmd = [getuserspns_cmd]
64
+
65
+ # If first arg looks like credentials (contains / and @), use it as positional
66
+ if args and "/" in args[0]:
67
+ cmd.append(args[0])
68
+ args = args[1:]
69
+ else:
70
+ cmd.append(target)
71
+
72
+ cmd.extend(args)
73
+
74
+ return {"cmd": cmd, "timeout": 1800}
75
+
76
+ def run(
77
+ self, target: str, args: List[str] = None, label: str = "", log_path: str = None
78
+ ) -> int:
79
+ """Execute impacket-GetUserSPNs and write output to log_path."""
80
+
81
+ args = args or []
82
+
83
+ # Replace <target> placeholder
84
+ args = [arg.replace("<target>", target) for arg in args]
85
+
86
+ # Find the correct command (varies by install: apt vs pipx)
87
+ getuserspns_cmd = find_impacket_command("GetUserSPNs")
88
+ if not getuserspns_cmd:
89
+ if log_path:
90
+ with open(log_path, "w", encoding="utf-8") as fh:
91
+ fh.write("ERROR: GetUserSPNs not found. Install with:\n")
92
+ fh.write(" Kali: sudo apt install python3-impacket\n")
93
+ fh.write(" Ubuntu: pipx install impacket\n")
94
+ return 1
95
+
96
+ # Build command
97
+ cmd = [getuserspns_cmd]
98
+
99
+ # If first arg looks like credentials, use it as positional
100
+ if args and "/" in args[0]:
101
+ cmd.append(args[0])
102
+ args = args[1:]
103
+ else:
104
+ cmd.append(target)
105
+
106
+ cmd.extend(args)
107
+
108
+ if not log_path:
109
+ try:
110
+ proc = subprocess.run(
111
+ cmd, capture_output=True, timeout=300, check=False
112
+ )
113
+ return proc.returncode
114
+ except Exception:
115
+ return 1
116
+
117
+ try:
118
+ # Create metadata header
119
+ with open(log_path, "w", encoding="utf-8", errors="replace") as fh:
120
+ fh.write(f"=== Plugin: Impacket GetUserSPNs ===\n")
121
+ fh.write(f"Target: {target}\n")
122
+ fh.write(f"Args: {args}\n")
123
+ fh.write(f"Label: {label}\n")
124
+ fh.write(
125
+ f"Started: {time.strftime('%Y-%m-%d %H:%M:%S UTC', time.gmtime())}\n"
126
+ )
127
+ fh.write(f"Command: {' '.join(cmd)}\n\n")
128
+
129
+ # Run GetUserSPNs
130
+ proc = subprocess.run(
131
+ cmd, capture_output=True, timeout=300, check=False, text=True
132
+ )
133
+
134
+ # Write output
135
+ with open(log_path, "a", encoding="utf-8", errors="replace") as fh:
136
+ if proc.stdout:
137
+ fh.write(proc.stdout)
138
+ if proc.stderr:
139
+ fh.write(proc.stderr)
140
+ fh.write(
141
+ f"\n=== Completed: {time.strftime('%Y-%m-%d %H:%M:%S UTC', time.gmtime())} ===\n"
142
+ )
143
+ fh.write(f"Exit Code: {proc.returncode}\n")
144
+
145
+ return proc.returncode
146
+
147
+ except subprocess.TimeoutExpired:
148
+ with open(log_path, "a", encoding="utf-8", errors="replace") as fh:
149
+ fh.write("\n\nERROR: GetUserSPNs timed out after 300 seconds\n")
150
+ return 124
151
+
152
+ except Exception as e:
153
+ with open(log_path, "a", encoding="utf-8", errors="replace") as fh:
154
+ fh.write(f"\n\nERROR: {str(e)}\n")
155
+ return 1
156
+
157
+
158
+ plugin = ImpacketGetUserSPNsPlugin()
@@ -2,10 +2,12 @@
2
2
  """
3
3
  souleyez.plugins.impacket_psexec - Remote command execution via SMB
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
8
9
 
10
+ from .impacket_common import find_impacket_command
9
11
  from .plugin_base import PluginBase
10
12
 
11
13
  HELP = {
@@ -166,8 +168,13 @@ class ImpacketPsexecPlugin(PluginBase):
166
168
  # Replace <target> placeholder
167
169
  args = [arg.replace("<target>", target) for arg in args]
168
170
 
171
+ # Find the correct command (varies by install: apt vs pipx)
172
+ psexec_cmd = find_impacket_command("psexec")
173
+ if not psexec_cmd:
174
+ return None # Tool not installed
175
+
169
176
  # Build command (args should include credentials)
170
- cmd = ["impacket-psexec"] + args
177
+ cmd = [psexec_cmd] + args
171
178
 
172
179
  return {"cmd": cmd, "timeout": 1800}
173
180
 
@@ -181,8 +188,18 @@ class ImpacketPsexecPlugin(PluginBase):
181
188
  # Replace <target> placeholder
182
189
  args = [arg.replace("<target>", target) for arg in args]
183
190
 
191
+ # Find the correct command (varies by install: apt vs pipx)
192
+ psexec_cmd = find_impacket_command("psexec")
193
+ if not psexec_cmd:
194
+ if log_path:
195
+ with open(log_path, "w", encoding="utf-8") as fh:
196
+ fh.write("ERROR: psexec not found. Install with:\n")
197
+ fh.write(" Kali: sudo apt install python3-impacket\n")
198
+ fh.write(" Ubuntu: pipx install impacket\n")
199
+ return 1
200
+
184
201
  # Build command
185
- cmd = ["impacket-psexec"]
202
+ cmd = [psexec_cmd]
186
203
 
187
204
  # Add args (should include credentials like "DOMAIN/user:pass@host")
188
205
  cmd.extend(args)
@@ -2,10 +2,12 @@
2
2
  """
3
3
  souleyez.plugins.impacket_secretsdump - Dump credentials from SAM/NTDS/LSA
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
8
9
 
10
+ from .impacket_common import find_impacket_command
9
11
  from .plugin_base import PluginBase
10
12
 
11
13
  HELP = {
@@ -190,8 +192,13 @@ class ImpacketSecretsdumpPlugin(PluginBase):
190
192
  # Replace <target> placeholder
191
193
  args = [arg.replace("<target>", target) for arg in args]
192
194
 
195
+ # Find the correct command (varies by install: apt vs pipx)
196
+ secretsdump_cmd = find_impacket_command("secretsdump")
197
+ if not secretsdump_cmd:
198
+ return None # Tool not installed
199
+
193
200
  # Build command (args should include credentials)
194
- cmd = ["impacket-secretsdump"] + args
201
+ cmd = [secretsdump_cmd] + args
195
202
 
196
203
  return {"cmd": cmd, "timeout": 1800}
197
204
 
@@ -205,8 +212,18 @@ class ImpacketSecretsdumpPlugin(PluginBase):
205
212
  # Replace <target> placeholder
206
213
  args = [arg.replace("<target>", target) for arg in args]
207
214
 
215
+ # Find the correct command (varies by install: apt vs pipx)
216
+ secretsdump_cmd = find_impacket_command("secretsdump")
217
+ if not secretsdump_cmd:
218
+ if log_path:
219
+ with open(log_path, "w", encoding="utf-8") as fh:
220
+ fh.write("ERROR: secretsdump not found. Install with:\n")
221
+ fh.write(" Kali: sudo apt install python3-impacket\n")
222
+ fh.write(" Ubuntu: pipx install impacket\n")
223
+ return 1
224
+
208
225
  # Build command
209
- cmd = ["impacket-secretsdump"]
226
+ cmd = [secretsdump_cmd]
210
227
 
211
228
  # Add target/credentials (should be in args like "DOMAIN/user:pass@host")
212
229
  cmd.extend(args)
@@ -2,10 +2,12 @@
2
2
  """
3
3
  souleyez.plugins.impacket_smbclient - SMB client for file operations
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
8
9
 
10
+ from .impacket_common import find_impacket_command
9
11
  from .plugin_base import PluginBase
10
12
 
11
13
  HELP = {
@@ -161,8 +163,13 @@ class ImpacketSmbclientPlugin(PluginBase):
161
163
  # Replace <target> placeholder
162
164
  args = [arg.replace("<target>", target) for arg in args]
163
165
 
166
+ # Find the correct command (varies by install: apt vs pipx)
167
+ smbclient_cmd = find_impacket_command("smbclient")
168
+ if not smbclient_cmd:
169
+ return None # Tool not installed
170
+
164
171
  # Build command (args should include credentials)
165
- cmd = ["impacket-smbclient"] + args
172
+ cmd = [smbclient_cmd] + args
166
173
 
167
174
  return {"cmd": cmd, "timeout": 1800}
168
175
 
@@ -176,8 +183,18 @@ class ImpacketSmbclientPlugin(PluginBase):
176
183
  # Replace <target> placeholder
177
184
  args = [arg.replace("<target>", target) for arg in args]
178
185
 
186
+ # Find the correct command (varies by install: apt vs pipx)
187
+ smbclient_cmd = find_impacket_command("smbclient")
188
+ if not smbclient_cmd:
189
+ if log_path:
190
+ with open(log_path, "w", encoding="utf-8") as fh:
191
+ fh.write("ERROR: smbclient not found. Install with:\n")
192
+ fh.write(" Kali: sudo apt install python3-impacket\n")
193
+ fh.write(" Ubuntu: pipx install impacket\n")
194
+ return 1
195
+
179
196
  # Build command
180
- cmd = ["impacket-smbclient"]
197
+ cmd = [smbclient_cmd]
181
198
 
182
199
  # Add args (should include credentials like "DOMAIN/user:pass@host")
183
200
  cmd.extend(args)
souleyez/plugins/john.py CHANGED
@@ -4,9 +4,10 @@ souleyez.plugins.john
4
4
 
5
5
  John the Ripper password cracking plugin.
6
6
  """
7
+
8
+ import os
7
9
  import subprocess
8
10
  import time
9
- import os
10
11
  from typing import List
11
12
 
12
13
  from .plugin_base import PluginBase
@@ -5,12 +5,14 @@ souleyez.plugins.katana - Web crawling and spidering for parameter discovery
5
5
  Katana is a next-generation crawling and spidering framework from ProjectDiscovery.
6
6
  It discovers endpoints, parameters, forms, and JavaScript-rendered routes.
7
7
  """
8
- import subprocess
8
+
9
9
  import shutil
10
- from typing import List, Optional, Dict, Any
10
+ import subprocess
11
+ from typing import Any, Dict, List, Optional
12
+
13
+ from souleyez.security.validation import ValidationError, validate_url
11
14
 
12
15
  from .plugin_base import PluginBase
13
- from souleyez.security.validation import validate_url, ValidationError
14
16
 
15
17
  HELP = {
16
18
  "name": "Katana - Web Crawler & Spider",
@@ -126,6 +128,34 @@ class KatanaPlugin(PluginBase):
126
128
  category = "vulnerability_analysis"
127
129
  HELP = HELP
128
130
 
131
+ def _is_snap_chromium(self) -> bool:
132
+ """
133
+ Check if chromium is installed via snap.
134
+
135
+ Snap chromium has sandboxing that breaks headless mode with katana.
136
+ Returns True if chromium path contains 'snap'.
137
+ """
138
+ chromium_binaries = ["chromium", "chromium-browser", "google-chrome", "chrome"]
139
+ for binary in chromium_binaries:
140
+ path = shutil.which(binary)
141
+ if path and "snap" in path:
142
+ return True
143
+ return False
144
+
145
+ def _is_arm64_linux(self) -> bool:
146
+ """
147
+ Check if running on ARM64 Linux.
148
+
149
+ go-rod (katana's headless library) doesn't have ARM64 chromium binaries
150
+ available for download, so headless mode fails silently on ARM64.
151
+ """
152
+ import platform
153
+
154
+ return platform.system() == "Linux" and platform.machine() in (
155
+ "aarch64",
156
+ "arm64",
157
+ )
158
+
129
159
  def check_tool_available(self) -> tuple:
130
160
  """
131
161
  Check if katana and chromium are installed.
@@ -221,9 +251,21 @@ class KatanaPlugin(PluginBase):
221
251
  cmd.extend(args)
222
252
 
223
253
  # Set defaults if not specified
224
- # Headless mode by default (unless -no-headless specified)
225
- if "-headless" not in args and "-no-headless" not in args:
226
- cmd.append("-headless")
254
+ # Headless mode by default - required for proper JavaScript execution
255
+ # However, ARM64 Linux doesn't have go-rod chromium binaries available,
256
+ # so we skip headless mode and rely on JavaScript endpoint extraction instead
257
+ if "-headless" not in args:
258
+ if self._is_arm64_linux():
259
+ # ARM64: go-rod can't find chromium binary, headless silently fails
260
+ # Skip headless mode - the handler will extract endpoints from JS files
261
+ if log_path:
262
+ with open(log_path, "a") as f:
263
+ f.write(
264
+ "NOTE: ARM64 Linux detected, using standard crawl mode. "
265
+ "API endpoints will be extracted from JavaScript files.\n"
266
+ )
267
+ else:
268
+ cmd.append("-headless")
227
269
 
228
270
  # JavaScript crawling by default
229
271
  if "-jc" not in args:
@@ -2,6 +2,7 @@
2
2
  """
3
3
  souleyez.plugins.kerbrute - Kerberos username enumeration and password spraying
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
@@ -11,6 +11,7 @@ A custom SoulEyez tool that:
11
11
  This is "glue" tooling - it bridges the gap between LFI discovery and
12
12
  credential exploitation.
13
13
  """
14
+
14
15
  import base64
15
16
  import json
16
17
  import re
@@ -5,12 +5,14 @@ souleyez.plugins.macos_ssh
5
5
  macOS SSH brute force plugin using Hydra.
6
6
  Attacks SSH on macOS systems with common credentials.
7
7
  """
8
+
8
9
  import subprocess
9
10
  import time
10
11
  from typing import List
11
12
 
13
+ from souleyez.security.validation import ValidationError, validate_target
14
+
12
15
  from .plugin_base import PluginBase
13
- from souleyez.security.validation import validate_target, ValidationError
14
16
 
15
17
  HELP = {
16
18
  "name": "macOS SSH Brute — Remote Login Attack",
souleyez/plugins/mdns.py CHANGED
@@ -5,12 +5,14 @@ souleyez.plugins.mdns
5
5
  mDNS/Bonjour discovery plugin.
6
6
  Discovers Apple devices and services via multicast DNS.
7
7
  """
8
+
8
9
  import subprocess
9
10
  import time
10
11
  from typing import List
11
12
 
13
+ from souleyez.security.validation import ValidationError, validate_target
14
+
12
15
  from .plugin_base import PluginBase
13
- from souleyez.security.validation import validate_target, ValidationError
14
16
 
15
17
  HELP = {
16
18
  "name": "mDNS — Bonjour Service Discovery",
@@ -2,10 +2,11 @@
2
2
  """
3
3
  souleyez.plugins.msf_auxiliary - Metasploit Framework auxiliary scanner wrapper
4
4
  """
5
- from typing import List
6
- from pathlib import Path
5
+
7
6
  import subprocess
8
7
  import time
8
+ from pathlib import Path
9
+ from typing import List
9
10
 
10
11
  from .plugin_base import PluginBase
11
12
 
@@ -6,12 +6,13 @@ Supports two execution modes:
6
6
  1. RPC Mode (Pro only): Uses msfrpcd for persistent sessions
7
7
  2. Console Mode: Uses msfconsole subprocess (sessions die on job completion)
8
8
  """
9
- from typing import List, Dict, Any, Optional
10
- import subprocess
11
- import time
12
- import socket
9
+
13
10
  import logging
14
11
  import re
12
+ import socket
13
+ import subprocess
14
+ import time
15
+ from typing import Any, Dict, List, Optional
15
16
 
16
17
  from .plugin_base import PluginBase
17
18
 
@@ -155,8 +156,8 @@ class MsfExploitPlugin(PluginBase):
155
156
  3. msfrpcd is running and accessible
156
157
  """
157
158
  try:
158
- from souleyez.core.msf_rpc_manager import is_pro_enabled
159
159
  from souleyez import config
160
+ from souleyez.core.msf_rpc_manager import is_pro_enabled
160
161
 
161
162
  # Must have Pro license
162
163
  if not is_pro_enabled():
souleyez/plugins/nikto.py CHANGED
@@ -2,14 +2,17 @@
2
2
  """
3
3
  souleyez.plugins.nikto - Web server vulnerability scanner
4
4
  """
5
+
5
6
  from __future__ import annotations
7
+
8
+ import re
6
9
  import subprocess
7
10
  import time
8
- import re
9
11
  from typing import List
10
12
 
13
+ from souleyez.security.validation import ValidationError, validate_url
14
+
11
15
  from .plugin_base import PluginBase
12
- from souleyez.security.validation import validate_url, ValidationError
13
16
 
14
17
  HELP = {
15
18
  "name": "Nikto - Web Server Vulnerability Scanner",
souleyez/plugins/nmap.py CHANGED
@@ -2,17 +2,19 @@
2
2
  """
3
3
  souleyez.plugins.nmap
4
4
  """
5
- from typing import List
5
+
6
6
  import subprocess
7
7
  import time
8
+ from typing import List
8
9
 
9
- from .plugin_base import PluginBase
10
10
  from souleyez.security.validation import (
11
- validate_target,
12
- validate_nmap_args,
13
11
  ValidationError,
12
+ validate_nmap_args,
13
+ validate_target,
14
14
  )
15
15
 
16
+ from .plugin_base import PluginBase
17
+
16
18
  HELP = {
17
19
  "name": "Nmap — Network Scanner",
18
20
  "description": (
@@ -2,12 +2,14 @@
2
2
  """
3
3
  souleyez.plugins.nuclei - Modern vulnerability scanner with 5000+ templates
4
4
  """
5
+
5
6
  import subprocess
6
7
  import time
7
8
  from typing import List
8
9
 
10
+ from souleyez.security.validation import ValidationError, validate_url
11
+
9
12
  from .plugin_base import PluginBase
10
- from souleyez.security.validation import validate_url, ValidationError
11
13
 
12
14
  HELP = {
13
15
  "name": "Nuclei - Modern Vulnerability Scanner",