You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Launching `Autosploit` as a Docker container makes it very easy to use the tool in a hosted cloud environment (AWS, Azure, ...)
31
-
* Separate `postgres` database into individual service for data persistence and potential async updating of the database
32
-
* Create a small bridge network ``haknet`` so the service discovery is automatic
33
-
* Launch `postgres` and `Autosploit` container, both linked by `haknet`
34
-
* Autosploit will automatically launch preconfigured `msfconsole` to the external `postgres` container through `haknet` transparent network
35
-
* Total image size of Kali + Metasploit + Autosploit : 1.75GB
28
+
- Launching `Autosploit` as a Docker container makes it very easy to use the tool in a hosted cloud environment (AWS, Azure, ...)
29
+
- Separate `postgres` database into individual service for data persistence and potential async updating of the database
30
+
- Create a small bridge network `haknet` so the service discovery is automatic
31
+
- Launch `postgres` and `Autosploit` container, both linked by `haknet`
32
+
- Autosploit will automatically launch preconfigured `msfconsole` to the external `postgres` container through `haknet` transparent network
33
+
- Total image size of Kali + Metasploit + Autosploit : 1.75GB
36
34
37
35
## Deploy
38
36
39
-
##### Step 1 - Create bridge network
37
+
### Step 1 - Create bridge network
38
+
40
39
This will enable the Metasploit Framework to talk to the `postgres` database using its hostname, making it abstract.
41
40
42
41
A Tor Socks Proxy can also be added to perform transparent proxy when launching exploits (not for reverse shells though, obviously).
@@ -45,22 +44,23 @@ A Tor Socks Proxy can also be added to perform transparent proxy when launching
45
44
docker network create -d bridge haknet
46
45
```
47
46
48
-
#####Step 2 - Launch services
47
+
### Step 2 - Launch services
49
48
50
49
All automagically linked
51
50
52
-
53
-
###### Step 2.1 - Launch postgres
51
+
#### Step 2.1 - Launch postgres
54
52
55
53
Launch a vanilla `postgres` service, linked to `haknet`
54
+
56
55
```bash
57
56
docker run --network haknet --name msfdb -e POSTGRES_PASSWORD=s3cr3t -d postgres
58
57
```
59
-
###### Step 2.2 - Launch Autosploit
58
+
59
+
#### Step 2.2 - Launch Autosploit
60
60
61
61
Launch `Autosploit`.
62
62
63
-
This Dockerfile will copy the default database config to ```~/.msf4/database.yml```. You can edit the configuration file `database.yml` to your liking before building.
63
+
This Dockerfile will copy the default database config to `~/.msf4/database.yml`. You can edit the configuration file `database.yml` to your liking before building.
64
64
65
65
Please be aware that the first build will take some time (~10mn)
Copy file name to clipboardExpand all lines: README.md
+88-29Lines changed: 88 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,53 +1,115 @@
1
1
# AutoSploit
2
2
3
-
As the name might suggest AutoSploit attempts to automate the exploitation of remote hosts. Targets are collected automatically as well by employing the Shodan.io API. The program allows the user to enter their platform specific search query such as; `Apache`, `IIS`, etc, upon which a list of candidates will be retrieved.
4
-
5
-
After this operation has been completed the 'Exploit' component of the program will go about the business of attempting to exploit these targets by running a series of Metasploit modules against them. Which Metasploit modules will be employed in this manner is determined by programmatically comparing the name of the module to the initial search query. However, I have added functionality to run all available modules against the targets in a 'Hail Mary' type of attack as well.
6
-
7
-
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 through the dialog that comes up before the 'Exploit' component is started.
3
+
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.
4
+
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
8
5
9
6
**Operational Security Consideration**
10
7
11
8
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.
12
9
10
+
The new version of AutoSploit has a feature that allows you to set a proxy before you connect and a custom user-agent.
11
+
13
12
## Usage
14
13
15
-
Clone the repo. Or deploy via Docker. Details for which can be found [here](https://github.com/NullArray/AutoSploit/tree/master/Docker)Special thanks to [Khast3x](https://github.com/khast3x) for their contribution in this regard.
14
+
Clone the repo. Or deploy via Docker. Details for which can be found [here](https://github.com/NullArray/AutoSploit/tree/master/Docker)
After which it can be started from the terminal with `python autosploit.py`. After which you can select one of five actions. Please see the option summary below.
18
+
Starting the program with `python autosploit.py` will open an AutoSploit terminal session. The options for which are as follows.
The Metasploit modules available with this tool are selected for RCE. You can find them in the `modules.txt` file that is included in this repo. Should you wish to add more or other modules please do so in the following format.
29
+
30
+
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.
31
+
32
+
As of version 2.0 AutoSploit can be started with a number of command line arguments/flags as well. Type `python autosploit.py -h`
33
+
to display all the options available to you. I've posted the options below as well for reference.
34
+
33
35
```
34
-
use exploit/linux/http/netgear_wnr2000_rce;exploit -j;
set the configuration for MSF (IE -C default 127.0.0.1
71
+
8080)
72
+
-e, --exploit start exploiting the already gathered hosts
73
+
74
+
misc arguments:
75
+
arguments that don't fit anywhere else
76
+
77
+
--ruby-exec if you need to run the Ruby executable with MSF use
78
+
this
79
+
--msf-path MSF-PATH pass the path to your framework if it is not in your
80
+
ENV PATH
35
81
```
36
-
With each new module on it's own line.
82
+
37
83
38
84
## Dependencies
85
+
39
86
AutoSploit depends on the following Python2.7 modules.
87
+
40
88
```
41
-
shodan
42
-
blessings
89
+
requests
90
+
psutil
43
91
```
92
+
44
93
Should you find you do not have these installed get them with pip like so.
94
+
95
+
```bash
96
+
pip install requests psutil
45
97
```
46
-
pip install shodan
47
-
pip install blessings
98
+
99
+
or
100
+
101
+
```bash
102
+
pip install -r requirements.txt
48
103
```
49
-
Since the program invokes functionality from the Metasploit Framework you need to have this installed also.
50
-
Get it from Rapid7 by clicking [here](https://www.rapid7.com/products/metasploit/).
104
+
105
+
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/).
106
+
107
+
## Acknowledgements
108
+
109
+
Special thanks to [Ekultek](https://github.com/Ekultek) without whoms contributions to the project version 2.0 would have been a lot less spectacular.
110
+
111
+
And thanks to [Khast3x](https://github.com/khast3x) for setting up Docker support.
112
+
51
113
52
114
53
115
### Active Development
@@ -60,7 +122,4 @@ that have expressed an interest in doing so. The new version will include extra
60
122
61
123
If you happen to encounter a bug please feel free to [Open a Ticket](https://github.com/NullArray/AutoSploit/issues).
62
124
63
-
If you wish to contribute to the development of this project please be sure to read [CONTRIBUTING.md](https://github.com/NullArray/AutoSploit/blob/master/CONTRIBUTING.md) before you get started as it contains our contribution guidelines.
0 commit comments