3 ms·
Linux hide processes from other users and ps command
- josephcsible 4y agotl;dr: mount /proc with the hidepid option.
- LinuxBender 4y agoThe article kindof touches on this but I do not believe they stress enough that if using hidepid=2 then one must create a group that will include all of the service accounts used by automation and monitoring tools or the people that manage those tools will raise high priority issues. Add the trusted automation service accounts to whatever group one specified in gid={gid of your monitoring group}. IIRC systemd containers can also have issues with this or at least did at one point. This is of course if the automation is not running as root. Along the same line of obfuscation of processes, one can also obfuscate visibility of network commands by setting permissions on /dev/net/{sockst*,tcp*,udp*,raw,netstat,unix} and so on at startup to hide established connections from compromised or malicious daemons but in the same regard one must set group permissions to allow trusted automation and monitoring tools. Similar outcomes can also be accomplished in namespaces.