I just re-enabled the systemd service I created for the previous ptrace_scope vulnerability (although I did change the /usr/bin/ file setting from 3 to 2):
For anyone wanting to implement this mitigation at system boot, you should first create a file in /usr/bin/:
sudo touch /usr/bin/disable-yama-ptrace
Open the file in your favorite text editor (for example, Plasma users can open it with kate):
kate /usr/bin/disable-yama-ptrace
Add the following content to the file:
#!/usr/bin/env bash
echo 3 > /proc/sys/kernel/yama/ptrace_scope
exit 0
Note: you can also use echo 2 instead of echo 3, as per the above quoted text from @LeakyMemory
Then sa…
Confirmation it is working:
❯ sysctl kernel.yama.ptrace_scope
kernel.yama.ptrace_scope = 2