感谢你的到来
一起学习进步

linode如何使用ClamAV扫描漏洞

安装ClamAV

  1. 更新你的包裹:apt update
  2. 将ClamAV安装到临时RAM磁盘中:apt install clamav
  3. 更新恶意软件定义。freshclam
  4. 装载您的Linode的磁盘:mount -o barrier=0 /dev/sda 注意以下假定您只有一个要扫描的磁盘,/dev/sda并且在引导进入救援模式时将该磁盘分配给该磁盘。如果您有多个磁盘,只需对需要装入的每个磁盘重复以下步骤,替换/dev/sda为每个磁盘的名称。

扫描您的系统

  1. 创建隔离目录以存放任何检测到的恶意软件,以便您可以在以后需要时进行分析:mkdir -p /media/sda/clamav/log/ mkdir -p /media/sda/clamav/quarantine/
  2. 运行扫描:clamscan -r --log=/media/sda/clamav/log/scan.log --move=/media/sda/clamav/quarantine /media/sda 此操作可能需要一些时间才能完成。完成后,扫描摘要将显示受感染文件的数量。
  3. 查看位于的ClamAV日志/media/sda/clamav/log/scan.log。可以在中找到扫描期间发现的任何恶意软件/media/sda/clamav/quarantine/

遇到问题:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://cdn.debian.net testing InRelease: The following signatures couldn't be verified because the publ8

W: Failed to fetch http://cdn.debian.net/debian/dists/testing/InRelease  

W: Some index files failed to download. They have been ignored, or old ones used instead.

解决办法:Change Root 需要使用执行权限挂载根磁盘

Changing root is the process of changing your working root directory. When you change root (abbreviated as chroot) to your Linode root disk, you will be able to run commands as though you are logged into that system.

在使用chroot之前,需要使用执行权限挂载根磁盘:

mount -o exec,barrier=0 /dev/sda
注意
如果在查看本节之前装入了磁盘,请卸载磁盘:

umount /dev/sda
然后,使用该exec选项重新安装它。

然后要创建chroot,您需要挂载临时文件系统:

cd /media/sda
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/
Chroot到你的磁盘:

chroot /media/sda /bin/bash
退出chroot并返回到Finnix类型“退出”:

exit

官方文档: 点我跳转 https://www.linode.com/docs/troubleshooting/rescue-and-rebuild/#change-root

赞(0) 打赏
未经允许不得转载:IT起义 » linode如何使用ClamAV扫描漏洞
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

跨境电商|抖音营销

微信:345497590QQ 345497590

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏