secator 0.0.1__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.

Potentially problematic release.


This version of secator might be problematic. Click here for more details.

Files changed (114) hide show
  1. secator/__init__.py +0 -0
  2. secator/celery.py +482 -0
  3. secator/cli.py +617 -0
  4. secator/config.py +137 -0
  5. secator/configs/__init__.py +0 -0
  6. secator/configs/profiles/__init__.py +0 -0
  7. secator/configs/profiles/aggressive.yaml +7 -0
  8. secator/configs/profiles/default.yaml +9 -0
  9. secator/configs/profiles/stealth.yaml +7 -0
  10. secator/configs/scans/__init__.py +0 -0
  11. secator/configs/scans/domain.yaml +18 -0
  12. secator/configs/scans/host.yaml +14 -0
  13. secator/configs/scans/network.yaml +17 -0
  14. secator/configs/scans/subdomain.yaml +8 -0
  15. secator/configs/scans/url.yaml +12 -0
  16. secator/configs/workflows/__init__.py +0 -0
  17. secator/configs/workflows/cidr_recon.yaml +28 -0
  18. secator/configs/workflows/code_scan.yaml +11 -0
  19. secator/configs/workflows/host_recon.yaml +41 -0
  20. secator/configs/workflows/port_scan.yaml +34 -0
  21. secator/configs/workflows/subdomain_recon.yaml +33 -0
  22. secator/configs/workflows/url_crawl.yaml +29 -0
  23. secator/configs/workflows/url_dirsearch.yaml +29 -0
  24. secator/configs/workflows/url_fuzz.yaml +35 -0
  25. secator/configs/workflows/url_nuclei.yaml +11 -0
  26. secator/configs/workflows/url_vuln.yaml +55 -0
  27. secator/configs/workflows/user_hunt.yaml +10 -0
  28. secator/configs/workflows/wordpress.yaml +14 -0
  29. secator/decorators.py +309 -0
  30. secator/definitions.py +165 -0
  31. secator/exporters/__init__.py +12 -0
  32. secator/exporters/_base.py +3 -0
  33. secator/exporters/csv.py +30 -0
  34. secator/exporters/gdrive.py +118 -0
  35. secator/exporters/json.py +15 -0
  36. secator/exporters/table.py +7 -0
  37. secator/exporters/txt.py +25 -0
  38. secator/hooks/__init__.py +0 -0
  39. secator/hooks/mongodb.py +212 -0
  40. secator/output_types/__init__.py +24 -0
  41. secator/output_types/_base.py +95 -0
  42. secator/output_types/exploit.py +50 -0
  43. secator/output_types/ip.py +33 -0
  44. secator/output_types/port.py +45 -0
  45. secator/output_types/progress.py +35 -0
  46. secator/output_types/record.py +34 -0
  47. secator/output_types/subdomain.py +42 -0
  48. secator/output_types/tag.py +46 -0
  49. secator/output_types/target.py +30 -0
  50. secator/output_types/url.py +76 -0
  51. secator/output_types/user_account.py +41 -0
  52. secator/output_types/vulnerability.py +97 -0
  53. secator/report.py +107 -0
  54. secator/rich.py +124 -0
  55. secator/runners/__init__.py +12 -0
  56. secator/runners/_base.py +833 -0
  57. secator/runners/_helpers.py +153 -0
  58. secator/runners/command.py +638 -0
  59. secator/runners/scan.py +65 -0
  60. secator/runners/task.py +106 -0
  61. secator/runners/workflow.py +135 -0
  62. secator/serializers/__init__.py +8 -0
  63. secator/serializers/dataclass.py +33 -0
  64. secator/serializers/json.py +15 -0
  65. secator/serializers/regex.py +17 -0
  66. secator/tasks/__init__.py +10 -0
  67. secator/tasks/_categories.py +304 -0
  68. secator/tasks/cariddi.py +102 -0
  69. secator/tasks/dalfox.py +65 -0
  70. secator/tasks/dirsearch.py +90 -0
  71. secator/tasks/dnsx.py +56 -0
  72. secator/tasks/dnsxbrute.py +34 -0
  73. secator/tasks/feroxbuster.py +91 -0
  74. secator/tasks/ffuf.py +86 -0
  75. secator/tasks/fping.py +44 -0
  76. secator/tasks/gau.py +47 -0
  77. secator/tasks/gf.py +33 -0
  78. secator/tasks/gospider.py +71 -0
  79. secator/tasks/grype.py +79 -0
  80. secator/tasks/h8mail.py +81 -0
  81. secator/tasks/httpx.py +99 -0
  82. secator/tasks/katana.py +133 -0
  83. secator/tasks/maigret.py +78 -0
  84. secator/tasks/mapcidr.py +32 -0
  85. secator/tasks/msfconsole.py +174 -0
  86. secator/tasks/naabu.py +52 -0
  87. secator/tasks/nmap.py +344 -0
  88. secator/tasks/nuclei.py +97 -0
  89. secator/tasks/searchsploit.py +52 -0
  90. secator/tasks/subfinder.py +40 -0
  91. secator/tasks/wpscan.py +179 -0
  92. secator/utils.py +445 -0
  93. secator/utils_test.py +183 -0
  94. secator-0.0.1.dist-info/LICENSE +60 -0
  95. secator-0.0.1.dist-info/METADATA +199 -0
  96. secator-0.0.1.dist-info/RECORD +114 -0
  97. secator-0.0.1.dist-info/WHEEL +5 -0
  98. secator-0.0.1.dist-info/entry_points.txt +2 -0
  99. secator-0.0.1.dist-info/top_level.txt +2 -0
  100. tests/__init__.py +0 -0
  101. tests/integration/__init__.py +0 -0
  102. tests/integration/inputs.py +42 -0
  103. tests/integration/outputs.py +392 -0
  104. tests/integration/test_scans.py +82 -0
  105. tests/integration/test_tasks.py +103 -0
  106. tests/integration/test_workflows.py +163 -0
  107. tests/performance/__init__.py +0 -0
  108. tests/performance/loadtester.py +56 -0
  109. tests/unit/__init__.py +0 -0
  110. tests/unit/test_celery.py +39 -0
  111. tests/unit/test_scans.py +0 -0
  112. tests/unit/test_serializers.py +51 -0
  113. tests/unit/test_tasks.py +348 -0
  114. tests/unit/test_workflows.py +96 -0
secator/utils_test.py ADDED
@@ -0,0 +1,183 @@
1
+ import contextlib
2
+ import json
3
+ import os
4
+ import unittest.mock
5
+
6
+ from fp.fp import FreeProxy
7
+
8
+ from secator.definitions import (CIDR_RANGE, DEBUG, DELAY, DEPTH, EMAIL,
9
+ FOLLOW_REDIRECT, HEADER, HOST, IP, MATCH_CODES,
10
+ METHOD, PROXY, RATE_LIMIT, RETRIES,
11
+ THREADS, TIMEOUT, URL, USER_AGENT, USERNAME)
12
+ from secator.cli import ALL_WORKFLOWS, ALL_TASKS, ALL_SCANS
13
+ from secator.output_types import OutputType
14
+ from secator.rich import console
15
+ from secator.utils import load_fixture
16
+
17
+ #---------#
18
+ # GLOBALS #
19
+ #---------#
20
+ USE_PROXY = bool(int(os.environ.get('USE_PROXY', '0')))
21
+ TEST_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/tests/'
22
+ FIXTURES_DIR = f'{TEST_DIR}/fixtures'
23
+ USE_PROXY = bool(int(os.environ.get('USE_PROXY', '0')))
24
+
25
+ #------------#
26
+ # TEST TASKS #
27
+ #------------#
28
+ TEST_TASKS = os.environ.get('TEST_TASKS', '')
29
+ if TEST_TASKS:
30
+ TEST_TASKS = [cls for cls in ALL_TASKS if cls.__name__ in TEST_TASKS.split(',')]
31
+ else:
32
+ TEST_TASKS = ALL_TASKS
33
+
34
+ #----------------#
35
+ # TEST WORKFLOWS #
36
+ #----------------#
37
+ TEST_WORKFLOWS = os.environ.get('TEST_WORKFLOWS', '')
38
+ if TEST_WORKFLOWS:
39
+ TEST_WORKFLOWS = [config for config in ALL_WORKFLOWS if config.name in TEST_WORKFLOWS.split(',')]
40
+ else:
41
+ TEST_WORKFLOWS = ALL_WORKFLOWS
42
+
43
+ #------------#
44
+ # TEST SCANS #
45
+ #------------#
46
+ TEST_SCANS = os.environ.get('TEST_SCANS', '')
47
+ if TEST_SCANS:
48
+ TEST_SCANS = [config for config in ALL_SCANS if config.name in TEST_SCANS.split(',')]
49
+ else:
50
+ TEST_SCANS = ALL_SCANS
51
+
52
+ #-------------#
53
+ # TEST INPUTS_TASKS #
54
+ #-------------#
55
+ INPUTS_TASKS = {
56
+ URL: 'https://fake.com',
57
+ HOST: 'fake.com',
58
+ USERNAME: 'test',
59
+ IP: '192.168.1.23',
60
+ CIDR_RANGE: '192.168.1.0/24',
61
+ EMAIL: 'fake@fake.com'
62
+ }
63
+
64
+ #---------------------#
65
+ # TEST FIXTURES_TASKS #
66
+ #---------------------#
67
+ FIXTURES_TASKS = {
68
+ tool_cls: load_fixture(f'{tool_cls.__name__}_output', FIXTURES_DIR)
69
+ for tool_cls in TEST_TASKS
70
+ }
71
+
72
+ #-----------#
73
+ # TEST OPTS #
74
+ #-----------#
75
+ META_OPTS = {
76
+ HEADER: 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1',
77
+ DELAY: 0,
78
+ DEPTH: 2,
79
+ FOLLOW_REDIRECT: True,
80
+ METHOD: 'GET',
81
+ MATCH_CODES: '200',
82
+ PROXY: FreeProxy(timeout=0.5).get() if USE_PROXY else False,
83
+ RATE_LIMIT: 10000,
84
+ RETRIES: 0,
85
+ THREADS: 50,
86
+ TIMEOUT: 1,
87
+ USER_AGENT: 'Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1',
88
+
89
+ # Individual tasks options
90
+ 'gf.pattern': 'xss',
91
+ 'nmap.output_path': load_fixture('nmap_output', FIXTURES_DIR, only_path=True, ext='.xml'), # nmap XML fixture
92
+ 'msfconsole.resource': load_fixture('msfconsole_input', FIXTURES_DIR, only_path=True),
93
+ 'dirsearch.output_path': load_fixture('dirsearch_output', FIXTURES_DIR, only_path=True),
94
+ 'maigret.output_path': load_fixture('maigret_output', FIXTURES_DIR, only_path=True),
95
+ 'wpscan.output_path': load_fixture('wpscan_output', FIXTURES_DIR, only_path=True),
96
+ 'h8mail.output_path': load_fixture('h8mail_output', FIXTURES_DIR, only_path=True),
97
+ 'h8mail.local_breach': load_fixture('h8mail_breach', FIXTURES_DIR, only_path=True)
98
+ }
99
+
100
+
101
+ def mock_subprocess_popen(output_list):
102
+ mock_process = unittest.mock.MagicMock()
103
+ mock_process.wait.return_value = 0
104
+ mock_process.stdout.readline.side_effect = output_list
105
+ mock_process.returncode = 0
106
+
107
+ def mock_popen(*args, **kwargs):
108
+ return mock_process
109
+
110
+ return unittest.mock.patch('subprocess.Popen', mock_popen)
111
+
112
+
113
+ @contextlib.contextmanager
114
+ def mock_command(cls, targets=[], opts={}, fixture=None, method=''):
115
+ mocks = []
116
+ if isinstance(fixture, dict):
117
+ fixture = [fixture]
118
+
119
+ is_list = isinstance(fixture, list)
120
+ if is_list:
121
+ for item in fixture:
122
+ if isinstance(item, dict):
123
+ mocks.append(json.dumps(item))
124
+ else:
125
+ mocks.append(item)
126
+ else:
127
+ mocks.append(fixture)
128
+
129
+ with mock_subprocess_popen(mocks):
130
+ command = cls(targets, **opts)
131
+ if method == 'run':
132
+ yield cls(targets, **opts).run()
133
+ elif method == 'si':
134
+ yield cls.si([], targets, **opts)
135
+ elif method in ['s', 'delay']:
136
+ yield getattr(cls, method)(targets, **opts)
137
+ else:
138
+ yield command
139
+
140
+
141
+ class CommandOutputTester: # Mixin for unittest.TestCase
142
+
143
+ def _test_task_output(
144
+ self,
145
+ results,
146
+ expected_output_keys=[],
147
+ expected_output_types=[],
148
+ expected_results=[],
149
+ empty_results_allowed=False):
150
+
151
+ if not isinstance(results, list):
152
+ results = [results]
153
+
154
+ try:
155
+ if not empty_results_allowed:
156
+ self.assertGreater(len(results), 0)
157
+
158
+ for item in results:
159
+
160
+ if DEBUG > 2:
161
+ console.log('\n', log_locals=True)
162
+
163
+ if DEBUG > 0 and isinstance(item, OutputType):
164
+ print(repr(item))
165
+
166
+ if expected_output_types:
167
+ self.assertIn(type(item), expected_output_types)
168
+
169
+ if expected_output_keys:
170
+ keys = [k for k in list(item.keys()) if not k.startswith('_')]
171
+ self.assertEqual(
172
+ set(keys).difference(set(expected_output_keys)),
173
+ set())
174
+
175
+ if expected_results:
176
+ for result in expected_results:
177
+ self.assertIn(result, results)
178
+
179
+ except Exception:
180
+ console.print('[bold red] failed[/]')
181
+ raise
182
+
183
+ console.print('[bold green] ok[/]')
@@ -0,0 +1,60 @@
1
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
2
+ “Business Source License” is a trademark of MariaDB Corporation Ab.
3
+
4
+ Parameters
5
+
6
+ Licensor: FreeLabz.
7
+ Licensed Work: Secator. The Licensed Work is (c) 2023 FreeLabz.
8
+ Additional Use Grant: You may make production use of the Licensed Work,
9
+ provided such use does not include offering the Licensed Work
10
+ to third parties on a hosted or embedded basis which is
11
+ competitive with FreeLabz's products.
12
+ Change Date: Four years from the date the Licensed Work is published.
13
+
14
+ For information about alternative licensing arrangements for the Licensed Work,
15
+ please contact sales@freelabz.com.
16
+
17
+ Notice
18
+
19
+ Business Source License 1.1
20
+
21
+ Terms
22
+
23
+ The Licensor hereby grants you the right to copy, modify, create derivative
24
+ works, redistribute, and make non-production use of the Licensed Work. The
25
+ Licensor may make an Additional Use Grant, above, permitting limited production use.
26
+
27
+ Effective on the Change Date, or the fourth anniversary of the first publicly
28
+ available distribution of a specific version of the Licensed Work under this
29
+ License, whichever comes first, the Licensor hereby grants you rights under
30
+ the terms of the Change License, and the rights granted in the paragraph
31
+ above terminate.
32
+
33
+ If your use of the Licensed Work does not comply with the requirements
34
+ currently in effect as described in this License, you must purchase a
35
+ commercial license from the Licensor, its affiliated entities, or authorized
36
+ resellers, or you must refrain from using the Licensed Work.
37
+
38
+ All copies of the original and modified Licensed Work, and derivative works
39
+ of the Licensed Work, are subject to this License. This License applies
40
+ separately for each version of the Licensed Work and the Change Date may vary
41
+ for each version of the Licensed Work released by Licensor.
42
+
43
+ You must conspicuously display this License on each original or modified copy
44
+ of the Licensed Work. If you receive the Licensed Work in original or
45
+ modified form from a third party, the terms and conditions set forth in this
46
+ License apply to your use of that work.
47
+
48
+ Any use of the Licensed Work in violation of this License will automatically
49
+ terminate your rights under this License for the current and all other
50
+ versions of the Licensed Work.
51
+
52
+ This License does not grant you any right in any trademark or logo of
53
+ Licensor or its affiliates (provided that you may use a trademark or logo of
54
+ Licensor as expressly required by this License).
55
+
56
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
57
+ AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
58
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
59
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
60
+ TITLE.
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.1
2
+ Name: secator
3
+ Version: 0.0.1
4
+ Summary: Security tools command runner
5
+ Author: FLZ Security
6
+ Author-email: ocervello@freelabz.com
7
+ License: MIT
8
+ Keywords: recon framework vulnerability pentest automation
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: bs4
16
+ Requires-Dist: celery
17
+ Requires-Dist: cpe
18
+ Requires-Dist: dotmap
19
+ Requires-Dist: eventlet
20
+ Requires-Dist: flower
21
+ Requires-Dist: free-proxy
22
+ Requires-Dist: furl
23
+ Requires-Dist: gevent
24
+ Requires-Dist: jinja2
25
+ Requires-Dist: humanize
26
+ Requires-Dist: memray
27
+ Requires-Dist: netifaces
28
+ Requires-Dist: pygments
29
+ Requires-Dist: pyinstrument
30
+ Requires-Dist: python-dotenv
31
+ Requires-Dist: pyyaml
32
+ Requires-Dist: pymongo
33
+ Requires-Dist: redis
34
+ Requires-Dist: requests
35
+ Requires-Dist: rich
36
+ Requires-Dist: rich-click <1.7
37
+ Requires-Dist: tabulate
38
+ Requires-Dist: termcolor
39
+ Requires-Dist: validators
40
+ Requires-Dist: xmltodict
41
+ Provides-Extra: dev
42
+ Requires-Dist: coverage ; extra == 'dev'
43
+ Requires-Dist: flake8 ; extra == 'dev'
44
+ Requires-Dist: watchdog ; extra == 'dev'
45
+ Requires-Dist: asciinema-automation ; extra == 'dev'
46
+ Provides-Extra: google
47
+ Requires-Dist: google-api-python-client ; extra == 'google'
48
+ Requires-Dist: google-auth ; extra == 'google'
49
+ Requires-Dist: gspread ; extra == 'google'
50
+
51
+ <h1 align="center">
52
+ secator
53
+ <br>
54
+ </h1>
55
+
56
+ <h4 align="center">Security swiss-knife to speed up vulnerability assessments.</h4>
57
+
58
+ <p align="center">
59
+ <!-- <a href="https://goreportcard.com/report/github.com/freelabz/secator"><img src="https://goreportcard.com/badge/github.com/freelabz/secator"></a> -->
60
+ <a href="https://github.com/freelabz/secator/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"></a>
61
+ <a href="https://github.com/freelabz/secator/releases"><img src="https://img.shields.io/github/release/freelabz/secator"></a>
62
+ <a href="https://www.apache.org/licenses/LICENSE-2.0"><img src="https://img.shields.io/badge/License-Apache-blue.svg"></a>
63
+ <a href="https://twitter.com/freelabz"><img src="https://img.shields.io/twitter/follow/freelabz.svg?logo=twitter"></a>
64
+ <!-- <a href="https://discord.gg/freelabz"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a> -->
65
+ </p>
66
+
67
+
68
+ <p align="center">
69
+ <a href="#features">Features</a> •
70
+ <a href="#supported-commands">Supported commands</a> •
71
+ <a href="#install-secator">Installation</a> •
72
+ <a href="#usage">Usage</a> •
73
+ <a href="https://docs.freelabz.com">Documentation</a>
74
+ </p>
75
+
76
+ `secator` is a task and workflow runner used for security assessments. It supports dozens of well-known security tools
77
+ and it is designed to improve productivity for pentesters and security researchers.
78
+
79
+ # Features
80
+
81
+ ![](images/short_demo.gif)
82
+
83
+ * **Curated list of commands**
84
+
85
+ * **Unified input options**
86
+
87
+ * **Unified output schema**
88
+
89
+ * **CLI and library usage**
90
+
91
+ * **Distributed options with Celery**
92
+
93
+ * **Complexity from simple tasks to complex workflows**
94
+
95
+ * **Customizable**
96
+
97
+ ## Supported commands
98
+
99
+ `secator` integrates the following commands:
100
+
101
+ | Name | Description | Category |
102
+ |---------------------------------------------------------------|--------------------------------------------------------------------------------|----------------|
103
+ | [httpx](https://github.com/projectdiscovery/httpx) | Fast HTTP prober. | `http` |
104
+ | [cariddi](https://github.com/edoardottt/cariddi) | Fast crawler and endpoint secrets / api keys / tokens matcher. | `http/crawler` |
105
+ | [gau](https://github.com/lc/gau) | Offline URL crawler (Alien Vault, The Wayback Machine, Common Crawl, URLScan). | `http/crawler` |
106
+ | [gospider](https://github.com/jaeles-project/gospider) | Fast web spider written in Go. | `http/crawler` |
107
+ | [katana](https://github.com/projectdiscovery/katana) | Next-generation crawling and spidering framework. | `http/crawler` |
108
+ | [dirsearch](https://github.com/maurosoria/dirsearch) | Web path discovery. | `http/fuzzer` |
109
+ | [feroxbuster](https://github.com/epi052/feroxbuster) | Simple, fast, recursive content discovery tool written in Rust. | `http/fuzzer` |
110
+ | [ffuf](https://github.com/ffuf/ffuf) | Fast web fuzzer written in Go. | `http/fuzzer` |
111
+ | [h8mail](https://github.com/khast3x/h8mail) | Email OSINT and breach hunting tool. | `osint` |
112
+ | [dnsx](https://github.com/projectdiscovery/dnsx) | Fast and multi-purpose DNS toolkit designed for running DNS queries. | `recon/dns` |
113
+ | [dnsxbrute](https://github.com/projectdiscovery/dnsx) | Fast and multi-purpose DNS toolkit designed for running DNS queries (bruteforce mode). | `recon/dns` |
114
+ | [subfinder](https://github.com/projectdiscovery/subfinder) | Fast subdomain finder. | `recon/dns` |
115
+ | [fping](https://fping.org/) | Find alive hosts on local networks. | `recon/ip` |
116
+ | [mapcidr](https://github.com/projectdiscovery/mapcidr) | Expand CIDR ranges into IPs. | `recon/ip` |
117
+ | [naabu](https://github.com/projectdiscovery/naabu) | Fast port discovery tool. | `recon/port` |
118
+ | [maigret](https://github.com/soxoj/maigret) | Hunt for user accounts across many websites. | `recon/user` |
119
+ | [gf](https://github.com/tomnomnom/gf) | A wrapper around grep to avoid typing common patterns. | `tagger` |
120
+ | [grype](https://github.com/anchore/grype) | A vulnerability scanner for container images and filesystems. | `vuln/code` |
121
+ | [dalfox](https://github.com/hahwul/dalfox) | Powerful XSS scanning tool and parameter analyzer. | `vuln/http` |
122
+ | [msfconsole](https://docs.rapid7.com/metasploit/msf-overview) | CLI to access and work with the Metasploit Framework. | `vuln/http` |
123
+ | [wpscan](https://github.com/wpscanteam/wpscan) | WordPress Security Scanner | `vuln/multi` |
124
+ | [nmap](https://github.com/nmap/nmap) | Vulnerability scanner using NSE scripts. | `vuln/multi` |
125
+ | [nuclei](https://github.com/projectdiscovery/nuclei) | Fast and customisable vulnerability scanner based on simple YAML based DSL. | `vuln/multi` |
126
+ | [searchsploit](https://gitlab.com/exploit-database/exploitdb) | Exploit searcher. | `exploit/search` |
127
+
128
+ Feel free to request new commands to be added by opening an issue, but please
129
+ check that the command complies with our selection criterias before doing so. If it doesn't but you still want to integrate it into `secator`, you can plug it in (see the [dev guide](https://docs.freelabz.com/for-developers/writing-custom-tasks)).
130
+
131
+
132
+ ## Install Secator
133
+
134
+ Secator requires **python >= 3.8** to install successfully. Run the following command to install the latest version:
135
+
136
+ ```sh
137
+ pip3 install git+https://github.com/freelabz/secator.git
138
+ ```
139
+
140
+ <details>
141
+ <summary>Bash one-liner</summary>
142
+
143
+ git clone https://github.com/freelabz/secator && sh ./scripts/install.sh
144
+
145
+ </details>
146
+
147
+ <details>
148
+ <summary>Docker</summary>
149
+
150
+ docker build -t secator
151
+
152
+ </details>
153
+
154
+ <details>
155
+ <summary>Development build</summary>
156
+
157
+ git clone https://github.com/freelabz/secator
158
+ cd secator
159
+ python3 -m virtualenv -p python3 ~/.virtualenvs/secator
160
+ source ~/.virtualenvs/secator/bin/activate
161
+ pip3 install -e .
162
+
163
+ </details>
164
+
165
+
166
+ ### Install specific tasks
167
+
168
+ ```sh
169
+ secator u install <TASK_NAME>
170
+ ```
171
+
172
+ ## Usage
173
+ ```sh
174
+ secator --help
175
+ ```
176
+ ![](images/help.png)
177
+
178
+
179
+ ### Running secator
180
+
181
+ Run a fuzzing task (`ffuf`):
182
+
183
+ ```sh
184
+ secator x ffuf http://testphp.vulnweb.com/FUZZ
185
+ ```
186
+
187
+ Run a port scan:
188
+
189
+ ```sh
190
+ secator w port_scan mydomain.com
191
+ ```
192
+
193
+ Run a full host scan:
194
+
195
+ ```sh
196
+ secator s host mydomain.com
197
+ ```
198
+
199
+ For more, read the complete [documentation](https://docs.freelabz.com).
@@ -0,0 +1,114 @@
1
+ secator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ secator/celery.py,sha256=QJyNvY6-I_QAgVUGMqZ07nSjEIy43R7zAHLQXPji2ss,13754
3
+ secator/cli.py,sha256=3ot6q1WcWDpwOQTtO89fmzhCyYa5LTwhsvd3KfVWnPg,19753
4
+ secator/config.py,sha256=iOeRzq7u1rvR1-Oq5v9wGxQYB613X0xKGLIcrfhEGc4,3693
5
+ secator/decorators.py,sha256=Zi9II1d1Yx4gtVZ7G7-Gw9NWrxtvDvddQDgVJJbCOlM,9207
6
+ secator/definitions.py,sha256=hnulsL7XJNDBh2Qky5okazDdDC9b030_ehIBjpJesJ8,5634
7
+ secator/report.py,sha256=d7bMLltJPifcEvsZ_MpDqERWVlMuRAuQg-FWu8Qat80,3056
8
+ secator/rich.py,sha256=WwgVG0GXF64COASVqmBNzYwM5CZ-QEOaYAWhby9AVKg,3398
9
+ secator/utils.py,sha256=No6m8LtyhC9RzXXQLOAwYRQPPNiGjPpI7o_Nbkj2B-w,11025
10
+ secator/utils_test.py,sha256=ovITORZwHqfP_bPfRQazjOc_Gs8lAwc7pnDEUqdnido,4986
11
+ secator/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ secator/configs/profiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ secator/configs/profiles/aggressive.yaml,sha256=JilVySABlSCYEFMjH7V0Oc3dAVlkfHOh1odTGhtm7BQ,108
14
+ secator/configs/profiles/default.yaml,sha256=kDuOF1Qkpv4oz1GZ-OwDxbi5pptAqShsCqdzkBOxXfw,149
15
+ secator/configs/profiles/stealth.yaml,sha256=Ud3EMZ2yRj0AT6w-AfV7fWUBYib9VAFp46GPpof9YaU,107
16
+ secator/configs/scans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ secator/configs/scans/domain.yaml,sha256=Dkm5dU2NdUTInkWD5cmVczvhUH0soaKPtoESeg8BVsQ,265
18
+ secator/configs/scans/host.yaml,sha256=tobz6yGeYlVnGwLVI9RLJT6MDLnGmQVVj8EOwAdksfw,189
19
+ secator/configs/scans/network.yaml,sha256=ghlgIwkWhJKQeT6V5TE51dFL-VRszWJtm4qx4ImjEEY,252
20
+ secator/configs/scans/subdomain.yaml,sha256=I007b1V5Rmm_4R9mODp6jxonHNIjXkQT9sU-AOxLSIo,123
21
+ secator/configs/scans/url.yaml,sha256=zhRiqyHq7BZHtKsmjpMvp3vmt5DRNtmfqW44sZm1tWw,158
22
+ secator/configs/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ secator/configs/workflows/cidr_recon.yaml,sha256=u1QKDKGbpJEez5QqC20Yd_nBLZd_z4nA-XFRQV7pVI4,558
24
+ secator/configs/workflows/code_scan.yaml,sha256=3H8H55NVskiDbBwNueVF8FUYkquEQn2C6evnid9zhB4,207
25
+ secator/configs/workflows/host_recon.yaml,sha256=wHXMycHQpWq8gVc8YSr6Kv-_0CtIfmkr6j7AY6Lah2w,1018
26
+ secator/configs/workflows/port_scan.yaml,sha256=DPXL8m96h3oFdk7Lw_6dP1j0pl_qzi_kWszZvaId5f0,796
27
+ secator/configs/workflows/subdomain_recon.yaml,sha256=qMvvKj0rWO1xzMiaT6VZMysXYGJFrGgGHP0weYEhs2g,798
28
+ secator/configs/workflows/url_crawl.yaml,sha256=h74dvDBNLuY1EHc9FMby3ydr34VH1qFJHQKUaIIYpcw,573
29
+ secator/configs/workflows/url_dirsearch.yaml,sha256=6UiQNge1WkryetOxwqzERra0xmNG0U8Y8CWKFLTyUUQ,677
30
+ secator/configs/workflows/url_fuzz.yaml,sha256=K1RkplXrgc7q2YJVv5A6B5MMkAzIIv31HInhRCKMpyI,774
31
+ secator/configs/workflows/url_nuclei.yaml,sha256=Qigz-hJzM7GeNA_UD46dThVIoqbWlBgiYb_i5fSyJiI,265
32
+ secator/configs/workflows/url_vuln.yaml,sha256=RNeS6o1wworxCznvnAgrfzVnMayD-9hFQ0-W0NbqMJY,1345
33
+ secator/configs/workflows/user_hunt.yaml,sha256=e5b-CkkjhOPE8Yh5LUh0K60GKmxTgn4s-Joo7m9jKrk,180
34
+ secator/configs/workflows/wordpress.yaml,sha256=QgBUNi8Gav_efbmczUGfzlByWsmogTmGtu1MwAlvQts,279
35
+ secator/exporters/__init__.py,sha256=2nBPOOas9Fp4nmo9pjSw3mvklZNHL8BmH88w_i-eaJc,356
36
+ secator/exporters/_base.py,sha256=-RrrwO_qp0ETLLHSta4T-zKtMbWdiEmz1Cw5mNo6USU,77
37
+ secator/exporters/csv.py,sha256=tfjaCZAD61IJt6j9Fu3lhwHJ7BTtTRB-dVe8DBcgtuI,1057
38
+ secator/exporters/gdrive.py,sha256=Wvb2kk65zqOUHwsbjw0lrLX62yX-Zn7ZZBDboneO8vM,4081
39
+ secator/exporters/json.py,sha256=DuAjs9Mxzp8yRzo1I2yeY1liWbTJd39brH5IQYz_XBM,500
40
+ secator/exporters/table.py,sha256=RHQoaFeeyeoBGNucJgrlk2KtmVqe9BGNtAAYee7xJ8Y,210
41
+ secator/exporters/txt.py,sha256=L09VS_NWAgUF1j4Pfil0q2yoMOdnXNtdymqqxxh0ni8,860
42
+ secator/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ secator/hooks/mongodb.py,sha256=rhRLtZZkhjz1GWpC2-CQpBaA2k8L7FVeR-5LkdjFdqc,7007
44
+ secator/output_types/__init__.py,sha256=uj6AXDeorECPwhwekNVGjQbGv41jHG_8udkuoc4XzW0,854
45
+ secator/output_types/_base.py,sha256=bld1ED0pN1hOvwBV2canrlKrfBCgawzWKPDH6F3jVQE,2469
46
+ secator/output_types/exploit.py,sha256=NIa0mbhm3ZTyV5kyjEvrI5QK2swMpdMCj3f1gIWcsro,1581
47
+ secator/output_types/ip.py,sha256=ySEqH3Gs7U41I1kS8olZ_p3Mk7JryEbXHLyexqlBQNA,995
48
+ secator/output_types/port.py,sha256=1ZmV4FDvwk1dvFXySnz5yIp13hbaRhnunxnETm66Os0,1607
49
+ secator/output_types/progress.py,sha256=u_-4IiECTSCJf-X_RkFOoFyb8mrff2rMcm8GGqLZ8hs,1231
50
+ secator/output_types/record.py,sha256=WnI0yvwzrO2Wt7OWciHMOuIRRLbuSOAJczdNshV7tYU,1192
51
+ secator/output_types/subdomain.py,sha256=lmCoK7_8I4FXWgl9kToRvDn3gr3E3uBTaQzFAOHbswE,1343
52
+ secator/output_types/tag.py,sha256=8AlT0VigsYP04GN8sPCTM07IlL5uMUmFgsNa9IDCoyY,1431
53
+ secator/output_types/target.py,sha256=gJWzzqhal34Cnl9oAKf0m1MSaGxRtUGdA2XbkhD_yd0,848
54
+ secator/output_types/url.py,sha256=yDozBXCuPfuybH1iX_xGmbCJPXO6Ei14C8Hp5CnzNbE,2535
55
+ secator/output_types/user_account.py,sha256=EiT2BFl2LTCdqHF1meoMEKVhjKGroyf8-JoWHPuBOTc,1378
56
+ secator/output_types/vulnerability.py,sha256=p0DTbr5w7Vv5D3dgbdnvsG5qXzqVVk4YPOPWYS1lxmM,2843
57
+ secator/runners/__init__.py,sha256=EBbOk37vkBy9p8Hhrbi-2VtM_rTwQ3b-0ggTyiD22cE,290
58
+ secator/runners/_base.py,sha256=o0FApkYRWAk6jMSOJ5FTNZTXA1qbmCqwcfehiv8nqgA,25616
59
+ secator/runners/_helpers.py,sha256=r8qo9KDwz9Jfefi0F7YVcwYdosI5bS_CMn_8eSs-8VE,3807
60
+ secator/runners/command.py,sha256=IjkHY9y_wDTazMF3dnbZt6zTe4YFXBU3x-99cShtpjw,17830
61
+ secator/runners/scan.py,sha256=H8CuxTYnkKwFbFhtybM4qnGz7Ktf3uIq7qruzzt4hvo,1650
62
+ secator/runners/task.py,sha256=o10p44ZV-4gVYMRudeWWa5CrCmoUWPQ-nyEyCNGOfy4,2711
63
+ secator/runners/workflow.py,sha256=tcX3mEZg64QBvwABtg6GyVcNjSZPsFXnp9Lb4gWJ_YY,3615
64
+ secator/serializers/__init__.py,sha256=OP5cmFl77ovgSCW_IDcZ21St2mUt5UK4QHfrsK2KvH8,248
65
+ secator/serializers/dataclass.py,sha256=g5gMT4NwndjhGcGbFuYEs07AZW_Q_m9orov_edVEGlI,792
66
+ secator/serializers/json.py,sha256=XwuSQOBwrOAs16F5HtY-Q-rAGAxfNvlq3z-Nb2gwigE,304
67
+ secator/serializers/regex.py,sha256=hGJ_1JSOv9xPtfn_umHlsjnR_alnsDFv-UmjYCC3vwU,314
68
+ secator/tasks/__init__.py,sha256=Wp2QF5QS2e_BlVygsIEFbmYPTfTg7v_Vd3LQJeXTC7I,344
69
+ secator/tasks/_categories.py,sha256=WJ-wRwvR9lsrEZeREcCGYGHvVF8cJ8IgqR2rWqZRSXU,8845
70
+ secator/tasks/cariddi.py,sha256=T_SdL4io7H1Evy91SsYpQgXDwN90aEI0LWBlanvgUZQ,3074
71
+ secator/tasks/dalfox.py,sha256=bm83J4k-I558q07OMEDj0gypWxqvSwzInWp-PZmYjSM,1677
72
+ secator/tasks/dirsearch.py,sha256=L074PEWJXtCBOZq9bS8qx3kxH3KOCIdCS1o3qh_ue7s,2452
73
+ secator/tasks/dnsx.py,sha256=6v2ttbycLLt6p-1B05P5662QNdFgS-ozrKjzN3w8hSk,1722
74
+ secator/tasks/dnsxbrute.py,sha256=_wjanOvxKsxZzuSPGiBOsd7TRrbshQgyEEZUCP0tVN4,1172
75
+ secator/tasks/feroxbuster.py,sha256=zKst1puii1H-1dyyuOLpPdWI5V6SwEvmkEQSuJLLwjE,3027
76
+ secator/tasks/ffuf.py,sha256=oTBW6u6QDpn1UDUO4cnGAN6n1sfKSK6GOWNYa76wppk,2536
77
+ secator/tasks/fping.py,sha256=P2EAPUGgwEC4Geh2zUbBPKF9bdqrlrdDg-R_TYLTFng,1127
78
+ secator/tasks/gau.py,sha256=8IOzD8N3nFLsh3HbRVh6Z4PdhtBti2ITClclzJa1Z0U,1446
79
+ secator/tasks/gf.py,sha256=N9Fbt3J3UDb0zr3fG_WW_Fk-94u5UzCL6zUT8WiCblo,892
80
+ secator/tasks/gospider.py,sha256=-zIttWmabtt5qWkxCFSeCKmC2swUhv038j3rbFReXSE,2121
81
+ secator/tasks/grype.py,sha256=D8RRNOwTmCZUyuLG21r8-lFRFtJ42km2IYo2nOeGL94,2356
82
+ secator/tasks/h8mail.py,sha256=nPfL6HYti6ihd6GrPy0LtvhLoY1Ym40MxZjOG4gfOE0,2076
83
+ secator/tasks/httpx.py,sha256=9cwO2hoRByQO48BlFkkIpYzfjXqnyDQPDvgf43HTl14,3493
84
+ secator/tasks/katana.py,sha256=oa0A-mdSQR7nO_71dOy42iaiTVTTvrJFR5E8GXsKCmg,4436
85
+ secator/tasks/maigret.py,sha256=8BKKcKi9t4mcWnm8HpLs-o_758CsF8qT8CGF9nTvFNU,2017
86
+ secator/tasks/mapcidr.py,sha256=O6zssQMMrg3JGXIhldgOD28WNATAb_wfj0svHr0DRxg,928
87
+ secator/tasks/msfconsole.py,sha256=b1qJsMeN08rO7rnWKtqWsutG48ebfr-a69GXEEi-wDQ,5923
88
+ secator/tasks/naabu.py,sha256=FgrlIuTX-p4FqXNzck2XGXRjFjPH97w04y5M2JkYo_0,1514
89
+ secator/tasks/nmap.py,sha256=IWyv_X6VNzRrsMgZrj0WWS5vD8hNQe5pyTQO14O3xNM,9385
90
+ secator/tasks/nuclei.py,sha256=eCMzirvXAheFn2QH1B8IPmA6rFqN41p9cuSZk2GcULQ,3256
91
+ secator/tasks/searchsploit.py,sha256=IYZVcUBGQVcBFe7XFJQqRK15zHwWK7wItgMi7DD_JOk,1469
92
+ secator/tasks/subfinder.py,sha256=_T7erWmfriqLeN5kquO3-L9DlR0mEjYPPC7NMzwTqwg,1033
93
+ secator/tasks/wpscan.py,sha256=9TcJvw2pydYdrsyUMOOYNzLmO47FQm00EjZ084peAFw,5439
94
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
95
+ tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
+ tests/integration/inputs.py,sha256=lno7blKvHkR8jlWn4ESANalPIY4NmLmFZ2M17vDOnGk,1472
97
+ tests/integration/outputs.py,sha256=6sQBA8MUPQMGk5EXsx4wQDu9RgjGN44I-goLv-pQKyM,58250
98
+ tests/integration/test_scans.py,sha256=XbwQZsK4MP2-lOaEwrXRbEOVbwF5pwaM8u1KLRVxMbY,2226
99
+ tests/integration/test_tasks.py,sha256=yc_9LFFgiIY8ngBEQWU-_ALYEa5YpU7BoICYGEDsX94,2919
100
+ tests/integration/test_workflows.py,sha256=oAatkoKtm82pjxtNEpVDx-ui8HwJyJJXz4NCjcOkpbs,4504
101
+ tests/performance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
+ tests/performance/loadtester.py,sha256=OJREI_D5-EkUAbXJzFXStz70qUO4uSxULzXha9DUQY4,1662
103
+ tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
+ tests/unit/test_celery.py,sha256=On_0t9C7i_VJGL9Mc7S0rAcMhc_0jmSau-b7MvDftYA,1144
105
+ tests/unit/test_scans.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
+ tests/unit/test_serializers.py,sha256=C5b2GervpnyLx8_3f2UqAl70ykPRz-icG4p_x72TbSc,1734
107
+ tests/unit/test_tasks.py,sha256=tl4MwRwa_ZUSfCCXtv304FFrtIVzIpU1z9O6hDrbi-Q,10287
108
+ tests/unit/test_workflows.py,sha256=Pec6VZHPogH7FITVeHEYkLtbseF03nqmwP5ZsN02PHs,2935
109
+ secator-0.0.1.dist-info/LICENSE,sha256=19W5Jsy4WTctNkqmZIqLRV1gTDOp01S3LDj9iSgWaJ0,2867
110
+ secator-0.0.1.dist-info/METADATA,sha256=_k4rtgq304Hx6iCSQkUq9_6UAikEN1oz0l1_jL9xGG0,8826
111
+ secator-0.0.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
112
+ secator-0.0.1.dist-info/entry_points.txt,sha256=lPgsqqUXWgiuGSfKy-se5gHdQlAXIwS_A46NYq7Acic,44
113
+ secator-0.0.1.dist-info/top_level.txt,sha256=QSZWmH2UVodHO4eymvoKxxQAFQ4VAxX6RT85-14CJIw,14
114
+ secator-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.42.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ secator = secator.cli:cli
@@ -0,0 +1,2 @@
1
+ secator
2
+ tests
tests/__init__.py ADDED
File without changes
File without changes
@@ -0,0 +1,42 @@
1
+ from secator.definitions import CIDR_RANGE, HOST, IP, ROOT_FOLDER, URL, USERNAME
2
+
3
+ INPUTS_TASKS = {
4
+ URL: f'http://localhost:3000/',
5
+ HOST: 'localhost',
6
+ USERNAME: 'ocervell',
7
+ IP: '127.0.0.1',
8
+ CIDR_RANGE: '192.168.1.0/24',
9
+ 'dalfox': 'http://testphp.vulnweb.com/listproducts.php?cat=123&artist=123&asdf=ff',
10
+ 'ffuf': 'http://localhost:3000/FUZZ',
11
+ 'gf': 'http://localhost:3000?q=test',
12
+ 'gau': 'https://danielmiessler.com/',
13
+ 'gospider': 'https://danielmiessler.com/',
14
+ 'grype': ROOT_FOLDER,
15
+ 'nuclei': 'http://localhost:3000/',
16
+ 'searchsploit': 'apache 2.4.5',
17
+ 'subfinder': 'api.github.com',
18
+ 'wpscan': 'http://localhost:8000/',
19
+ 'h8mail': 'test@test.com',
20
+ 'dnsx': 'wikipedia.org',
21
+ 'dnsxbrute': 'wikipedia.org'
22
+ }
23
+
24
+ INPUTS_WORKFLOWS = {
25
+ 'cidr_recon': '127.0.0.1/30',
26
+ 'code_scan': ROOT_FOLDER,
27
+ # 'dir_finder': 'localhost:3000', # TODO: add fixture with directories
28
+ 'host_recon': 'localhost',
29
+ 'subdomain_recon': 'api.github.com',
30
+ 'url_crawl': 'localhost:3000',
31
+ 'url_fuzz': 'http://localhost:3000',
32
+ 'url_nuclei': ['http://localhost:3000', 'http://localhost:8080'],
33
+ 'url_vuln': ['http://testphp.vulnweb.com/listproducts.php?cat=123&artist=123&asdf=ff', 'https://www.hahwul.com/?q=123'],
34
+ 'user_hunt': 'ocervell'
35
+ }
36
+
37
+ INPUTS_SCANS = {
38
+ 'domain': 'testphp.vulnweb.com',
39
+ 'host': 'localhost',
40
+ 'network': '127.0.0.1/24',
41
+ 'url': ['http://localhost:3000', 'http://localhost:8080']
42
+ }