README 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. v 0.1 gpk@onramp.net 3/27/99
  2. I Intro
  3. This document covers the use of the modified "chat" program and its
  4. adjunct "chatchat" to login using the Security Dynamics SecurID card
  5. on a linux system.
  6. This set of files comprises a modified version of the chat program
  7. (the one distributed with ppp-2.3.5) and a new program called chatchat
  8. that allows you to supply data from the keyboard to the chat program.
  9. The SecurID card generates passwords that have a lifetime of one
  10. minute and are used as a first layer in dial up security. The only
  11. software I know of for this card is for windows, so I wrote my own.
  12. This software allows you to type in the time-sensitive password right
  13. when your chat script is asked to supply the passcode by the remote
  14. system.
  15. II How It Works
  16. This version of chat his an additional command that can be put into
  17. its options that says "Don't reply with this string. Open this pipe,
  18. read the contents, and reply with that instead." Chatchat creates a
  19. pipe and lets you type your passcode into it, then chat picks that up
  20. and sends it out just as though the passcode was hardcoded into the
  21. options.
  22. III Installation
  23. I've provided intel binaries and source code the the modified chat
  24. program and the chatchat program. I'll recommend that you copy the
  25. chat.c program into your ppp-2.3.5/chat directory (save your original
  26. chat.c program first!) and re-make it using the Makefile that comes
  27. with chat. Copy the new chat somewhere into your path. (On my system
  28. chat lives in /usr/sbin/chat, so I've copied the modified one into
  29. /usr/sbin/chat.new and changed my dial in script to call chat.new
  30. instead of chat.
  31. Second, compile chatchat.c and install it somewhere in your path:
  32. gcc -g -o chatchat chatchat.c
  33. cp chatchat /usr/sbin
  34. Third, modify your chat script to use the chatchat program. Mine
  35. looks something like this:
  36. --------------------
  37. #!/bin/sh
  38. #
  39. # This is part 2 of the ppp-on script. It will perform the connection
  40. # protocol for the desired connection.
  41. # use atm0 to turn down the speaker volume on my sportster x2 voice modem
  42. # gpk 11/2/97
  43. exec /usr/sbin/chat.new -V -v \
  44. ABORT "BUSY" \
  45. ABORT "NO DIAL TONE" \
  46. ABORT "NO ANSWER" \
  47. TIMEOUT 50 \
  48. "" "atm0" \
  49. OK ATDT$TELEPHONE \
  50. CONNECT '' \
  51. name: \\da0xxxxxx \
  52. word: @/var/tmp/p \
  53. compress. ''
  54. -----------------------
  55. This is a standard chat script:
  56. * abort if the modem is busy, you don't get a dial tone, no one
  57. answers, or 50 seconds elapses.
  58. * use atm0 to mute the modem
  59. * dial the modem, when it connects, wait to be asked for account name
  60. * when we see "name:" prompt, delay briefly then respond with your
  61. account name (fill in your account name)
  62. Now we get to the new stuff:
  63. * when we see "word:" in the password prompt, instead of responding
  64. with "@/var/tmp/p", the modified chat program will open the pipe
  65. /var/tmp/p, read the passcode out of there, and send it
  66. * when we see "compress." (the last word before ppp starts), reply
  67. with nothing. The script ends and we start ppp.
  68. Note:
  69. * Make sure there is some whitespace between the filename and the \.
  70. IV Usage
  71. To use this install the modified chat and chatchat programs, and
  72. modify your chat script similar to the above. Before you dial in,
  73. start that chatchat program giving it the same pipe as in your config
  74. file. In the above case:
  75. chatchat /var/tmp/p
  76. Wait until you have one or two tick marks left on your card's
  77. current number, then start your dial up process that eventually calls
  78. chat. When chat goes to open and read the pipe, chatchat will prompt:
  79. type PIN into SecurID card and
  80. enter resulting passcode:
  81. At that point, type your PIN number into your Securid card, press
  82. the diamond, and type the resulting numbers in as your passcode. If
  83. you've left the -V -v options on your chat command you'll see
  84. everything so out, otherwise it works silently.
  85. If you type the number wrong or run out of time, the server will
  86. respond with an authentication failure. In that case you will have to
  87. hang up and start again. I don't know how to build a conditional script
  88. that says either expect "compress" next, but if you see "name:" again,
  89. do this instead.
  90. V Additional Information
  91. You can obtain additional information about chat and ppp from the
  92. man pages for chat and pppd, as well as the PPP-HOWTO.