this post was submitted on 18 Feb 2024
48 points (87.5% liked)
Linux
48031 readers
1383 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thank you for the list! Do you maybe know where can I find explanations what does each option do? I know only half of them and I already use some of them.
I will describe settings that are not so easy to google and a few new thoughts.
kptr restrict:
https://wiki.archlinux.org/title/security
https://lwn.net/Articles/420403/
Kexec:
You may google about mechanics, but basically, it is just a mechanism to 'reexec' your kernel to something different, usually another kernel, but you can boot netboot.xyz, for example.
But now imagine that it will boot a kernel that will dump the output of all your traffic, or will dump all your keyboard keypresses (keylogger).
These are unlikely scenarios. But I prefer to disable this feature since I don't use it anyway.
Also, about keyloggers. Any program inside your X session may grab all your keyboard events. Literally last week I wrote a keylogger in rust in 70 lines of code. Therefore, use Wayland.
Ebpf JIT:
There I misleaded you.
There is some new information about JIT and security. See https://youtu.be/kvt4wdXEuRU?si=3imn8PAEbvgjWTU3
According to the update, you need to set bpf_jit_harden=2 and unprivileged_bpf_disabled=1. (Even unprivileged ebpf may crash your kernel. For some unknown reason, this is not recognized as a problem.)
Randomize virtual memory address:
https://www.techtarget.com/searchsecurity/definition/address-space-layout-randomization-ASLR#:~:text=Address%20space%20layout%20randomization%20(ASLR)%20is%20a%20memory%2Dprotection,executables%20are%20loaded%20into%20memory.
systemd
If you use systemd your can use systemd-analyze tool to harden your units settings.
Also, I remember the tool you can use.
There are some security certifications - most used are pcidss or stig. There are guidelines to improve security.
You can use openscap with a profile (pcidss or stig or both) and it will check if your system satisfies these guidelines.
This may give you some thoughts.
Here is an alternative Piped link(s):
https://piped.video/kvt4wdXEuRU?si=3imn8PAEbvgjWTU3
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I'm open-source; check me out at GitHub.
Thank you very much for this detailed explanation! Looks like kptr and kexec are already disabled and enabled randomized virtual memory address in the hardened kernel. I will check for ebpf. Security certs seem interesting, I will defenetly look into them.