Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
linux:grsec [2006/03/05 11:42] a typo |
linux:grsec [2006/07/26 14:23] a |
||
---|---|---|---|
Line 16: | Line 16: | ||
==== Links ==== | ==== Links ==== | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
===== Instalation ===== | ===== Instalation ===== | ||
Line 25: | Line 26: | ||
server@/ | server@/ | ||
+ | |||
+ | ==== gradm install from source ==== | ||
+ | |||
+ | # gradm-xxxx.tar.gz | ||
+ | # cd gradm | ||
+ | # ./configure | ||
+ | # make && make install | ||
+ | ... | ||
+ | Setting up grsecurity ACL password | ||
+ | Password: | ||
+ | Re-enter Password: | ||
+ | Password written to / | ||
+ | |||
==== kernel 2.4.x tips ==== | ==== kernel 2.4.x tips ==== | ||
Line 30: | Line 44: | ||
===== Configuration ===== | ===== Configuration ===== | ||
+ | |||
+ | putting all Grsec sysctl options into sysctl.conf | ||
+ | |||
+ | sysctl -a |grep grsec >> / | ||
==== sysctl ==== | ==== sysctl ==== | ||
Line 70: | Line 88: | ||
==== PaX ==== | ==== PaX ==== | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | install pax utils: | ||
+ | | ||
+ | |||
+ | **Testing the PAX default settings** with '' | ||
+ | |||
+ | PaXtest - Copyright(c) 2003,2004 by Peter Busser < | ||
+ | Released under the GNU Public Licence version 2 or later | ||
+ | | ||
+ | Mode: kiddie|blackhat | ||
+ | Linux xxxx | ||
+ | | ||
+ | Executable anonymous mapping | ||
+ | Executable bss : Vulnerable | ||
+ | Executable data : Vulnerable | ||
+ | Executable heap : Vulnerable | ||
+ | Executable stack : Vulnerable | ||
+ | Executable anonymous mapping (mprotect) | ||
+ | Executable bss (mprotect) | ||
+ | Executable data (mprotect) | ||
+ | Executable heap (mprotect) | ||
+ | Executable shared library bss (mprotect) : Vulnerable | ||
+ | Executable shared library data (mprotect): Vulnerable | ||
+ | Executable stack (mprotect) | ||
+ | Anonymous mapping randomisation test : 9 bits (guessed) | ||
+ | Heap randomisation test (ET_EXEC) | ||
+ | Heap randomisation test (ET_DYN) | ||
+ | Main executable randomisation (ET_EXEC) | ||
+ | Main executable randomisation (ET_DYN) | ||
+ | Shared library randomisation test : 8 bits (guessed) | ||
+ | Stack randomisation test (SEGMEXEC) | ||
+ | Stack randomisation test (PAGEEXEC) | ||
+ | Return to function (strcpy) | ||
+ | Return to function (strcpy, RANDEXEC) | ||
+ | Return to function (memcpy) | ||
+ | Return to function (memcpy, RANDEXEC) | ||
+ | Executable shared library bss : Vulnerable | ||
+ | Executable shared library data : Vulnerable | ||
+ | Writable text segments | ||
+ | |||
==== gdadm ==== | ==== gdadm ==== | ||
- | | + | |
+ | The **gradm** utility controls only grsecurity' | ||
+ | |||
+ | | ||
+ | |||
+ | Once you've set up a password, you can log into gradm as admin with the command: | ||
+ | |||
+ | gradm -a | ||
+ | |||
+ | An innovative way to set up RBAC is to use grsecurity' | ||
+ | |||
+ | gradm -F -L / | ||
+ | |||
+ | Let this mode run for a day or two to catch any time-sensitive processes. Avoid any administrative tasks during this time -- remember, the root account is no longer trusted. After grsecurity has had enough time to recognize normal system usage, shut down learning mode and log into gradm as admin. Shutting down learning mode is necessary because grsecurity hides its configuration files when RBAC is running, as it is during learning mode. This means that the system will display an error message about not being able to find learning.log. In fact, the directory /etc/grsec will not appear to exist, even to root. | ||
+ | |||
+ | To write the ACL to disk, run the command: | ||
+ | |||
+ | gradm -F -L / | ||
+ | |||
+ | To start RBAC with your new ACL, run: | ||
+ | |||
+ | gradm -E | ||
+ | |||
+ | You can now enjoy the security advantages of processes running with the least amount of privileges necessary. | ||
+ | |||
+ | If you encounter any problems, disable RBAC by first logging in with the admin password and then running: | ||
+ | |||
+ | gradm -D | ||
==== grsec iptables patch ==== | ==== grsec iptables patch ==== | ||
- | | + | FIXME TODO |