home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / voice / centigra.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  35.4 KB  |  892 lines

  1.  
  2.             Notes on Centigram Voice Mail system Consoles
  3.  
  4. Proper entry procedure, possible design flaw and serious security
  5. bug:
  6.  
  7.      Due to, I assume, more efficient task-handling and the
  8. desire for a more 'Unix-like' environment, the developers at
  9. Centigram needed for certain key functions to be available at all
  10. times.  For instance, the ^Z key acts as the 'escape' key (these
  11. can be remapped, if desired).  When necessary for some
  12. applications to use an 'escape' procedure, pressing this key can,
  13. in at leas cases, cause a drop to shell, or /cmds/qnxsh
  14. (possibly /cmds/sh, as well, but I'm used to seeing qnxsh).  If
  15. this escape procedure were invoked during, say, /cmds/login, the
  16. resulting drop to shell would by-pass the 'Enter Passcode:'
  17. message.  And it does.
  18.  
  19.      After calling the Centigram, normal procedure is to hit ^Z
  20. to activate the terminal, followed by the entry of the remote or
  21. console passcodes, and then proceeding with normal console
  22. activities.  However, if ^Z is continually depressed during the
  23. login sequence, the login program will abort and run /cmds/qnxsh.
  24. The behavior may be somewhat erratic by the repeat use of the
  25. escape key, but when the $ prompt appears, usually, it doesn't
  26. deliberately go away without an 'exit' command or a ^D.
  27. Typically, a login pattern can develop to accommodate the erratic
  28. behavior something along the lines of: continuously depress ^Z
  29. until $ prompt appears, hit return, possibly get 'Enter Passcode:'
  30. message, hit return, and $ prompt appears again, set proper tty
  31. setting, and change directory appropriately, and continue with
  32. normal console functions.
  33.  
  34. Initial STTY Setting:
  35.  
  36.      I've had problems with my terminal settings not being set
  37. properly during the above entry procedure.  I can correct this by
  38. using the "stty +echo +edit" command, and, for my terminal, all
  39. is restored.  The correct values for STTY options and keys appear
  40. to be:
  41.  
  42. Options: +echo +edit +etab +ers +edel +oflow +mapcr +hangup
  43.  break=03h     esc=1Ah     rub=7Fh     can=18h     eot=04h      up=15h
  44.  
  45.  down=
  46. 0Ah    left=08h     ins=0Eh     del=0Bh
  47.  
  48.      The keymap, of course, can be modified as desired, but the
  49. options, especially +edit, appear to be necessary.
  50.  
  51. [A somewhat detailed description of the options could follow, or
  52. maybe just a list and a brief review of the ones I care to
  53. comment on]
  54.  
  55. Disks and directories:
  56.  
  57.      The drives and directories are set up in a remotely MessDos
  58. fashion.  The output of a 'pwd' command looks similar to '4:/'.
  59. '4;' represents the drive number, and '/' is the start of the
  60. directory structure, '4:/' being the root directory for drive 4,
  61. '3:/tmp' being the /tmp directory on drive 3, etc.
  62.  
  63.      The two most important directories are 1:/cmds and 4:/cmds,
  64. which contain, for the most part, the program files for all of
  65. the performable commands on the system, excluding the commands
  66. written into the shell.  The directory 1:/cmds should look
  67. similar to:
  68.  
  69. $ ls
  70.  backup        drel          ls            rm            talk
  71.  chattr        eo            mkdir         rmdir         tcap
  72.  choose        fdformat      mount         runfloppy     timer
  73.  clrhouse      files         p             search        tsk
  74.  cp            frel          pack          sh            unpack
  75.  date          get_boolean   patch         slay          ws
  76.  ddump         led           pwd           sleep         zap
  77.  diff          led.init      qnxsh         spatch
  78.  dinit         login         query         stty
  79.  
  80.      This is a display of many useful commands.  chattr changes
  81. the read/write file attributes, cp is copy, ddump dumps disk
  82. sectors in hex & ascii, led is the line editor, p is the file
  83. print utility, and a variety of other things that you can
  84. experiment with at your own leisure.  DO NOT USE THE TALK
  85. COMMAND.  At least, be careful if you do.  If you try to
  86. communicate with your own terminal, it locks communication with
  87. the shell, and upon hangup, for some reason, causes (well, in one
  88. instance) a major system error and system-wide reboot, which,
  89. quite frankly, made me say 'Oops. I'm not doing that again'
  90. when I called to check on the actual voice mailboxes, and the
  91. phone line just sat there, dead as old wood; and I was quite
  92. relieved that it came back up after a few minutes.
  93.  
  94.      The other directory, 4:/cmds, is filled with more specific
  95. commands pertaining to functions within the voice mail system
  96. itself.  These programs are actually run from within other
  97. programs, to produce an easy-to-understand menu system.
  98. Normally, this menu system is immediately run after the entry
  99. of the remote or console passcode, but it would not be run when
  100. using the aforementioned security bug.  It can be run from the
  101. shell simply by typing the name of the program, 'console'.
  102.  
  103. Mounting and Initializing Drives:
  104.  
  105.      The MOUNT command produces results similar to this when run
  106. without arguments:
  107.  
  108. $ mount
  109. Drive 1:    Hard,  360k, offset =  256k, partition= Qnx
  110. Drive 2:  Floppy,  360k, p=1Drive 3: RamDisk,   96k, partition= Qnx
  111. Drive 4:    Hard,  6.1M, offset =  616k, partition= Qnx
  112. $tty0  = $con,     Serial at 03F8
  113. $tty1  = $term1 ,     Serial at 02F8
  114. $tty2  = $term2 ,     Serial at 0420
  115. $tty3  = $mdm   ,     Serial at 0428
  116.  
  117.      The Hard and Floppy drives are fairly self-explanatory,
  118. although I can't explain why they appear to be so small, nor do
  119. I know where the voice recordings go, or if this list contain all
  120. the space required for voice storage.
  121.      The Ramdisk, however, is a bit more interesting to me.  The
  122. mount command used for the above-mentioned disk 3 was:
  123.  
  124. $ mount ramdisk 3 s=96k -v
  125.  
  126.       Although I'm not sure what the -v qualifier does, the rest
  127. is fairly straightforward.  I assume that the size of the drive
  128. can be greater than 96k, although I haven't yet played with it to
  129. see how far it can go.  To initialize the drive, the following
  130. command was used:
  131.  
  132. $ dinit 3
  133.  
  134.      Quite simple, really.   Now the drive is ready for use, so
  135. one can 'mkdir 3:/tmp' or such and route files there as desired,
  136. or use it for whatever purpose.  If something is accidentally
  137. redirected to the console with >$cons, you can use the line
  138. editor 'led' to create a temporary file and then use the print
  139. utility 'p' to clear the console's screen by using "p filename
  140. >$cons", where filename contains a clear screen of 25 lines, or
  141. an @▐SI bomb (if appropriate), or a full-screen DobbsHead or
  142. whatever you like.
  143.  
  144. EVMON and password collecting:
  145.  
  146.      The evmon utility is responsible for informing the system
  147. manager about the activity currently taking place within the
  148. voice mail system.  Run alone, evmon produces output similar to:
  149.  
  150. $ evmon
  151. Type Ctrl-C to terminate.
  152. ln  26 tt 3
  153. ln  26 line break
  154. ln  26 onhook
  155. ln  28 ringing
  156. ln  28 tt 8
  157. ln  28 tt 7
  158. ln  28 tt 6
  159. ln  28 tt 2
  160. ln  28 offhook
  161. ln  28 tt *
  162. ln  28 tt 2
  163. ln  28 tt 0
  164. ln  28 tt 3
  165. ln  28 tt 0
  166. ln  28 line break
  167. ln  28 onhook
  168. [...]
  169.  
  170. And so forth.  This identifies a certain phone line, such as line
  171. 28, and a certain action taking place on the line, such as the
  172. line ringing, going on or offhook, etc.  The 'tt' stands (I
  173. assume) for touch tone, and it is, of course, the tone currently
  174. played on the line; which means that touchtone entry of passcodes
  175. can be recorded and filed at will.  In the above example, the
  176. passcode for Mailbox 8762 is 2030 (the * key, along with the 0
  177. key, can acts as the 'user entering mailbox' key; it can,
  178. however, also be the abort key during passcode entry, and other
  179. things as well).  Now the user, of course, doesn't (usually) dial
  180. 8762 to enter his mailbox, he simply dials the mailbox number and
  181. then * plus his passcode; the reason for this is the type of
  182. signalling coming from the switch to this particular business
  183. line was set-up for four digit touch tone ID to route the line to
  184. the appropriate called number.  This is not the only method of
  185. signalling, however, as I've seen other businesses that use three
  186. digit pulse signalling, for example, and there are others as
  187. well.  Each may have it's own eccentricities, but I would imagine
  188. that the line ID would be displayed with EVMON in most cases.
  189.  
  190.      Now, let's say we're online, and we want to play around, and
  191. we want to collect passcodes.  We've set up our Ramdisk to normal
  192. size and we are ready to run evmon.  We could run it, sit at our
  193. terminal, and then record the output, but it's such a time
  194. consuming task (this is 'real-time', after all) that sitting and
  195. waiting be nearly pointless.  So, we use the handy features of
  196. run-in-background and file-redirection.  (See, I told you we were
  197. getting 'Unix-like'.)
  198.  
  199. $ evmon > 3:/tmp/output &
  200. Type Ctrl-C to terminate.
  201. 5e1e
  202. $ ...
  203.  
  204.      5e1e is the task ID (TID) of the new evmon process.  Now we
  205. can go off and perform whatever lists we want, or just play in
  206. the directories, or route DobbsHeads or whatever.  When we decide
  207. to end for the day, we simply stop EVMON, nab the file, remove
  208. it, and if necessary, dismount the ramdisk.
  209.  
  210. $ kill 5e1e
  211. $ p 3:/tmp/output
  212. [ EVMON output would normally appear; if, however, ]
  213. [ there is none, the file would be deleted during  ]
  214. [ the kill with an error message resulting         ]
  215. $ rm 3:/tmp/output
  216. $ rmdir 3:/tmp
  217. $ mount ramdisk 3
  218.  
  219.      and now we can ^D or exit out of the shell and say good-bye.
  220.  
  221.      The good thing about this EVMON procedure is that you don't
  222. need to be online while it runs.  You could start a task sometime
  223. at night and then wait until the next day before you kill the
  224. process and check your results.  This usually produces large log
  225. files anywhere from 40K to 200K, depending upon the amount of
  226. system usage (these figures are rough estimates).  If, however,
  227. you start the EVMON task and leave it running, then the
  228. administrator will not be able to start a new EVMON session until
  229. the old task is killed.  While this probably shouldn't be a
  230. problem over the weekends, during business hours it may become a
  231. little risky.
  232.  
  233.      Remember though, that the risk might be worth it, especially
  234. if the administrator decides to check his mailbox; you'd then
  235. have his passcode, and possibly, remote telephone access to
  236. system administrator functions via touch-tone on the mailbox
  237. system.
  238.  
  239. Task management:
  240.      As we have just noted, any task like EVMON can be run in the
  241. background by appending the command line with a &, the standard
  242. unix 'run-in-background' character.  A Task ID will echo back in
  243. hexadecimal, quite comparable to the unix Process ID.  The
  244. program responsible for task management is called 'tsk' and
  245. should be in 1:/cmds/tsk.  Output from running tsk alone should
  246. look something like:
  247.  
  248. $ tsk
  249. Tty Program         Tid  State Blk  Pri   Flags     Grp Mem Dad  Bro  Son
  250.   0 task            0001 READY ----  1 ---IPLA----- 255 255 ---- ---- ----
  251.   0 fsys            0002 RECV  0000  3 ---IPLA----- 255 255 ---- ---- ----
  252.   0 dev             0003 RECV  0000  2 ---IPLA----- 255 255 ---- ---- ----
  253.   0 idle            0004 READY ---- 15 ----PLA----- 255 255 ---- ---- 0508
  254.   0 /cmds/timer     0607 RECV  0000  2 -S--P-AC---- 255 255 ---- ---- ----
  255.   0 /cmds/err_log   0509 RECV  0000  5 -S--P--C---- 255 255 0A0A ---- ----
  256.   0 /cmds/ovrseer   0A0A REPLY 0607  5 -S--P--C---- 255 255 ---- ---- 030C
  257.   0 /cmds/recorder  010B REPLY 0509  5 -S--P--C---- 255 255 0A0A 0509 ----
  258.   0 /cmds/master    030C REPLY 0607  5 -S--P--C---- 255 255 0A0A 010B 011C
  259.               [ ... a wide assortment of programs ... ]
  260.   0 /cmds/vmemo     011C REPLY 0110 13 -S-----C---- 255 255 030C 011B ----
  261.   3 /cmds/comm      0508 RECV  5622  8 ----P-A----- 255 255 0004 ---- 5622
  262.   3 /cmds/tsk       051D REPLY 0001  8 ------------ 255 255 301E ---- ----
  263.   3 /cmds/qnxsh     301E REPLY 0001 14 ---------E-- 255 255 5622 ---- 051D
  264.   3 /cmds/login     5622 REPLY 0003  8 -------C---- 255 255 0508 ---- 301E
  265.  
  266.  
  267. Although I'm not quite sure at some of the specifics
  268. displayed in this output, the important parts are obvious.  The
  269. first column is the tty number which corresponds to the $tty list
  270. in 'mount' (meaning that the modem I've just called is $tty3, and
  271. I am simultaneously running four tasks from that line); the
  272. second column is the program name (without the drive
  273. specification); the third column is the task ID; the middle
  274. columns are unknown to me; and the last three represent the ties
  275. and relations to other tasks (Parent task ID, another task ID
  276. created from the same parent, and task ID of any program called).
  277.  
  278.      Knowing this, it's easy to follow the tasks we've created
  279. since login.  Initially, task 0508, /cmds/comm, was run, which
  280. presumably contains the requisite 'what should I do know that my
  281. user has pressed a key?' functions, which called /cmds/login to
  282. log the user in.  Login was interrupted with ^Z and one of the
  283. shells, qnxsh, was called to handle input from the user.
  284. Finally, the typing of 'tsk' requires that the /cmds/tsk program
  285. be given a task ID, and the output of the program is simply
  286. confirming that it exists.
  287.      As mentioned, to kill a task from the shell, simply type
  288. 'kill [task-id]' where [task-id] is the four digit hexadecimal
  289. number.
  290.  
  291.      There are other functions of the tsk program, as well.  The
  292. help screen lists:
  293.  
  294. $ tsk ?
  295. use: tsk [f={cmoprst}] [p=program] [t=tty] [u=userid]
  296.      tsk code [p=program]
  297.      tsk info
  298.      tsk mem t=tid
  299.      tsk names
  300.      tsk size [p=program] [t=tty] [u=userid]
  301.      tsk ports
  302.      tsk
  303. tsk
  304.      tsk tree [+tid] [+all] [-net]
  305.      tsk users [p=program] [t=tty] [u=userid]
  306.      tsk vcs
  307.      tsk who tid ...
  308. options: +qnx -header +physical [n=]node s=sort_field
  309.  
  310.      I haven't seen all the information available from this, yet,
  311. as the plain 'tsk' tells me everything I need to know; however,
  312. you may want to play around, there's no telling what secrets are
  313. hidden...
  314.  
  315. $ tsk tsk
  316. Tsk tsk? Have I been a bad computer?
  317.  
  318.      See what I mean?
  319.  
  320. ddump:
  321.  
  322.      The ddump utility is used to display the contents on a
  323. specified blocks of the disk.  It's quite simple to use.
  324.  
  325. $ ddump ?
  326. use: ddump drive block_number [-v]
  327.  
  328.      Again, I'm not quite sure what the -v switch does, but the
  329. instructions are very straightforward.  Normal output looks
  330. similar to:
  331.  
  332. $ ddump 3 3
  333. Place diskette in drive 3 and hit <CR>     <-- this message is always
  334.                                                displayed by ddump.
  335. Block 00000003  Status: 00
  336. 000:  00 00 00 00 00 00 00 00 94 00 00 00 00 00 00 00 ................
  337. 010:  01 00 01 00 40 02 00 00 00 02 00 00 00 00 00 00 ....@....╬.Lù...
  338. 020:  00 01 00 FF FF 00 00 97 37 29 17 00 01 01 01 30 ........7).....0
  339. 030:  C4 17 8E 62 69 74 6D 61 70 00 00 00 00 00 00 00 ...bitmap.......
  340. 040:  00 00 00 00 C0 00 00 00 00 00 00 00 00 00 00 00 ................
  341. 050:  00 00 00 FF FF 00 00 A5 37 29 17 00 01 01 17 30 ........7).....0
  342. 060:  C4 25 8E 6C 6C 6C 00 00 00 00 00 00 00 00 00 00 .%.lll..........
  343. 070:  00 00 00 00 50 0E 00 00 00 0E 00 00 00 00 00 00 ....P...........
  344. 080:  00 01 00 FF FF 7E 05 A8 38 29 17 00 01 01 17 30 .....~..8).....0
  345. 090:  C4 28 8F 61 62 63 00 00 00 00 00 00 00 00 00 00 .(.abc..........
  346. 0A0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  347. 0B0:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  348. [...etc...]
  349.  
  350.      As you can probably notice, what we have here is the
  351. directory track for the ramdisk.  It lists three files, even
  352. though the file abc no longer exists.  The actual bytes have yet
  353. to be decoded, but, as far as the ramdisk goes, I suspect that
  354. they'll be memory related, and not physical block related; that
  355. is, I suspect that some of the numbers given above correspond to
  356. the memory address of the file, and not to the actual disk-block.
  357. So, at least for the ramdisk, finding specific files may be
  358. difficult.  However, if you only have one file one the ramdisk
  359. besides 'bitmap' (which appears to be mandatory across all the
  360. disks), then the next file you create should reside on track 4
  361. and continue working it's way up.  Therefore, if you have evmon
  362. running and redirected to a file on the ramdisk, in order to
  363. check the contents, it's not necessary to kill the process, and
  364. restart evmon, etc.  Simply 'ddump 3 4', and you could get either
  365. useless information (all the bytes are 00 or FF), or you could
  366. get something like:
  367.  
  368. $ ddump 3 4
  369. Place diskette in drive 3 and hit <CR>
  370.  
  371. Block 00000004  Status: 00
  372. 000:  00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 ................
  373. 010:  6C 6E 20 20 32 36 20 74 74 20 33 1E 6C 6E 20 20 ln  26 tt 3.ln
  374. 020:  32 36 20 6C 69 6E 65 20 62 72 65 61 6B 1E 6C 6E 26 line break.ln
  375. 030:  20 20 32 36 20 6F 6E 68 6F 6F 6B 1E 6C 6E 20 20   26 onhook.ln
  376. 040:  32 38 20 72 69 6E 67 69 6E 67 1E 6C 6E 20 20 32 28 ringing.ln  2
  377. 050:  38 20 74 74 20 38 1E 6C 6E 20 20 32 38 20 74 74 8 tt 8.ln  28 tt
  378. 060:  20 37 1E 6C 6E 20 20 32 38 20 74 74 20 36 1E 6C  7.ln  28 tt 6.l
  379. 070:  6E 20 20 32 38 20 74 74 20 32 1E 6C 6E 20 20 32 n  28 tt 2.ln  2
  380. 080:  38 20 6F 66 66 68 6F 6F 6B 1E 6C 6E 20 20 32 38 8 offhook.ln  28
  381. 090:  20 74 74 20 2A 1E 6C 6E 20 20 32 38 20 74 74 20  tt *.ln  28 tt
  382.  
  383.      ... and so forth, thus making sure that the file does have
  384. some content.  Depending upon the length of that content, you
  385. could then choose to either keep the file running, or restart
  386. evmon and buffer the previous output.
  387.  
  388. led:
  389.  
  390.      The program 'led' is Centigram's answer to a standard text
  391. editor.  It is equivalent to 'ed' in unix or 'edlin' in MSDOS,
  392. but it does have it's minor differences.  led is used to create
  393. text files, edit, existing log files, or edit executable shell
  394. scripts.  By typing 'led [filename]', you will enter the led
  395. editor, and if a filename is specified, and it exists, the file
  396. will be loaded and the editor set to line 1.  If there is no
  397. filename on the command line, or the file does not exist, of the
  398. file is busy, then led begins editing a null file, an empty
  399. buffer, without the corresponding filename.  (Commands can also
  400. be specified to be used in led after the filename is entered.  If
  401. needed, you can experiment with this.)
  402.  
  403.  Notable commands from within led:
  404.  
  405.    i             insert
  406.    a             append
  407.    w [filename]  write to disk; if no file is named, attempt to
  408.                  write to current file; if there is no current
  409.                  file, do not write.
  410.    d             delete current line
  411.    a number      goto line numbered
  412.    q             quit (if not saved, inform user to use 'qq')
  413.    qq            Really quit
  414.  
  415.      When inserting or appending, led will prompt you with a '.'
  416. period.  To end you entry, simply enter one period alone on a
  417. line, and you will then return to command mode.  When displaying
  418. the current entry, led will prefix
  419. all new, updated lines, with the 'i' character.
  420.  
  421.      The key sequence to enter a Dobbshead into a file and
  422. redirect it to the console, then, would be:
  423.  
  424. $ led 3:/dobbshead3:/dobbshead : unable to match file
  425. i               ___
  426.            .  /   \
  427.            . | o o |
  428.            . |  Y  |
  429.            U=====  |
  430.               \___/
  431.            FUCK YOU!
  432. q
  433. ?4 buffer has been modified, use qq to quit without saving
  434. w 3:/dobbshead
  435. 7 [the number of lines in the file]
  436. q
  437. $ p 3:/dobbshead > $cons
  438. $ rm 3:/dobbshead
  439.  
  440.      Ok, so it's not quite the Dobbshead.  Fuck you.
  441.  
  442. The console utility:
  443.  
  444.      The program that acts as the menu driver for the Voice Mail
  445. System Administration, the program that is normally run upon
  446. correct passcode entry, is /cmds/console.  This program will
  447. simply produce a menu with a variety of sub-menu's that allow
  448. the administrator to perform a wide assortment of tasks.  Since
  449. this is mostly self-explanatory, I'll let you find out about
  450. these functions for youself; I will, however, add just a few
  451. comments about the console utility.  The first menu received
  452. should look like this:
  453.  
  454. (c) All Software Copyright 1983, 1989 Centigram Corporation
  455. All Rights Reserved.
  456.  
  457.          MAIN MENU
  458.  
  459. (R) Mailbox maintenance
  460. (R) Report generation
  461. (S) System maintenance
  462. (X) Exit
  463.  
  464. Enter letter in () to execute command.
  465. When you need help later, type ?.
  466.  
  467. COMMAND (M/R/S/X):
  468.  
  469.      The mailbox maintenance option is used when you want to
  470. find specific information concerning mailboxes on the system.
  471. For instance, to get a listing of all the mailboxes currently
  472. being used on the system:
  473.  
  474. COMMAND (M/R/S/X): m
  475.  
  476.     MAILBOX MAINTENANCE
  477.  
  478. (B) Mailbox block inquiry
  479. (C) Create new mailboxes
  480. (D) Delete mailboxes
  481. (E) Mailbox dump
  482. (I) Inquire about mailboxes
  483. (L) List maintenance
  484. (M) Modify mailboxes
  485. (P) Set passcode/tutorial
  486. (R) Rotational mailboxes
  487. (S) Search for mailboxes
  488. (X) Exit
  489.  
  490. If you need help later, type ?.
  491.  
  492. COMMAND (B/C/D/E/I/L/M/P/R/S/X): i
  493. Report destination (c/s1/s2) [c]:
  494.  
  495. Mailbox to display: 0000-9999
  496.  
  497.                               >>> BOBTEL <<<
  498.                              Mailbox Data Inquiry
  499.                             Tue Mar 31, 1992  3:07 am
  500.  
  501. Box        Msgs Unp Urg Rec   Mins FCOS LCOS GCOS NCOS MWI           Passwd
  502. 8001         1   1   0   0     0.0 5    5    1    1   None           Y
  503. 8002         0   0   0   0     0.0 5    5    1    1   None           Y (t)
  504. 8003         0   0   0   0     0.0 12   12   1    1   None
  505.                      0   0     0.0 12   12   1    1   None           Y
  506. 8006         6   6   0   0     0.7 12   12   1    1   None           N
  507. 8008         0   0   0   0     0.0 5    5    1    1   None           Y
  508. 8013         0   0   0   0     0.0 12   12   1    1   None           1234
  509. 8014         0   0   0   0     0.0 5    5    1    1   None           Y
  510. 8016         0   0   0   0     0.0 12   12   1    1   None           Y
  511. [ ... etc ... ]
  512.  
  513.      This simply lists every box along with the relevant
  514. information concerning are the
  515. Total number of messages, number of unplayed messages, number of
  516. urgent messages, and number of received messages currently being
  517. stored on the drive for the mailbox; Mins is the numbers of
  518. minutes currently being used by those messages; F, L, G, and
  519. NCOS are various classes of service for the mailboxes; MWI is
  520. the message waiting indicator, or service light; and Passwd is
  521. simply a Yes/No condition informing the administrator whether
  522. the mailbox currently has a password.  The'(t)' the password
  523. field means the box is currently in tutorial mode, and the '1234'
  524. that replaces the Y/N condition, I assume, means the box is set
  525. to initial tutorial mode with simple passcode 1234 -- in other
  526. words the box is available to be used by a new subscriber.
  527. Mailboxes with FCOS of 1 should be looked for, these represent
  528. administration or service mailboxes, although they are not
  529. necessarily capable of performing system administration
  530. functions.
  531.  
  532.      The System maintenance option from the main menu is very
  533. useful in that, if you don't have access to the qnxsh, you can
  534. still run a number of tasks or print out any file you wish from
  535. within the menu system.  The System Mainenance menu looks like:
  536.  
  537.          SYSTEM MAINTENANCE
  538.  
  539. (A) Automatic Wakeup
  540. (B) Automated Receptionist Extensions
  541. (D) Display modem passcode
  542. (E) Enable modem/serial port
  543. (F) Floppy backup
  544. (G) Resynchronize HIS PMS room status
  545. (H) Hard Disk Utilities
  546. (L) Lights test
  547. (M) Manual message purge
  548. (N) System name
  549. (P) Passcode
  550. (R) Reconfiguration
  551. (S) System shutdown
  552. (T) Time and date
  553. (U) Utility menu
  554. (V) Call Detail Recorder
  555. (W) Network menu
  556. (X) Exit
  557.  
  558. Enter letter in () to execute command.
  559. When you need help later, type ?.
  560.  
  561. COMMAND (A/B/D/E/F/G/H/L/M/N/P/R/S/T/U/V/W/X):
  562.  
  563.      If you don't have access to the 'p' command, you can still
  564. display any specific file on the drive that you wish to see.
  565. Choose 'v', the Call Detail Recorder option, from above, and you
  566. will get this menu:
  567.  
  568. COMMAND (A/B/D/E/F/G/H/L/M/N/P/R/S/T/U/V/W/X): v
  569. Warning: cdr is not running.
  570.  
  571. CALL DETAIL RECORDER MENU
  572.  
  573. (C) Configure CDR
  574. (R) Run CDR
  575. (T) Terminate CDR
  576. (E) Run EVMON
  577. (F) Terminate EVMON
  578. (S) Show CDR log file
  579. (D) Delete CDR log file
  580. (X) Exit
  581.  
  582. If you need help later, type ?.
  583.  
  584. COMMAND (C/R/T/E/F/S/D/X):
  585. M      From here, you can use (C) Configure CDR to set the log
  586. file to any name that you want, and use (S) to print that file
  587. to your terminal.
  588.  
  589. COMMAND (C/R/T/E/F/S/D/X): c
  590.  
  591. Answer the following question to configure call detail recorder
  592. [ simply hit return until the last 'filename' question come up ]
  593. VoiceMemo line numbers enabled:
  594. HOST 1 lines:
  595.  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
  596. 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  597. VoiceMemo line numbers:
  598.  
  599. EVMON: HOST 1 lines to monitor:
  600.  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
  601. 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  602. EVMON:VoiceMemo line numbers:
  603. Message levels are:
  604.      1:  Detailed VoiceMemo
  605.      2:  VoiceMemo
  606.      3:  Pager
  607.      4:  Receptionist
  608.      5:  EVMON
  609.      6:  Automatic WakeUp
  610.      7:  Open Account Administrator
  611.      8:  DTMF to PBX
  612.      9:  Message Waiting Lamp
  613.     10:  SL-1 integration
  614.     11:  Centrex Integration
  615. Message levels enabled:
  616.  2  3  7  9
  617. Message levels:
  618. cdr enable = [N]
  619. Enter filename to save log data = [/logfile] /config/remote.cmds
  620.  
  621. Returning from the CDR configuration.
  622.  
  623. CALL DETAIL RECORDER MENU
  624.  
  625. (C) Configure CDR
  626. (R) Run CDR
  627. (T) Terminate CDR
  628. (E) Run EVMON
  629. (F) Terminate EVMON
  630. (S) Show CDR log file
  631. (D) Delete CDR log file
  632. (X) Exit
  633.  
  634. If you need help later, type ?.
  635.  
  636. COMMAND (C/R/T/E/F/S/D/X): s
  637. ad
  638. cd
  639. copy
  640. date
  641. dskchk
  642. evmon
  643. files
  644. ls
  645. mount
  646. p
  647. pwd
  648. query
  649. task
  650. tcap
  651. what
  652.  
  653.      Don't forget to return the filename back to it's original
  654. name, as shown in the [] field, after you have finished.
  655.  
  656.      If you don't have access to the shell, you can also run
  657. EVMON, from the CDR menu, using option E.  It will simply start
  658. the evmon process displaying to your terminal, interruptable by
  659. the break character, ^C.  This, unfortunately, cannot be
  660. redirected or run in the background as tasks running from the
  661. shell can.  If, however, you have some time to kill you may want
  662. to play with it.
  663.  
  664.      Also from the System Maintenance menu, you can perform a
  665. number of shell tasks without direct access to the shell.  Option
  666. (U), Utilities Menu, has an option called Task.  This will allow
  667. you limited shell access, possibly with redirection and '&' back-
  668. grounding.
  669.  
  670. COMMAND (A/B/D/E/F/G/H/L/M/N/P/R/S/T/U/V/W/X): U
  671.  
  672.          UTILITY MENU
  673.  
  674. (B) Reboot
  675. (H) History
  676. (T) Task
  677. (X) Exit
  678.  
  679. Enter letter in () to execute command.
  680. When you need help later, type ?.
  681.  
  682. COMMAND (B/H/T/X): t
  683.  
  684. Choose the following commands:
  685.              ad             cd           copy           date
  686.          dskchk          evmon          files             ls
  687.           mount              p            pwd          query
  688.            task           tcap           what
  689.  
  690. Enter a command name or 'X' to exit: pwd
  691. 1:/
  692.  
  693. Choose the following commands:
  694.              ad             cd           copy           date
  695.          dskchk          evmon          files      ls
  696.          mount              p            pwd          query
  697.           task           tcap           what
  698.  
  699. Enter a command name or 'X' to exit: evmon
  700. Type Ctrl-C to terminate.
  701. ln  29 ringing
  702. ln  29 tt 8
  703. ln  29 tt 0
  704. ln  29 tt 8
  705. ln  29 tt 6
  706. ln  29 offhook
  707. ln  29 record ended
  708. [ ... etc ... ]
  709.  
  710. A look at 'ad':
  711.  
  712.      The program 'ad' is called to dump information on a variety
  713. of things, the most useful being mailboxes.  Dumps of specific
  714. information about a mailbox can be done either in Mailbox format,
  715. or Raw Dump format.  Mailbox format looks like:
  716.  
  717. $ ad
  718. Type #: 0
  719. Mailbox #: 8486
  720. (M)ailbox, (D)ump ? m
  721.  
  722. MAILBOX: 8486
  723.  
  724. Login status:
  725.     Bad logs     = 3          Last log     = 03/26/92 12:19 pmVersion = 0
  726.  
  727. Configuration:
  728.     Name #       = 207314     Greeting     = 207309     Greeting2    = 0
  729.     Passcode     = XXXXXXXXXX Tutorial     = N          Extension    = 8486
  730.     Ext index    = 0          Attendant    =            Attend index = 0
  731.        Code      =            ID           = BOBTECHM   Night_treat  = M          Fcos         = 12 os         = 12         Gcos         = 1          Ncos         = 1    Rot index    = 0          o eid   = 0    Rot start    = --    wkup defined 
  732.          fdx_msgs= 0
  733.     Sent_urg_msgs= 0          Tas_msgs     = 0          Pages        = 0
  734.     Receipt      = 0          Sent_to_node = 0          Urg_to_node  = 0
  735.     Net_urg_mlen = 0          Net_msgs_rcv = 0          Net_urg_rcv  = 0
  736.     Net_sent_node= 0          Net_send_nurg= 0          Net_send_rcp = 0
  737.     Greet_count  = 9          Successlogins= 1          Recpt_calls  = 0
  738.     Recpt_complt = 0          Recpt_busy   = 0          Recpt_rna    = 0
  739.     Recpt_msgs   = 0          Recpt_attend = 0          User_connect = 20
  740.     Clr_connect  = 22         Callp_connect= 0          Disk_use     = 498
  741.     Net_sent_mlen= 0          Net_rcvd_mlen= 0          Net_rcvd_urg = 0
  742.     Net_node_mlen= 0          Net_recip_mlen=0          Net_node_urg = 0
  743.     Text_msg_cnt = 0
  744.  
  745.  
  746. Message Queues:
  747.     TYPE           COUNT TOTAL HEAD TAIL  TYPE           COUNT TOTAL HEAD TAIL
  748.     Free             71   ---   58   55   Unplayed          0   ---   -1   -1
  749.     Played            2   0.5   56   57   Urgent            0   ---   -1   -1
  750.     Receipts          0   ---   -1   -1   Undelivered       0   ---   -1   -1
  751.     Future delivery   0   ---   -1   -1   Call placement    0   ---   -1   -1
  752.  
  753. Messages: 2
  754.  #  msg #   DATE    TIME   LENGTH      SENDER     PORT   FLAGS  MSG     SIBL
  755.                            (MINS)                               NXT PRV NXT PRV
  756. Played Queue
  757. 56 207126 03/26/92 12:17 pm    0.5 000000000000000  27 ------P-  57  -1  -1  -1
  758.  
  759. 57 207147 03/26/92 12:19 pm    0.1 000000000000000  29 ------P-  -1  56  -1  -1
  760.  
  761.      The Ramp format looks like:
  762. $ ad
  763. Type #: 0
  764. Mailbox #: 8487
  765. (M)ailbox, (D)ump ? d
  766.  
  767. HEX: 8487
  768. 000: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  769. 010: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  770. 020: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 34 38 |..............48|
  771. 030: 37 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ..............|
  772. 040: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  773. 050: 00 00 00 00 00 00 00 00 - 00 00 42 49 4f 54 45 43 |..........BOBTEC|
  774. 060: 48 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |H...............|
  775. 070: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  776. 080: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 37 32 33 |.............723|
  777. 090: 36 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ..............|
  778. 0a0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  779. 0b0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  780. 0c0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 |................|
  781. [mostly deleted -- the list continues to hex fff.]
  782.  
  783.      One of the unfortunate aspects is that the password is not
  784. displayed in the Mailbox format (Awwww!).   I can tell you now,
  785. though, that it also isn't displayed anywhere in the Raw Dump
  786. format.  The program 'asetpass' was used to change the password
  787. of a test mailbox, and both full dumps were downloaded and
  788. compared; they matched exactly.  So, it looks like the passcodes
  789. are probably stored somewhere else, and the dump simply contains
  790. a link to the appropriate offset; which meansthe only way, so
  791. far, to get passcodes for mailboxes is to capture them in EVMON.
  792.  
  793. Intricacies of the login program:
  794.  
  795.      The console login program is 1:/cmds/login.  Although I
  796. can't even recognize any valid 8080 series assembly in the
  797. program (and I'm told the Centigram boxes run on the 8080
  798. family), I did manage to find a few interesting tidbits inside of
  799. it.  Firstly, the console and remote passwords seems to be stored
  800. in the file /config/rates; unfortunately, it's encrypted and I'm
  801. not going to try to break the scheme.  /config/rates looks like
  802. this:
  803.  
  804. $ p /config/rates
  805. \CE\FFC~C~\0A\00\00\00\00\00\0A\00\00\00\00\00\0A\00\00\00\00\00\0A\00\00\00\00
  806. \00\0A\00\00\00\00\00\0A\00\00\00\00\00\0A\00\00\00\00\00\00\00\00\00\00\00\00
  807. functions with different passcodes.  In this instance, only one
  808. passcode appears to be selected.  I am still unsure, however,
  809. whether this is actually a password file, or a file that would
  810. acts as a pointer to another space on the disk which contains the
  811. actual password.  I would assume, for this login program, that it
  812. is actually an encrypted password.
  813.  
  814.      Another very interesting thing sleeping within the confines
  815. of the login program is the inconspicuous string 'QNX'.  It sits
  816. in the code between two 'Enter Passcode:' prompts, separated by
  817. \00's.   I believe this to be a system-wide backdoor placed into
  818. the login program by Centigram, Corp.  Such a thing does exist;
  819. whenever Centigram wants to get into a certain mailbox system to
  820. perform maintenance or solve a problem, they can.  They may,
  821. however, require the Serial number of the machine or of the Hard
  822. Drive, in order to get this access.  (This serial number would be
  823. provided by the company requiring service.)
  824.  
  825.      When logging in with QNX, a very strange thing happens.
  826.  
  827. (^Z)
  828. Enter Passcode: (QNX^M)  Enter Passcode:
  829.  
  830.      A second passcode prompt appears, a prompt in which the
  831. 'QNX' passcode produces an Invalid Passcode message.  I believe
  832. that when Centigram logs in from remote, they use this procedure,
  833. along with either a predetermined passcode, or a passcode
  834. determined based on a serial number, to access the system.  I
  835. have not ever seen this procedure actually done, but it is the
  836. best speculation that I can give.
  837.  
  838.      I should also make note of a somewhat less important point.
  839. Should the console have no passcodes assigned, a simple ^Z for
  840. terminal activation will start the /cmds/console program, and
  841. log the user directly in without prompting for a passcode.  The
  842. odds on finding a Centigram like this, nowadays, is probably as
  843. remote as being struck by lightning, but personally, I can recall
  844. a time a number of years back when a Florida company hadn't yet
  845. passcode protected a Centigram.  It was very fun to have such a
  846. large number of people communicating back and forth in normal
  847. voice; it was even more fun to hop on conferences with a number
  848. of people and record the stupidity of the average Bell operator.
  849.  
  850. Special Keys or Strings:
  851.  
  852.      There are a number of special characters or strings that are
  853. important to either the shell or the program being executed.
  854. Some of these are:
  855. ?     after the program name, gives help list for that program.
  856. &     runs a task in the background
  857. :     sets the comment field (for text within shell scripts)
  858. ;     command delimiter within the shell
  859. >     redirects output of a task to a file
  860. <     (theoretically) routes input from a file
  861. $cons the 'filename' of the console (redirectable)
  862. $tty# the 'filename' of tty number '#'
  863. $mdm  the 'filename' of the modem line
  864. #$    ? produces a value like '1920', '321d'
  865.         probably the TID of the current process
  866. ##    ? produces a value like 'ffff'
  867. #%    ? produces a value like '0020', '001d'
  868. #&    ? produces a value like '0000'
  869. #?    ? produces a value like '0000'
  870. #*    a null argument
  871. #g    ? produces a value like '00ff'
  872. #i    directly followed by a number, produces '0000'
  873.       not followed, produces the error 'non-existent integer
  874.       variable' probably used in conjunction with environment
  875.       variables
  876. #k    accepts a line from current input (stdin) to be
  877.       substituted on the command line
  878. #m    ? '00ff'
  879. #n    ? '0000'
  880. #p    ? '0042'
  881. #s    produces the error 'non-existent string variable'
  882.       probably used in conjunction with environment variables
  883. #t    ? '0003'
  884. #u    ? some string similar to 'system'
  885. #D    ? '0018'
  886. #M    ? '0004'
  887. #Y    ? '005c'
  888.  
  889.  
  890.  
  891.  
  892.