# AutoSploit | Automated Mass Exploiter

**URL:** <https://onehack.st/t/autosploit-automated-mass-exploiter/86883>\
**Category:** Tools & Scripts\
**Tags:** hacking, technology\
**Created:** [May 16, 2020, 1:53pm UTC](https://onehack.st/t/autosploit-automated-mass-exploiter/86883 "2020-05-16T13:53:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [May 16, 2020, 1:53pm UTC](https://onehack.st/t/autosploit-automated-mass-exploiter/86883/1 "2020-05-16T13:53:27Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/d/6/d666a7bfd3bacdd75824a46b9f15e895234b7930.jpeg)

To exploit target you need to exploit one by one, but with AutoSploit you can mass exploit targets. Targets can be collected from internet (shodan, cencys).

## Overview

As the name might suggest AutoSploit attempts to automate the exploitation of remote hosts. Targets can be collected automatically through Shodan, Censys or Zoomeye. But options to add your custom targets and host lists have been included as well. The available Metasploit modules have been selected to facilitate Remote Code Execution and to attempt to gain Reverse TCP Shells and/or Meterpreter sessions. Workspace, local host and local port for MSF facilitated back connections are configured by filling out the dialog that comes up before the exploit component is started

_ **Operational Security Consideration:** _

Receiving back connections on your local machine might not be the best idea from an OPSEC standpoint. Instead consider running this tool from a VPS that has all the dependencies required, available.

The new version of AutoSploit has a feature that allows you to set a proxy before you connect and a custom user-agent.

## Installation

Installing AutoSploit is very simple, you can find the latest stable release [here](https://github.com/NullArray/AutoSploit/releases/latest). You can also download the master branch as a [zip](https://github.com/NullArray/AutSploit/zipball/master) or [tarball](https://github.com/NullArray/AutSploit/tarball/master) or follow one of the below methods :

##### Docker Compose

Using Docker Compose is by far the easiest way to get AutoSploit up and running without too much of a hassle.

git clone [https://github.com/NullArray/AutoSploit.git](https://github.com/NullArray/AutoSploit.git) cd Autosploit/Docker docker-compose run --rm autosploit

##### Docker

Just using Docker.

```auto
git clone https://github.com/NullArray/AutoSploit.git

```

```auto
cd Autosploit/Docker

```

```auto
# If you wish to edit default postgres service details, edit database.yml. Should work out of the box

```

```auto
# nano database.yml

```

```auto
docker network create -d bridge haknet

```

```auto
docker run --network haknet --name msfdb -e POSTGRES_PASSWORD=s3cr3t -d postgres

```

```auto
docker build -t autosploit .

```

```auto
docker run -it --network haknet -p 80:80 -p 443:443 -p 4444:4444 autosploit

```

Dev team contributor [Khast3x](https://github.com/khast3x) recently improved Docker operations as well as add more details to the README.md in the `Docker` subdirectory. For more information on deploying AutoSploit with Docker please be sure to click [here](https://github.com/NullArray/AutoSploit/tree/master/Docker)

##### Cloning

On any Linux system the following should work :

git clone [https://github.com/NullArray/AutoSploit](https://github.com/NullArray/AutoSploit) cd AutoSploit chmod +x install.sh ./install.sh

AutoSploit is compatible with macOS, however, you have to be inside a virtual environment for it to run successfully. In order to accomplish this employ/perform the below operations via the terminal or in the form of a shell script.

sudo -s \<\< ‘\_EOF’ pip2 install virtualenv --user git clone [https://github.com/NullArray/AutoSploit.git](https://github.com/NullArray/AutoSploit.git) virtualenv source /bin/activate cd pip2 install -r requirements.txt chmod +x install.sh ./install.sh python autosploit.py \_EOF

## Usage

Starting the program with `python autosploit.py` will open an AutoSploit terminal session. The options for which are as follows.

```auto
1. Usage And Legal
2. Gather Hosts
3. Custom Hosts
4. Add Single Host
5. View Gathered Hosts
6. Exploit Gathered Hosts
99. Quit

```

Choosing option `2` will prompt you for a platform specific search query. Enter `IIS` or `Apache` in example and choose a search engine. After doing so the collected hosts will be saved to be used in the `Exploit` component.

As of version 2.0 AutoSploit can be started with a number of command line arguments/flags as well. Type `python autosploit.py -h` to display all the options available to you. I’ve posted the options below as well for reference.

```auto
usage: python autosploit.py -[c|z|s|a] -[q] QUERY

```

```auto
                            [-C] WORKSPACE LHOST LPORT [-e] [--whitewash] PATH

```

```auto
                            [--ruby-exec] [--msf-path] PATH [-E] EXPLOIT-FILE-PATH

```

```auto
                            [--rand-agent] [--proxy] PROTO://IP:PORT [-P] AGENT

```

```auto
 

```

```auto
optional arguments:

```

```auto
  -h, --help show this help message and exit

```

```auto
 

```

```auto
search engines:

```

```auto
  possible search engines to use

```

```auto
 

```

```auto
  -c, --censys use censys.io as the search engine to gather hosts

```

```auto
  -z, --zoomeye use zoomeye.org as the search engine to gather hosts

```

```auto
  -s, --shodan use shodan.io as the search engine to gather hosts

```

```auto
  -a, --all search all available search engines to gather hosts

```

```auto
 

```

```auto
requests:

```

```auto
  arguments to edit your requests

```

```auto
 

```

```auto
  --proxy PROTO://IP:PORT

```

```auto
                        run behind a proxy while performing the searches

```

```auto
  --random-agent use a random HTTP User-Agent header

```

```auto
  -P USER-AGENT, --personal-agent USER-AGENT

```

```auto
                        pass a personal User-Agent to use for HTTP requests

```

```auto
  -q QUERY, --query QUERY

```

```auto
                        pass your search query

```

```auto
 

```

```auto
exploits:

```

```auto
  arguments to edit your exploits

```

```auto
 

```

```auto
  -E PATH, --exploit-file PATH

```

```auto
                        provide a text file to convert into JSON and save for

```

```auto
                        later use

```

```auto
  -C WORKSPACE LHOST LPORT, --config WORKSPACE LHOST LPORT

```

```auto
                        set the configuration for MSF (IE -C default 127.0.0.1

```

```auto
                        8080)

```

```auto
  -e, --exploit start exploiting the already gathered hosts

```

```auto
 

```

```auto
misc arguments:

```

```auto
  arguments that don't fit anywhere else

```

```auto
 

```

```auto
  --ruby-exec if you need to run the Ruby executable with MSF use

```

```auto
                        this

```

```auto
  --msf-path MSF-PATH pass the path to your framework if it is not in your

```

```auto
                        ENV PATH

```

```auto
  --whitelist PATH only exploit hosts listed in the whitelist file

```

## Dependencies

_Note_ : All dependencies should be installed using the above installation method, however, if you find they are not:

AutoSploit depends on the following Python2.7 modules.

```auto
requests
psutil

```

Should you find you do not have these installed get them with pip like so.

pip install requests psutil

or

pip install -r requirements.txt

Since the program invokes functionality from the Metasploit Framework you need to have this installed also. Get it from Rapid7 by clicking [here](https://www.rapid7.com/products/metasploit/).

 ![image](https://onehack.st/uploads/default/original/3X/7/1/71bfaf4c9394defb4ebe8a260785b9ed70fc9d3f.png)

## Acknowledgements

Special thanks to [Ekultek](https://github.com/Ekultek) without whoms contributions to the project, the new version would have been a lot less spectacular.

Thanks to [Khast3x](https://github.com/khast3x) for setting up Docker support.

Last but certainly not least. Thanks to all who have submitted Pull Requests, bug reports, useful and productive contributions in general.

### Active Development

If you would like to contribute to the development of this project please be sure to read [CONTRIBUTING.md](https://github.com/NullArray/AutoSploit/blob/master/CONTRIBUTING.md) as it contains our contribution guidelines.

Please, also, be sure to read our [contribution standards](https://github.com/NullArray/AutoSploit/wiki/Development-information#contribution-standards) before sending pull requests

If you need some help understanding the code, or want to chat with some other AutoSploit community members, feel free to join our [Discord server](https://discord.gg/9BeeZQk).

### Note

If you happen to encounter a bug please feel free to [Open a Ticket](https://github.com/NullArray/AutoSploit/issues).

Thanks in advance.

## GitHub:

> **[GitHub - NullArray/AutoSploit: Automated Mass Exploiter](https://github.com/NullArray/AutoSploit)**
>
> Automated Mass Exploiter
