<commit_before>---
layout: post
title: SELinux vs AppArmor vs grsecurity 
---

I have done a lot of research in this area. I have even exploited AppArmor’s rulesets for MySQL. AppArmor is the weakest form of processes separation. The property that I’m exploiting is that all processes have write privileges to some of the same directories such as /tmp/. What nice about AppArmor is that it breaks some exploits without getting in the user/administrators way. However AppArmor has some fundamental flaws that aren't going to be fixed any time soon.
SELinux is very secure, its also very annoying. Unlike AppAmoror most legitimate applications will not run until SELinux has been reconfigured. Most often this results in the administrator misconfiguration SELinux or disabling it all together.
grsecurity is a very large package of tools. The one Ilike the most is grsecuirty’s enhanced chroot. This is even more secure then SELinux, although it takes some skill and some time to setup a chroot jail where as SELinux and AppAprmor “just work”.
There is a 4th system, a Virtual Machine. Vulnerabilities have been found in VM environments that can allow an attacker to “break out”. However a VM has a even greater separation than a chroot becuase in a VM you are sharing less resources between processes. The resources available to a VM are virtual, and can have little or no overlap between other VMs. This also relates to "cloud computing". In a cloud environment you could have a very clean separation between your database and web application, which is important for security. It also maybe possible that 1 exploit could own the entire cloud and all VM's running on it.<commit_msg>[NEW] SELinux vs AppArmor vs Grsecurity<commit_after>---
layout: post
title: SELinux vs AppArmor vs grsecurity 
---

I have done a lot of research in this area. I have even exploited AppArmor’s rulesets for MySQL. AppArmor is the weakest form of processes separation. The property that I’m exploiting is that all processes have write privileges to some of the same directories such as /tmp/. What nice about AppArmor is that it breaks some exploits without getting in the user/administrators way. However AppArmor has some fundamental flaws that aren't going to be fixed any time soon.

SELinux is very secure, its also very annoying. Unlike AppAmoror most legitimate applications will not run until SELinux has been reconfigured. Most often this results in the administrator misconfiguration SELinux or disabling it all together.

grsecurity is a very large package of tools. The one Ilike the most is grsecuirty’s enhanced chroot. This is even more secure then SELinux, although it takes some skill and some time to setup a chroot jail where as SELinux and AppAprmor “just work”.

There is a 4th system, a Virtual Machine. Vulnerabilities have been found in VM environments that can allow an attacker to “break out”. However a VM has a even greater separation than a chroot becuase in a VM you are sharing less resources between processes. The resources available to a VM are virtual, and can have little or no overlap between other VMs. This also relates to "cloud computing". In a cloud environment you could have a very clean separation between your database and web application, which is important for security. It also maybe possible that 1 exploit could own the entire cloud and all VM's running on it.
{'fraction_non_alphanumeric': 0.029489826010026542, 'fraction_numerical': 0.0011795930404010617, 'mean_word_length': 4.479806138933764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6642799', 'n_tokens_mistral': 822, 'n_tokens_neox': 773, 'n_words': 554}