<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://ideas.4brad.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Brad Ideas - Have the OS give user permissions on &amp;quot;privileged&amp;quot; IP ports. - Comments</title>
 <link>http://ideas.4brad.com/node/376</link>
 <description>Comments for &quot;Have the OS give user permissions on &quot;privileged&quot; IP ports.&quot;</description>
 <language>en</language>
<item>
 <title>Internal only</title>
 <link>http://ideas.4brad.com/node/376#comment-1768</link>
 <description>&lt;p&gt;This is a proposal for internal security on a system itself, nothing to do with firewalls.&lt;/p&gt;
&lt;p&gt;Remember, firewalls are a hoax.  They are an insecure way to protect systems which we use and sell because our systems themselves are unacceptably insecure, and since they often run windows, unfixable.&lt;/p&gt;
&lt;p&gt;The name firewall should remind you of the strategy of making all your buildings out of straw, and then putting a brick wall around them.  One flaming arrow over the top of the wall and you lose everything.  Oh yeah, and the straw cars (laptops) are constantly roaming back and forth in and out of the firewall, bringing back incindiaries to launch when they get inside.&lt;/p&gt;
</description>
 <pubDate>Tue, 06 Jun 2006 11:00:28 -0700</pubDate>
 <dc:creator>brad</dc:creator>
 <guid isPermaLink="false">comment 1768 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Have the OS give user permissions on &quot;privileged&quot; IP ports.</title>
 <link>http://ideas.4brad.com/node/376#comment-1757</link>
 <description>&lt;p&gt;How would I do this securely for port 443 on a UNIX server running in a QZ between firewalls?&lt;/p&gt;
</description>
 <pubDate>Fri, 02 Jun 2006 14:10:48 -0700</pubDate>
 <dc:creator>Maggie</dc:creator>
 <guid isPermaLink="false">comment 1757 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>The program would have to</title>
 <link>http://ideas.4brad.com/node/376#comment-1740</link>
 <description>&lt;p&gt;The program would have to change, sure, but not be rewritten. It could just have a command line option to say &quot;don&#039;t bind, and listen to the socket on stdin.&quot; Should be a pretty small change.&lt;/p&gt;
</description>
 <pubDate>Mon, 29 May 2006 07:28:35 -0700</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 1740 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>low port bindng</title>
 <link>http://ideas.4brad.com/node/376#comment-1736</link>
 <description>&lt;p&gt;That is fine, but means the program has to change.  If you are willing to rewrite the daemons, then you should go all the way to a capability design.   In such a design a program can&amp;#8217;t do anything you didn&amp;#8217;t grant it the capability to do, no matter how you update it.&lt;/p&gt;

&lt;p&gt;But for now I was proposing something to let the programs be the same but not run as root.&lt;/p&gt;
</description>
 <pubDate>Sun, 28 May 2006 02:30:14 -0700</pubDate>
 <dc:creator>brad</dc:creator>
 <guid isPermaLink="false">comment 1736 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>In a &quot;truly secure system&quot;</title>
 <link>http://ideas.4brad.com/node/376#comment-1735</link>
 <description>&lt;p&gt;In a &quot;truly secure system&quot; as you describe, you need something like &lt;a href=&quot;http://raw.cs.berkeley.edu/pcc.html&quot; rel=&quot;nofollow&quot;&gt;Proof-Carrying Code&lt;/a&gt;, so that software can be proved safe to run (if not correct).&lt;/p&gt;
&lt;p&gt;As for solving the problem using the unix-like systems of today, this is easy. Start the &quot;lowportbind&quot; program as root. It binds to a low port, setuid()s to a less privileged user, dup2()s the connection onto stdin, then execv()s the daemon. This would be similar to what inetd does.&lt;/p&gt;
&lt;p&gt;All you do is carefully audit lowportbind&#039;s code and make sure you trust it. And, of course, make sure the other services you run are also pretty secure, since a flaw can still compromise parts of the system no matter what; the breach just won&#039;t be as drastic.&lt;/p&gt;
&lt;p&gt;On that note, when you mentioned &quot;this world of software that is updated regularly and without much attention by 99% of the sysadmins&quot;, you pointed out a much bigger problem. Even if one day all code is proved safe to run, if you don&#039;t know what you&#039;re doing, your system will still be insecure, perhaps because you won&#039;t understand the assumptions made in the proof. That&#039;s why simplicity is of paramount importance. Your proposal, while well-intentioned, is unnecessary complexity and a recipe for confusion. Imagine if every time there was a security problem we fixed it by making the system we use more complicated. What do you think got us confused enough to cause the problem in the first place?&lt;/p&gt;
</description>
 <pubDate>Sat, 27 May 2006 19:23:03 -0700</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 1735 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Not a solution</title>
 <link>http://ideas.4brad.com/node/376#comment-1563</link>
 <description>&lt;p&gt;Give the program all powers so it can perform a minor operation and trust it to give them back?  That&amp;#8217;s hardly a solution.  In a truly secure system, you should be able to run programs without having to trust them at all.   Especially in this world of software that is updated regularly and without much attention by 99% of the sysadmins &amp;#8212; or even updated automatically, as is now common on Windows.&lt;/p&gt;
</description>
 <pubDate>Mon, 10 Apr 2006 07:37:30 -0700</pubDate>
 <dc:creator>brad</dc:creator>
 <guid isPermaLink="false">comment 1563 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Isn&#039;t this a solved problem?</title>
 <link>http://ideas.4brad.com/node/376#comment-1559</link>
 <description>&lt;p&gt;1. Start program as root&lt;br /&gt;
2. Bind to a low port&lt;br /&gt;
3. setuid&lt;br /&gt;
4. Do everything else&lt;/p&gt;
&lt;p&gt;What&#039;s the problem? Can&#039;t you at least call bind() without screwing up?&lt;/p&gt;
&lt;p&gt;Keep in mind that *simplicity* promotes security, while fancy complicated schemes hinder it.&lt;/p&gt;
</description>
 <pubDate>Sat, 08 Apr 2006 18:51:20 -0700</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 1559 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Oh, I&#039;m all for even more</title>
 <link>http://ideas.4brad.com/node/376#comment-1510</link>
 <description>&lt;p&gt;In fact, as I noted, I think the long term is to move towards things like capability based security, though that typically involves rewriting programs, and languages and libraries being adapted to capability systems.   In capaiblity systems, such as &lt;a href=&quot;http://erights.org&quot;&gt;E&lt;/a&gt; a program can never do more that you give it capabilities to do, so you can be a lot more comfortable about it.&lt;/p&gt;

&lt;p&gt;The key to this idea is to find some baby-steps which are easy to implement and easy to maintain.&lt;/p&gt;
</description>
 <pubDate>Mon, 27 Mar 2006 20:17:34 -0800</pubDate>
 <dc:creator>brad</dc:creator>
 <guid isPermaLink="false">comment 1510 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Consider AppArmor</title>
 <link>http://ideas.4brad.com/node/376#comment-1484</link>
 <description>&lt;p&gt;Take a look at &lt;a href=&quot;http://www.novell.com/products/apparmor/&quot; rel=&quot;nofollow&quot;&gt; AppArmor &lt;/a&gt;.  It has a finer grained access control mechanism to accomplish what you are describing.  The &lt;a href=&quot;/hrefhttp://www.fosdem.org/2006&quot; rel=&quot;nofollow&quot;&gt; FOSDEM &lt;/a&gt; &lt;a href=&quot;http://ftp.belnet.be/mirror/FOSDEM/FOSDEM2006-apparmor.avi&quot; rel=&quot;nofollow&quot;&gt; lecture (200+ MB avi file) &lt;/a&gt; describes restricting the NTP daemon as an example.  The necessary unix kernel mods are available in linux.  I don&#039;t know whether they&#039;ve been ported to other Unix variants but the concepts do carry across.  The rest of the administrative structure needed to implement and maintain these controls is also available as open source.&lt;/p&gt;
&lt;p&gt;It looks much more tractable than the SELinux approach, with only a modest loss of capability.  It deals with much more than just port restrictions efficiently.&lt;/p&gt;
</description>
 <pubDate>Wed, 22 Mar 2006 11:04:53 -0800</pubDate>
 <dc:creator>rjh</dc:creator>
 <guid isPermaLink="false">comment 1484 at http://ideas.4brad.com</guid>
</item>
<item>
 <title>Have the OS give user permissions on &quot;privileged&quot; IP ports.</title>
 <link>http://ideas.4brad.com/node/376</link>
 <description>&lt;p&gt;Very technical post here.  Among the children of Unix (Linux/BSDs/MacOS) there is a convention that for a program to open a TCP or UDP port from 0 to 1023, it must have superuser permission.  The idea is that these ports are privileged, and you don&amp;#8217;t want just any random program taking control of such a port and pretending to be (or blocking out) a system service like Email or DNS or the web.&lt;/p&gt;

&lt;p&gt;This makes sense, but the result is that all programs that provide such services have to start their lives as the all-powerful superuser, which is a security threat of its own.   Many programs get superuser powers just so they can open their network port and, and then discard the powers.   This is not good security design.&lt;/p&gt;

&lt;p&gt;While capability-based-security (where the dispatcher that runs programs gives them capability handles for all the activities they need to do) would be much better, that&amp;#8217;s not an option here yet.&lt;/p&gt;

&lt;p&gt;I propose a simple ability to &amp;#8220;chown&amp;#8221; ports (ie. give ownership and control like a file) to specific Unix users or groups.   For example, if there is a &amp;#8220;named&amp;#8221; user that manages the DNS name daemon, give ownership of the DNS port (53) to that user.   Then a program running as that user could open that port, and nobody else except root (superuser) could do so.   You could also open some ports to any user, if you wanted.&lt;/p&gt;
</description>
 <comments>http://ideas.4brad.com/node/376#comments</comments>
 <category domain="http://ideas.4brad.com/archives/cat_technology.html">Technology</category>
 <pubDate>Wed, 22 Mar 2006 10:27:32 -0800</pubDate>
 <dc:creator>brad</dc:creator>
 <guid isPermaLink="false">376 at http://ideas.4brad.com</guid>
</item>
</channel>
</rss>
