一、Linux
1.进程
ps -ef
2.服务
systemctl list-unit-files --type=service
3.计划任务
crontab -l 查看
crontab -r 删除
4.端口
netstat -tulnp
5.日志
/var/log/auth.log
/var/log/secure
二、Windows
1.进程
tasklist
2.服务
net start
win+r ==> services.msc
3.计划任务
schtasks /query 查看
schtasks /delete /tn <taskname> 删除
atq 查看
atrm 删除
4.端口
netstat -ano
5.日志
爆破事件id : 4624 登陆成功 4625 登陆失败
三、应急响应具体步骤
3.1 查日志,查找攻击入口点并封堵
通过查日志去查找攻击入口点,然后修补漏洞
3.2 查杀木马文件
通过查进程、查计划任务、查服务、查启动项,找到木马文件所在位置,结束掉进程,删除计划任务、服务、启动项,删除木马文件,如果木马文件无法删除,则使用chattr -i命令解除占用后再删除。
3.2.1 工具查杀
- 阿里伏魔(在线工具) https://ti.aliyun.com/#/webshell
- 百度WEBDIR https://scanner.baidu.com/#/pages/intro
- 河马 https://n.shellpub.com
- D盾 http://www.d99net.net
- CloudWalker(牧云) https://stack.chaitin.com/security-challenge/webshell
- 在线webshell查杀-灭绝师太版 http://tools.bugscaner.com/killwebshell/
- WebShell Detector webshel1扫描检测器 http://www.shelldetector.com/
- 查杀进程、计划任务、服务、启动项等:火绒剑
3.3 封锁
- 利用防火墙策略
- 拉黑ip,封锁协议,加上防护软件或者安全策略(多次验证就会触发)
四、docker镜像中有马
docker inspect --format='{{.GraphDriver.Data.LowerDir}}' <镜像名> # 查看镜像信息,包括其在真机的路径