-
Notifications
You must be signed in to change notification settings - Fork 0
2. Installation
you can try Autorecon with one click by using Google Cloud Console
If you don't have a Kali instance, you can quickly install AutoRecon using the Dockerfile in the repository. Simply download the Dockerfile, and run the following command from the same directory:
sudo docker build -t tib3rius/autorecon .- Python 3
python3-pip-
pipx(optional, but recommended)
If you don't have these installed, and are running Kali Linux, you can execute the following:
$ sudo apt install python3
$ sudo apt install python3-pipAdditionally, if you experience any issues with the stability of the python3-pip installation (as reported by a number of people installing pip3 via apt on the OSCP distribution of Kali), you can install it manually as follows:
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3 get-pip.pyThe pip3 command should now be usable.
Further, it's recommended you use pipx to manage your python packages; this installs each python package in it's own virtualenv, and makes it available in the global context, which avoids conflicting package dependencies and the resulting instability. To summarise the installation instructions:
$ sudo apt install python3-venv
$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepathYou will have to re-source your ~/.bashrc or ~/.zshrc file (or open a new tab) after running these commands in order to use pipx.
Note that if you want to elevate privileges to run a program installed with pipx, with sudo, you have two options:
- Append the appropriate path to your execution command, using one of the following examples (recommended):
$ sudo env "PATH=$PATH" autorecon [OPTIONS]
$ sudo $(which autorecon) [OPTIONS]To make this easier, you could add the following alias to your ~/.profile (or equivalent):
alias sudo="sudo env \"PATH=$PATH\""
- Add the
pipxbinary path to thesecure_pathset in/etc/sudoers
sudo visudo /etc/sudoersUpdate the secure_path directive as follows:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/kali/.local/bin"
If you're not using Kali Linux, make sure to adjust the path to the relevant user. Further detail on the installation of pipx is available in their installation instructions available here. Please refer to this for any issues you experience.
Several commands used in AutoRecon reference the SecLists project, in the directory /usr/share/seclists/. You can either manually download the SecLists project to this directory (https://github.com/danielmiessler/SecLists), or if you are using Kali Linux (highly recommended) you can run the following:
$ sudo apt install seclistsAutoRecon will still run if you do not install SecLists, though several commands may fail, and some manual commands may not run either.
Additionally the following commands may need to be installed, depending on your OS:
curl
enum4linux
feroxbuster
nbtscan
nikto
nmap
onesixtyone
oscanner
smbclient
smbmap
smtp-user-enum
snmpwalk
sslscan
svwar
tnscmd10g
whatweb
wkhtmltoimage
On Kali Linux, you can ensure these are all installed using the following command:
$ sudo apt install seclists curl enum4linux feroxbuster nbtscan nikto nmap onesixtyone oscanner smbclient smbmap smtp-user-enum snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdfEnsure you have all of the requirements installed as per the previous section.
$ pipx install git+https://github.com/Tib3rius/AutoRecon.gitIf installing using pip, you'll need to run the installation command as root or with sudo in order to be able to run autorecon using sudo:
$ sudo python3 -m pip install git+https://github.com/Tib3rius/AutoRecon.gitIf you'd prefer not to use pip or pipx, you can always still install and execute autorecon.py manually as a script. First install the dependencies:
$ python3 -m pip install -r requirements.txtYou will then be able to run the autorecon.py script (from <AUTORECON_ROOT_DIR>/src/autorecon):
$ python3 autorecon.py [OPTIONS] 127.0.0.1See detailed usage options below.
If you installed using pipx or pip it is recommended that prior to upgrading, you remove all config files stored in ~/.config/AutoRecon using sudo rm -rf {insert directory path here}/.config/AutoRecon . Note that if you run AutoRecon using sudo, you'll also have to delete the config files in /root/.config/AutoRecon using sudo rm -rf /root/.config/AutoRecon using.