Linux系统应急响应涉及命令和工具
Linux系统应急响应涉及命令和工具
一、关键文件
二、常见命令
查看进程资源占用:top
查看进程:ps -aux
查看网络连接:netstat -antpl
如果为恶意程序的外链信息,则根据pid,利用ls -alh /proc/pid 命令查看其对应的可执行程序
开放端口的进程:lsof
显示错误的尝试登录信息:lastb
显示系统用户最近的登录信息:last
实现所有的用户最近的登录信息:lastlog
查找符合条件的字符串:grep
查看定时任务:crontab -l 、 cat /etc/crontab
查看历史命令:history 、cat ~/.bash_history
查看当前目录下所有文件并排序:ls -alt
校验RPM软件包:rpm -Va 、 dpkg -verify
查看文件(文件夹)详细信息:stat
查找当前目录下,指定天数内修改的指定类型(or名称)文件:find ./ -,time 0 -name *.php
三、应急工具
1、Busybox
官网:https://busybox.net/
2、chkrootkit
官网:http://chkrootkit.org/
3、Rkhunter
官网:http://www.rootkit.nl
4、河马Webshell
官网:https://www.shellpub.com/
文件名 | 说明 |
/etc/passwd | 用户信息文件 |
/etc/crontab | 定时任务文件 |
/etc/anacrontab | 异步定时任务文件 |
/etc/rc.d/rc.local | 开机启动项 |
/var/log/btmp | 登录失败日志,使用last命令查看 |
/var/log/cron | 定时任务执行日志 |
/var/log/lastlog | 所有用户最近登录信息,使用1astlog查看 |
/var/log/secure | 验证、授权等日志 |
/var/log/wtmp | 包含用户登录日志,使用1ast命令查看 |
/var/log/utmp | 当前登录系统的用户信息,使用1ast命令查看 |
二、常见命令
查看进程资源占用:top
查看进程:ps -aux
查看网络连接:netstat -antpl
如果为恶意程序的外链信息,则根据pid,利用ls -alh /proc/pid 命令查看其对应的可执行程序
开放端口的进程:lsof
显示错误的尝试登录信息:lastb
显示系统用户最近的登录信息:last
实现所有的用户最近的登录信息:lastlog
查找符合条件的字符串:grep
查看定时任务:crontab -l 、 cat /etc/crontab
查看历史命令:history 、cat ~/.bash_history
查看当前目录下所有文件并排序:ls -alt
校验RPM软件包:rpm -Va 、 dpkg -verify
查看文件(文件夹)详细信息:stat
查找当前目录下,指定天数内修改的指定类型(or名称)文件:find ./ -,time 0 -name *.php
三、应急工具
1、Busybox
官网:https://busybox.net/
2、chkrootkit
官网:http://chkrootkit.org/
3、Rkhunter
官网:http://www.rootkit.nl
4、河马Webshell
官网:https://www.shellpub.com/