1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: System Security (was: Re: [MUD&#45;Dev] players who "take away from the game") -->
<!--X-From-R13: "Pehpr [vgpurare, Xe." <oehprNcherzntvp.pbz> -->
<!--X-Date: Thu, 11 Nov 1999 14:33:12 &#45;0800 -->
<!--X-Message-Id: 011c01bf2c93$f4151420$7101a8c0#howdy,cybersight.com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: System Security (was: Re: [MUD-Dev] players who "take away</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:bruce#puremagic,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00216.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00218.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00215.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00222.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00217">Author</A>
&nbsp;|&nbsp;<A HREF="#00217">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00217">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: System Security (was: Re: [MUD-Dev] players who "take away from the game") </LI>
<LI><em>From</em>: "Bruce Mitchener, Jr." &lt;<A HREF="mailto:bruce#puremagic,com">bruce#puremagic,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 11 Nov 1999 14:27:35 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On November 11, 1999, J C Lawrence wrote:
&gt;On Wed, 10 Nov 1999 22:00:11 -0700
&gt;cg  &lt;cg#ami-cg,GraySage.Edmonton.AB.CA&gt; wrote:
&gt;&gt; Aha! A technical issue! :-)
&gt;
&gt;&lt;&lt;Oops&gt;&gt;


Yay!

&gt;If you bind to a port less than 1024 on a Unix system your server
&gt;must run as root.  Ergo, if there is a stack overflow ir similar
&gt;exploit in your server, an arbitrary user can obtain root access on
&gt;your system.
&gt;
&gt;There are a couple simple ways to protect against this:
&gt;
&gt;  -- setuid() away from root for all portions of the code that don't
&gt;deal with the sokcet calls.  You should do this sort of
&gt;setuid()/setgid() protection in any privileged code your write
&gt;anyway.  Always.  This leaves the exploint window inthe soket code
&gt;only, not your entire app/server.
&gt;
&gt;  -- Use a helper program which runs as root to do the privileged
&gt;socket IO which then communicates to the server which runs as a
&gt;non-priviledged user via some other stack.


One other option, used by Genesis (the Cold driver) at the least (I'd assume
it is used by other stuff as well), is to pre-bind various privileged ports
during the startup of the server and then setuid() away from root for the
rest of the execution time of the server.  When you attempt to bind a
socket, it first checks to see if it is in the list of prebound sockets and
if so, uses it from there.

There are some flaws in the Genesis implementation, but it largely works.
I'll probably look at borrowing the same approach for whatever server
architecture I end up moving to (I no longer use Cold.).

 - Bruce





_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00216.html">Re: [MUD-Dev] players who "take away from the game"</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00218.html">Re: [MUD-Dev] players who "take away from the game"</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00215.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00222.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00217"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00217"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="00205" HREF="msg00205.html">[MUD-Dev] Neverwinter Nights</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 11 Nov 1999, 18:43 GMT
<UL>
<LI><strong><A NAME="00211" HREF="msg00211.html">Re: [MUD-Dev] Neverwinter Nights</A></strong>, 
Dundee <a href="mailto:SkeptAck#antisocial,com">SkeptAck#antisocial,com</a>, Thu 11 Nov 1999, 19:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00206" HREF="msg00206.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 11 Nov 1999, 18:43 GMT
<UL>
<LI><strong><A NAME="00215" HREF="msg00215.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></strong>, 
J C Lawrence <a href="mailto:claw#cp,net">claw#cp,net</a>, Thu 11 Nov 1999, 22:01 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00217" HREF="msg00217.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></strong>, 
Bruce Mitchener, Jr. <a href="mailto:bruce#puremagic,com">bruce#puremagic,com</a>, Thu 11 Nov 1999, 22:33 GMT
</LI>
<LI><strong><A NAME="00222" HREF="msg00222.html">Re: System Security (was: Re: [MUD-Dev] players who "take away from the game")</A></strong>, 
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Thu 11 Nov 1999, 23:05 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00204" HREF="msg00204.html">[MUD-Dev] MySQL as a MUD.</A></strong>, 
Quzah <a href="mailto:quzah#hotmail,com">quzah#hotmail,com</a>, Thu 11 Nov 1999, 18:43 GMT
<UL>
<LI><strong><A NAME="00210" HREF="msg00210.html">Re: [MUD-Dev] MySQL as a MUD.</A></strong>, 
Holly Sommer <a href="mailto:hsommer#micro,ti.com">hsommer#micro,ti.com</a>, Thu 11 Nov 1999, 19:02 GMT
<UL>
<LI><strong><A NAME="00224" HREF="msg00224.html">Re: [MUD-Dev] MySQL as a MUD.</A></strong>, 
J C Lawrence <a href="mailto:claw#cp,net">claw#cp,net</a>, Thu 11 Nov 1999, 23:20 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>