Skip to content

2. Installation

Noureldin Ehab edited this page Oct 14, 2021 · 3 revisions

Quick Install (Google Cloud Shell)

you can try Autorecon with one click by using Google Cloud Console

Open in Cloud Shell

Quick Install (Docker)

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 .

Requirements

  • Python 3
  • python3-pip
  • pipx (optional, but recommended)

Python 3

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-pip

Additionally, 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.py

The pip3 command should now be usable.

pipx

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 ensurepath

You 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:

  1. 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\""
  1. Add the pipx binary path to the secure_path set in /etc/sudoers
sudo visudo /etc/sudoers

Update 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.

Supporting packages

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 seclists

AutoRecon 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 wkhtmltopdf

Installation

Ensure you have all of the requirements installed as per the previous section.

Using pipx (recommended)

$ pipx install git+https://github.com/Tib3rius/AutoRecon.git

Using pip

If 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.git

Manual

If 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.txt

You will then be able to run the autorecon.py script (from <AUTORECON_ROOT_DIR>/src/autorecon):

$ python3 autorecon.py [OPTIONS] 127.0.0.1

See detailed usage options below.

Upgrading

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.

Clone this wiki locally