Ok, there seems to be a possible false positive story going on here...
Step by step:
First:
ssh -G 2>&1 | grep -e illegal -e unknown > /dev/null && echo "System clean" || echo "System infected"
This code's only purpose is to find out whether or not the command "ssh -G" returns the message "illegal option" in the first line. If it doesnt return this line, then it somehow means that the system is infected.
Second:
Searching for those files:
[root@pmail ~] ls -all /lib64/libkeyutils.so*
lrwxrwxrwx 1 root root 27 Jun 19 2021 /lib64/libkeyutils.so -> /usr/lib64/libkeyutils.so.1
lrwxrwxrwx. 1 root root 18 Jun 19 2021 /lib64/libkeyutils.so.1 -> libkeyutils.so.1.6
-rwxr-xr-x. 1 root root 16192 Jun 19 2021 /lib64/libkeyutils.so.1.6
Take a look at the date.
Next step is to check if those files are installed from a repo:
[root@pmail ~]# rpm -q --whatprovides /lib64/libkeyutils.so*
keyutils-libs-devel-1.5.10-9.el8.x86_64
keyutils-libs-1.5.10-9.el8.x86_64
keyutils-libs-1.5.10-9.el8.x86_64
Next step is to check when was this installed:
[root@pmail ~]# dnf history list keyutils-libs
ID | Command line | Date and time | Action(s) | Altered
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | | 2021-12-26 14:06 | Install | 362 EE
Take a look at the date and what line number is this. It says line number 1. Which means these files are installed on the first ever install
[root@pmail ~]# dnf history info 1 | grep 'keyutils-libs'
Install keyutils-libs-1.5.10-9.el8.x86_64 @baseos
This install was BEFORE CWP was installed. So, this seems like some mass hysteria going on with these files. It's a false positive.
Third:
netstat -plan | grep atd
It returns a result, but nothing is using it.
Probably because I have all ports closed except those needed?
Now, does a result from this last command indicate that my system is infected?
Here is an example of another article saying that a result like this means you're infected:
unix 2 [ ACC ] STREAM LISTENING 103713 8119/atd @/tmp/dbus-ZP7tFO4xsL
The red part is what indicates infection. I don't have the red part on my output.