aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/grsec.conf
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/grsec.conf')
-rw-r--r--src/tools/grsec.conf98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/tools/grsec.conf b/src/tools/grsec.conf
new file mode 100644
index 000000000..177e4d59b
--- /dev/null
+++ b/src/tools/grsec.conf
@@ -0,0 +1,98 @@
1## Address Space Protection
2# Disable privileged io: iopl(2) and ioperm(2)
3# Warning: Xorg without modesetting needs it to be 0
4kernel.grsecurity.disable_priv_io = 1
5kernel.grsecurity.deter_bruteforce = 1
6
7kernel.grsecurity.deny_new_usb = 0
8kernel.grsecurity.harden_ipc = 1
9
10## Filesystem Protections
11# Prevent symlinks/hardlinks exploits (don't follow symlink on world-writable +t
12# folders)
13kernel.grsecurity.linking_restrictions = 1
14# Prevent writing to fifo not owned in world-writable +t folders
15kernel.grsecurity.fifo_restrictions = 1
16
17# Chroot restrictions
18kernel.grsecurity.chroot_deny_bad_rename = 1
19kernel.grsecurity.chroot_deny_mount = 1
20kernel.grsecurity.chroot_deny_chroot = 1
21kernel.grsecurity.chroot_deny_pivot = 1
22kernel.grsecurity.chroot_enforce_chdir = 1
23kernel.grsecurity.chroot_deny_chmod = 1
24kernel.grsecurity.chroot_deny_fchdir = 1
25kernel.grsecurity.chroot_deny_mknod = 1
26kernel.grsecurity.chroot_deny_shmat = 1
27kernel.grsecurity.chroot_deny_unix = 1
28kernel.grsecurity.chroot_findtask = 1
29kernel.grsecurity.chroot_restrict_nice = 1
30kernel.grsecurity.chroot_deny_sysctl = 1
31kernel.grsecurity.chroot_caps = 1
32
33## Kernel Auditing
34kernel.grsecurity.exec_logging = 1
35kernel.grsecurity.audit_chdir = 1
36# By default exec_logging and audit_chdir only target members of audit_gid, you
37# can change that by setting audit_group to 0
38kernel.grsecurity.audit_group = 1
39# You can also override audit_gid to use another group
40kernel.grsecurity.audit_gid = 0
41kernel.grsecurity.resource_logging = 1
42kernel.grsecurity.chroot_execlog = 1
43kernel.grsecurity.audit_ptrace = 1
44kernel.grsecurity.audit_mount = 1
45kernel.grsecurity.signal_logging = 1
46kernel.grsecurity.forkfail_logging = 1
47kernel.grsecurity.timechange_logging = 1
48kernel.grsecurity.rwxmap_logging = 1
49
50## Executable Protections
51kernel.grsecurity.dmesg = 1
52kernel.grsecurity.consistent_setxid = 1
53# Trusted execution
54# Add users to the 64040 (grsec-tpe) group to enable them to execute binaries
55# from untrusted directories
56kernel.grsecurity.tpe = 1
57kernel.grsecurity.tpe_invert = 1
58kernel.grsecurity.tpe_restrict_all = 1
59kernel.grsecurity.tpe_gid = 64040
60
61## Kernel-enforce SymlinkIfOwnerMatch
62kernel.grsecurity.enforce_symlinksifowner = 1
63kernel.grsecurity.symlinkown_gid = 33
64
65## Network Protections
66kernel.grsecurity.ip_blackhole = 1
67kernel.grsecurity.lastack_retries = 4
68# Socket restrictions
69# If the setting is enabled and an user is added to relevant group, she won't
70# be able to open this kind of socket
71kernel.grsecurity.socket_all = 1
72kernel.grsecurity.socket_all_gid = 64041
73kernel.grsecurity.socket_client = 1
74kernel.grsecurity.socket_client_gid = 64042
75kernel.grsecurity.socket_server = 1
76kernel.grsecurity.socket_server_gid = 64043
77
78# Ptrace
79kernel.grsecurity.harden_ptrace = 1
80kernel.grsecurity.ptrace_readexec = 1
81
82# Protect mounts
83# don't try to set it to 0, it'll fail, just let it commented
84# kernel.grsecurity.romount_protect = 1
85
86# PAX
87kernel.pax.softmode = 0
88
89# Disable module loading
90# This is not a grsecurity anymore, but you might still want to disable module
91# loading so no code is inserted into the kernel
92# kernel.modules_disabled=1
93
94# Once you're satisfied with settings, set grsec_lock to 1 so noone can change
95# grsec sysctl on a running system
96kernel.grsecurity.grsec_lock = 1
97
98# vim: filetype=conf: