secator 0.13.0__py3-none-any.whl → 0.15.0__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.
- secator/cli.py +34 -10
- secator/configs/profiles/aggressive.yaml +6 -5
- secator/configs/profiles/default.yaml +6 -7
- secator/configs/profiles/insane.yaml +8 -0
- secator/configs/profiles/paranoid.yaml +8 -0
- secator/configs/profiles/polite.yaml +8 -0
- secator/configs/profiles/sneaky.yaml +8 -0
- secator/configs/profiles/tor.yaml +5 -0
- secator/decorators.py +17 -10
- secator/definitions.py +5 -0
- secator/installer.py +10 -3
- secator/output_types/stat.py +3 -0
- secator/report.py +2 -2
- secator/runners/_base.py +32 -2
- secator/runners/command.py +2 -0
- secator/runners/scan.py +1 -0
- secator/runners/task.py +1 -0
- secator/tasks/_categories.py +11 -11
- secator/tasks/arjun.py +2 -1
- secator/tasks/bbot.py +3 -0
- secator/tasks/bup.py +2 -1
- secator/tasks/cariddi.py +2 -1
- secator/tasks/dalfox.py +2 -1
- secator/tasks/dirsearch.py +3 -1
- secator/tasks/dnsx.py +3 -1
- secator/tasks/dnsxbrute.py +2 -0
- secator/tasks/feroxbuster.py +3 -1
- secator/tasks/ffuf.py +3 -1
- secator/tasks/fping.py +3 -1
- secator/tasks/gau.py +3 -1
- secator/tasks/gf.py +2 -1
- secator/tasks/gitleaks.py +3 -1
- secator/tasks/gospider.py +2 -0
- secator/tasks/grype.py +3 -1
- secator/tasks/h8mail.py +2 -1
- secator/tasks/httpx.py +3 -1
- secator/tasks/katana.py +2 -0
- secator/tasks/maigret.py +3 -1
- secator/tasks/mapcidr.py +2 -1
- secator/tasks/msfconsole.py +4 -3
- secator/tasks/naabu.py +3 -1
- secator/tasks/nmap.py +2 -0
- secator/tasks/nuclei.py +3 -1
- secator/tasks/searchsploit.py +3 -1
- secator/tasks/subfinder.py +3 -1
- secator/tasks/testssl.py +2 -1
- secator/tasks/trivy.py +4 -1
- secator/tasks/wafw00f.py +2 -1
- secator/tasks/wpprobe.py +2 -1
- secator/tasks/wpscan.py +2 -1
- secator/template.py +1 -1
- secator/utils.py +15 -11
- secator/utils_test.py +9 -3
- {secator-0.13.0.dist-info → secator-0.15.0.dist-info}/METADATA +10 -3
- {secator-0.13.0.dist-info → secator-0.15.0.dist-info}/RECORD +58 -55
- secator/configs/profiles/stealth.yaml +0 -7
- secator/configs/workflows/port_scan.yaml +0 -39
- {secator-0.13.0.dist-info → secator-0.15.0.dist-info}/WHEEL +0 -0
- {secator-0.13.0.dist-info → secator-0.15.0.dist-info}/entry_points.txt +0 -0
- {secator-0.13.0.dist-info → secator-0.15.0.dist-info}/licenses/LICENSE +0 -0
secator/tasks/ffuf.py
CHANGED
|
@@ -7,7 +7,7 @@ from secator.definitions import (AUTO_CALIBRATION, CONTENT_LENGTH,
|
|
|
7
7
|
MATCH_WORDS, METHOD, OPT_NOT_SUPPORTED,
|
|
8
8
|
PERCENT, PROXY, RATE_LIMIT, RETRIES,
|
|
9
9
|
STATUS_CODE, THREADS, TIME, TIMEOUT,
|
|
10
|
-
USER_AGENT, WORDLIST)
|
|
10
|
+
USER_AGENT, WORDLIST, URL)
|
|
11
11
|
from secator.output_types import Progress, Url
|
|
12
12
|
from secator.serializers import JSONSerializer, RegexSerializer
|
|
13
13
|
from secator.tasks._categories import HttpFuzzer
|
|
@@ -19,6 +19,8 @@ FFUF_PROGRESS_REGEX = r':: Progress: \[(?P<count>\d+)/(?P<total>\d+)\] :: Job \[
|
|
|
19
19
|
class ffuf(HttpFuzzer):
|
|
20
20
|
"""Fast web fuzzer written in Go."""
|
|
21
21
|
cmd = 'ffuf -noninteractive'
|
|
22
|
+
tags = ['url', 'fuzz']
|
|
23
|
+
input_types = [URL]
|
|
22
24
|
input_flag = '-u'
|
|
23
25
|
input_chunk_size = 1
|
|
24
26
|
file_flag = None
|
secator/tasks/fping.py
CHANGED
|
@@ -11,8 +11,10 @@ from secator.tasks._categories import ReconIp
|
|
|
11
11
|
class fping(ReconIp):
|
|
12
12
|
"""Send ICMP echo probes to network hosts, similar to ping, but much better."""
|
|
13
13
|
cmd = 'fping -a'
|
|
14
|
+
tags = ['ip', 'recon']
|
|
14
15
|
file_flag = '-f'
|
|
15
16
|
input_flag = None
|
|
17
|
+
input_types = [IP]
|
|
16
18
|
opt_prefix = '--'
|
|
17
19
|
opt_key_map = {
|
|
18
20
|
DELAY: 'period',
|
|
@@ -26,7 +28,7 @@ class fping(ReconIp):
|
|
|
26
28
|
DELAY: lambda x: x * 1000, # convert s to ms
|
|
27
29
|
TIMEOUT: lambda x: x * 1000 # convert s to ms
|
|
28
30
|
}
|
|
29
|
-
|
|
31
|
+
input_types = [IP]
|
|
30
32
|
output_types = [Ip]
|
|
31
33
|
install_pre = {'*': ['fping']}
|
|
32
34
|
ignore_return_code = True
|
secator/tasks/gau.py
CHANGED
|
@@ -4,7 +4,7 @@ from secator.definitions import (DELAY, DEPTH, FILTER_CODES, FILTER_REGEX,
|
|
|
4
4
|
HEADER, MATCH_CODES, MATCH_REGEX, MATCH_SIZE,
|
|
5
5
|
MATCH_WORDS, METHOD, OPT_NOT_SUPPORTED,
|
|
6
6
|
OPT_PIPE_INPUT, PROXY, RATE_LIMIT, RETRIES,
|
|
7
|
-
THREADS, TIMEOUT, USER_AGENT)
|
|
7
|
+
THREADS, TIMEOUT, USER_AGENT, URL)
|
|
8
8
|
from secator.serializers import JSONSerializer
|
|
9
9
|
from secator.tasks._categories import HttpCrawler
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from secator.tasks._categories import HttpCrawler
|
|
|
13
13
|
class gau(HttpCrawler):
|
|
14
14
|
"""Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, Common Crawl, and URLScan."""
|
|
15
15
|
cmd = 'gau'
|
|
16
|
+
tags = ['pattern', 'scan']
|
|
17
|
+
input_types = [URL]
|
|
16
18
|
file_flag = OPT_PIPE_INPUT
|
|
17
19
|
json_flag = '--json'
|
|
18
20
|
opt_prefix = '--'
|
secator/tasks/gf.py
CHANGED
|
@@ -8,6 +8,7 @@ from secator.tasks._categories import Tagger
|
|
|
8
8
|
class gf(Tagger):
|
|
9
9
|
"""Wrapper around grep, to help you grep for things."""
|
|
10
10
|
cmd = 'gf'
|
|
11
|
+
tags = ['pattern', 'scan']
|
|
11
12
|
file_flag = OPT_PIPE_INPUT
|
|
12
13
|
input_flag = OPT_PIPE_INPUT
|
|
13
14
|
version_flag = OPT_NOT_SUPPORTED
|
|
@@ -17,7 +18,7 @@ class gf(Tagger):
|
|
|
17
18
|
opt_key_map = {
|
|
18
19
|
'pattern': ''
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
input_types = [URL]
|
|
21
22
|
install_cmd = (
|
|
22
23
|
'go install -v github.com/tomnomnom/gf@latest && '
|
|
23
24
|
'git clone https://github.com/1ndianl33t/Gf-Patterns $HOME/.gf || true'
|
secator/tasks/gitleaks.py
CHANGED
|
@@ -5,7 +5,7 @@ import yaml
|
|
|
5
5
|
from secator.config import CONFIG
|
|
6
6
|
from secator.decorators import task
|
|
7
7
|
from secator.runners import Command
|
|
8
|
-
from secator.definitions import (OUTPUT_PATH)
|
|
8
|
+
from secator.definitions import (OUTPUT_PATH, PATH, GIT_REPOSITORY)
|
|
9
9
|
from secator.utils import caml_to_snake
|
|
10
10
|
from secator.output_types import Tag, Info, Error
|
|
11
11
|
|
|
@@ -14,6 +14,8 @@ from secator.output_types import Tag, Info, Error
|
|
|
14
14
|
class gitleaks(Command):
|
|
15
15
|
"""Tool for detecting secrets like passwords, API keys, and tokens in git repos, files, and stdin."""
|
|
16
16
|
cmd = 'gitleaks'
|
|
17
|
+
tags = ['secret', 'scan']
|
|
18
|
+
input_types = [PATH, GIT_REPOSITORY]
|
|
17
19
|
input_flag = None
|
|
18
20
|
json_flag = '-f json'
|
|
19
21
|
opt_prefix = '--'
|
secator/tasks/gospider.py
CHANGED
|
@@ -16,8 +16,10 @@ from secator.tasks._categories import HttpCrawler
|
|
|
16
16
|
class gospider(HttpCrawler):
|
|
17
17
|
"""Fast web spider written in Go."""
|
|
18
18
|
cmd = 'gospider'
|
|
19
|
+
tags = ['url', 'crawl']
|
|
19
20
|
file_flag = '-S'
|
|
20
21
|
input_flag = '-s'
|
|
22
|
+
input_types = [URL]
|
|
21
23
|
json_flag = '--json'
|
|
22
24
|
opt_prefix = '--'
|
|
23
25
|
opt_key_map = {
|
secator/tasks/grype.py
CHANGED
|
@@ -2,7 +2,7 @@ from secator.config import CONFIG
|
|
|
2
2
|
from secator.decorators import task
|
|
3
3
|
from secator.definitions import (DELAY, FOLLOW_REDIRECT, HEADER,
|
|
4
4
|
OPT_NOT_SUPPORTED, PROXY, RATE_LIMIT, RETRIES,
|
|
5
|
-
THREADS, TIMEOUT, USER_AGENT)
|
|
5
|
+
THREADS, TIMEOUT, USER_AGENT, PATH, DOCKER_IMAGE)
|
|
6
6
|
from secator.output_types import Vulnerability
|
|
7
7
|
from secator.tasks._categories import VulnCode
|
|
8
8
|
|
|
@@ -11,6 +11,8 @@ from secator.tasks._categories import VulnCode
|
|
|
11
11
|
class grype(VulnCode):
|
|
12
12
|
"""Vulnerability scanner for container images and filesystems."""
|
|
13
13
|
cmd = 'grype --quiet'
|
|
14
|
+
tags = ['vuln', 'scan']
|
|
15
|
+
input_types = [PATH, DOCKER_IMAGE]
|
|
14
16
|
input_flag = ''
|
|
15
17
|
file_flag = OPT_NOT_SUPPORTED
|
|
16
18
|
json_flag = None
|
secator/tasks/h8mail.py
CHANGED
|
@@ -11,9 +11,10 @@ from secator.output_types import UserAccount, Info, Error
|
|
|
11
11
|
class h8mail(OSInt):
|
|
12
12
|
"""Email information and password lookup tool."""
|
|
13
13
|
cmd = 'h8mail'
|
|
14
|
+
tags = ['user', 'recon', 'email']
|
|
14
15
|
json_flag = '--json '
|
|
15
16
|
input_flag = '--targets'
|
|
16
|
-
|
|
17
|
+
input_types = [EMAIL]
|
|
17
18
|
file_flag = '-domain'
|
|
18
19
|
version_flag = '--help'
|
|
19
20
|
opt_prefix = '--'
|
secator/tasks/httpx.py
CHANGED
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
from secator.decorators import task
|
|
4
4
|
from secator.definitions import (DELAY, DEPTH, FILTER_CODES, FILTER_REGEX, FILTER_SIZE, FILTER_WORDS, FOLLOW_REDIRECT,
|
|
5
5
|
HEADER, MATCH_CODES, MATCH_REGEX, MATCH_SIZE, MATCH_WORDS, METHOD, OPT_NOT_SUPPORTED,
|
|
6
|
-
PROXY, RATE_LIMIT, RETRIES, THREADS, TIMEOUT, URL, USER_AGENT)
|
|
6
|
+
PROXY, RATE_LIMIT, RETRIES, THREADS, TIMEOUT, URL, USER_AGENT, HOST, IP)
|
|
7
7
|
from secator.config import CONFIG
|
|
8
8
|
from secator.output_types import Url, Subdomain
|
|
9
9
|
from secator.serializers import JSONSerializer
|
|
@@ -15,8 +15,10 @@ from secator.utils import (sanitize_url, extract_domain_info, extract_subdomains
|
|
|
15
15
|
class httpx(Http):
|
|
16
16
|
"""Fast and multi-purpose HTTP toolkit."""
|
|
17
17
|
cmd = 'httpx'
|
|
18
|
+
tags = ['url', 'probe']
|
|
18
19
|
file_flag = '-l'
|
|
19
20
|
input_flag = '-u'
|
|
21
|
+
input_types = [HOST, IP, URL]
|
|
20
22
|
json_flag = '-json'
|
|
21
23
|
opts = {
|
|
22
24
|
# 'silent': {'is_flag': True, 'default': False, 'help': 'Silent mode'},
|
secator/tasks/katana.py
CHANGED
|
@@ -17,8 +17,10 @@ from secator.tasks._categories import HttpCrawler
|
|
|
17
17
|
class katana(HttpCrawler):
|
|
18
18
|
"""Next-generation crawling and spidering framework."""
|
|
19
19
|
cmd = 'katana'
|
|
20
|
+
tags = ['url', 'crawl']
|
|
20
21
|
file_flag = '-list'
|
|
21
22
|
input_flag = '-u'
|
|
23
|
+
input_types = [URL]
|
|
22
24
|
json_flag = '-jsonl'
|
|
23
25
|
opts = {
|
|
24
26
|
'headless': {'is_flag': True, 'short': 'hl', 'help': 'Headless mode'},
|
secator/tasks/maigret.py
CHANGED
|
@@ -17,8 +17,10 @@ logger = logging.getLogger(__name__)
|
|
|
17
17
|
class maigret(ReconUser):
|
|
18
18
|
"""Collect a dossier on a person by username."""
|
|
19
19
|
cmd = 'maigret'
|
|
20
|
+
tags = ['user', 'recon', 'username']
|
|
20
21
|
file_flag = None
|
|
21
22
|
input_flag = None
|
|
23
|
+
input_types = [USERNAME]
|
|
22
24
|
json_flag = '--json ndjson'
|
|
23
25
|
opt_prefix = '--'
|
|
24
26
|
opts = {
|
|
@@ -32,7 +34,7 @@ class maigret(ReconUser):
|
|
|
32
34
|
TIMEOUT: 'timeout',
|
|
33
35
|
THREADS: OPT_NOT_SUPPORTED
|
|
34
36
|
}
|
|
35
|
-
|
|
37
|
+
input_types = [USERNAME]
|
|
36
38
|
output_types = [UserAccount]
|
|
37
39
|
output_map = {
|
|
38
40
|
UserAccount: {
|
secator/tasks/mapcidr.py
CHANGED
|
@@ -11,6 +11,7 @@ from secator.tasks._categories import ReconIp
|
|
|
11
11
|
class mapcidr(ReconIp):
|
|
12
12
|
"""Utility program to perform multiple operations for a given subnet/cidr ranges."""
|
|
13
13
|
cmd = 'mapcidr'
|
|
14
|
+
tags = ['ip', 'recon']
|
|
14
15
|
input_flag = '-cidr'
|
|
15
16
|
file_flag = '-cl'
|
|
16
17
|
install_pre = {
|
|
@@ -19,7 +20,7 @@ class mapcidr(ReconIp):
|
|
|
19
20
|
install_version = 'v1.1.34'
|
|
20
21
|
install_cmd = 'go install -v github.com/projectdiscovery/mapcidr/cmd/mapcidr@[install_version]'
|
|
21
22
|
install_github_handle = 'projectdiscovery/mapcidr'
|
|
22
|
-
|
|
23
|
+
input_types = [CIDR_RANGE]
|
|
23
24
|
output_types = [Ip]
|
|
24
25
|
opt_key_map = {
|
|
25
26
|
THREADS: OPT_NOT_SUPPORTED,
|
secator/tasks/msfconsole.py
CHANGED
|
@@ -6,8 +6,8 @@ from rich.panel import Panel
|
|
|
6
6
|
|
|
7
7
|
from secator.config import CONFIG
|
|
8
8
|
from secator.decorators import task
|
|
9
|
-
from secator.definitions import (DELAY, FOLLOW_REDIRECT, HEADER, HOST, OPT_NOT_SUPPORTED, PROXY, RATE_LIMIT,
|
|
10
|
-
THREADS, TIMEOUT, USER_AGENT)
|
|
9
|
+
from secator.definitions import (DELAY, FOLLOW_REDIRECT, HEADER, HOST, IP, OPT_NOT_SUPPORTED, PROXY, RATE_LIMIT,
|
|
10
|
+
RETRIES, THREADS, TIMEOUT, USER_AGENT, URL)
|
|
11
11
|
from secator.tasks._categories import VulnMulti
|
|
12
12
|
from secator.utils import get_file_timestamp
|
|
13
13
|
|
|
@@ -18,8 +18,9 @@ logger = logging.getLogger(__name__)
|
|
|
18
18
|
class msfconsole(VulnMulti):
|
|
19
19
|
"""CLI to access and work with the Metasploit Framework."""
|
|
20
20
|
cmd = 'msfconsole --quiet'
|
|
21
|
+
tags = ['exploit', 'attack']
|
|
21
22
|
version_flag = OPT_NOT_SUPPORTED
|
|
22
|
-
|
|
23
|
+
input_types = [HOST, IP, URL]
|
|
23
24
|
input_chunk_size = 1
|
|
24
25
|
output_types = []
|
|
25
26
|
opt_prefix = '--'
|
secator/tasks/naabu.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from secator.decorators import task
|
|
2
|
-
from secator.definitions import (DELAY, HOST, OPT_NOT_SUPPORTED, PORT, PORTS,
|
|
2
|
+
from secator.definitions import (DELAY, HOST, IP, OPT_NOT_SUPPORTED, PORT, PORTS,
|
|
3
3
|
PROXY, RATE_LIMIT, RETRIES, STATE, THREADS,
|
|
4
4
|
TIMEOUT, TOP_PORTS)
|
|
5
5
|
from secator.output_types import Port
|
|
@@ -11,7 +11,9 @@ from secator.tasks._categories import ReconPort
|
|
|
11
11
|
class naabu(ReconPort):
|
|
12
12
|
"""Port scanning tool written in Go."""
|
|
13
13
|
cmd = 'naabu'
|
|
14
|
+
tags = ['port', 'scan']
|
|
14
15
|
input_flag = '-host'
|
|
16
|
+
input_types = [HOST, IP]
|
|
15
17
|
file_flag = '-list'
|
|
16
18
|
json_flag = '-json'
|
|
17
19
|
opts = {
|
secator/tasks/nmap.py
CHANGED
|
@@ -24,7 +24,9 @@ logger = logging.getLogger(__name__)
|
|
|
24
24
|
class nmap(VulnMulti):
|
|
25
25
|
"""Network Mapper is a free and open source utility for network discovery and security auditing."""
|
|
26
26
|
cmd = 'nmap'
|
|
27
|
+
tags = ['port', 'scan']
|
|
27
28
|
input_flag = None
|
|
29
|
+
input_types = [HOST, IP]
|
|
28
30
|
input_chunk_size = 1
|
|
29
31
|
file_flag = '-iL'
|
|
30
32
|
opt_prefix = '--'
|
secator/tasks/nuclei.py
CHANGED
|
@@ -4,7 +4,7 @@ from secator.definitions import (CONFIDENCE, CVSS_SCORE, DELAY, DESCRIPTION,
|
|
|
4
4
|
MATCHED_AT, NAME, OPT_NOT_SUPPORTED, PERCENT,
|
|
5
5
|
PROVIDER, PROXY, RATE_LIMIT, REFERENCES,
|
|
6
6
|
RETRIES, SEVERITY, TAGS, THREADS, TIMEOUT,
|
|
7
|
-
USER_AGENT)
|
|
7
|
+
USER_AGENT, HOST, URL)
|
|
8
8
|
from secator.output_types import Progress, Vulnerability
|
|
9
9
|
from secator.serializers import JSONSerializer
|
|
10
10
|
from secator.tasks._categories import VulnMulti
|
|
@@ -14,6 +14,8 @@ from secator.tasks._categories import VulnMulti
|
|
|
14
14
|
class nuclei(VulnMulti):
|
|
15
15
|
"""Fast and customisable vulnerability scanner based on simple YAML based DSL."""
|
|
16
16
|
cmd = 'nuclei'
|
|
17
|
+
tags = ['vuln', 'scan']
|
|
18
|
+
input_types = [HOST, IP, URL]
|
|
17
19
|
file_flag = '-l'
|
|
18
20
|
input_flag = '-u'
|
|
19
21
|
json_flag = '-jsonl'
|
secator/tasks/searchsploit.py
CHANGED
|
@@ -3,7 +3,7 @@ import re
|
|
|
3
3
|
from secator.config import CONFIG
|
|
4
4
|
from secator.decorators import task
|
|
5
5
|
from secator.definitions import (CVES, EXTRA_DATA, ID, MATCHED_AT, NAME,
|
|
6
|
-
PROVIDER, REFERENCE, TAGS, OPT_NOT_SUPPORTED)
|
|
6
|
+
PROVIDER, REFERENCE, TAGS, TECHNOLOGY, OPT_NOT_SUPPORTED)
|
|
7
7
|
from secator.output_types import Exploit
|
|
8
8
|
from secator.runners import Command
|
|
9
9
|
from secator.serializers import JSONSerializer
|
|
@@ -16,7 +16,9 @@ SEARCHSPLOIT_TITLE_REGEX = re.compile(r'^((?:[a-zA-Z\-_!\.()]+\d?\s?)+)\.?\s*(.*
|
|
|
16
16
|
class searchsploit(Command):
|
|
17
17
|
"""Exploit searcher based on ExploitDB."""
|
|
18
18
|
cmd = 'searchsploit'
|
|
19
|
+
tags = ['exploit', 'recon']
|
|
19
20
|
input_flag = None
|
|
21
|
+
input_types = [TECHNOLOGY]
|
|
20
22
|
json_flag = '--json'
|
|
21
23
|
version_flag = OPT_NOT_SUPPORTED
|
|
22
24
|
opts = {
|
secator/tasks/subfinder.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from secator.decorators import task
|
|
2
|
-
from secator.definitions import (DELAY, DOMAIN, OPT_NOT_SUPPORTED, PROXY,
|
|
2
|
+
from secator.definitions import (DELAY, DOMAIN, HOST, OPT_NOT_SUPPORTED, PROXY,
|
|
3
3
|
RATE_LIMIT, RETRIES, THREADS, TIMEOUT)
|
|
4
4
|
from secator.output_types import Subdomain
|
|
5
5
|
from secator.serializers import JSONSerializer
|
|
@@ -10,6 +10,8 @@ from secator.tasks._categories import ReconDns
|
|
|
10
10
|
class subfinder(ReconDns):
|
|
11
11
|
"""Fast passive subdomain enumeration tool."""
|
|
12
12
|
cmd = 'subfinder -cs'
|
|
13
|
+
tags = ['dns', 'recon']
|
|
14
|
+
input_types = [HOST]
|
|
13
15
|
file_flag = '-dL'
|
|
14
16
|
input_flag = '-d'
|
|
15
17
|
json_flag = '-json'
|
secator/tasks/testssl.py
CHANGED
|
@@ -15,7 +15,8 @@ from secator.tasks._categories import Command, OPTS
|
|
|
15
15
|
class testssl(Command):
|
|
16
16
|
"""SSL/TLS security scanner, including ciphers, protocols and cryptographic flaws."""
|
|
17
17
|
cmd = 'testssl.sh'
|
|
18
|
-
|
|
18
|
+
tags = ['dns', 'recon', 'tls']
|
|
19
|
+
input_types = [HOST]
|
|
19
20
|
input_flag = None
|
|
20
21
|
file_flag = '-iL'
|
|
21
22
|
file_eof_newline = True
|
secator/tasks/trivy.py
CHANGED
|
@@ -5,7 +5,8 @@ import yaml
|
|
|
5
5
|
from secator.config import CONFIG
|
|
6
6
|
from secator.decorators import task
|
|
7
7
|
from secator.definitions import (THREADS, OUTPUT_PATH, OPT_NOT_SUPPORTED, HEADER, DELAY, FOLLOW_REDIRECT,
|
|
8
|
-
PROXY, RATE_LIMIT, RETRIES, TIMEOUT,
|
|
8
|
+
DOCKER_IMAGE, PATH, GIT_REPOSITORY, PROXY, RATE_LIMIT, RETRIES, TIMEOUT,
|
|
9
|
+
USER_AGENT)
|
|
9
10
|
from secator.tasks._categories import Vuln
|
|
10
11
|
from secator.output_types import Vulnerability, Tag, Info, Error
|
|
11
12
|
|
|
@@ -14,7 +15,9 @@ from secator.output_types import Vulnerability, Tag, Info, Error
|
|
|
14
15
|
class trivy(Vuln):
|
|
15
16
|
"""Comprehensive and versatile security scanner."""
|
|
16
17
|
cmd = 'trivy'
|
|
18
|
+
tags = ['vuln', 'scan']
|
|
17
19
|
input_flag = None
|
|
20
|
+
input_types = [DOCKER_IMAGE, PATH, GIT_REPOSITORY]
|
|
18
21
|
json_flag = '-f json'
|
|
19
22
|
opts = {
|
|
20
23
|
"mode": {"type": click.Choice(['image', 'fs', 'repo']), 'default': 'image', 'help': 'Trivy mode', 'required': True} # noqa: E501
|
secator/tasks/wafw00f.py
CHANGED
|
@@ -12,7 +12,8 @@ from secator.tasks._categories import OPTS
|
|
|
12
12
|
class wafw00f(Command):
|
|
13
13
|
"""Web Application Firewall Fingerprinting tool."""
|
|
14
14
|
cmd = 'wafw00f'
|
|
15
|
-
|
|
15
|
+
tags = ['waf', 'scan']
|
|
16
|
+
input_types = [URL]
|
|
16
17
|
input_flag = None
|
|
17
18
|
file_flag = '-i'
|
|
18
19
|
json_flag = '-f json'
|
secator/tasks/wpprobe.py
CHANGED
|
@@ -12,9 +12,10 @@ from secator.tasks._categories import OPTS
|
|
|
12
12
|
class wpprobe(Command):
|
|
13
13
|
"""Fast wordpress plugin enumeration tool."""
|
|
14
14
|
cmd = 'wpprobe'
|
|
15
|
+
tags = ['vuln', 'scan', 'wordpress']
|
|
15
16
|
file_flag = '-f'
|
|
16
17
|
input_flag = '-u'
|
|
17
|
-
|
|
18
|
+
input_types = [URL]
|
|
18
19
|
opt_prefix = '-'
|
|
19
20
|
opts = {
|
|
20
21
|
'mode': {'type': click.Choice(['scan', 'update', 'update-db']), 'default': 'scan', 'help': 'WPProbe mode', 'required': True, 'internal': True}, # noqa: E501
|
secator/tasks/wpscan.py
CHANGED
|
@@ -17,9 +17,10 @@ from secator.tasks._categories import VulnHttp
|
|
|
17
17
|
class wpscan(VulnHttp):
|
|
18
18
|
"""Wordpress security scanner."""
|
|
19
19
|
cmd = 'wpscan --force --verbose'
|
|
20
|
+
tags = ['vuln', 'scan', 'wordpress']
|
|
20
21
|
file_flag = None
|
|
21
22
|
input_flag = '--url'
|
|
22
|
-
|
|
23
|
+
input_types = [URL]
|
|
23
24
|
json_flag = '-f json'
|
|
24
25
|
opt_prefix = '--'
|
|
25
26
|
opts = {
|
secator/template.py
CHANGED
|
@@ -64,7 +64,7 @@ class TemplateLoader(DotMap):
|
|
|
64
64
|
_path = config.pop('_path', None)
|
|
65
65
|
if _path:
|
|
66
66
|
console.print(f'[italic green]{_path}[/]\n')
|
|
67
|
-
yaml_str = yaml.dump(config, indent=4)
|
|
67
|
+
yaml_str = yaml.dump(config, indent=4, sort_keys=False)
|
|
68
68
|
from rich.syntax import Syntax
|
|
69
69
|
yaml_highlight = Syntax(yaml_str, 'yaml', line_numbers=True)
|
|
70
70
|
console.print(yaml_highlight)
|
secator/utils.py
CHANGED
|
@@ -164,7 +164,8 @@ def discover_internal_tasks():
|
|
|
164
164
|
# Sort task_classes by category
|
|
165
165
|
task_classes = sorted(
|
|
166
166
|
task_classes,
|
|
167
|
-
key=lambda x: (get_command_category(x), x.__name__)
|
|
167
|
+
# key=lambda x: (get_command_category(x), x.__name__)
|
|
168
|
+
key=lambda x: x.__name__)
|
|
168
169
|
|
|
169
170
|
return task_classes
|
|
170
171
|
|
|
@@ -262,9 +263,9 @@ def get_command_category(command):
|
|
|
262
263
|
Returns:
|
|
263
264
|
str: Command category.
|
|
264
265
|
"""
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return
|
|
266
|
+
if not command.tags:
|
|
267
|
+
return 'misc'
|
|
268
|
+
return '/'.join(command.tags)
|
|
268
269
|
|
|
269
270
|
|
|
270
271
|
def merge_opts(*options):
|
|
@@ -309,6 +310,8 @@ def pluralize(word):
|
|
|
309
310
|
"""
|
|
310
311
|
if word.endswith('y'):
|
|
311
312
|
return word.rstrip('y') + 'ies'
|
|
313
|
+
elif word.endswith('s'):
|
|
314
|
+
return word + 'es'
|
|
312
315
|
return f'{word}s'
|
|
313
316
|
|
|
314
317
|
|
|
@@ -418,15 +421,16 @@ def format_object(obj, obj_breaklines=False):
|
|
|
418
421
|
|
|
419
422
|
def debug(msg, sub='', id='', obj=None, lazy=None, obj_after=True, obj_breaklines=False, verbose=False):
|
|
420
423
|
"""Print debug log if DEBUG >= level."""
|
|
421
|
-
if not DEBUG_COMPONENT
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
if sub:
|
|
425
|
-
if verbose and sub not in DEBUG_COMPONENT:
|
|
426
|
-
sub = f'debug.{sub}'
|
|
427
|
-
if not any(sub.startswith(s) for s in DEBUG_COMPONENT):
|
|
424
|
+
if not DEBUG_COMPONENT == ['all']:
|
|
425
|
+
if not DEBUG_COMPONENT or DEBUG_COMPONENT == [""]:
|
|
428
426
|
return
|
|
429
427
|
|
|
428
|
+
if sub:
|
|
429
|
+
if verbose and sub not in DEBUG_COMPONENT:
|
|
430
|
+
sub = f'debug.{sub}'
|
|
431
|
+
if not any(sub.startswith(s) for s in DEBUG_COMPONENT):
|
|
432
|
+
return
|
|
433
|
+
|
|
430
434
|
if lazy:
|
|
431
435
|
msg = lazy(msg)
|
|
432
436
|
|
secator/utils_test.py
CHANGED
|
@@ -9,7 +9,8 @@ from fp.fp import FreeProxy
|
|
|
9
9
|
from secator.definitions import (CIDR_RANGE, DELAY, DEPTH, EMAIL,
|
|
10
10
|
FOLLOW_REDIRECT, HEADER, HOST, IP, MATCH_CODES,
|
|
11
11
|
METHOD, PROXY, RATE_LIMIT, RETRIES,
|
|
12
|
-
THREADS, TIMEOUT, URL, USER_AGENT, USERNAME
|
|
12
|
+
THREADS, TIMEOUT, URL, USER_AGENT, USERNAME, PATH,
|
|
13
|
+
DOCKER_IMAGE, GIT_REPOSITORY)
|
|
13
14
|
from secator.cli import ALL_WORKFLOWS, ALL_TASKS, ALL_SCANS
|
|
14
15
|
from secator.output_types import EXECUTION_TYPES, STAT_TYPES
|
|
15
16
|
from secator.runners import Command
|
|
@@ -61,7 +62,9 @@ INPUTS_TASKS = {
|
|
|
61
62
|
IP: '192.168.1.23',
|
|
62
63
|
CIDR_RANGE: '192.168.1.0/24',
|
|
63
64
|
EMAIL: 'fake@fake.com',
|
|
64
|
-
|
|
65
|
+
PATH: '.',
|
|
66
|
+
DOCKER_IMAGE: 'redis:latest',
|
|
67
|
+
GIT_REPOSITORY: 'https://github.com/freelabz/secator',
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
#---------------------#
|
|
@@ -165,7 +168,7 @@ class CommandOutputTester: # Mixin for unittest.TestCase
|
|
|
165
168
|
expected_status='SUCCESS',
|
|
166
169
|
empty_results_allowed=False):
|
|
167
170
|
|
|
168
|
-
console.print(f'[dim]Testing {runner.config.type} {runner.name} ...[/]', end='')
|
|
171
|
+
console.print(f'\t[dim]Testing {runner.config.type} {runner.name} ...[/]', end='')
|
|
169
172
|
debug('', sub='unittest')
|
|
170
173
|
|
|
171
174
|
if not runner.inputs:
|
|
@@ -176,6 +179,8 @@ class CommandOutputTester: # Mixin for unittest.TestCase
|
|
|
176
179
|
console.print('[dim gold3] (no outputs defined).[/]', end='')
|
|
177
180
|
|
|
178
181
|
try:
|
|
182
|
+
debug(f'{runner.name} starting command: {runner.cmd}', sub='unittest') if isinstance(runner, Command) else None
|
|
183
|
+
|
|
179
184
|
# Run runner
|
|
180
185
|
results = runner.run()
|
|
181
186
|
for result in results:
|
|
@@ -202,6 +207,7 @@ class CommandOutputTester: # Mixin for unittest.TestCase
|
|
|
202
207
|
# Check results
|
|
203
208
|
for item in results:
|
|
204
209
|
debug(f'{runner.name} yielded {repr(item)}', sub='unittest')
|
|
210
|
+
debug(f'{runner.name} yielded (JSON): {json.dumps(item.toDict(), default=str)}', sub='unittest.dict', verbose=True)
|
|
205
211
|
|
|
206
212
|
if expected_output_types:
|
|
207
213
|
debug(f'{runner.name} item should have an output type in {[_._type for _ in expected_output_types]}', sub='unittest') # noqa: E501
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: secator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: The pentester's swiss knife.
|
|
5
5
|
Project-URL: Homepage, https://github.com/freelabz/secator
|
|
6
6
|
Project-URL: Issues, https://github.com/freelabz/secator/issues
|
|
@@ -82,7 +82,7 @@ Description-Content-Type: text/markdown
|
|
|
82
82
|
<a href="https://pypi.org/project/secator/"><img src="https://img.shields.io/pypi/dm/secator"></a>
|
|
83
83
|
<a href="https://twitter.com/freelabz"><img src="https://img.shields.io/twitter/follow/freelabz.svg?logo=twitter"></a>
|
|
84
84
|
<a href="https://youtube.com/@FreeLabz"><img src="https://img.shields.io/youtube/channel/subscribers/UCu-F6SpU0h2NP18zBBP04cw?style=social&label=Subscribe%20%40FreeLabz"></a>
|
|
85
|
-
|
|
85
|
+
<a href="https://discord.gg/nyHjC2aTrq"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a>
|
|
86
86
|
</p>
|
|
87
87
|
|
|
88
88
|
|
|
@@ -91,7 +91,8 @@ Description-Content-Type: text/markdown
|
|
|
91
91
|
<a href="#supported-commands">Supported commands</a> •
|
|
92
92
|
<a href="#install-secator">Installation</a> •
|
|
93
93
|
<a href="#usage">Usage</a> •
|
|
94
|
-
<a href="https://docs.freelabz.com">Documentation</a>
|
|
94
|
+
<a href="https://docs.freelabz.com">Documentation</a> •
|
|
95
|
+
<a href="https://discord.gg/nyHjC2aTrq">Join us on Discord !</a>
|
|
95
96
|
</p>
|
|
96
97
|
|
|
97
98
|
`secator` is a task and workflow runner used for security assessments. It supports dozens of well-known security tools
|
|
@@ -122,6 +123,11 @@ and it is designed to improve productivity for pentesters and security researche
|
|
|
122
123
|
|
|
123
124
|
| Name | Description | Category |
|
|
124
125
|
|---------------------------------------------------------------|--------------------------------------------------------------------------------|-----------------|
|
|
126
|
+
| [arjun](https://github.com/s0md3v/Arjun) | HTTP Parameter Discovery Suite. | |
|
|
127
|
+
| [gitleaks](https://github.com/gitleaks/gitleaks) | Tool for detecting secrets like passwords, API keys, tokens, etc. | |
|
|
128
|
+
| [testssl](https://github.com/testssl/testssl.sh) | SSL/TLS security scanner, including ciphers, protocols and cryptographic flaws.| |
|
|
129
|
+
| [wafw00f](https://github.com/EnableSecurity/wafw00f) | Web Application Firewall Fingerprinting tool. | |
|
|
130
|
+
| [wpprobe](https://github.com/Chocapikk/wpprobe) | Fast wordpress plugin enumeration tool. | |
|
|
125
131
|
| [httpx](https://github.com/projectdiscovery/httpx) | Fast HTTP prober. | `http` |
|
|
126
132
|
| [cariddi](https://github.com/edoardottt/cariddi) | Fast crawler and endpoint secrets / api keys / tokens matcher. | `http/crawler` |
|
|
127
133
|
| [gau](https://github.com/lc/gau) | Offline URL crawler (Alien Vault, The Wayback Machine, Common Crawl, URLScan). | `http/crawler` |
|
|
@@ -139,6 +145,7 @@ and it is designed to improve productivity for pentesters and security researche
|
|
|
139
145
|
| [naabu](https://github.com/projectdiscovery/naabu) | Fast port discovery tool. | `recon/port` |
|
|
140
146
|
| [maigret](https://github.com/soxoj/maigret) | Hunt for user accounts across many websites. | `recon/user` |
|
|
141
147
|
| [gf](https://github.com/tomnomnom/gf) | A wrapper around grep to avoid typing common patterns. | `tagger` |
|
|
148
|
+
| [trivy](https://github.com/aquasecurity/trivy) | Comprehensive and versatile security scanner. | `vuln` |
|
|
142
149
|
| [grype](https://github.com/anchore/grype) | A vulnerability scanner for container images and filesystems. | `vuln/code` |
|
|
143
150
|
| [dalfox](https://github.com/hahwul/dalfox) | Powerful XSS scanning tool and parameter analyzer. | `vuln/http` |
|
|
144
151
|
| [msfconsole](https://docs.rapid7.com/metasploit/msf-overview) | CLI to access and work with the Metasploit Framework. | `vuln/http` |
|