<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4736513511246556230</id><updated>2024-09-29T03:16:58.095+01:00</updated><category term="grsecurity"/><category term="hardening"/><category term="kernel"/><category term="linux"/><title type='text'>SecurityTargets Blog</title><subtitle type='html'>Penetration Testing and Security Solutions.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.securitytargets.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4736513511246556230/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.securitytargets.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4736513511246556230.post-1996638585672047306</id><published>2010-10-14T03:29:00.000+01:00</published><updated>2010-10-14T03:29:05.520+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grsecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="hardening"/><category scheme="http://www.blogger.com/atom/ns#" term="kernel"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Hardening CentOS kernel with grsecurity</title><content type='html'>Hardening the server&#39;s kernel is one of the most important things we need to consider when speaking about OS hardening. This is mini-howto install and configure grsecurity on CentOS server.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://grsecurity.net/&quot;&gt;grsecurity&lt;/a&gt; is powerful and easy to use Linux kernel security enhancement. It gives you a lot of security features:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;An intelligent and robust Role-Based Access Control (RBAC) system that can generate least privilege policies for your entire system with no configuration&lt;/li&gt;
&lt;li&gt;Change root (chroot) hardening&lt;/li&gt;
&lt;li&gt;/tmp race prevention&lt;/li&gt;
&lt;li&gt;Extensive auditing&lt;/li&gt;
&lt;li&gt;Prevention of arbitrary code execution, regardless of the technique used (stack smashing, heap corruption, etc)&lt;/li&gt;
&lt;li&gt;Prevention of arbitrary code execution in the kernel&lt;/li&gt;
&lt;li&gt;Randomization of the stack, library, and heap bases&lt;/li&gt;
&lt;li&gt;Kernel stack base randomization&lt;/li&gt;
&lt;li&gt;Protection against exploitable null-pointer dereference bugs in the kernel&lt;/li&gt;
&lt;li&gt;Reduction of the risk of sensitive information being leaked by arbitrary-read kernel bugs&lt;/li&gt;
&lt;li&gt;A restriction that allows a user to only view his/her processes&lt;/li&gt;
&lt;li&gt;Security alerts and audits that contain the IP address of the person causing the alert&lt;/li&gt;
&lt;/ul&gt;Take a look at &lt;span class=&quot;bodytitle&quot;&gt;&lt;a href=&quot;http://grsecurity.net/features.php&quot;&gt;grsecurity features&lt;/a&gt; for more details.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Downloading linux kernel and grsecurity patch&lt;/h2&gt;At the first we need to download grsecurity patch and the right version of Linux kernel source code. In &lt;a href=&quot;http://grsecurity.net/download_stable.php&quot;&gt;this page&lt;/a&gt; you can find the latest stable version of grsecurity patch (At the time of writing this post, it&#39;s for linux 2.6.32 stable tree).&lt;br /&gt;
&lt;br /&gt;
Before we start make sure to install all the necessary packages that you&#39;ll need to build the kernel:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# yum groupinstall &quot;Development Tools&quot;&lt;br /&gt;
# yum install ncurses-devel&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# cd /usr/src/kernels&lt;br /&gt;
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.23.tar.bz2&lt;br /&gt;
# wget http://grsecurity.net/stable/grsecurity-2.2.0-2.6.32.23-201009271837.patch&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Patching the kernel&lt;/h2&gt;After downloading linux kernel source code and grsecurity patch we are going to unpack and patch the kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# tar xjf linux-2.6.32.23.tar.bz2&lt;br /&gt;
# patch -p0 &amp;lt; grsecurity-2.2.0-2.6.32.23-201009271837.patch&lt;br /&gt;
# mv linux-2.6.32.23 linux-2.6.32.23-grsec&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;grsecurity configuration&lt;/h2&gt;Now we need to configure the new kernel. The easiest way is to use your current kernel configuration file and then modify it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# cd linux-2.6.32.23-grsec&lt;br /&gt;
# cp /boot/config-`uname -r` .config&lt;br /&gt;
# make menuconfig&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can find grsecurity options under &lt;b&gt;Security options&lt;/b&gt; » &lt;b&gt;Grsecurity&lt;/b&gt; menu. Select the security level and any other options you want. I suggest you checkout &lt;a href=&quot;http://grsecurity.net/confighelp.php&quot;&gt;this page&lt;/a&gt; to find more details about grsecurity options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Building and installing grsecurity kernel&lt;/h2&gt;All you need to do now is compiling the kernel and install it on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# make bzImage &amp;amp;&amp;amp; make modules&lt;br /&gt;
# make modules_install &amp;amp;&amp;amp; make install&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; If you get message like this &quot;&lt;i style=&quot;color: #444444;&quot;&gt;2.6 PaX kernels no longer build correctly with old versions of binutils. Please upgrade your binutils to 2.18 or newer.&lt;/i&gt;&quot; then you have to upgrade binutils by installing it manually from the source.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;# cd /usr/src&lt;br /&gt;
# wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2&lt;br /&gt;
# tar xjf binutils-2.20.1.tar.bz2&lt;br /&gt;
# cd binutils-2.20.1&lt;br /&gt;
# ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
After that go back to the kernel directory and compile it. When it finish reboot your server into &lt;b&gt;linux-2.6.32.23-grsec&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cheers!</content><link rel='replies' type='application/atom+xml' href='http://blog.securitytargets.com/feeds/1996638585672047306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.securitytargets.com/2010/10/hardening-centos-kernel-with-grsecurity.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4736513511246556230/posts/default/1996638585672047306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4736513511246556230/posts/default/1996638585672047306'/><link rel='alternate' type='text/html' href='http://blog.securitytargets.com/2010/10/hardening-centos-kernel-with-grsecurity.html' title='Hardening CentOS kernel with grsecurity'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4736513511246556230.post-5361297505134435254</id><published>2010-09-15T03:23:00.001+01:00</published><updated>2010-09-18T00:25:37.263+01:00</updated><title type='text'>Here we go!</title><content type='html'>This is the official blog of SecurityTargets. A startup security specialized company we intend to lunch soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we&#39;ll share ideas about what we do and how we do it!</content><link rel='replies' type='application/atom+xml' href='http://blog.securitytargets.com/feeds/5361297505134435254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.securitytargets.com/2010/09/here-we-go.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4736513511246556230/posts/default/5361297505134435254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4736513511246556230/posts/default/5361297505134435254'/><link rel='alternate' type='text/html' href='http://blog.securitytargets.com/2010/09/here-we-go.html' title='Here we go!'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry></feed>