1. #!usr/bin/perl
  2. #Code : Çağrı TEPEBAŞILI
  3. #Open Source
  4.  
  5. print "\n\n\n[+] MythRDL Linux Server Security Tool >>>\n\n\n" ;
  6. print "[+] [0] Block The Backdoors\n";
  7. print "[+] [1] Php [dot] ini Security\n" ;
  8. print "[+] [2] Authorization Security\n\n" ;
  9. print "[+] [3] File Acces Control\n";
  10.  
  11. sub security{
  12.     $path = system("pwd");
  13.     {
  14.     system("cd $path");
  15.     system("chmod 777 IceWaLL.pl");
  16.     system("chmod 777 /etc/my.cnf ");
  17.     }
  18. open (DOSYAX, "> /etc/my.cnf");
  19. print DOSYAX ("\nsafe-show-database\nlocal-infile=0\n");
  20. }
  21.  
  22. sub ini{
  23.  
  24. open (DOSYA, "> php.ini");
  25. print DOSYA ("disable_functions = wget,touch,unlink,mkdir,rmdir,glob, posix_getpwuid, array_compare, array_user_key_compare, ini_restore, exec, proc_get_status, proc_nice, proc_open, allow_url_fopen, fin, pconnect, system, dl, passthruexec, shell_exec, proc_close, proc_get_status, chown, chgrp, escapeshellcmd, escapeshellarg, fileread, passthru, popen,curl_exec, shell, execute\nsafe mode = on\nregister_globals = off\nallow_url_fopen = off\nallow_url_include = off\ndisplay_errors = Off\ncgi.force_redirect = on\nmagic_quotes_gpc = off\nmagic_quotes_runtime = Off\nmagic_quotes_sybase = Off\nsession.use_trans_sid = off\nexpose_php = Off\nhtml_errors = off\nmax_execution_time = 300\nmax_input_time = 300\nServerSignature = Off\nUseCanonicalName = Off\nregister_long_arrays = Off\nenable_dl = off\nfile_uploads = off\ndisplay_startup_errors = off\nsafe_mode_gid = Off\nregister_argc_argv = Off\n");
  26.  
  27. }
  28.  
  29. sub auth{
  30.  
  31. {
  32. system("rm –f /etc/security/console.apps/halt");
  33. system("rm –f /etc/security/console.apps/poweroff");
  34. system("rm –f /etc/security/console.apps/reboot");
  35. system("rm –f /etc/security/console.apps/shutdown ");
  36. system("cd /etc/pam.dfor i in * ; dosed '/[^#].*pam_console.so/s/^/#/' <$i> temp && mv temp $idone");
  37. system("chmod 600 /etc/inetd.conf");
  38. system("chattr +i /etc/inetd.conf");
  39. system("chattr +i /etc/services");
  40. system("chmod 600 /etc/shadow");
  41. system("chmod 600 /etc/passwd");
  42. system("chmod 600 /etc/group");
  43. system("chmod 600 /etc/master.passwd");
  44. }
  45.  
  46. }
  47.  
  48.  
  49. &security;
  50. &ini;
  51. &auth;
  52.  
  53. print "[+] Make Software Security, Authorization Is Complete and Touch php [dot] ini\n";
  54. print "[+] GET File Acces Control(Y/N)\n";
  55.  
  56. $que1 = <STDIN>;
  57. chop($que1);
  58. if($que1 == "y"){
  59.  
  60.     print "[+] Example : /home/webst/site/public_html/config.php\n";
  61.     print "[+] Give File PATH : ";
  62.     $que2 = <STDIN>;
  63.     chop($que2);
  64.     {
  65.     system("chmod 600 $que2"); 
  66.     }
  67.     print "\n[+] File is Safe. !\n";
  68. }
  69. else{
  70.     die();
  71. }