BSD tty security, part 3: How to Fix It

Rahul Dhesi dhesi%cirrusl at oliveb.ATC.olivetti.com
Sat May 18 06:16:46 AEST 1991


In the discussion, Dan mentioned using a secure attention key (SAK)
sequence for security.  John objected, saying that the SAK sequence
would have to be disabled for some purposes, such as UUCP.  I
responded:

   A secure attention key sequence, to be secure, must use an
   out-of-band channel.  As an analogous example, the DTR line to a
   modem is out-of-band and cannot be defeated no matter what you send
   on the data lines.

John F Haugh II responds (quite correctly):

   Not everything has an out of band channel to send a SAK sequence
   along on.  For example, what would you use as the SAK sequence on a
   3 wire dumb ASCII terminal that is hardwired to a port switch that
   is used by any number of other terminals with various baud rates and
   keyboards?  There are no spare lines to dork with.  Send a break?
   Do all dumb ASCII keyboards include a BREAK key?  It can't be
   defeated, but not every keyboard has one.

Dan will, of course, have his own response to this (as he always
does :-).  Although it's true that not all hardware guarantees an
out-of-band channel to support a secure attention key, it turns out
that there is a simple method of using in-band signalling that is
*virtually* foolproof.  The good folks at Bizcomp patented this some
years ago.  (Maybe I should say the "bad" folks, because they then
proceeded to sue everybody in sight.)  The idea is to have a secure
attention sequence that includes guard pauses before and after.  In the
case of the most popular application of this patent, the sequence used
is:

     (1 second pause) +++ (1 second pause)

When the above happens on the data line, a modem that understands it
goes into command mode.

I said *virtually* foolproof because there is a finite, though
infinitesimal, chance that a genuine data stream will include the same
sequence.  If it does, you are in trouble.  It doesn't happen in
practice, probably for the same reason that an ideal gas in a box never
collects all in one corner, though the quantum mechanics (mechanicists?
machinists?) will tell you that, given enough time, it *will* happen.

Probably 99.9% of dumb terminals have a real break key.  Users of the
remaining 0.1% may have to do something like this:

     1.   pause for 3 to 5 seconds
     2.   rapidly hit the + key 10 times
     3.   pause for 3 to 5 seconds
     4.   hit the return key

The chances of the pauses accidentally occuring in the same way in a
data stream are probably very small.  To make the sequence even more
foolproof you can increase the pauses, or require a longer
sequence like:

     (pause) +++ (pause) --- (pause) &&& (pause)
--
Rahul Dhesi <dhesi at cirrus.COM>
UUCP:  oliveb!cirrusl!dhesi



More information about the Comp.unix.internals mailing list