Skip to content

Commit 8a9f4ad

Browse files
authored
Merge branch 'dev-beta' into dev-beta
2 parents 79ea890 + bbb9bc2 commit 8a9f4ad

File tree

11 files changed

+676
-263
lines changed

11 files changed

+676
-263
lines changed

Docker/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Docker deployment instructions
2-
=====
1+
# Docker deployment instructions
32

43
## tl;dr
54

@@ -24,19 +23,19 @@ docker build -t autosploit .
2423
docker run -it --network haknet -p 80:80 -p 443:443 -p 4444:4444 autosploit
2524
```
2625

27-
2826
## Abstract
2927

30-
* 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
3634

3735
## Deploy
3836

39-
##### Step 1 - Create bridge network
37+
### Step 1 - Create bridge network
38+
4039
This will enable the Metasploit Framework to talk to the `postgres` database using its hostname, making it abstract.
4140

4241
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
4544
docker network create -d bridge haknet
4645
```
4746

48-
##### Step 2 - Launch services
47+
### Step 2 - Launch services
4948

5049
All automagically linked
5150

52-
53-
###### Step 2.1 - Launch postgres
51+
#### Step 2.1 - Launch postgres
5452

5553
Launch a vanilla `postgres` service, linked to `haknet`
54+
5655
```bash
5756
docker run --network haknet --name msfdb -e POSTGRES_PASSWORD=s3cr3t -d postgres
5857
```
59-
###### Step 2.2 - Launch Autosploit
58+
59+
#### Step 2.2 - Launch Autosploit
6060

6161
Launch `Autosploit`.
6262

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

6565
Please be aware that the first build will take some time (~10mn)
6666

Docker/database.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
development: &pgsql
2-
adapter: postgresql
3-
database: postgres
4-
username: postgres
5-
password: s3cr3t
6-
host: msfdb
7-
port: 5432
8-
pool: 200
9-
timeout: 5
2+
adapter: postgresql
3+
database: postgres
4+
username: postgres
5+
password: s3cr3t
6+
host: msfdb
7+
port: 5432
8+
pool: 200
9+
timeout: 5
1010

11-
production: &production
12-
<<: *pgsql
11+
production: &production
12+
<<: *pgsql

Docker/docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: '3'
1+
version: '3'
22

33
services:
44
autosploit:
55
build:
6-
context: .
6+
context: .
77
ports:
88
- 80:80
99
- 443:433
@@ -13,7 +13,7 @@ services:
1313
depends_on:
1414
- postgres
1515
postgres:
16-
image: postgres
16+
image: postgres
1717
environment:
1818
- POSTGRES_PASSWORD=s3cr3t
1919
networks:
@@ -23,8 +23,7 @@ services:
2323

2424
networks:
2525
haknet:
26-
driver: bridge
26+
driver: bridge
2727

2828
volumes:
2929
db:
30-

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AutoSploit
22

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

55
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.
66

@@ -17,41 +17,54 @@ Clone the repo. Or deploy via Docker. Details for which can be found [here](http
1717
`git clone https://github.com/NullArray/AutoSploit.git`
1818

1919
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.
20+
2021
```
2122
+------------------+----------------------------------------------------+
2223
| Option | Summary |
2324
+------------------+----------------------------------------------------+
24-
|1. Usage | Display this informational message. |
25-
|2. Gather Hosts | Query Shodan for a list of platform specific IPs. |
26-
|3. View Hosts | Print gathered IPs/RHOSTS. |
27-
|4. Exploit | Configure MSF and Start exploiting gathered targets|
28-
|5. Quit | Exits AutoSploit. |
25+
|1\. Usage | Display this informational message. |
26+
|2\. Gather Hosts | Query Shodan for a list of platform specific IPs. |
27+
|3\. View Hosts | Print gathered IPs/RHOSTS. |
28+
|4\. Exploit | Configure MSF and Start exploiting gathered targets|
29+
|5\. Quit | Exits AutoSploit. |
2930
+------------------+----------------------------------------------------+
3031
```
32+
3133
## Available Modules
34+
3235
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.
36+
3337
```
34-
use exploit/linux/http/netgear_wnr2000_rce;exploit -j;
38+
use exploit/linux/http/netgear_wnr2000_rce;exploit -j;
3539
```
40+
3641
With each new module on it's own line.
3742

3843
## Dependencies
44+
3945
AutoSploit depends on the following Python2.7 modules.
46+
4047
```
4148
shodan
4249
blessings
4350
```
51+
4452
Should you find you do not have these installed get them with pip like so.
53+
54+
```bash
55+
pip install shodan blessings
4556
```
46-
pip install shodan
47-
pip install blessings
57+
58+
or
59+
60+
```bash
61+
pip install -r requirements.txt
4862
```
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/).
63+
64+
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/).
5165

5266
### Note
67+
5368
While this isn't exactly a Beta release it is an early release nonetheless as such the tool might be subject to changes in the future. If you happen to encounter a bug or would like to contribute to the tool's improvement please feel free to [Open a Ticket](https://github.com/NullArray/AutoSploit/issues) or [Submit a Pull Request](https://github.com/NullArray/AutoSploit/pulls)
5469

5570
Thanks.
56-
57-

0 commit comments

Comments
 (0)