update README

This commit is contained in:
epi052
2020-01-23 19:56:32 -06:00
parent e49b428e82
commit 04ae261d9d
3 changed files with 60 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
# Automated Reconnaissance Pipeline # Automated Reconnaissance Pipeline
![version](https://img.shields.io/badge/version-0.7.0-informational?style=for-the-badge) ![version](https://img.shields.io/badge/version-0.7.2-informational?style=for-the-badge)
![python](https://img.shields.io/badge/python-3.7-informational?style=for-the-badge) ![python](https://img.shields.io/badge/python-3.7-informational?style=for-the-badge)
![luigi](https://img.shields.io/badge/luigi-2.8.11-yellowgreen?style=for-the-badge) ![luigi](https://img.shields.io/badge/luigi-2.8.11-yellowgreen?style=for-the-badge)
![cmd2](https://img.shields.io/badge/cmd2-0.9.23-yellowgreen?style=for-the-badge) ![cmd2](https://img.shields.io/badge/cmd2-0.9.23-yellowgreen?style=for-the-badge)
@@ -72,5 +72,11 @@ and running easily.
The other option is to add `--local-scheduler` to your `scan` command from within the `recon-pipeline` shell. The other option is to add `--local-scheduler` to your `scan` command from within the `recon-pipeline` shell.
## Special Thanks
- @aringo for his help on the precursor to this tool
- @kernelsndrs for identifying a few bugs after initial launch

View File

@@ -9,6 +9,8 @@ import threading
import subprocess import subprocess
from pathlib import Path from pathlib import Path
__version__ = "0.7.2"
# fix up the PYTHONPATH so we can simply execute the shell from wherever in the filesystem # fix up the PYTHONPATH so we can simply execute the shell from wherever in the filesystem
os.environ["PYTHONPATH"] = f"{os.environ.get('PYTHONPATH')}:{str(Path(__file__).parent.resolve())}" os.environ["PYTHONPATH"] = f"{os.environ.get('PYTHONPATH')}:{str(Path(__file__).parent.resolve())}"
@@ -207,7 +209,11 @@ class ReconShell(cmd2.Cmd):
continue continue
self.async_alert( self.async_alert(
style(f"[!] {args.tool} has an unmet dependency; installing {dependency}", fg="yellow", bold=True,) style(
f"[!] {args.tool} has an unmet dependency; installing {dependency}",
fg="yellow",
bold=True,
)
) )
# install the dependency before continuing with installation # install the dependency before continuing with installation
@@ -232,11 +238,15 @@ class ReconShell(cmd2.Cmd):
if tools.get(args.tool).get("shell"): if tools.get(args.tool).get("shell"):
# go tools use subshells (cmd1 && cmd2 && cmd3 ...) during install, so need shell=True # go tools use subshells (cmd1 && cmd2 && cmd3 ...) during install, so need shell=True
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc = subprocess.Popen(
command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
else: else:
# "normal" command, split up the string as usual and run it # "normal" command, split up the string as usual and run it
proc = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc = subprocess.Popen(
shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
out, err = proc.communicate() out, err = proc.communicate()
@@ -269,5 +279,7 @@ class ReconShell(cmd2.Cmd):
if __name__ == "__main__": if __name__ == "__main__":
rs = ReconShell(persistent_history_file="~/.reconshell_history", persistent_history_length=10000) rs = ReconShell(
persistent_history_file="~/.reconshell_history", persistent_history_length=10000
)
sys.exit(rs.cmdloop()) sys.exit(rs.cmdloop())

View File

@@ -27,7 +27,11 @@ tools = {
"shell": True, "shell": True,
}, },
"luigi": {"installed": False, "dependencies": ["pipenv"], "commands": ["pipenv install luigi"]}, "luigi": {"installed": False, "dependencies": ["pipenv"], "commands": ["pipenv install luigi"]},
"pipenv": {"installed": False, "dependencies": None, "commands": ["apt-get install -y -q pipenv"],}, "pipenv": {
"installed": False,
"dependencies": None,
"commands": ["apt-get install -y -q pipenv"],
},
"masscan": { "masscan": {
"installed": False, "installed": False,
"dependencies": None, "dependencies": None,
@@ -38,7 +42,11 @@ tools = {
"rm -rf /tmp/masscan", "rm -rf /tmp/masscan",
], ],
}, },
"amass": {"installed": False, "dependencies": None, "commands": ["apt-get install -y -q amass"],}, "amass": {
"installed": False,
"dependencies": None,
"commands": ["apt-get install -y -q amass"],
},
"aquatone": { "aquatone": {
"installed": False, "installed": False,
"dependencies": None, "dependencies": None,
@@ -82,7 +90,10 @@ tools = {
"subjack": { "subjack": {
"installed": False, "installed": False,
"dependencies": ["go"], "dependencies": ["go"],
"commands": ["go get github.com/haccer/subjack", "(cd ~/go/src/github.com/haccer/subjack && go install)",], "commands": [
"go get github.com/haccer/subjack",
"(cd ~/go/src/github.com/haccer/subjack && go install)",
],
"shell": True, "shell": True,
}, },
"webanalyze": { "webanalyze": {
@@ -140,7 +151,9 @@ def get_scans():
# options for ReconShell's 'install' command # options for ReconShell's 'install' command
install_parser = cmd2.Cmd2ArgumentParser() install_parser = cmd2.Cmd2ArgumentParser()
install_parser.add_argument("tool", help="which tool to install", choices=list(tools.keys()) + ["all"]) install_parser.add_argument(
"tool", help="which tool to install", choices=list(tools.keys()) + ["all"]
)
# options for ReconShell's 'scan' command # options for ReconShell's 'scan' command
@@ -155,7 +168,9 @@ scan_parser.add_argument(
"--exempt-list", completer_method=cmd2.Cmd.path_complete, help="list of blacklisted ips/domains" "--exempt-list", completer_method=cmd2.Cmd.path_complete, help="list of blacklisted ips/domains"
) )
scan_parser.add_argument( scan_parser.add_argument(
"--results-dir", completer_method=cmd2.Cmd.path_complete, help="directory in which to save scan results", "--results-dir",
completer_method=cmd2.Cmd.path_complete,
help="directory in which to save scan results",
) )
scan_parser.add_argument( scan_parser.add_argument(
"--wordlist", completer_method=cmd2.Cmd.path_complete, help="path to wordlist used by gobuster" "--wordlist", completer_method=cmd2.Cmd.path_complete, help="path to wordlist used by gobuster"
@@ -165,19 +180,30 @@ scan_parser.add_argument(
choices_function=lambda: [x[1] for x in socket.if_nameindex()], choices_function=lambda: [x[1] for x in socket.if_nameindex()],
help="which interface masscan should use", help="which interface masscan should use",
) )
scan_parser.add_argument("--recursive", action="store_true", help="whether or not to recursively gobust") scan_parser.add_argument(
"--recursive", action="store_true", help="whether or not to recursively gobust"
)
scan_parser.add_argument("--rate", help="rate at which masscan should scan") scan_parser.add_argument("--rate", help="rate at which masscan should scan")
scan_parser.add_argument( scan_parser.add_argument(
"--top-ports", help="ports to scan as specified by nmap's list of top-ports (only meaningful to around 5000)", "--top-ports",
help="ports to scan as specified by nmap's list of top-ports (only meaningful to around 5000)",
)
scan_parser.add_argument(
"--ports", help="port specification for masscan (all ports example: 1-65535,U:1-65535)"
)
scan_parser.add_argument(
"--threads", help="number of threads for all of the threaded applications to use"
) )
scan_parser.add_argument("--ports", help="port specification for masscan (all ports example: 1-65535,U:1-65535)")
scan_parser.add_argument("--threads", help="number of threads for all of the threaded applications to use")
scan_parser.add_argument("--scan-timeout", help="scan timeout for aquatone") scan_parser.add_argument("--scan-timeout", help="scan timeout for aquatone")
scan_parser.add_argument("--proxy", help="proxy for gobuster if desired (ex. 127.0.0.1:8080)") scan_parser.add_argument("--proxy", help="proxy for gobuster if desired (ex. 127.0.0.1:8080)")
scan_parser.add_argument("--extensions", help="list of extensions for gobuster (ex. asp,html,aspx)") scan_parser.add_argument("--extensions", help="list of extensions for gobuster (ex. asp,html,aspx)")
scan_parser.add_argument( scan_parser.add_argument(
"--local-scheduler", action="store_true", help="use the local scheduler instead of the central scheduler (luigid)", "--local-scheduler",
action="store_true",
help="use the local scheduler instead of the central scheduler (luigid)",
) )
scan_parser.add_argument( scan_parser.add_argument(
"--verbose", action="store_true", help="shows debug messages from luigi, useful for troubleshooting", "--verbose",
action="store_true",
help="shows debug messages from luigi, useful for troubleshooting",
) )