<?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: Defense in Depth and Sudo</title>
	<atom:link href="http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/feed/" rel="self" type="application/rss+xml" />
	<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/</link>
	<description>Linux, politics, and other interesting things</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:09:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: robw</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24998</link>
		<dc:creator>robw</dc:creator>
		<pubDate>Mon, 14 Jun 2010 23:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24998</guid>
		<description>They&#039;ve been able to do that for more than a decade and yet still don&#039;t in the majority of attacks to lower profile websites, so even a pathetically weak defense is &#039;good enough&#039; for a lot of cases.  If you have the time then definitely put something better in place, I wouldn&#039;t argue against that, but don&#039;t discount the cheap methods as worthless.

By way of metaphor, most people&#039;s houses aren&#039;t highly secure against burglary and so most burglars are skilled at identifying weakly protected houses.  Is a security light good protection?  No, but it&#039;ll put a lot of them off, and that&#039;s what we&#039;re aiming for here.  We can inconvenience the lazy attackers enough for them to go elsewhere even with trivial and easily-breakable measures like sudo.

Interesting post though, it&#039;s good to think about these things.</description>
		<content:encoded><![CDATA[<p>They&#8217;ve been able to do that for more than a decade and yet still don&#8217;t in the majority of attacks to lower profile websites, so even a pathetically weak defense is &#8216;good enough&#8217; for a lot of cases.  If you have the time then definitely put something better in place, I wouldn&#8217;t argue against that, but don&#8217;t discount the cheap methods as worthless.</p>
<p>By way of metaphor, most people&#8217;s houses aren&#8217;t highly secure against burglary and so most burglars are skilled at identifying weakly protected houses.  Is a security light good protection?  No, but it&#8217;ll put a lot of them off, and that&#8217;s what we&#8217;re aiming for here.  We can inconvenience the lazy attackers enough for them to go elsewhere even with trivial and easily-breakable measures like sudo.</p>
<p>Interesting post though, it&#8217;s good to think about these things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etbe</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24993</link>
		<dc:creator>etbe</dc:creator>
		<pubDate>Mon, 14 Jun 2010 10:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24993</guid>
		<description>robw: Any half competent script author would at least try using sudo with the same password any time that they cracked a user account, so the same password twice isn&#039;t going to help.

The script kiddies have collections of kernel exploits etc, so it would be quite possible for them to have an exploit that replaces sudo with a shell function that exports the password elsewhere.</description>
		<content:encoded><![CDATA[<p>robw: Any half competent script author would at least try using sudo with the same password any time that they cracked a user account, so the same password twice isn&#8217;t going to help.</p>
<p>The script kiddies have collections of kernel exploits etc, so it would be quite possible for them to have an exploit that replaces sudo with a shell function that exports the password elsewhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robw</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24992</link>
		<dc:creator>robw</dc:creator>
		<pubDate>Mon, 14 Jun 2010 09:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24992</guid>
		<description>In a web hosting environment the most common type of attack is automated, done on a massive scale across thousands of hosts, in an attempt to find some weak and easy targets to build up a botnet.  Against this the login-twice method does actually provide some protection.  The attackers would be able to get around the protection if they used intelligence and effort, but 99% of the attackers don&#039;t care to try as they&#039;re getting plenty of success with even less protected servers.

As an anecdote I&#039;ve often seen servers which have technically been compromised, in that a user account (such as &#039;apache&#039;) has been breached, but the attacker has only tried to run some pre-written scripts and shown no imagination in finding weaknesses specific to the server itself.  Blocking most outbound ports at the firewall is often enough, so that they can&#039;t run an IRC server, for example.

You quite rightly discuss how to make a server the most secure, much as how someone could talk about making their house more burglar-proof.  The truth is that most attackers, both physical and virtual, are lazy enough that even weak protection is good enough for a majority of cases.

So yes, I fully agree with what you say - sudo isn&#039;t much of a protection at all against someone who knows Linux well - but it is good enough to limit damage from a non-determined hacker.</description>
		<content:encoded><![CDATA[<p>In a web hosting environment the most common type of attack is automated, done on a massive scale across thousands of hosts, in an attempt to find some weak and easy targets to build up a botnet.  Against this the login-twice method does actually provide some protection.  The attackers would be able to get around the protection if they used intelligence and effort, but 99% of the attackers don&#8217;t care to try as they&#8217;re getting plenty of success with even less protected servers.</p>
<p>As an anecdote I&#8217;ve often seen servers which have technically been compromised, in that a user account (such as &#8216;apache&#8217;) has been breached, but the attacker has only tried to run some pre-written scripts and shown no imagination in finding weaknesses specific to the server itself.  Blocking most outbound ports at the firewall is often enough, so that they can&#8217;t run an IRC server, for example.</p>
<p>You quite rightly discuss how to make a server the most secure, much as how someone could talk about making their house more burglar-proof.  The truth is that most attackers, both physical and virtual, are lazy enough that even weak protection is good enough for a majority of cases.</p>
<p>So yes, I fully agree with what you say &#8211; sudo isn&#8217;t much of a protection at all against someone who knows Linux well &#8211; but it is good enough to limit damage from a non-determined hacker.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etbe</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24989</link>
		<dc:creator>etbe</dc:creator>
		<pubDate>Sun, 13 Jun 2010 21:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24989</guid>
		<description>http://www.reddit.com/r/linux/comments/cehbu/can_using_sudo_provide_defense_in_depth_benefits/

There is some discussion on this post at the above Reddit page.</description>
		<content:encoded><![CDATA[<p><a href="http://www.reddit.com/r/linux/comments/cehbu/can_using_sudo_provide_defense_in_depth_benefits/" rel="nofollow">http://www.reddit.com/r/linux/comments/cehbu/can_using_sudo_provide_defense_in_depth_benefits/</a></p>
<p>There is some discussion on this post at the above Reddit page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etbe</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24988</link>
		<dc:creator>etbe</dc:creator>
		<pubDate>Sun, 13 Jun 2010 21:47:37 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24988</guid>
		<description>Depth in terms of &quot;Defense in Depth&quot; means things such as denyhosts, not merely entering a second password.

http://www.usenix.org/event/hotsec07/tech/full_papers/florencio/florencio.pdf

There has been research on this matter (see the above URL).  In summary the entropy in the user-name does do some good if you have a large number of accounts (such as an Internet banking service for a major bank) such that a multiple attempt lock-out doesn&#039;t work.  But if you have a small number of accounts (less than 10,000 or so) and any sort of limit on the rate of attempts per account then the overall scanning rate will not lead to any significant risk of attack.

The mechanisms for securing Internet banking are quite different from those for securing servers for sysadmin login.

Besides, there is no reason why the account for UID==0 needs to be named &quot;root&quot;.  You can easily configure a system with account &quot;root&quot; locked and have another name for the account that is really used for UID==0 access.</description>
		<content:encoded><![CDATA[<p>Depth in terms of &#8220;Defense in Depth&#8221; means things such as denyhosts, not merely entering a second password.</p>
<p><a href="http://www.usenix.org/event/hotsec07/tech/full_papers/florencio/florencio.pdf" rel="nofollow">http://www.usenix.org/event/hotsec07/tech/full_papers/florencio/florencio.pdf</a></p>
<p>There has been research on this matter (see the above URL).  In summary the entropy in the user-name does do some good if you have a large number of accounts (such as an Internet banking service for a major bank) such that a multiple attempt lock-out doesn&#8217;t work.  But if you have a small number of accounts (less than 10,000 or so) and any sort of limit on the rate of attempts per account then the overall scanning rate will not lead to any significant risk of attack.</p>
<p>The mechanisms for securing Internet banking are quite different from those for securing servers for sysadmin login.</p>
<p>Besides, there is no reason why the account for UID==0 needs to be named &#8220;root&#8221;.  You can easily configure a system with account &#8220;root&#8221; locked and have another name for the account that is really used for UID==0 access.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zomglol</title>
		<link>http://etbe.coker.com.au/2010/06/13/defense-in-depth-and-sudo/comment-page-1/#comment-24986</link>
		<dc:creator>zomglol</dc:creator>
		<pubDate>Sun, 13 Jun 2010 16:11:58 +0000</pubDate>
		<guid isPermaLink="false">http://etbe.coker.com.au/?p=2254#comment-24986</guid>
		<description>Defense in depth means adding layers of security to slow an attacker down.

Using root removes depth.  You can use other tools such as denyhosts to block attacks but one should be doing that anyway.

1: ssh as root (yes)-&gt; password cracker -&gt; pwn

2: ssh as root (no)-&gt; user dictionary -&gt; find valid user (yes) -&gt; password cracker -&gt; pwn

Plus you have a one liner at the end of your article about not using sudo in it&#039;s default configuration, well I would argue that if you are using sudo in its default configuration you shouldn&#039;t be responsible for security of systems anyway.</description>
		<content:encoded><![CDATA[<p>Defense in depth means adding layers of security to slow an attacker down.</p>
<p>Using root removes depth.  You can use other tools such as denyhosts to block attacks but one should be doing that anyway.</p>
<p>1: ssh as root (yes)-&gt; password cracker -&gt; pwn</p>
<p>2: ssh as root (no)-&gt; user dictionary -&gt; find valid user (yes) -&gt; password cracker -&gt; pwn</p>
<p>Plus you have a one liner at the end of your article about not using sudo in it&#8217;s default configuration, well I would argue that if you are using sudo in its default configuration you shouldn&#8217;t be responsible for security of systems anyway.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

