File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 31
31
- 查看开放的端口,比如常用的80,22,8009,后面的箭头表示端口对应占用的程序:` netstat -lnp `
32
32
- 检查某个端口的具体信息:` lsof -i :18954 `
33
33
- 检查启动项:` chkconfig `
34
- - 检查定时器:` cat /etc/crontab `
35
- - 检查定时器:` crontab -l `
34
+ - 检查定时器(重要):` cat /etc/crontab `
35
+ - 检查定时器(重要):` crontab -l `
36
+ - ` vim /var/spool/cron/crontabs/root `
37
+ - ` vim /var/spool/cron/root `
36
38
- 检查其他系统重要文件:
37
39
- ` cat /etc/rc.local `
38
40
- ` cd /etc/init.d;ll `
@@ -89,6 +91,25 @@ TOTAL:(总的流量) 12.9GB 229Mb 190Mb 193Mb
89
91
- yum update openssh-server
90
92
91
93
94
+ ## 实战
95
+
96
+ #### 挖矿程序
97
+
98
+ - 先查看调度任务是否有新增内容
99
+ - ` vim /var/spool/cron/root `
100
+ - ` vim /var/spool/cron/crontabs/root `
101
+ - 如果有,先停止定时任务:` systemctl stop crond `
102
+ - 如果对方有去 wget curl 指定网站,则先在 hosts 里面映射为 127.0.0.1,比如:` 127.0.0.1 prax0zma.ru `
103
+ - 查看当前最占用 CPU 的进程 PID,加入发现是 22935,则:` cd /proc/22935 && ll ` ,发现程序目录是:` /root/.tmp00/bash64 `
104
+ - 我们就把该程序去掉执行任务的权限:` chmod -R -x /root/.tmp00/ ` ,然后再 kill 掉该程序
105
+ - 打开别人的脚本,看下是如何书写的,发现有写入几个目录,这里进行删除:
106
+
107
+ ```
108
+ rm -rf /tmp/.ha /boot/.b /boot/.0 /root/.tmp00
109
+ ```
110
+
111
+ - 最后检查下是否有免密内容被修改:` cd ~/.ssh/ && cat authorized_keys `
112
+
92
113
## 资料
93
114
94
115
- < http://www.jianshu.com/p/97b9dc47b88c >
You can’t perform that action at this time.
0 commit comments