How to prevent unprivileged users from viewing dmesg command output on Linux – nixCraft

One can use dmesg command see or control the kernel ring buffer. 
The kernel syslog contains debugging information that is often useful during exploitation of other vulnerabilities, such as kernel heap addresses. 
There is an option that prevents unprivileged users from reading the syslog.

sudo sysctl -w kernel.dmesg_restrict=1

1 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *