home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / zines / a_m / ciac.b8 < prev    next >
Encoding:
Text File  |  2003-06-11  |  9.5 KB  |  429 lines

  1.  
  2.  
  3.         _____________________________________________________
  4.  
  5.              The Computer Incident Advisory Capability
  6.  
  7.                          ___  __ __    _     ___
  8.  
  9.                         /       |     / \   /
  10.  
  11.                         \___  __|__  /___\  \___
  12.  
  13.         _____________________________________________________
  14.  
  15.                          Information Bulletin       
  16.  
  17.  
  18.  
  19.         Detection/Eradication Procedures for VMSCRTL.EXE Trojan Horse
  20.  
  21.  
  22.  
  23. November 21, 1990, 1100 PST                                 Number B-8
  24.  
  25. __________________________________________________________________________
  26.  
  27. PROBLEM:  Detection of trojan horse and recovery procedures
  28.  
  29. PLATFORM: VAX/VMS (all versions)
  30.  
  31. DAMAGE:  Gives unauthorized privileged access to system if trojan
  32.  
  33.   horse is implanted in system by intruders who have already obtained
  34.  
  35.   privileged status
  36.  
  37. DETECTION:  Several methods (described herein), of which finding
  38.  
  39.   VMSCRTL.EXE in SYS$LIBRARY is the fastest
  40.  
  41. __________________________________________________________________________
  42.  
  43.                      Critical Trojan Horse Facts
  44.  
  45.  
  46.  
  47. In bulletin B-6 CIAC warned of a new pattern of intrusions into VMS
  48.  
  49. systems.  Part of this pattern is placing a file named VMSCTRL.EXE into
  50.  
  51. SYS$LIBRARY.  CIAC has determined that this file contains a trojan
  52.  
  53. horse program.  VMSCRTL.EXE also provides a means for the attackers to
  54.  
  55. gain full privileges from a non-privileged account if this file has
  56.  
  57. been installed with the CMKRNL privilege. The presence of VMSCRTL.EXE
  58.  
  59. in SYS$LIBRARY indicates that a VMS system has been compromised and
  60.  
  61. that the attackers have been able to gain full privileges.
  62.  
  63.  
  64.  
  65. The trojan horse behaviors of VMSCRTL.EXE are:
  66.  
  67.  
  68.  
  69. 1.      Copies itself to SYS$LIBRARY:VMSCRTL.EXE
  70.  
  71.  
  72.  
  73. 2.      Creates the file SYS$STARTUP:DECW$INSTALL_LAT.COM  This file
  74.  
  75. contains a standard DEC copyright notice and a DCL command to install
  76.  
  77. SYS$LIBRARY:VMSCRTL.EXE with CMKRNL privilege.
  78.  
  79.  
  80.  
  81. 3.      Modifies the file SYS$STARTUP:VMS$LAYERED.DAT to include the
  82.  
  83. execution of SYS$STARTUP:DECW$INSTALL_LAT.COM as part of the VMS boot
  84.  
  85. procedure.
  86.  
  87.  
  88.  
  89. 4.      Exits with a (falsified) CLI error message while returning a
  90.  
  91. status of SYS$NORMAL
  92.  
  93.  
  94.  
  95. The "tracks" left behind by the execution of VMSCRTL.EXE are fairly obvious:
  96.  
  97.  
  98.  
  99. 1.      The presence of SYS$LIBRARY:VMSCRTL.EXE
  100.  
  101.  
  102.  
  103. 2.      The presence of SYS$STARTUP:DECW$INSTALL_LAT.COM
  104.  
  105.  
  106.  
  107. 3.      The file SYS$STARTUP:VMS$LAYERED.DAT will have its MODIFIED
  108.  
  109. date changed to reflect the time at which VMSCRTL.EXE was run.  Use the
  110.  
  111. DCL command "$ DIRECTORY/FULL SYS$STARTUP:VMS$LAYERED.DAT" or "$
  112.  
  113. DIRECTORY/DATE=MODIFIED SYS$STARTUP:VMS$LAYERED.DAT" to determine the
  114.  
  115. modification date.  Note that this evidence will be destroyed if any
  116.  
  117. subsequent modifications or listings of SYS$STARTUP:VMS$LAYERED.DAT are
  118.  
  119. made via the STARTUP command to SYSMAN.
  120.  
  121.  
  122.  
  123. 4.      The DCL command "$ MCR SYSMAN STARTUP FILE" will list
  124.  
  125. DECW$INSTALL_LAT.COM as one of the startup files.  Note that executing
  126.  
  127. this command will change the modification date of
  128.  
  129. SYS$STARTUP:VMS$LAYERED.DAT  Be sure, therefore, to do this check after
  130.  
  131. checking the MODIFIED date as prescribed above.
  132.  
  133.  
  134.  
  135. 5.       If the infected system has been rebooted since VMSCRTL.EXE was
  136.  
  137. run, the DCL command "$ MCR INSTALL /LIST" will reveal that
  138.  
  139. SYS$LIBRARY:VMSCRTL.EXE is installed with privilege. A full list of
  140.  
  141. this installed image will show it is installed with CMKRNL.
  142.  
  143.  
  144.  
  145. DETECTION
  146.  
  147.  
  148.  
  149. The presence of the file SYS$LIBRARY:VMSCRTL.EXE is definite
  150.  
  151. confirmation that this trojan horse is present.  Additional
  152.  
  153. confirmatory evidence includes:
  154.  
  155.  
  156.  
  157. 1.      The presence of the file SYS$STARTUP:DECW$INSTALL_LAT.COM
  158.  
  159.  
  160.  
  161. 2.      Modification to the SYSMAN STARTUP database file to include the
  162.  
  163. execution of SYS$STARTUP:DECW$INSTALL_LAT.COM
  164.  
  165.  
  166.  
  167. A search string that can be used to identify VMSCRTL.EXE regardless of
  168.  
  169. the file's name is "%VCR"    For example, to search your entire system
  170.  
  171. disk you might enter:
  172.  
  173.  
  174.  
  175.         $ SEARCH SYS$SYSDEVICE:[*...]*.* "%VCR"/WINDOW=1
  176.  
  177.  
  178.  
  179. If VMSCRTL.EXE is detected in a non-system directory, it is likely that
  180.  
  181. the attackers have penetrated a non-privileged account but have not yet
  182.  
  183. been able to gain full privileges.
  184.  
  185.  
  186.  
  187. MINIMAL RECOVERY PROCEDURE
  188.  
  189.  
  190.  
  191. If you have detected VMSCRTL.EXE in SYS$LIBRARY, the VMS system has
  192.  
  193. been compromised by attackers who were able to gain full privileges.
  194.  
  195. (If these attackers are able to reenter the system, they will again be
  196.  
  197. able to gain full privileges).  The minimal recovery procedure
  198.  
  199. described below is provided only as a quick, short-term, "stop gap"
  200.  
  201. measure.  (The possibility that other damage to the compromised VMS
  202.  
  203. system was done by the attackers is large--we therefore recommend that
  204.  
  205. when time permits the full recovery procedure be implemented.) The
  206.  
  207. minimal recovery procedure is:
  208.  
  209.  
  210.  
  211. 1.      Use INSTALL to remove SYS$LIBRARY:VMSCRTL.EXE with the
  212.  
  213. command:  "$ MCR INSTALL SYS$LIBRARY:VMSCRTL.EXE/DELETE"
  214.  
  215.  
  216.  
  217. Note: It is possible that VMSCRTL.EXE is not installed (yet) and so
  218.  
  219. this command may produce the appropriate error message.
  220.  
  221.  
  222.  
  223. 2.      Remove the startup entry SYS$STARTUP:DECW$INSTALL_LAT.COM from
  224.  
  225. SYSMAN's database with the command:  "$ MCR SYSMAN STARTUP REMOVE FILE
  226.  
  227. SYS$STARTUP:DECW$INSTALL_LAT.COM
  228.  
  229.  
  230.  
  231. 3.      Delete the file SYS$LIBRARY:VMSCRTL.EXE and the file
  232.  
  233. SYS$STARTUP:DECW$INSTALL_LAT.COM
  234.  
  235.  
  236.  
  237. 4.      Disable all inactive accounts using AUTHORIZE.  For example, to
  238.  
  239. disable an account named JONES, enter:
  240.  
  241.  
  242.  
  243.    $ SET DEF SYS$SYSTEM
  244.  
  245.    $ RUN AUTHORIZE
  246.  
  247.    UAF> MOD JONES/FLAGS=DISUSER
  248.  
  249.    UAF> EXIT
  250.  
  251.  
  252.  
  253. 5.      Change the passwords on all active accounts.
  254.  
  255.  
  256.  
  257. 6.      Review all entries in SYSUAF.DAT and make appropriate corrections
  258.  
  259.  
  260.  
  261. 7.      Review all SYSGEN parameters and make appropriate corrections
  262.  
  263.  
  264.  
  265. 8.      Review all system files for modifications occurring after the
  266.  
  267. penetration.  The following DCL command can prove very useful in this
  268.  
  269. endeavor:
  270.  
  271.  
  272.  
  273.                 $ DIR/FULL/MODIFIED/SINCE="<actual penetration date>"
  274.  
  275.  
  276.  
  277.         For example, if the penetration date were October 31st, enter:
  278.  
  279.  
  280.  
  281.                 $ DIR/FULL/MODIFIED/SINCE="31-OCT-1990"
  282.  
  283.  
  284.  
  285.  
  286.  
  287. FULL RECOVERY PROCEDURE
  288.  
  289.  
  290.  
  291. For the full recovery procedure, follow the complete VMS recovery
  292.  
  293. procedure given in the appendix to this bulletin.
  294.  
  295.  
  296.  
  297. For additional information or assistance, please contact CIAC
  298.  
  299.  
  300.  
  301.         Hal R. Brand
  302.  
  303.         (415) 422-6312 or (FTS) 532-6312
  304.  
  305.  
  306.  
  307.         or call (415) 422-8193 or (FTS) 532-8193
  308.  
  309.  
  310.  
  311.         send FAX messages to:  (415) 423-0913 or (FTS) 543-0913
  312.  
  313.  
  314.  
  315. Neither the United States Government nor the University of California
  316.  
  317. nor any of their employees, makes any warranty,  expressed or implied,
  318.  
  319. or assumes any legal liability or responsibility for the accuracy,
  320.  
  321. completeness, or usefulness of any information, product, or process
  322.  
  323. disclosed, or represents that its use would not infringe privately
  324.  
  325. owned rights.  Reference herein to any specific commercial products,
  326.  
  327. process, or service by trade name, trademark manufacturer, or
  328.  
  329. otherwise, does not necessarily constitute or imply its endorsement,
  330.  
  331. recommendation, or favoring by the United States Government or the
  332.  
  333. University of California.  The views and opinions of authors expressed
  334.  
  335. herein do not necessarily state or reflect those of the United States
  336.  
  337. Government nor the University of California, and shall not be used for
  338.  
  339. advertising or product endorsement purposes.
  340.  
  341.  
  342.  
  343. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  344.  
  345.  
  346.  
  347.                     COMPLETE VMS RECOVERY PROCEDURE
  348.  
  349.  
  350.  
  351. This recovery procedure should be applied to a compromised VMS system
  352.  
  353. whenever it can not be determined that the intruders failed to gain
  354.  
  355. system privilege.
  356.  
  357.  
  358.  
  359. 1.      Get a hardcopy listing of your current SYSUAF.DAT   If
  360.  
  361. SYSUAF.DAT contains an extremely large number of users, it will take
  362.  
  363. considerable time to restore all accounts (so it may be expedient to
  364.  
  365. save SYSUAF.DAT to tape or elsewhere so it can be restored, although we
  366.  
  367. do not generally recommend this procedure).
  368.  
  369.  
  370.  
  371. 2.      Remove from all disks all executable code (including DCL
  372.  
  373. command procedures) run by  privileged accounts.
  374.  
  375.  
  376.  
  377. 3.      Initialize the system disk to remove all files.  (This is an
  378.  
  379. extreme step, but it is guaranteed to remove any damage done by the
  380.  
  381. intruder.)
  382.  
  383.  
  384.  
  385. 4.      Install VMS and all layered products. 
  386.  
  387.  
  388.  
  389. 5.      Use AUTHORIZE to add only currently active accounts (or restore
  390.  
  391. the SYSUAF.DAT you saved).  If you restore SYSUAF.DAT you must
  392.  
  393. scrutinize it very carefully.  To restore SYSUAF.DAT is not generally
  394.  
  395. recommended.  It is better to re-create only the active accounts,
  396.  
  397. because this not only removes all dormant accounts, but also guarantees
  398.  
  399. elimination of bogus accounts and unauthorized modifications.
  400.  
  401.  
  402.  
  403. 6.      Restore from TRUSTED backups all site specific files found on
  404.  
  405. the system disk.  In the event you do not have TRUSTED backups, we
  406.  
  407. recommend you re-create these files.
  408.  
  409.  
  410.  
  411. Note:  "Trusted backups" are defined as backups in which there is a
  412.  
  413. high degree of assurance that there were no unauthorized changes made
  414.  
  415. to any of the files before the backup was made.
  416.  
  417.  
  418.  
  419. 7.      Restore from TRUSTED backups all files removed in step 2.  In
  420.  
  421. the event you do not have TRUSTED backups, we recommend that you
  422.  
  423. re-create these files.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.