2023-03-30 02:08:47 -04:00
## Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
2020-01-24 04:30:36 -05:00
## See the file COPYING for copying conditions.
2022-07-12 02:58:16 -04:00
## See the following links for a community discussion and overview regarding the selections
## https://forums.whonix.org/t/blacklist-more-kernel-modules-to-reduce-attack-surface/7989
## https://madaidans-insecurities.github.io/guides/linux-hardening.html#kasr-kernel-modules
2022-07-07 13:04:37 -04:00
2022-07-12 02:58:16 -04:00
## Disable automatic conntrack helper assignment
## https://phabricator.whonix.org/T486
2020-01-24 04:30:36 -05:00
options nf_conntrack nf_conntrack_helper=0
2022-07-12 02:58:16 -04:00
## Disable bluetooth to reduce attack surface due to extended history of security vulnerabilities
## https://en.wikipedia.org/wiki/Bluetooth#History_of_security_concerns
2023-10-27 10:34:21 -04:00
#
## Now replaced by a privacy and security preserving default bluetooth configuration for better usability
#
# install bluetooth /bin/disabled-bluetooth-by-security-misc
# install btusb /bin/disabled-bluetooth-by-security-misc
2020-01-24 04:30:36 -05:00
2022-07-12 02:58:16 -04:00
## Disable thunderbolt and firewire modules to prevent some DMA attacks
2022-07-13 09:42:13 -04:00
install thunderbolt /bin/disabled-thunderbolt-by-security-misc
install firewire-core /bin/disabled-firewire-by-security-misc
install firewire_core /bin/disabled-firewire-by-security-misc
install firewire-ohci /bin/disabled-firewire-by-security-misc
install firewire_ohci /bin/disabled-firewire-by-security-misc
install firewire_sbp2 /bin/disabled-firewire-by-security-misc
install firewire-sbp2 /bin/disabled-firewire-by-security-misc
install ohci1394 /bin/disabled-firewire-by-security-misc
install sbp2 /bin/disabled-firewire-by-security-misc
install dv1394 /bin/disabled-firewire-by-security-misc
install raw1394 /bin/disabled-firewire-by-security-misc
install video1394 /bin/disabled-firewire-by-security-misc
2020-01-24 04:30:36 -05:00
2022-07-12 02:58:16 -04:00
## Disable CPU MSRs as they can be abused to write to arbitrary memory.
## https://security.stackexchange.com/questions/119712/methods-root-can-use-to-elevate-itself-to-kernel-mode
2022-07-13 09:42:13 -04:00
install msr /bin/disabled-msr-by-security-misc
2020-01-24 04:30:36 -05:00
2022-07-12 02:58:16 -04:00
## Disables unneeded network protocols that will likely not be used as these may have unknown vulnerabilties.
## Credit to Tails (https://tails.boum.org/blueprint/blacklist_modules/) for some of these.
## > Debian ships a long list of modules for wide support of devices, filesystems, protocols. Some of these modules have a pretty bad security track record, and some of those are simply not used by most of our users.
## > Other distributions like Ubuntu[1] and Fedora[2] already ship a blacklist for various network protocols which aren't much in use by users and have a poor security track record.
2022-07-13 09:42:13 -04:00
install dccp /bin/disabled-network-by-security-misc
install sctp /bin/disabled-network-by-security-misc
install rds /bin/disabled-network-by-security-misc
install tipc /bin/disabled-network-by-security-misc
install n-hdlc /bin/disabled-network-by-security-misc
install ax25 /bin/disabled-network-by-security-misc
install netrom /bin/disabled-network-by-security-misc
install x25 /bin/disabled-network-by-security-misc
install rose /bin/disabled-network-by-security-misc
install decnet /bin/disabled-network-by-security-misc
install econet /bin/disabled-network-by-security-misc
install af_802154 /bin/disabled-network-by-security-misc
install ipx /bin/disabled-network-by-security-misc
install appletalk /bin/disabled-network-by-security-misc
install psnap /bin/disabled-network-by-security-misc
install p8023 /bin/disabled-network-by-security-misc
install p8022 /bin/disabled-network-by-security-misc
install can /bin/disabled-network-by-security-misc
install atm /bin/disabled-network-by-security-misc
2020-09-19 15:46:19 -04:00
2022-07-12 02:58:16 -04:00
## Disable uncommon file systems to reduce attack surface
2022-12-13 00:11:24 -05:00
## HFS and HFS+ are legacy Apple filesystems that may be required depending on the EFI parition format
2022-07-13 09:42:13 -04:00
install cramfs /bin/disabled-filesys-by-security-misc
install freevxfs /bin/disabled-filesys-by-security-misc
install jffs2 /bin/disabled-filesys-by-security-misc
install hfs /bin/disabled-filesys-by-security-misc
install hfsplus /bin/disabled-filesys-by-security-misc
install udf /bin/disabled-filesys-by-security-misc
2020-01-24 04:30:36 -05:00
2022-07-12 02:58:16 -04:00
## Disable uncommon network file systems to reduce attack surface
2022-07-13 09:42:13 -04:00
install cifs /bin/disabled-netfilesys-by-security-misc
install nfs /bin/disabled-netfilesys-by-security-misc
install nfsv3 /bin/disabled-netfilesys-by-security-misc
install nfsv4 /bin/disabled-netfilesys-by-security-misc
install ksmbd /bin/disabled-netfilesys-by-security-misc
install gfs2 /bin/disabled-netfilesys-by-security-misc
2022-07-07 05:26:55 -04:00
2022-07-12 02:58:16 -04:00
## Disables the vivid kernel module as it's only required for testing and has been the cause of multiple vulnerabilities
## https://forums.whonix.org/t/kernel-recompilation-for-better-hardening/7598/233
## https://www.openwall.com/lists/oss-security/2019/11/02/1
## https://github.com/a13xp0p0v/kconfig-hardened-check/commit/981bd163fa19fccbc5ce5d4182e639d67e484475
2022-07-13 09:42:13 -04:00
install vivid /bin/disabled-vivid-by-security-misc
2022-07-07 05:26:55 -04:00
2022-07-12 02:58:16 -04:00
## Disable Intel Management Engine (ME) interface with the OS
## https://www.kernel.org/doc/html/latest/driver-api/mei/mei.html
2022-07-13 09:42:13 -04:00
install mei /bin/disabled-intelme-by-security-misc
install mei-me /bin/disabled-intelme-by-security-misc
2022-07-07 15:27:15 -04:00
2022-07-12 02:58:16 -04:00
## Blacklist automatic loading of the Atheros 5K RF MACs madwifi driver
## https://git.launchpad.net/ubuntu/+source/kmod/tree/debian/modprobe.d/blacklist-ath_pci.conf?h=ubuntu/disco
2022-07-09 14:52:00 -04:00
blacklist ath_pci
2022-07-12 02:58:16 -04:00
## Blacklist automatic loading of miscellaneous modules
## https://git.launchpad.net/ubuntu/+source/kmod/tree/debian/modprobe.d/blacklist.conf?h=ubuntu/disco
2022-07-09 14:52:00 -04:00
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac
2022-07-12 02:58:16 -04:00
## Blacklist automatic loading of framebuffer drivers
## https://git.launchpad.net/ubuntu/+source/kmod/tree/debian/modprobe.d/blacklist-framebuffer.conf?h=ubuntu/disco
2022-07-09 14:52:00 -04:00
blacklist aty128fb
blacklist atyfb
2022-11-09 04:43:59 -05:00
blacklist radeonfb
2022-07-09 14:52:00 -04:00
blacklist cirrusfb
blacklist cyber2000fb
blacklist cyblafb
blacklist gx1fb
blacklist hgafb
blacklist i810fb
2022-11-09 04:43:59 -05:00
blacklist intelfb
2022-07-09 14:52:00 -04:00
blacklist kyrofb
blacklist lxfb
2022-07-12 02:58:16 -04:00
blacklist matroxfb_bases
2022-07-09 14:52:00 -04:00
blacklist neofb
2022-11-09 04:43:59 -05:00
blacklist nvidiafb
2022-07-09 14:52:00 -04:00
blacklist pm2fb
blacklist rivafb
blacklist s1d13xxxfb
blacklist savagefb
blacklist sisfb
blacklist sstfb
blacklist tdfxfb
blacklist tridentfb
2022-11-09 04:43:59 -05:00
blacklist vesafb
2022-07-09 14:52:00 -04:00
blacklist vfb
blacklist viafb
blacklist vt8623fb
blacklist udlfb
2022-07-12 02:58:16 -04:00
## Disable CD-ROM devices
## https://nvd.nist.gov/vuln/detail/CVE-2018-11506
## https://forums.whonix.org/t/blacklist-more-kernel-modules-to-reduce-attack-surface/7989/31
2022-07-13 09:42:13 -04:00
#install cdrom /bin/disabled-cdrom-by-security-misc
#install sr_mod /bin/disabled-cdrom-by-security-misc
2022-07-09 14:53:25 -04:00
blacklist cdrom
blacklist sr_mod