AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1077310
Accepted
Maestro223
Maestro223
Asked: 2021-09-12 15:23:07 +0800 CST2021-09-12 15:23:07 +0800 CST 2021-09-12 15:23:07 +0800 CST

从 Debian 10 更新到 Debian 11 出错了

  • 772

我只是使用这些说明从 Debian 10 升级到 Debian 11 。一切似乎都很顺利,除了 maldet 失败了。

这是错误:

maldet[2117]: maldet(2117): {mon} kernel does not support inotify(), aborting
systemd[1]: maldet.service: Can't open PID file /usr/local/maldetect/tmp/inotifywait.pid (yet?) after start: Operation not permitted 
systemd[1]: maldet.service: Failed with result 'protocol'.
systemd[1]: Failed to start Linux Malware Detect monitoring - maldet.

我的 /usr/lib/systemd/system/maldet.service 文件包含:

[Unit]
Description=Linux Malware Detect monitoring - maldet
After=network.target

[Service]
EnvironmentFile=/usr/local/maldetect/conf.maldet
ExecStart=/usr/local/maldetect/maldet --monitor USERS
ExecStop=/usr/local/maldetect/maldet --kill-monitor
Type=forking
PIDFile=/usr/local/maldetect/tmp/inotifywait.pid
[Install]
WantedBy=multi-user.target

在我更新之前,我验证了所有服务都正常工作,并且在更新期间选择了“N”否,拒绝替换我的自定义配置文件......所以应该没有任何改变。

另外,我使用的是 Linux 5.10.0-8-amd64 & maldet 1.6.4

有人可以帮我解决这个问题吗?谢谢

malware debian
  • 1 1 个回答
  • 582 Views

1 个回答

  • Voted
  1. Best Answer
    camillepr
    2021-09-28T01:18:12+08:002021-09-28T01:18:12+08:00

    问题是文件/usr/local/maldetect/internals/functions中的条件:

    if [ -f "/boot/System.map-$(uname -r)" ]; then
            ksup=`grep -i inotify_ /boot/System.map-$(uname -r)`
            if [ -z "$ksup" ]; then
                eout "{mon} kernel does not support inotify(), aborting." 1
                exit
            fi
        elif [ -f "/boot/config-$(uname -r)" ]; then
            ksup=`grep -m1 CONFIG_INOTIFY /boot/config-$(uname -r)`
            if [ -z "$ksup" ]; then
                eout "{mon} kernel does not support inotify(), aborting." 1
                exit
            fi
    fi
    

    它正在对文件/boot/System.map-$(uname -r)执行 grep,但在 Debian 11 中,内容是ffffffffffffffff B The real System.map is in the linux-image-<version>-dbg package

    我看到两个快速解决方案,第一个是检查正确的文件:

    • 使用此命令为正在运行的内核安装 dbg 包apt install linux-image-$(uname -r)-dbg
    • 将条件的文件路径替换为指向好的文件路径sed -i 's#/boot/System.map#/lib/debug/boot/System.map#' /usr/local/maldetect/internals/functions

    为了避免安装 dbg 包,另一种解决方案是删除第一个条件,只使用第二个签入/boot/config-$(uname -r).

    我用第一个来测试,Maldetect现在开始了。两种解决方案都应该在等待最终修复时起作用。

    问候

    • 2

相关问题

  • 网站被隐藏的 iframe (q5x.ru) 攻击

  • 如何删除“ffsearcher”木马?

  • Conficker:是否应该保留在组策略中采取的防止病毒攻击的步骤?

  • 使用个人笔记本电脑处理无线网络中的垃圾邮件或病毒感染主机的最佳方法是什么?

  • 我是否需要为我网络上的所有 PC 部署防病毒和反间谍软件?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve