home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / zines / phrack1 / phrack17.008 < prev    next >
Encoding:
Text File  |  2003-06-11  |  11.5 KB  |  214 lines

  1.  
  2.                         % = % = % = % = % = % = % = %
  3.                         =                           =
  4.                         %   P h r a c k   X V I I   %
  5.                         =                           =
  6.                         % = % = % = % = % = % = % = %
  7.  
  8.                               Phrack  Seventeen
  9.                                 07 April 1988
  10.  
  11.                     File 8 of 12 : Dialback Modem Security
  12.  
  13.  
  14.  
  15. In article <906@hoptoad.uucp> gnu@hoptoad.UUCP writes:
  16. >Here are the two messages I have archived on the subject...
  17.  
  18. >[I believe the definitive article in that discussion was by Lauren Weinstein,
  19. >vortex!lauren; perhaps he has a copy.
  20.  
  21.         What follows is the original article that started the discussion.  I
  22. do not know whether it qualifies as the "definitive article" as I think I
  23. remember Lauren and I both posted further comments.
  24.                                                             - Dave
  25.  
  26.                             ** ARTICLE FOLLOWS **
  27.  
  28. ------------------------------------------------------------------------------
  29.  
  30.         An increasingly popular technique for protecting dial-in ports from
  31. the ravages of hackers and other more sinister system penetrators is dial back
  32. operation wherein a legitimate user initiates a call to the system he desires
  33. to connect with, types in his user ID and perhaps a password, disconnects and
  34. waits for the system to call him back at a prearranged number. It is assumed
  35. that a penetrator will not be able to specify the dial back number (which is
  36. carefully protected), and so even if he is able to guess a user-name/password
  37. pair he cannot penetrate the system because he cannot do anything meaningful
  38. except type in a user-name and password when he is connected to the system. If
  39. he has a correct pair it is assumed the worst that could happen is a spurious
  40. call to some legitimate user which will do no harm and might even result in a
  41. security investigation.
  42.  
  43.         Many installations depend on dial-back operation of modems for their
  44. principle protection against penetration via their dial up ports on the
  45. incorrect presumption that there is no way a penetrator could get connected to
  46. the modem on the call back call unless he was able to tap directly into the
  47. line being called back.  Alas, this assumption is not always true -
  48. compromises in the design of modems and the telephone network unfortunately
  49. make it all too possible for a clever penetrator to get connected to the call
  50. back call and fool the modem into thinking that it had in fact dialed the
  51. legitimate user.
  52.  
  53.         The problem areas are as follows:
  54.  
  55.                         Caller control central offices
  56.  
  57.         Many older telephone central office switches implement caller control
  58. in which the release of the connection from a calling telephone to a called
  59. telephone is exclusively controlled by the originating telephone.  This means
  60. that if the penetrator simply failed to hang up a call to a modem on such a
  61. central office after he typed the legitimate user's user-name and password,
  62. the modem would be unable to hang up the connection.
  63.  
  64.         Almost all modems would simply go on-hook in this situation and not
  65. notice that the connection had not been broken.  If the same line was used to
  66. dial out on as the call came in on,  when the modem went to dial out to call
  67. the legitimate user back the it might not notice (there is no standard way of
  68. doing so electrically) that the penetrator was still connected on the line.
  69. This means that the modem might attempt to dial and then wait for an
  70. answerback tone from the far end modem. If the penetrator was kind enough to
  71. supply the answerback tone from his modem after he heard the system modem
  72. dial, he could make a connection and penetrate the system. Of course some
  73. modems incorporate dial tone detectors and ringback detectors and in fact wait
  74. for dial tone before dialing, and ringback after dialing but fooling those
  75. with a recording of dial tone (or a dial tone generator chip) should pose
  76. little problem.
  77.  
  78.  
  79.                      Trying to call out on a ringing line
  80.  
  81.         Some modems are dumb enough to pick up a ringing line and attempt to
  82. make a call out on it.   This fact could be used by a system penetrator to
  83. break dial back security even on joint control or called party control central
  84. offices.  A penetrator would merely have to dial in on the dial-out line
  85. (which would work even if it was a separate line as long as the penetrator was
  86. able to obtain it's number), just as the modem was about to dial out.  The
  87. same technique of waiting for dialing to complete and then supplying
  88. answerback tone could be used - and of course the same technique of supplying
  89. dial tone to a modem which waited for it would work here too.
  90.  
  91.         Calling the dial-out line would work especially well in cases where
  92. the software controlling the modem either disabled auto-answer during the
  93. period between dial-in and dial-back (and thus allowed the line to ring with
  94. no action being taken) or allowed the modem to answer the line (auto-answer
  95. enabled) and paid no attention to whether the line was already connected when
  96. it tried to dial out on it.
  97.  
  98.  
  99.                                The ring window
  100.  
  101.         However, even carefully written software can be fooled by the ring
  102. window problem.  Many central offices actually will connect an incoming call
  103. to a line if the line goes off hook just as the call comes in without first
  104. having put the 20 hz. ringing voltage on the line to make it ring.  The ring
  105. voltage in many telephone central offices is supplied asynchronously every 6
  106. seconds to every line on which there is an incoming call that has not been
  107. answered, so if an incoming call reaches a line just an instant after the end
  108. of the ring period and the line clairvoyantly responds by going off hook it
  109. may never see any ring voltage.
  110.  
  111.         This means that a modem that picks up the line to dial out just as our
  112. penetrator dials in may not see any ring voltage and may therefore have no way
  113. of knowing that it is connected to an incoming call rather than the call
  114. originating circuitry of the switch.  And even if the switch always rings
  115. before connecting an incoming call, most modems have a window just as they are
  116. going off hook to originate a call when they will ignore transients (such as
  117. ringing voltage) on the assumption that they originate from the going-off-hook
  118. process. [The author is aware that some central offices reverse battery (the
  119. polarity of the voltage on the line) in the answer condition to distinguish it
  120. from the originate condition, but as this is by no means universal few if any
  121. modems take advantage of the information supplied]
  122.  
  123.  
  124.                                   In Summary
  125.  
  126.         It is thus impossible to say with any certainty that when a modem goes
  127. off hook and tries to dial out on a line which can accept incoming calls it
  128. really is connected to the switch and actually making an outgoing call. And
  129. because it is relatively easy for a system penetrator to fool the tone
  130. detecting circuitry in a modem into believing that it is seeing dial tone,
  131. ringback and so forth until he supplies answerback tone and connects and
  132. penetrates system security should not depend on this sort of dial-back.
  133.  
  134.  
  135.                              Some Recommendations
  136.  
  137.         Dial back using the same line used to dial in is not very secure and
  138. cannot be made completely secure with conventional modems.  Use of dithered
  139. (random) time delays between dial in and dial back combined with allowing the
  140. modem to answer during the wait period (with provisions made for recognizing
  141. the fact that this wasn't the originated call - perhaps by checking to see if
  142. the modem is in originate or answer mode) will substantially reduce this
  143. window of vulnerability but nothing can completely eliminate it.
  144.  
  145.         Obviously if one happens to be connected to an older caller control
  146. switch, using the same line for dial in and dial out isn't secure at all.  It
  147. is easy to experimentally determine this, so it ought to be possible to avoid
  148. such situations.
  149.  
  150.         Dial back using a separate line (or line and modem) for dialing out is
  151. much better, provided that either the dial out line is sterile (not readily
  152. traceable by a penetrator to the target system) or that it is a one way line
  153. that cannot accept incoming calls at all.  Unfortunately the later technique
  154. is far superior to the former in most organizations as concealing the
  155. telephone number of dial out lines for long periods involves considerable
  156. risk.  The author has not tried to order a dial out only telephone line, so he
  157. is unaware of what special charges might be made for this service or even if
  158. it is available.
  159.  
  160.                            A final word of warning
  161.  
  162.         In years past it was possible to access telephone company test and
  163. verification trunks in some areas of the country by using mf tones from so
  164. called "blue boxes". These test trunks connect to special ports on telephone
  165. switches that allow a test connection to be made to a line that doesn't
  166. disconnect when the line hangs up.   These test connections could be used to
  167. fool a dial out modem, even one on a dial out only line (since the telephone
  168. company needs a way to test it, they usually supply test connections to it
  169. even if the customer can't receive calls).
  170.  
  171.         Access to verification and test ports and trunks has been tightened
  172. (they are a kind of dial-a-wiretap so it ought to be pretty difficult) but in
  173. any as in any system there is always the danger that someone, through
  174. stupidity or ignorance if not mendacity will allow a system penetrator access
  175. to one.
  176.  
  177.                        **  Some more recent comments **
  178.  
  179.         Since posting this I have had several people suggest use of PBX lines
  180. that can dial out but not be dialed into or outward WATS lines that also
  181. cannot be dialed.  Several people have also suggested use of call forwarding
  182. to forward incoming calls on the dial out line to the security office. [This
  183. may not work too well in areas served by certain ESS's which ring the number
  184. from which calls are being forwarded once anyway in case someone forgot to
  185. cancel forwarding. Forwarding is also subject to being cancelled at random
  186. times by central office software reboots]
  187.  
  188.         And since posting this I actually tried making some measurements of
  189. how wide the incoming call window is for the modems we use for dial in at
  190. CRDS.  It appears to be at least 2-3 seconds for US Robotics Courier 2400 baud
  191. modems.  I found I could defeat same-line-for-dial-out dialback quite handily
  192. in a few dozen tries no matter what tricks I played with timing and watching
  193. modem status in the dial back login software. I eventually concluded that
  194. short of reprogramming the micro in the modem to be smarter about monitoring
  195. line state, there was little I could do at the login (getty) level to provide
  196. much security for same line dialback.
  197.  
  198.         Since it usually took a few tries to break in, it is possible to
  199. provide some slight security improvement by sharply limiting the number of
  200. unsuccessful callbacks per user per day so that a hacker with only a couple of
  201. passwords would have to try over a significant period of time.
  202.  
  203.         Note that dialback on a dedicated dial-out only line is somewhat
  204. secure.
  205.  
  206.  
  207.          David I. Emery    Charles River Data Systems   617-626-1102
  208.          983 Concord St., Framingham, MA 01701.
  209.          uucp: decvax!frog!die
  210.  
  211. --
  212.           David I. Emery   Charles River Data Systems
  213. 983 Concord St., Framingham, MA 01701 (617) 626-1102 uucp: decvax!frog!die
  214.