<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hardening CentOS</title>
	<atom:link href="http://www.bofh-hunter.com/2009/07/09/hardening-centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/</link>
	<description>Admin Spotting for Fun and Profit</description>
	<lastBuildDate>Fri, 16 Jul 2010 09:41:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: M Kobar</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-219</link>
		<dc:creator>M Kobar</dc:creator>
		<pubDate>Mon, 03 Aug 2009 15:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-219</guid>
		<description>Part of our humble SF project may be of interest:  

We have an appliance (Orange JeOS) builder for CentOS that has a sister sub-project that uses the NSA SNAC Security Guidelines via the automated NSA-lockdown tool.

It is in its infant stage but is currently usable.  Future directions include automatic app detection and a nice GUI.

We have also compiled a detailed coverage table to show how much of the SNAC Guidelines our tool covers and how much requires manual intervention.

Much of this security coverage is due to the limitation of packages installed and the modification of default configuration settings.

More information on the NSA SNAC Lockdown tool can be found here:

http://orangejeos.sourceforge.net/about-nsa-lockdown.html

And the coverage table can be found here:

http://orangejeos.sourceforge.net/nsa-coverage-matrix.html

Always looking for any good ideas and feedback.

Thanks for the CentOS Security page!</description>
		<content:encoded><![CDATA[<p>Part of our humble SF project may be of interest:  </p>
<p>We have an appliance (Orange JeOS) builder for CentOS that has a sister sub-project that uses the NSA SNAC Security Guidelines via the automated NSA-lockdown tool.</p>
<p>It is in its infant stage but is currently usable.  Future directions include automatic app detection and a nice GUI.</p>
<p>We have also compiled a detailed coverage table to show how much of the SNAC Guidelines our tool covers and how much requires manual intervention.</p>
<p>Much of this security coverage is due to the limitation of packages installed and the modification of default configuration settings.</p>
<p>More information on the NSA SNAC Lockdown tool can be found here:</p>
<p><a href="http://orangejeos.sourceforge.net/about-nsa-lockdown.html" rel="nofollow">http://orangejeos.sourceforge.net/about-nsa-lockdown.html</a></p>
<p>And the coverage table can be found here:</p>
<p><a href="http://orangejeos.sourceforge.net/nsa-coverage-matrix.html" rel="nofollow">http://orangejeos.sourceforge.net/nsa-coverage-matrix.html</a></p>
<p>Always looking for any good ideas and feedback.</p>
<p>Thanks for the CentOS Security page!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JD</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-209</link>
		<dc:creator>JD</dc:creator>
		<pubDate>Tue, 28 Jul 2009 11:37:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-209</guid>
		<description>Small correction to the iptables section - the default rules don&#039;t open up ports 50 &amp; 51. They open up _protocols_ 50 &amp; 51 - IPSEC ESP &amp; AH respectively.

Also with regards to Sysctl options, another one to consider is :

net.ipv4.tcp_timestamps = 0

Makes OS detection ever so slightly harder and (probably) doesn&#039;t break anything.</description>
		<content:encoded><![CDATA[<p>Small correction to the iptables section &#8211; the default rules don&#8217;t open up ports 50 &amp; 51. They open up _protocols_ 50 &amp; 51 &#8211; IPSEC ESP &amp; AH respectively.</p>
<p>Also with regards to Sysctl options, another one to consider is :</p>
<p>net.ipv4.tcp_timestamps = 0</p>
<p>Makes OS detection ever so slightly harder and (probably) doesn&#8217;t break anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Perrin</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-204</link>
		<dc:creator>Jim Perrin</dc:creator>
		<pubDate>Mon, 20 Jul 2009 17:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-204</guid>
		<description>As for mod_security, I absolutely agree that it should be used. The base page was strictly dealing with securing the OS though. I very briefly touched on ssh, though not to any real extent. I&#039;ll be working on some application security pages later on. Thanks for your comments though!</description>
		<content:encoded><![CDATA[<p>As for mod_security, I absolutely agree that it should be used. The base page was strictly dealing with securing the OS though. I very briefly touched on ssh, though not to any real extent. I&#8217;ll be working on some application security pages later on. Thanks for your comments though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amos</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-203</link>
		<dc:creator>Amos</dc:creator>
		<pubDate>Mon, 20 Jul 2009 12:34:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-203</guid>
		<description>Great work to start this page. I logged in but don&#039;t see a way to add comments on the page so I&#039;ll to it here:

mod_security (available from EPEL) for http servers. Seems to be required by PCI DSS and friends.
SE Linux - the best guide for it I found so far lives at http://docs.fedoraproject.org/selinux-user-guide/f10/en-US/, I guess it&#039;s close enough for CentOS 5 (could be added in an &quot;additional resources&quot; section).
restricted shell - we are in a process which might end up with us using it (we hope to keep less trusted users off of our sensitive servers altogether) but it sounds like a must if you have to provide shell access.
HISTTIMEFORMAT=&#039;%F %T &#039; - will list (and save) history entries with timestamps, not sure how much this will help for security but maybe together with restricted shell (which can forbid change to shell variables as well as erasing of history file) you can get a VERY useful data set about what happened when, instead of a &quot;flat list&quot; of commands executed without a timestamp to correlate to.
remote logging of shell commands - there are a few links I found to enable remote logging of shell commands - this way you can get a list of what a hacker did through a shell on your compromised server on a remote logging server. I&#039;ve even heard of people who go all the way and use &quot;screen&quot; as their login shell, which can also log everything.</description>
		<content:encoded><![CDATA[<p>Great work to start this page. I logged in but don&#8217;t see a way to add comments on the page so I&#8217;ll to it here:</p>
<p>mod_security (available from EPEL) for http servers. Seems to be required by PCI DSS and friends.<br />
SE Linux &#8211; the best guide for it I found so far lives at <a href="http://docs.fedoraproject.org/selinux-user-guide/f10/en-US/" rel="nofollow">http://docs.fedoraproject.org/selinux-user-guide/f10/en-US/</a>, I guess it&#8217;s close enough for CentOS 5 (could be added in an &#8220;additional resources&#8221; section).<br />
restricted shell &#8211; we are in a process which might end up with us using it (we hope to keep less trusted users off of our sensitive servers altogether) but it sounds like a must if you have to provide shell access.<br />
HISTTIMEFORMAT=&#8217;%F %T &#8216; &#8211; will list (and save) history entries with timestamps, not sure how much this will help for security but maybe together with restricted shell (which can forbid change to shell variables as well as erasing of history file) you can get a VERY useful data set about what happened when, instead of a &#8220;flat list&#8221; of commands executed without a timestamp to correlate to.<br />
remote logging of shell commands &#8211; there are a few links I found to enable remote logging of shell commands &#8211; this way you can get a list of what a hacker did through a shell on your compromised server on a remote logging server. I&#8217;ve even heard of people who go all the way and use &#8220;screen&#8221; as their login shell, which can also log everything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Loftin</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-201</link>
		<dc:creator>Ron Loftin</dc:creator>
		<pubDate>Sun, 19 Jul 2009 21:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-201</guid>
		<description>I&#039;ve been comparing what you suggest for system hardening with my approach, and I have a few observations about the section on modifying fstab.

I definitely agree with limiting what the normal, unprivileged peasants can do.

In your example, you seem to have overlooked the world-writable /dev/shm.  I admit that I only noticed this recently myself, but I have made that &quot;nodev,nosuid&quot; along with the other places you note where the users have write access.

Since CentOS uses udev, I give all filesystems, including root, the &quot;nodev&quot; options.  As long as udev is doing all the device handling, I don&#039;t seem to have any need for device files to be created on disk anywhere.

It may be overkill, but on systems with a separate /boot filesystem, I make that &quot;noauto&quot; to protect the kernel.  After all, the only time that /boot actually NEEDS to be mounted is during kernel installation/upgrade operations.  Call me paranoid if you want.  I don&#039;t mind. ;&gt;

As a minor detail, my reading of the man page says that the &quot;default&quot; entry in the options field of fstab is unnecessary when specifying additional parameters there.  It doesn&#039;t hurt anything, and if you want it there in your example to remind the less-experienced admins that the defaults stay in place unless explicitly changed, I understand.

Thanks for collecting this stuff in one place so folks can easily refer to it.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been comparing what you suggest for system hardening with my approach, and I have a few observations about the section on modifying fstab.</p>
<p>I definitely agree with limiting what the normal, unprivileged peasants can do.</p>
<p>In your example, you seem to have overlooked the world-writable /dev/shm.  I admit that I only noticed this recently myself, but I have made that &#8220;nodev,nosuid&#8221; along with the other places you note where the users have write access.</p>
<p>Since CentOS uses udev, I give all filesystems, including root, the &#8220;nodev&#8221; options.  As long as udev is doing all the device handling, I don&#8217;t seem to have any need for device files to be created on disk anywhere.</p>
<p>It may be overkill, but on systems with a separate /boot filesystem, I make that &#8220;noauto&#8221; to protect the kernel.  After all, the only time that /boot actually NEEDS to be mounted is during kernel installation/upgrade operations.  Call me paranoid if you want.  I don&#8217;t mind. ;&gt;</p>
<p>As a minor detail, my reading of the man page says that the &#8220;default&#8221; entry in the options field of fstab is unnecessary when specifying additional parameters there.  It doesn&#8217;t hurt anything, and if you want it there in your example to remind the less-experienced admins that the defaults stay in place unless explicitly changed, I understand.</p>
<p>Thanks for collecting this stuff in one place so folks can easily refer to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Perrin</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-199</link>
		<dc:creator>Jim Perrin</dc:creator>
		<pubDate>Thu, 16 Jul 2009 18:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-199</guid>
		<description>This is very doable. I even have a script to enumerate users and only allow root to use cron unless others are added</description>
		<content:encoded><![CDATA[<p>This is very doable. I even have a script to enumerate users and only allow root to use cron unless others are added</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aron Parsons</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-198</link>
		<dc:creator>Aron Parsons</dc:creator>
		<pubDate>Thu, 16 Jul 2009 13:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-198</guid>
		<description>Try this for PAM:

# cd /etc/pam.d
# cat &lt; system-auth-local
auth  requisite  pam_tally2.so unlock_time=900 onerr=fail no_magic_root
auth  include  system-auth-ac

account requisite  pam_tally2.so 
account include system-auth-ac

password  include system-auth-ac

session include system-auth-ac
EOF

# ln -sf system-auth-local system-auth

This will keep authconfig from wiping out your changes in the future.  Also, the pam_tally2 lines should be at the top of the auth/account sections.</description>
		<content:encoded><![CDATA[<p>Try this for PAM:</p>
<p># cd /etc/pam.d<br />
# cat &lt; system-auth-local<br />
auth  requisite  pam_tally2.so unlock_time=900 onerr=fail no_magic_root<br />
auth  include  system-auth-ac</p>
<p>account requisite  pam_tally2.so<br />
account include system-auth-ac</p>
<p>password  include system-auth-ac</p>
<p>session include system-auth-ac<br />
EOF</p>
<p># ln -sf system-auth-local system-auth</p>
<p>This will keep authconfig from wiping out your changes in the future.  Also, the pam_tally2 lines should be at the top of the auth/account sections.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: irado</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-197</link>
		<dc:creator>irado</dc:creator>
		<pubDate>Thu, 16 Jul 2009 13:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-197</guid>
		<description>there are some errors:

#sysctl -p /etc/sysctl.conf

error: &quot;net.ipv4.icmp_ignore_bogus_error_messages&quot; is an unknown key

every key with &quot; redirects&quot; keyword MUST have underscore and NOT spaces connecting the previous word and the &quot;redirects&quot; word.

example:

net.ipv4.conf.all.send redirects must be changed to:
net.ipv4.conf.all.send_redirects</description>
		<content:encoded><![CDATA[<p>there are some errors:</p>
<p>#sysctl -p /etc/sysctl.conf</p>
<p>error: &#8220;net.ipv4.icmp_ignore_bogus_error_messages&#8221; is an unknown key</p>
<p>every key with &#8221; redirects&#8221; keyword MUST have underscore and NOT spaces connecting the previous word and the &#8220;redirects&#8221; word.</p>
<p>example:</p>
<p>net.ipv4.conf.all.send redirects must be changed to:<br />
net.ipv4.conf.all.send_redirects</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michae Fox</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-196</link>
		<dc:creator>Michae Fox</dc:creator>
		<pubDate>Tue, 14 Jul 2009 07:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-196</guid>
		<description>Thanks for starting the wiki page on CentOS hardening. Just what the doctor ordered. Especially if contains up to date information.</description>
		<content:encoded><![CDATA[<p>Thanks for starting the wiki page on CentOS hardening. Just what the doctor ordered. Especially if contains up to date information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AJay</title>
		<link>http://www.bofh-hunter.com/2009/07/09/hardening-centos/comment-page-1/#comment-195</link>
		<dc:creator>AJay</dc:creator>
		<pubDate>Mon, 13 Jul 2009 18:55:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.bofh-hunter.com/?p=153#comment-195</guid>
		<description>What about a section on limiting cron, by editing cron.allow?  I was compromised a while ago and there was a script in /var/lib/cron.</description>
		<content:encoded><![CDATA[<p>What about a section on limiting cron, by editing cron.allow?  I was compromised a while ago and there was a script in /var/lib/cron.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
