• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

韩工

  • 博客园
  • 管理

公告

View Post

CentOS下疑似病毒的排查步骤

 

1)         抓包分析,先禁用外部高风险高流量的IP地址

# tcpdump -i eth0 -w /home/hanzijing/001.pcap   

2)       检查24小时内系统关键目录被更改过的文件

# find /etc/ -mtime 0

# find /usr/bin -mtime 0

3)       将已登录vty用户踢下线

# pkill -kill -t pts/0  

4)       根据可疑进程的PID号查找执行文件位置

# ls -l /proc/PID/     

5)       排查计划任务中的可疑文件

# crontab -l 

6)       检查/etc/rc0.d目录下的启动文件

# for i in `seq 1 6`; do ll rc$i.d/; done

7)       检查/etc/cron目录下文件

# for i in 'cron.d cron.daily cron.hourly cron.monthly cron.weekly'; do ll $i/; done             

8)       对检查到的可执行文件进行运行权限限制

# chmod -x file      

 

 

9)       root无法删除的文件处理办法

# ll /etc/init.d/acpidtd

-rwxr-xr-x 1 root root 1223753 Oct 16  2014 /etc/init.d/acpidtd

# rm -f /etc/init.d/acpidtd

rm: cannot remove `/etc/init.d/acpidtd': Operation not permitted

# lsattr /etc/init.d/acpidtd

----i--------e- /etc/init.d/acpidtd

# chattr -i /etc/init.d/acpidtd

# rm -f /etc/init.d/acpidtd

 

征途漫漫,惟有奋斗!

posted on 2021-12-20 09:56  韩工-Hill  阅读(753)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3