所以我刚刚安装并运行了rkhunter,它向我显示绿色 OKs / Not founds 除了:/usr/bin/lwp-request,如下所示:
/usr/bin/lwp-request [ Warning ]
Run Code Online (Sandbox Code Playgroud)
在日志中它说:
Warning: The command '/usr/bin/lwp-request' has been replaced by a
script: /usr/bin/lwp-request: Perl script text executable
Run Code Online (Sandbox Code Playgroud)
我已经跑了rkhunter --propupd
和sudo apt-get update && sudo apt-get upgrade
这并没有帮助。几天前我安装了 Debian 9.0,我是 Linux 的新手。
关于该怎么做的任何建议?
编辑:此外chkrootkit给了我这个:
发现以下可疑文件和目录:
/usr/lib/mono/xbuild-frameworks/.NETPortable
/usr/lib/mono/xbuild-frameworks/.NETPortable/v5.0/SupportedFrameworks/.NET Framework 4.6.xml
/usr/lib/mono/xbuild-frameworks/.NETFramework
/usr/lib/python2.7/dist-packages/PyQt5/uic/widget-plugins/.noinit
/usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/.noinit
/usr/lib/mono/xbuild-frameworks/.NETPortable
/usr/lib/mono/xbuild-frameworks/.NETFramework
Run Code Online (Sandbox Code Playgroud)
我想这是一个单独的问题?或者这根本就没有问题?我不知道如何检查这些文件/目录是否正常且需要。
编辑:注意我曾经也收到“检查密码文件更改”和“检查组文件更改”的警告,即使我没有更改任何此类错误。较早和较晚的扫描未显示任何警告 - 这些只显示一次。有任何想法吗?
我跑:
:~$ sudo rkhunter --checkall --report-warnings-only
Run Code Online (Sandbox Code Playgroud)
我收到的警告之一:
Warning: Suspicious file types found in /dev:
/dev/.udev/rules.d/root.rules: ASCII text
Run Code Online (Sandbox Code Playgroud)
并且root.rules
包含:
SUBSYSTEM=="block", ENV{MAJOR}=="8", ENV{MINOR}=="1", SYMLINK+="root"
Run Code Online (Sandbox Code Playgroud)
我想了解这些变量的含义和作用SUBSYSTEM
,ENV{MAJOR}
以及SYMLINK+
。
我刚刚跑了rkhunter --check
,除了这个之外一切都很好:
Checking if SSH root access is allowed [ Warning]
Run Code Online (Sandbox Code Playgroud)
这个警告是什么意思?此系统不允许 SSH 根访问。
编辑#1
这是我/etc/ssh/sshd_config
的设置方式:
PermitRootLogin no
Run Code Online (Sandbox Code Playgroud)
和 rkhunter.conf
root ~ # cat /etc/rkhunter.conf | grep ALLOW_SSH_ROOT_USER
#ALLOW_SSH_ROOT_USER=no
ALLOW_SSH_ROOT_USER=unset
Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 上,我正在尝试安装 rkhunter。
我试过了
apt-get install rkhunter
成功
但后来,我做到了
rkhunter --update
我不断得到
无效的 WEB_CMD 配置选项:相对路径名:“/bin/false”
当时,我像这样检查我的系统:
rkhunter --check --enable all --disable none --report-warnings-only
Run Code Online (Sandbox Code Playgroud)
或更短的版本:
rkhunter -c --enable all --disable none --rwo
Run Code Online (Sandbox Code Playgroud)
但这给了我这样的警告消息:
Run Code Online (Sandbox Code Playgroud)Warning: The command '/usr/bin/GET' has been replaced by a script: /usr/bin/GET: a /usr/bin/perl -w script text executable
这对我来说并不重要,我只想检查 rootkit,而不是其他任何东西。但我似乎找不到合适的选项来完成这项工作。
如何rkhunter
只扫描rootkit?
我尝试创建一个 systemd 启动脚本,它在我的笔记本电脑系统启动后 30 分钟启动 rkhunter 扫描,如下所示:
[Unit]
Description=starts rkhunter and displays any findings with zenity
[Service]
ExecStartPre=/bin/sleep 1800
ExecStart=/usr/local/sbin/rkhunter-check
[Install]
WantedBy=default.target
Run Code Online (Sandbox Code Playgroud)
但这失败并出现超时错误
Job for rkhunter.service failed because a timeout was exceeded.
Run Code Online (Sandbox Code Playgroud)
ExecStartPre 似乎不是这样工作的。
我该如何解决这个问题?
一个完美的解决方案是: