This document covers the various security features for the Laptop and Server roles.
This is a larger document than other documents in this flake. It is possible that errors may have crept in while writing this document. In any case, the flake source should be referred to as the primary and only source of truth.
- Madaidan's Insecurities
- Kicksecure System Hardening Checklist
- Tails Kernel Hardening
- ArchWiki - Security
Warnings:
- Several hardening options may hinder performance.
Missing features:
- AppArmor/SELinux support is not great under NixOS.
- LKRG (Linux Kernel Runtime Guard) does not work under NixOS.
- LOCKDOWN_LSM and MODULE_SIG are disabled in the kernel upstream to ensure reproducibility.
- Secure Boot
- Entropy
- Memory Allocator
- Filesystems
- Impermanence
- Kernel
- Kernel Parameters
- sysctl Options
- Module Blacklists
- Audit Subsystem
- Coredumps
- Emergency and Rescue
- Systemd Services
- Users and Privileges
- Nix Package Manager
- SOPS
- USBGuard
- Wireless Networking
- DNS
- Firewall
- MAC Randomization
- Secure Shell
- Fail2Ban
- I2P and Anonymity
- Display Server
- Session Locking
- Firejail
- Bubblewrap
- Browsers
- Search Engine
- Password Manager
- Virtualisation and Containers
Secure Boot is used to ensure that the bootloader is signed before loading. Secure Boot support for NixOS is provided by the lanzaboote project.
Note that Secure Boot can only be enabled post-installation. See Setting up Secure Boot.
Jitterentropy is used to improve RNG quality by providing a noise source using the CPU execution jitter.
The hardware RNGS are not trusted. This is done using the following kernel parameters:
random.trust_cpu=off
random.trust_bootloader=off
The graphene-hardened malloc
from GrapheneOS is used. This provides substantial hardening against various
vulnerabilities.
-
Mount Profiles
Filesystem mounts are hardened using Mount Profiles. These are used to set the following options on sensitive mounts:
nosuid nodev noexec ro -
ZFS
ZFS, which provides advanced self-healing capabilities and administraton, is supported out-of-the-box.
It is the also root filesystem on Laptop.
-
Encrypted Mounts
Also, LUKS encrypted mounts can be added using the variables file. See Additional Disks and Mounts.
-
Filesystem hardening sysctls
Several
fs.*sysctls are set. See sysctl Options.
LUKS encryption with a passphrase is enabled for the root partition, containing the main ZFS rpool.
Random encryption is used on the swap partition.
Impermanence ensures a clean filesystem after every reboot. Only explicitly declared state survives across reboots, and anything else is purged. This greatly reduces the persistent attack surface.
Impermanence is implemented differently on the Laptop and Server role, without using the library, using either ZFS Snapshots or tmpfs for rollbacks and bind mounts for state persistence.
See Impermanence.
The linux-hardened kernel from Nixpkgs is used.
Several kernel parameters are used to harden the kernel. They are covered below:
-
disables merging of slabs of similar sizes
sometines, vulnerable slabs may be merged with safe ones
slight increase in kernel memory utilization
slab_nomerge -
enable zeroing of memory during allocation and free time
mitigate use-after-free vulnerabilities and erase sensitive data also enables poisoning for some freed memory
little performance cost
init_on_alloc=1 init_on_free=1 -
randomise page allocator freelists
makes page allocations less predictable
slightly improves performace
page_alloc.shuffle=1 -
enable kernel page table isolation
mitigates meltdown and prevents some KASLR bypasses
pti=on -
randomize kernel stack offset on each syscall
mitigates attacks reliant on deterministic kernel stack layouts
randomize_kstack_offset=on -
disable obsolete vsyscalls
replaced by vDSO calls
vsyscall=none -
disable debugfs
debugfs exposes sensitive kernel information
debugfs=off -
panic on oops
some kernel exploits will cause an "oops"
this will cause the kernel to panic on such oopses, preventing the exploit
sometimes, bad drivers cause harmless oopses, resulting in system crashes
oops=panic -
enforce signed modules
only allows kernel modules that have been signed with a valid key to be loaded makes it harder to load a malicious kernel module
virtualbox, nvidia modules may need manual signing
since MODULE_SIG is disabled on NixOS, this does nothing
module.sig_enforce=1 -
enable the kernel lockdown LSM
confidentiality is the strictest mode protects both kernel integrity and
prevents unauthorized access to kernel data establishes clear security boundary between userspace and kernel
this implies
module.sig_enforce=1since LOCKDOWN_LSM is disabled on NixOS, this does nothing
lockdown=confidentiality -
panic on uncorrectable memory errors
kernel will panic on uncorrectable memory errors
mainly for systems with ECC memory
mce=0 -
mitigate spectre vulnerabilities
spectre_v2=on spec_store_bypass_disable=on -
do not trust the proprietary cpu RNG
this RNG can not be audited
random.trust_cpu=off random.trust_bootloader=off -
enable IOMMU
mitigates direct memory access attacks
intel_iommu=on amd_iommu=on -
fix a hole in IOMMU
disables busmaster bit on all PCI bridges in early boot
efi=disable_early_pci_dma -
force KVM to mark huge pages as non-executable
prevents code execution in certain memory regions
can increase memory usage, especially with KVM-based hypervisors
kvm.nx_huge_pages=force -
quiet boot
do not print unnecessary text during boot
prevent malicious screenreaders from capturing system logs
quiet loglevel=3 rd.systemd.show_status=false rd.udev.log_level=3 udev.log_priority=3 -
prevent kaudit overflow
audit_backlog_limit=8192 -
disable IPv6
ipv6.disable=1
unused parameters due to high performance costs:
# disable hyperthreading - for both amd and intel
# also disable TSX and mitigate TAA - mostly for intel
# also mitigate speculative execution vulnerabilities - mostly for intel
# dramatic performance losses
#"nosmt=force"
#"tsx=off"
#"tsx_async_abort=full,nosmt"
#"l1tf=full,force"
#"mds=full,nosmt"
Several kernel parameters are used to harden the kernel. They are covered below:
-
enable ASLR
randomises memory space for stack, heap, memory mappings and shared libraries
kernel.randomize_va_space=2 -
disable magic SysRq key
kernel.sysrq=0 -
restrict access to kernel pointers via /proc
kernel.kptr_restrict=2 -
only allow access to kernel log messages for privileged users
kernel.dmesg_restrict=1 -
disable unprivileged calls to berkeley packet filter
kernel.unprivileged_bpf_disabled=1 -
disable ability to load a new kernel while system is running
kernel.kexec_load_disabled=1 -
control use of performance events system by unprivileged users
=2 disallows kernel profiling by unprivileged users
kernel.perf_event_paranoid=3 -
limit cpu time that can be accounted for performance events to 1%
kernel.perf_cpu_time_max_percent=1 -
limit sample rate for performance events to 1
kernel.perf_event_max_sample_rate=1 -
disable ptrace with yama LSM
kernel.yama.ptrace_scope=3 -
disable unprivileged user namespaces
kernel.unprivileged_userns_clone=0NOTE: Browsers and distrobox containers require this feature to be enabled, and it can be enabled on demand on a as-needed basis by the user using the waybar userns module.
-
disable function tracing
kernel.ftrace_enabled=0 -
prevent auto loading line disciplines for tty
dev.tty.ldisc_autoload=0 -
disable core dumps for setuid programs
fs.suid_dumpable=0 -
restrict creation of hard links to files owned by other users
fs.protected_hardlinks=1 -
restrict creation of symlinks to files owned by other users
fs.protected_symlinks=1 -
controls permissions for named pipes
only owned of the FIFO can write to it
fs.protected_fifos=2 -
restrict access to regular files by non-root users if the file is owned by another user
fs.protected_regular=2 -
disable the berkely packet filter JIT
net.core.bpf_jit_enable=0 -
enable JIT hardening techniques like constant blinding
net.core.bpf_jit_harden=2 -
protect against SYN flood attacks
net.ipv4.tcp_syncookies=1 -
protect against time-wait assassination by dropping RST packets
net.ipv4.tcp_rfc1337=1 -
enable source validation of received packets from all interfaces
protect against IP spoofing
net.ipv4.conf.all.rp_filter=1 net.ipv4.conf.default.rp_filter=1 -
disable ICMP redirect acceptance and sending
prevent MITM attacks
net.ipv4.conf.all.accept_redirects=0 net.ipv4.conf.default.accept_redirects=0 net.ipv4.conf.all.secure_redirects=0 net.ipv4.conf.default.secure_redirects=0 net.ipv4.conf.all.send_redirects=0 net.ipv4.conf.default.send_redirects=0 net.ipv6.conf.all.accept_redirects=0 net.ipv6.conf.default.accept_redirects=0 -
ignore all ICMP requests
prevent smurf attacks and clock fingerprinting
net.ipv4.icmp_echo_ignore_all=1 net.ipv4.icmp_echo_ignore_broadcasts=1 -
disable source routing
prevent MITM attacks
net.ipv4.conf.all.accept_source_route=0 net.ipv4.conf.default.accept_source_route=0 net.ipv6.conf.all.accept_source_route=0 net.ipv6.conf.default.accept_source_route=0 -
disable TCP SACK
commonly exploited and mostly unnecessary
net.ipv4.tcp_sack=0 net.ipv4.tcp_dsack=0 net.ipv4.tcp_fack=0 -
log martian packets
net.ipv4.conf.all.log_martians=1 net.ipv4.conf.default.log_martians=1 -
disable IPv6 router advertisements
prevent MITM attacks
net.ipv6.conf.all.accept_ra=0 net.ipv6.conf.default.accept_ra=0 -
generate a random IPv6 address every time
IPv6 addresses are tied to MAC address, making them unique for each device
net.ipv6.conf.all.use_tempaddr=2 net.ipv6.conf.default.use_tempaddr=2 -
disable tcp timestamps
tcp timestamps leak the system time
kernel attempts to mitigate this by adding random offsets but that is not sufficient
net.ipv4.tcp_timestamps=0 -
disable the often-abused userfaultfd() syscall
vm.unprivileged_userfaultfd=0 -
increase bits of entropy used for mmap ASLR
vm.mmap_rnd_compat_bits=16This is set to 32 on Laptop
-
do not print unnecessary things during boot
kernel.printk="3 3 3 3"
Several kernel modules are blacklisted to reduce the attack surface. They are covered below:
-
datagram congestion control protocol
manages congestion without providing reliable data delivery can blacklist unless using voice-over-IP
dccp -
stream control transmission protocol
like tcp but with support for multiple streams can blacklist unless involved in telecoms or signalling
sctp -
reliable datagram sockets
high performance clustered computing and inter-process communication can blacklist unless running distributed systems
rds -
transparent inter-process communication
cluster-wide communication in systems like databases/clustered servers can blacklist unless running clustered environments
tipc -
high-level data link control
serial communication and networking over physical links can blacklist unless using specialized serial networking hardware
n-hdlc -
amateur radio X.25 protocol
amateur radio communication can blacklist unless a radio operator
ax25 -
network layer protocol used in AX.25
netrom -
X.25 protocol
packet-switched network protocol can blacklist unless using legacy networking systems
x25 -
amateur radio link layer
packet radio communication can blacklist unless a radio operator
rose -
digital equipment corporation network
DEC network protocol for its proprietary systems can blacklist unless using legacy DEC equipment
decnet -
Acorn Computers' networking protocol
proprietary network protocol developed by Acorn can blacklist unless using legacy Acorn equipment
econet -
IEEE 802.15.4 protocol family
low-rate wireless personal area networks (LR-WPANs), mostly for IoT devices can blacklist unless dealing with IoT
af_802154 -
internetwork packet exchange
Novell protocol used in legacy networks can blacklist unless using old Novell networks
ipx -
AppleTalk protocol
network protocol developed by Apple can blacklist unless using legacy Mac systems
appletalk -
subnetwork access protocol
transmitting packets over different types of physical networks can blacklist unless dealing with low-level networking
psnap -
IEEE 802.3 and 802.2
ethernet-based networking standard for ethernet communication can blacklist unless using ethernet (eg. only using wifi)
p8023 p8022 -
controller area network
communication in vehicles and industrial systems can blacklist unless dealing with embedded/automotive systems
can -
asynchronous transfer mode
used in old telecommunications networks can blacklist unless using legacy telecom equipment
atm -
rare filesystems
can blacklist if not using
cramfs freexvfs jffs2 hfs hfsplus squashfs udf overlay adfs affs bfs befs efs erofs exofs f2fs hpfs jfs minix nilfs2 omfs qnx4 qnx6 sysv ufs -
network filesystems
can blacklist if not using
cifs nfs nfsv3 nfsv4 sunrpc lockd ksmbd gfs2 -
virtual video driver
can blacklist unless testing video drivers
vivid -
IEEE 1394
high-speed interface for video cameras, external drives, etc replacd by usb 3.0 and usb c can blacklist unless using old firewire devices
firewire-core -
intel thunderbolt
high-speed data and power transfer can blacklist unless using thunderbolt
thunderbolt -
bluetooth
can blacklist unless using bluetooth
bluetooth btusb -
usb video class devices
can blacklist unless using webcam
uvcvideo -
annoying PC speaker module
can blacklist unless deaf
pcspkr
The Linux audit subsystem is enabled with various STIG-compliant rules. They are covered below:
-
STIG-compliant rules:
-
https://stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268165NixOS must generate audit records when successful/unsuccessful attempts to delete security objects occur.
-
https://stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268163NixOS must generate audit records when successful/unsuccessful attempts to modify security objects occur.
-a always,exit -F path=/run/current-system/sw/bin/chage -F perm=x -F auid>=1000 -F auid!=unset -k compliance-privileged-chage -a always,exit -F path=/run/current-system/sw/bin/chcon -F perm=x -F auid>=1000 -F auid!=unset -k compliance-perm-mod -a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=-1 -k compliance-perm-mod -a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k compliance-perm-mod -a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=-1 -k compliance-perm-mod -a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k compliance-perm-mod -
https://stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268164NixOS must generate audit records when successful/unsuccessful attempts to delete privileges occur.
-a always,exit -F path=/run/current-system/sw/bin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k compliance-privileged-usermod -
https://stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268166NixOS must generate audit records when concurrent logins to the same account occur from different sources.
-a always,exit -F path=/var/log/lastlog -F perm=wa -F key=logins -
https://stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268167NixOS must generate audit records for all account creations, modifications, disabling, and termination events.
-a always,exit -F path=/etc/passwd -F perm=wa -F key=compliance-identity -a always,exit -F path=/etc/shadow -F perm=wa -F key=compliance-identity -a always,exit -F path=/etc/group -F perm=wa -F key=compliance-identity -a always,exit -F path=/etc/gshadow -F perm=wa -F key=compliance-identity -a always,exit -F path=/etc/sudoers -F perm=wa -F key=compliance-identity -a always,exit -F path=/etc/security/opasswd -F perm=wa -F key=compliance-identity -
https://www.stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268094Successful/unsuccessful uses of the mount syscall in NixOS must generate an audit record.
-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=unset -k compliance-privileged-mount -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=unset -k compliance-privileged-mount -
https://www.stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268091NixOS must generate audit records for all usage of privileged commands.
-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k compliance-execpriv -a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k compliance-execpriv -a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k compliance-execpriv -a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k compliance-execpriv -
https://www.stigviewer.com/stigs/anduril_nixos/2024-10-25/finding/V-268096Successful/unsuccessful uses of the init_module, finit_module, and delete_module system calls in NixOS must generate an audit record.
-a always,exit -F arch=b32 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=unset -k compliance-module-chng -a always,exit -F arch=b64 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=unset -k compliance-module-chng
-
-
Additional rules
-
log everytime a program is attempted to run
-a exit,always -F arch=b64 -S execve -k rules-run
-
Coredumps are disabled to prevent leaking sensitive information.
This is by disabling systemd coredumps, using PAM login limits, and using some sysctl options.
The emergency and rescue targets and services are disabled.
Upstream Nixpkgs already hardens several common service, especially network-facing ones. Some services are additionally hardened with low-breakage service options. These options are:
{
ProtectClock = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectControlGroups = true;
ProtectHome = "read-only";
ProtectHostname = true;
SystemCallArchitectures = "native";
LockPersonality = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
}A single user is created, and is part of the wheel group.
The root account is locked.
Both run0 and sudo are available for privilege elevation. However, run0 is
preferred and is used in the CLI. sudo is also aliased to run0 in the bash
shell.
Other tools like su and pkexec are disabled by removing their setuid bit.
The Nix package manager and the Nix packaging model prevent various classes of supply chain attacks.
The Nix package manager is hardened and can only be used by members of the wheel group. Furthermore, only the root user is trusted by the store uri. This is important because adding a trusted user is essentially passwordless root.
Nix is also set to only download and use cryptographically signed binaries. Remote building and copying signed closures can be done using seed.
Nonfree packages and broken packages are disabled.
Untrusted flake configuration settings are disabled. These may allow the flake to get root privileges.
sops-nix is used to store secrets consumed by the NixOS modules.
USBGuard is used to protect against rogue USB devices like BadUSB.
The policy is set to allow only devices that existed before the daemon started. All other devices are blocked.
Additionally, devices with the following identifiers are explicitly rejected:
-
Both mass storage device and HID input device
reject with-interface all-of { 08:*:* 03:00:* } reject with-interface all-of { 08:*:* 03:01:* } -
Both mass storage device and wireless controller
reject with-interface all-of { 08:*:* e0:*:* } -
Both mass storage device and communications device
reject with-interface all-of { 08:*:* 02:*:* }
USBGuard can be controlled using the usbguard command line interface. Only the
root user is allowed to use the USBGuard IPC.
wpa_supplicant is used for wireless connections. Network secrets are stored
using SOPS.
WPA3 (SAE / dragonfly) is used for wireless authentication.
Unbound DNS server hosted on Server is used as the default DNS server.
Cloudflare is used as the fallback server.
The Unbound DNS server hosted on Server is hardened. The following options are used:
-
disable ipv6
prefer-ip6=no prefer-ip4=yes do-ip6=no do-ip4=yes -
hide information
hide-identity=yes hide-version=yes hide-trustanchor=yes hide-http-user-agent=yes -
send minimum information to upstream servers
qname-minimisation=yes qname-minimisation-strict=yes -
harden against very small EDNS buffer sizes
harden-short-bufsize=yes -
harden against large queries
harden-large-queries=yes -
harden against out of zone rrsets, to avoid spoofing attempts
harden-glue=yes -
harden against unverified glue rrsets
harden-unverified-glue=yes -
harden against receiving dnssec-stripped data
harden-dnssec-stripped=yes -
harden against queries that fall under dnssec-signed nxdomain names
harden-below-nxdomain=yes -
harden the referral path by performing additional queries, intensive and experimental
harden-referral-path=no -
harden against downgrades when multiple algorithms are advertised
harden-algo-downgrade=yes -
harden against unknown records in the authority and additional sections
harden-unknown-additional=yes -
use the dnssec nsec chain
aggressive-nsec=yes -
use random bits in the query to foil spoof attempts
use-caps-for-id=yes
The NixOS networking.firewall module is used, which uses the new nf_tables
backend. The userspace tool nixos-firewall-tool can be used for ad-hoc
changes.
By default, NO ports are open on ANY interface. Additionally, NO interfaces are trusted, not even loopback.
ICMP ping requests are also disallowed.
Ports are open on the server based on the enabled services. See Server Usage Documentation which covers all ports.
Most ports are opened only to the loopback interface since services are
reverse-proxied via NGINX. For the few ports that are opened to LAN, the ports
are opened only to a select CIDR defined by the network.range variable in the
variables file. Since this value is a CIDR, it can be used to allow only
specific IP addresses. For example, by setting it to 10.0.0.100/31, only
10.0.0.100 and 10.0.0.101 are allowed.
GNU MAC Changer is used to randomize the MAC address. Only the non-vendor bits are randomized, since randomizing the entire MAC address may lead to extremely uncommon MAC addresses which reduces anonymity.
SSH is enabled on the Server. See Server Usage Documentation for details about using a non-default port, authorized keys, etc.
The SSH configuration is sufficiently hardened. The following options are set:
-
Only the main user and group is allowed.
-
Root login is disabled.
PermitRootLogin no -
Password authentication is disabled.
PasswordAuthentication no -
Only three authentication tries are allowed.
MaxAuthTries 3 -
Only two concurrent session are allowed.
MaxSessions 2 ClientAliveCountMax 2 -
General hardening
AllowTCPForwarding no TCPKeepAlive no AllowAgentForwarding no
Fail2Ban is used to limit brute force authentication attempts on SSH.
-
I2P
The I2P network can be browsed using the i2p-browser which uses the I2P HTTP Proxy hosted on Server.
-
Tor
oniuxcan be used to run binaries in a Tor sandbox. Do not useoniuxto run browsers, use the Tor Browser instead. The Tor Browser is not installed by default but can be used by installing it in an ad-hoc Nix shell. -
Metadata Anonymization
mat2can be used to remove any identifying metadata from files.
The I2PD router is hosted on Server. The qBittorrent torrent client also uses the I2P network via this router.
The desktop is 100% wayland, with no X or Xwayland.
The session is locked using swaylock after 10 seconds of inactivity, and
suspended after further inactivity. This behaviour can be controlled using the
waybar idle_inhibitor Module.
firejail can be used to sandbox programs.
firejail, along with additional hardening flags, is used to sandbox browsers.
Some of the flags used are listed below. Not all flags are used for all
browsers.
-
--nonewprivsEnsures that child processes cannot acquire new privileges using execve. This mitigates most of the vulnerabilities that arises due to
firejailbeing a suid binary. -
--seccompEnable the seccomp filter and blacklist the syscalls in the default list.
-
--caps.drop=allDrop all capabilities for the processes running in the sandbox.
-
--norootInstall a user namespace with a single user - the current user. root does not exist in the new namespace.
-
--nodbusDisable D-Bus access for both the system and session buses.
-
--nogroupsDisable supplementary groups.
-
--nodvdDisable DVD and audio CD devices.
-
--noprintersDisable printers.
-
--nou2fDisable U2F devices.
-
--no3dDisable 3D hardware acceleration.
-
--nosoundDisable sound system.
-
--novideoDisable video devices.
-
--privateMount new
/rootand/home/userdirectories in temporary filesystems. -
--private-cacheMount an empty temporary filesystem on top of the
.cachedirectory in user home. -
--private-cwdSet working directory inside jail to the home directory.
-
--private-devCreate a new
/devwith limited devices. -
--private-tmpMount a new temporary filesystem on top of
/tmp. -
--private-etc=...Use an empty
/etcwith specific files.
bubblewrap can be used to sandbox programs.
Three hardened browsers are included. See Laptop Usage Documentation for more information about browser usage. This section covers the various hardening flags in the browsers.
-
Runs in a firejail with the following flags:
--nonewprivs --whitelist=/home/${config.vars.user.name}/.local/share/home.html --caps.drop=all --nodvd --nogroups --noprinters --noroot --nou2f --private-cache --private-cwd --private-dev --private-etc=chromium,brave,resolv.conf,hosts -
Several Chromium Enterprise Policies and some Brave-Specific Policies are used to harden the browser. Some of them involve:
-
Disabling several Brave anti-features like:
- Brave Rewards
- Brave Wallet
- Brave VPN
- Brave AI Chat
- Brave News
- Brave Talk
- Brave Speedreader
- Brave Wayback Machine
- Brave P3A (Privacy Preserving Product Analytics)
- Brave Stats Ping
- Brave Web Discovery
- Brave Playlist
- Tor (breaks anonymity)
-
Enabling useful Brave features:
- Brave DeAmp
- Brave Debouncing
- Brave Reduce Language Fingerprinting
-
Default block some permissions and content:
- Clipboard
- Geolocation
- Insecure Content
- Notifications
- Popups
- Sensors
- Bluetooth
- Hid
- Usb
- Intrusive Ads
- Non-Proxied UDP
-
Disable telemetry, services that require sending data to Google, and other features to reduce attack surface:
- V8 JavaScript JIT
- Metrics
- Feedback Surveys
- User Feedback
- Safe Browsing Extended Reporting
- Safe Browsing Deep Scanning
- Advanced Protection
- Domain Reliability
- Network Time Queries
- Keyed Anonymization Data Collection
- Accesibility Image Labels
- Media Recommendations
- Password Manager
- Autofill
- Add Profile
- PDF Reader
- External Extensions
- Shopping List
- Search Suggest
- Spellcheck
- Live Translate
- Media Router
- Sync
- Promotions
- Dinosaur Easter Egg
- Printing
- Bookmark Bar
- Third Party Cookies
- Background Apps
- Autoplay
- Payment Method Query
-
Use Post Quantum Key Cryptography
-
Use Site Per Process
-
Use Strict HTTPS-Only Mode
-
Use SearXNG as Search Engine
-
-
Preferences file settings
- Auto redirect amp pages
- Auto redirect tracking URLs
- Prevent language fingerprinting
- Automatically remove unused permissions
- Aggressive trackers and ads blocking
- Block fingerprinting
- Block third party cookies
- Strict HTTPS upgrades
- Disable V8 JavaScript JIT
- Disable WebTorrent
- Disable social media components
- Disable Google push messaging services
- Disable saving contact information
- Disable search suggestions
- Limit autocompletions to history only
-
Local state file settings
- Disable Brave P3A
- Disable Brave stats reporting
- Disable user experience metrics reporting
-
Extensions
- Bitwarden (for use with selfhosted Vaultwarden)
- uBlock Origin (further configured using policies)
- Dark Reader
- Vimium
-
Runs in a firejail with the following flags:
--nonewprivs --caps.drop=all --no3d --nodbus --nodvd --nogroups --noprinters --noroot --nosound --nou2f --novideo --private-cache --private-cwd --private-dev --private-etc --private-tmp --seccomp -
Firefox policies:
-
Disabled features:
- Auto update
- Autofill address
- Autofill credit card
- Background updates
- About addons page
- About config page
- About profiles page
- About support page
- Accounts
- PDF viewer
- Developer tools
- Feedback commands
- Firefox accounts
- Firefox screenshots
- Firefox studies
- Forget button
- Form history
- Master password creation
- Password reveal
- Profile import
- Profile refresh
- Security bypass
- Set desktop background
- System addon update
- Telemetry
- Bookmarks toolbar
- Check default browser
- Encrypted media extensions
- Firefox home items
- Firefox suggest
- HTTPS only mode (disabled for i2p)
- Install addons permission
- Microsoft Entra SSO
- Default bookmarks
- Save logins
- First run page
- Post update page
- Password manager
- PDFjs
- Picture-in-picture
- Printing
- Search suggest
- Home button
- Show terms of use
- Translate
- WindowsSSO
-
Enabled features:
- Start downloads in temp directory
- Prompt for download location
- Sanitize on shutdown
- Post quantum key agreement
- Tracking protection from Cryptomining, Fingerprinting and Email Tracking
- Encrypted client hello
-
-
Profile options
-
Use I2P HTTP proxy
-
Disable suggestions except history
-
Enable resist fingerprinting
-
Disable JavaScript
-
Default deny permissions:
- Camera
- Desktop notification
- Geolocation
- Microphone
- Screen wake lock
- xr
- Shortcuts
-
-
Runs in a firejail with the following flags:
--nonewprivs --private --caps.drop=all --noroot --private-cache --private-cwd --private-dev --private-etc --private-tmp -
Uses Windows 11 user agent. Other than these, the browser is mostly vanilla and unconfigured.
Available only under Nomad Mode. Vanilla unconfigured Librewolf.
The SearXNG metasearch engine is hosted on Server. This preserves user privacy while ensuring good quality results. See Server Usage Documentation for information about default search engines.
The Brave Browser uses SearXNG as the default search engine.
The Vaultwarden password manager is hosted on Server.
The Brave Browser uses the Bitwarden extension to access the vault hosted on Server.