|
1 | 1 | # Docker deployment instructions |
2 | 2 |
|
3 | | -## tl;dr |
4 | 3 |
|
5 | | -Using [docker-compose](https://docs.docker.com/compose/install/): |
| 4 | +## From Dockerhub |
6 | 5 |
|
7 | 6 | ```bash |
8 | | -git clone https://github.com/NullArray/AutoSploit.git |
9 | | -cd Autosploit/Docker |
10 | | -docker-compose run --rm autosploit |
| 7 | +> docker run -it battlecl0ud/autosploit |
11 | 8 | ``` |
12 | 9 |
|
13 | | -Using just Docker: |
| 10 | +*Ideally this is to be replaced by project author's dockerhub account* |
14 | 11 |
|
15 | | -```bash |
16 | | -git clone https://github.com/NullArray/AutoSploit.git |
17 | | -cd Autosploit/Docker |
18 | | -# If you wish to edit default postgres service details, edit database.yml. Should work out of the box |
19 | | -# nano database.yml |
20 | | -docker network create -d bridge haknet |
21 | | -docker run --network haknet --name msfdb -e POSTGRES_PASSWORD=s3cr3t -d postgres |
22 | | -docker build -t autosploit . |
23 | | -docker run -it --network haknet -p 80:80 -p 443:443 -p 4444:4444 autosploit |
24 | | -``` |
25 | | - |
26 | | -## Abstract |
27 | | - |
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 |
34 | | - |
35 | | -## Deploy |
36 | | - |
37 | | -### Step 1 - Create bridge network |
38 | | - |
39 | | -This will enable the Metasploit Framework to talk to the `postgres` database using its hostname, making it abstract. |
40 | | - |
41 | | -A Tor Socks Proxy can also be added to perform transparent proxy when launching exploits (not for reverse shells though, obviously). |
42 | | - |
43 | | -```bash |
44 | | -docker network create -d bridge haknet |
45 | | -``` |
46 | | - |
47 | | -### Step 2 - Launch services |
48 | | - |
49 | | -All automagically linked |
50 | | - |
51 | | -#### Step 2.1 - Launch postgres |
52 | | - |
53 | | -Launch a vanilla `postgres` service, linked to `haknet` |
54 | | - |
55 | | -```bash |
56 | | -docker run --network haknet --name msfdb -e POSTGRES_PASSWORD=s3cr3t -d postgres |
57 | | -``` |
58 | | - |
59 | | -#### Step 2.2 - Launch Autosploit |
60 | | - |
61 | | -Launch `Autosploit`. |
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. |
64 | | - |
65 | | -Please be aware that the first build will take some time (~10mn) |
66 | | - |
67 | | -Building will be faster if done on a hosted server as it benefits from the -grade bandwidth |
| 12 | +## Build it yourself |
68 | 13 |
|
69 | 14 | ```bash |
70 | | -git clone https://github.com/NullArray/AutoSploit.git |
71 | | -cd Autosploit/Docker |
72 | | -nano database.yml # Exemple configuration should work fine |
73 | | -docker build -t autosploit . |
74 | | -docker run -it --network haknet -p 80:80 -p 443:443 -p 4444:4444 autosploit |
| 15 | +> git clone https://github.com/NullArray/AutoSploit.git |
| 16 | +> cd Autosploit/Docker |
| 17 | +> docker build -t autosploit . |
| 18 | +> docker run -it autosploit |
75 | 19 | ``` |
0 commit comments