home *** CD-ROM | disk | FTP | other *** search
/ Hacker Chronicles 1 / HACKER1.ISO / phrk2 / phrack17.8 < prev    next >
Text File  |  1992-09-26  |  12KB  |  212 lines

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