mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-03 03:48:22 +00:00
Rebase secureblue with a new, clean commit history
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<zone>
|
||||
<short>Fedora Workstation</short>
|
||||
<description>Overriden default config</description>
|
||||
<forward/>
|
||||
</zone>
|
||||
1
config/files/usr/etc/ld.so.preload
Normal file
1
config/files/usr/etc/ld.so.preload
Normal file
@@ -0,0 +1 @@
|
||||
/usr/lib64/libhardened_malloc.so
|
||||
54
config/files/usr/etc/modprobe.d/blacklist.conf
Normal file
54
config/files/usr/etc/modprobe.d/blacklist.conf
Normal file
@@ -0,0 +1,54 @@
|
||||
install dccp /bin/true
|
||||
install sctp /bin/true
|
||||
install rds /bin/true
|
||||
install tipc /bin/true
|
||||
install firewire-core /bin/true
|
||||
install firewire_core /bin/true
|
||||
install firewire-ohci /bin/true
|
||||
install firewire_ohci /bin/true
|
||||
install firewire_sbp2 /bin/true
|
||||
install firewire-sbp2 /bin/true
|
||||
install thunderbolt /bin/true
|
||||
install n-hdlc /bin/false
|
||||
install ax25 /bin/false
|
||||
install netrom /bin/false
|
||||
install x25 /bin/false
|
||||
install rose /bin/false
|
||||
install decnet /bin/false
|
||||
install econet /bin/false
|
||||
install af_802154 /bin/false
|
||||
install ipx /bin/false
|
||||
install appletalk /bin/false
|
||||
install psnap /bin/false
|
||||
install p8023 /bin/false
|
||||
install p8022 /bin/false
|
||||
install can /bin/false
|
||||
install atm /bin/false
|
||||
install cramfs /bin/false
|
||||
install freevxfs /bin/false
|
||||
install jffs2 /bin/false
|
||||
install hfs /bin/false
|
||||
install hfsplus /bin/false
|
||||
install squashfs /bin/false
|
||||
install udf /bin/false
|
||||
install cifs /bin/true
|
||||
install nfs /bin/true
|
||||
install nfsv3 /bin/true
|
||||
install nfsv4 /bin/true
|
||||
install ksmbd /bin/true
|
||||
install gfs2 /bin/true
|
||||
install vivid /bin/false
|
||||
install ohci1394 /bin/false
|
||||
install sbp2 /bin/false
|
||||
install dv1394 /bin/false
|
||||
install raw1394 /bin/false
|
||||
install video1394 /bin/false
|
||||
install msr /bin/true
|
||||
install vivid /bin/false
|
||||
|
||||
|
||||
blacklist tipc
|
||||
blacklist dccp
|
||||
blacklist sctp
|
||||
blacklist rds
|
||||
blacklist ath_pci
|
||||
3
config/files/usr/etc/modprobe.d/nvidia.conf
Normal file
3
config/files/usr/etc/modprobe.d/nvidia.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# Enable DynamicPwerManagement
|
||||
# http://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/dynamicpowermanagement.html
|
||||
options nvidia NVreg_DynamicPowerManagement=0x02
|
||||
64
config/files/usr/etc/security/limits.conf
Normal file
64
config/files/usr/etc/security/limits.conf
Normal file
@@ -0,0 +1,64 @@
|
||||
# /etc/security/limits.conf
|
||||
#
|
||||
#This file sets the resource limits for the users logged in via PAM.
|
||||
#It does not affect resource limits of the system services.
|
||||
#
|
||||
#Also note that configuration files in /etc/security/limits.d directory,
|
||||
#which are read in alphabetical order, override the settings in this
|
||||
#file in case the domain is the same or more specific.
|
||||
#That means, for example, that setting a limit for wildcard domain here
|
||||
#can be overridden with a wildcard setting in a config file in the
|
||||
#subdirectory, but a user specific setting here can be overridden only
|
||||
#with a user specific setting in the subdirectory.
|
||||
#
|
||||
#Each line describes a limit for a user in the form:
|
||||
#
|
||||
#<domain> <type> <item> <value>
|
||||
#
|
||||
#Where:
|
||||
#<domain> can be:
|
||||
# - a user name
|
||||
# - a group name, with @group syntax
|
||||
# - the wildcard *, for default entry
|
||||
# - the wildcard %, can be also used with %group syntax,
|
||||
# for maxlogin limit
|
||||
#
|
||||
#<type> can have the two values:
|
||||
# - "soft" for enforcing the soft limits
|
||||
# - "hard" for enforcing hard limits
|
||||
#
|
||||
#<item> can be one of the following:
|
||||
# - core - limits the core file size (KB)
|
||||
# - data - max data size (KB)
|
||||
# - fsize - maximum filesize (KB)
|
||||
# - memlock - max locked-in-memory address space (KB)
|
||||
# - nofile - max number of open file descriptors
|
||||
# - rss - max resident set size (KB)
|
||||
# - stack - max stack size (KB)
|
||||
# - cpu - max CPU time (MIN)
|
||||
# - nproc - max number of processes
|
||||
# - as - address space limit (KB)
|
||||
# - maxlogins - max number of logins for this user
|
||||
# - maxsyslogins - max number of logins on the system
|
||||
# - priority - the priority to run user process with
|
||||
# - locks - max number of file locks the user can hold
|
||||
# - sigpending - max number of pending signals
|
||||
# - msgqueue - max memory used by POSIX message queues (bytes)
|
||||
# - nice - max nice priority allowed to raise to values: [-20, 19]
|
||||
# - rtprio - max realtime priority
|
||||
#
|
||||
#<domain> <type> <item> <value>
|
||||
#
|
||||
|
||||
#* soft core 0
|
||||
#* hard rss 10000
|
||||
#@student hard nproc 20
|
||||
#@faculty soft nproc 20
|
||||
#@faculty hard nproc 50
|
||||
#ftp hard nproc 0
|
||||
#@student - maxlogins 4
|
||||
|
||||
* hard core 0
|
||||
* soft core 0
|
||||
|
||||
# End of file
|
||||
50
config/files/usr/etc/sysctl.d/hardening.conf
Normal file
50
config/files/usr/etc/sysctl.d/hardening.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
# Enable IP spoofing protection, turn on source route verification
|
||||
net.ipv4.conf.all.rp_filter = 1
|
||||
net.ipv4.conf.default.rp_filter = 1
|
||||
|
||||
# Disable ICMP Redirect Acceptance
|
||||
net.ipv4.conf.all.accept_redirects = 0
|
||||
net.ipv4.conf.all.send_redirects = 0
|
||||
net.ipv4.conf.default.accept_redirects = 0
|
||||
net.ipv4.conf.all.secure_redirects = 0
|
||||
net.ipv4.conf.default.secure_redirects = 0
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
net.ipv6.conf.default.accept_redirects = 0
|
||||
|
||||
# Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
net.ipv4.conf.default.log_martians = 1
|
||||
|
||||
net.core.bpf_jit_harden = 2
|
||||
kernel.yama.ptrace_scope = 3
|
||||
kernel.unprivileged_bpf_disabled = 1
|
||||
kernel.sysrq = 0
|
||||
kernel.perf_event_paranoid = 3
|
||||
kernel.kptr_restrict = 2
|
||||
kernel.dmesg_restrict = 1
|
||||
fs.suid_dumpable = 0
|
||||
fs.protected_regular = 2
|
||||
fs.protected_fifos = 2
|
||||
dev.tty.ldisc_autoload = 0
|
||||
|
||||
|
||||
user.max_user_namespaces = 0
|
||||
kernel.unprivileged_userns_clone = 0
|
||||
|
||||
|
||||
|
||||
# Swap only when necessary
|
||||
vm.swappiness = 1
|
||||
|
||||
# Restrict userfaultfd to CAP_SYS_PTRACE
|
||||
vm.unprivileged_userfaultfd = 0
|
||||
|
||||
## Prevent kernel info leaks in console during boot.
|
||||
## https://phabricator.whonix.org/T950
|
||||
kernel.printk = 3 3 3 3
|
||||
|
||||
## Disables kexec which can be used to replace the running kernel.
|
||||
kernel.kexec_load_disabled=1
|
||||
|
||||
## Disable core dump
|
||||
kernel.core_pattern=|/bin/false
|
||||
@@ -21,18 +21,7 @@ screens:
|
||||
- run: flatpak remote-delete --system --force fedora
|
||||
- run: flatpak remote-delete --user --force fedora
|
||||
- run: flatpak remove --system --noninteractive --all
|
||||
- run: flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
- run: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
check-system-flathub:
|
||||
source: yafti.screen.consent
|
||||
values:
|
||||
title: Missing Flathub Repository (System)
|
||||
condition:
|
||||
run: flatpak remotes --system --columns=name | grep flathub | wc -l | grep '^0$'
|
||||
description: |
|
||||
We have detected that you don't have Flathub's repository on your system. We will now add that repository to your system-wide list.
|
||||
actions:
|
||||
- run: flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
check-user-flathub:
|
||||
source: yafti.screen.consent
|
||||
values:
|
||||
@@ -55,7 +44,7 @@ screens:
|
||||
groups:
|
||||
Core GNOME Apps:
|
||||
description: Core system applications for the GNOME desktop environment.
|
||||
default: true
|
||||
default: false
|
||||
packages:
|
||||
- Calculator: org.gnome.Calculator
|
||||
- Calendar: org.gnome.Calendar
|
||||
@@ -79,7 +68,7 @@ screens:
|
||||
- Weather: org.gnome.Weather
|
||||
System Apps:
|
||||
description: System applications for all desktop environments.
|
||||
default: true
|
||||
default: false
|
||||
packages:
|
||||
- Deja Dup Backups: org.gnome.DejaDup
|
||||
- Fedora Media Writer: org.fedoraproject.MediaWriter
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
!include 100-bling.just
|
||||
# Include some of your custom scripts here!
|
||||
|
||||
# Add additional boot parameters for hardening (requires reboot)
|
||||
set-kargs-hardening:
|
||||
rpm-ostree kargs --append="init_on_alloc=1" --append="init_on_free=1" --append="slab_nomerge" --append="page_alloc.shuffle=1" --append="randomize_kstack_offset=on" --append="vsyscall=none" --append="debugfs=off" --append="lockdown=confidentiality" --append="random.trust_cpu=off" --append="random.trust_bootloader=off" --append="intel_iommu=on" --append="amd_iommu=on" --append="efi=disable_early_pci_dma" --append="iommu.passthrough=0" --append="iommu.strict=1" --append="nvme_core.default_ps_max_latency_us=0" --append="mitigations=auto,nosmt"
|
||||
|
||||
Reference in New Issue
Block a user