first commit
This commit is contained in:
3
etc_org/sysctl.d/10-console-messages.conf
Normal file
3
etc_org/sysctl.d/10-console-messages.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
# the following stops low-level messages on console
|
||||
kernel.printk = 4 4 1 7
|
||||
12
etc_org/sysctl.d/10-ipv6-privacy.conf
Normal file
12
etc_org/sysctl.d/10-ipv6-privacy.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
# IPv6 Privacy Extensions (RFC 4941)
|
||||
# ---
|
||||
# IPv6 typically uses a device's MAC address when choosing an IPv6 address
|
||||
# to use in autoconfiguration. Privacy extensions allow using a randomly
|
||||
# generated IPv6 address, which increases privacy.
|
||||
#
|
||||
# Acceptable values:
|
||||
# 0 - don’t use privacy extensions.
|
||||
# 1 - generate privacy addresses
|
||||
# 2 - prefer privacy addresses and use them over the normal addresses.
|
||||
net.ipv6.conf.all.use_tempaddr = 2
|
||||
net.ipv6.conf.default.use_tempaddr = 2
|
||||
15
etc_org/sysctl.d/10-kernel-hardening.conf
Normal file
15
etc_org/sysctl.d/10-kernel-hardening.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
# These settings are specific to hardening the kernel itself from attack
|
||||
# from userspace, rather than protecting userspace from other malicious
|
||||
# userspace things.
|
||||
#
|
||||
#
|
||||
# When an attacker is trying to exploit the local kernel, it is often
|
||||
# helpful to be able to examine where in memory the kernel, modules,
|
||||
# and data structures live. As such, kernel addresses should be treated
|
||||
# as sensitive information.
|
||||
#
|
||||
# Many files and interfaces contain these addresses (e.g. /proc/kallsyms,
|
||||
# /proc/modules, etc), and this setting can censor the addresses. A value
|
||||
# of "0" allows all users to see the kernel addresses. A value of "1"
|
||||
# limits visibility to the root user, and "2" blocks even the root user.
|
||||
kernel.kptr_restrict = 1
|
||||
5
etc_org/sysctl.d/10-link-restrictions.conf
Normal file
5
etc_org/sysctl.d/10-link-restrictions.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
# These settings eliminate an entire class of security vulnerability:
|
||||
# time-of-check-time-of-use cross-privilege attacks using guessable
|
||||
# filenames (generally seen as "/tmp file race" vulnerabilities).
|
||||
fs.protected_hardlinks = 1
|
||||
fs.protected_symlinks = 1
|
||||
26
etc_org/sysctl.d/10-magic-sysrq.conf
Normal file
26
etc_org/sysctl.d/10-magic-sysrq.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
# The magic SysRq key enables certain keyboard combinations to be
|
||||
# interpreted by the kernel to help with debugging. The kernel will respond
|
||||
# to these keys regardless of the current running applications.
|
||||
#
|
||||
# In general, the magic SysRq key is not needed for the average Ubuntu
|
||||
# system, and having it enabled by default can lead to security issues on
|
||||
# the console such as being able to dump memory or to kill arbitrary
|
||||
# processes including the running screen lock.
|
||||
#
|
||||
# Here is the list of possible values:
|
||||
# 0 - disable sysrq completely
|
||||
# 1 - enable all functions of sysrq
|
||||
# >1 - enable certain functions by adding up the following values:
|
||||
# 2 - enable control of console logging level
|
||||
# 4 - enable control of keyboard (SAK, unraw)
|
||||
# 8 - enable debugging dumps of processes etc.
|
||||
# 16 - enable sync command
|
||||
# 32 - enable remount read-only
|
||||
# 64 - enable signalling of processes (term, kill, oom-kill)
|
||||
# 128 - allow reboot/poweroff
|
||||
# 256 - allow nicing of all RT tasks
|
||||
#
|
||||
# For example, to enable both control of console logging level and
|
||||
# debugging dumps of processes: kernel.sysrq = 10
|
||||
#
|
||||
kernel.sysrq = 176
|
||||
12
etc_org/sysctl.d/10-network-security.conf
Normal file
12
etc_org/sysctl.d/10-network-security.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# Turn on Source Address Verification in all interfaces to
|
||||
# prevent some spoofing attacks.
|
||||
net.ipv4.conf.default.rp_filter=1
|
||||
net.ipv4.conf.all.rp_filter=1
|
||||
|
||||
# Turn on SYN-flood protections. Starting with 2.6.26, there is no loss
|
||||
# of TCP functionality/features under normal conditions. When flood
|
||||
# protections kick in under high unanswered-SYN load, the system
|
||||
# should remain more stable, with a trade off of some loss of TCP
|
||||
# functionality/features (e.g. TCP Window scaling).
|
||||
net.ipv4.tcp_syncookies=1
|
||||
22
etc_org/sysctl.d/10-ptrace.conf
Normal file
22
etc_org/sysctl.d/10-ptrace.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# The PTRACE system is used for debugging. With it, a single user process
|
||||
# can attach to any other dumpable process owned by the same user. In the
|
||||
# case of malicious software, it is possible to use PTRACE to access
|
||||
# credentials that exist in memory (re-using existing SSH connections,
|
||||
# extracting GPG agent information, etc).
|
||||
#
|
||||
# A PTRACE scope of "0" is the more permissive mode. A scope of "1" limits
|
||||
# PTRACE only to direct child processes (e.g. "gdb name-of-program" and
|
||||
# "strace -f name-of-program" work, but gdb's "attach" and "strace -fp $PID"
|
||||
# do not). The PTRACE scope is ignored when a user has CAP_SYS_PTRACE, so
|
||||
# "sudo strace -fp $PID" will work as before. For more details see:
|
||||
# https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace
|
||||
#
|
||||
# For applications launching crash handlers that need PTRACE, exceptions can
|
||||
# be registered by the debugee by declaring in the segfault handler
|
||||
# specifically which process will be using PTRACE on the debugee:
|
||||
# prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);
|
||||
#
|
||||
# In general, PTRACE is not needed for the average running Ubuntu system.
|
||||
# To that end, the default is to set the PTRACE scope to "1". This value
|
||||
# may not be appropriate for developers or servers with only admin accounts.
|
||||
kernel.yama.ptrace_scope = 1
|
||||
11
etc_org/sysctl.d/10-zeropage.conf
Normal file
11
etc_org/sysctl.d/10-zeropage.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
# Protect the zero page of memory from userspace mmap to prevent kernel
|
||||
# NULL-dereference attacks against potential future kernel security
|
||||
# vulnerabilities. (Added in kernel 2.6.23.)
|
||||
#
|
||||
# While this default is built into the Ubuntu kernel, there is no way to
|
||||
# restore the kernel default if the value is changed during runtime; for
|
||||
# example via package removal (e.g. wine, dosemu). Therefore, this value
|
||||
# is reset to the secure default each time the sysctl values are loaded.
|
||||
#
|
||||
# ARM-specific default:
|
||||
vm.mmap_min_addr = 32768
|
||||
1
etc_org/sysctl.d/99-sysctl.conf
Symbolic link
1
etc_org/sysctl.d/99-sysctl.conf
Symbolic link
@@ -0,0 +1 @@
|
||||
../sysctl.conf
|
||||
9
etc_org/sysctl.d/README
Normal file
9
etc_org/sysctl.d/README
Normal file
@@ -0,0 +1,9 @@
|
||||
This directory contains settings similar to those found in /etc/sysctl.conf.
|
||||
In general, files in the 10-*.conf range come from the procps package and
|
||||
serve as system defaults. Other packages install their files in the
|
||||
30-*.conf range, to override system defaults. End-users can use 60-*.conf
|
||||
and above, or use /etc/sysctl.conf directly, which overrides anything in
|
||||
this directory.
|
||||
|
||||
After making any changes, please run "service procps start" (or, from
|
||||
a Debian package maintainer script "invoke-rc.d procps start").
|
||||
Reference in New Issue
Block a user