Merge pull request #16 from madaidan/patch-12

Mount /proc with hidepid=2
This commit is contained in:
Patrick Schleizer 2019-06-30 08:09:23 +00:00 committed by GitHub
commit 9525ff87c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

3
debian/control vendored
View File

@ -109,3 +109,6 @@ Description: enhances misc security settings
DMA (Direct Memory Access) attacks. DMA (Direct Memory Access) attacks.
. .
IOMMU is enabled with a boot parameter to prevent DMA attacks. IOMMU is enabled with a boot parameter to prevent DMA attacks.
.
A systemd service mounts /proc with hidepid=2 at boot to prevent users from seeing each other's processes.
.

View File

@ -0,0 +1,27 @@
[Unit]
Description=Mounts /proc with hidepid=2
Documentation=https://github.com/Whonix/security-misc
Requires=local-fs.target
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/bin/mount -o remount,nosuid,nodev,noexec,hidepid=2 /proc
ProtectSystem=strict
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
PrivateTmp=true
PrivateMounts=true
PrivateDevices=true
PrivateNetwork=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
RestrictRealtime=true
SystemCallArchitectures=native
RestrictNamespaces=true
SystemCallFilter=mount munmap access read open close stat fstat lstat mmap mprotect brk rt_sigaction rt_sigprocmask execve readlink getrlimit getuid getgid geteuid getegid statfs prctl arch_prctl set_tid_address newfstatat set_robust_list
[Install]
WantedBy=multi-user.target