 
 
 
  
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
&                             SNAPSHOT
$                               V1.2
 
 
 
(                           June 1, 1984
 
(                            Written by:
(                           Eric S. Zipp
4               Technology Development of California
,                        621 Six Flags Drive
,                       Arlington, Tx. 76011
)                          (817) 461-1242
 D SYSTEM SNAPSHOT                                            Page 1
 
 
 1.0  SCOPE:  
     ______
 
C There always exists a problem with insuring  the  security  of  a
 C processing  system  and the integrity of the data which is stored
 C on that system.  In most cases the  responsibility  fall  on  the
 C shoulders  of  the  System Manager to 'insure' that the System is
 C not compromised in any way and even be aware if  an  attempt  has
 C been  made to breach the security measures which have been put in
 C place on that System.  The problem is compounded when there often
 C exists a need to give a number of users privileges, in support of
 C job related activities, which allow them to  circumvent  most  if
 C not all system level checks and safeguards.  SNAPSHOT attempts to
 C act as a passive monitor of the VMS System and checks a number of
 C 'areas  of  interest'  on  a  regular  basis, and reports when it
 C notices that their has been a change since the last time a change
 & was made to that 'area of interest'.
 
 
 
 2.0  PROCESSING PHILOSOPHY 
     __________ __________
  
C The philosophy used is to  interrogate  some  areas  of  VMS  and
 C generate  a  file  with  the results of that interrogation called
 C SNAPxxx.OLD , where 'xxx' is some mnemonic which is indicative of
 C what  you  have  out there.  The command file SNAPSHOT.COM, on my
 C system, is run every night at midnight but its  run  interval  is
 C arbitrary.   Each  time  SNAPSHOT is run is generates a 'current'
 C SNAPxxx.OLD for each area of interest interrogated.   The  system
 C utility  DIFFERENCES  is  then  run  comparing the 'current' file
 C against the  'previous'  file.   If  there  were  no  differences
 C recorded,   the  'current'  SNAPxxx.OLD  file  is  deleted.   If,
 C however,  there  were  differences,  a   message   is   sent   to
 C SNAP$RECIPIENT,  normally 'SYSTEM', via the MAIL utility with the
 C SNAPxxx.DIF as the text of the message, where SNAPxxx.DIF is  the
 C output  of  the  DIFFERENCES  comparison along with a note at the
 C bottom which tells you the creation  date  of  both  files.   The
 C 'previous'  SNAPxxx.OLD  file  is  then deleted and the 'current'
 C file with the changes becomes the  one  to  check  against.   The
 C command  file  which  does  the  checking and notifying is called
 C SNAPCHECK.COM as is designed to compare two 'P1'.OLD files and as
 C such  can  be used to check and 'new' areas of interest that need
 " to be added to suit your system.
 
 
 
 3.0  AREAS OF INTEREST 
     _____ __ ________
  
C A number of Areas within the VMS system are monitored  to  insure
 C that  a  change  has  not be made by someone that should be dealt
 C with.  The processing philosophy is modular to  allow  additional
 + areas to added based on individual needs.
 D SYSTEM SNAPSHOT                                            Page 2
 
 
! 3.1  INSTALLED IMAGES(PROGRAMS)
  
C VMS has a large number of installed images which  in  many  cased
 C require  privileges  to  run.  In addition 'privileged' users may
 C 'install' programs on  the  system  which  even  after  the  'job
 C related'  privileges  are removed, a program which they installed
 C could give them whatever 'clout' they desire.  As an  attempt  to
 C identify  when  an  installed  image is added or modified, a full
 C listing of all images which are installed on the system  as  well
 B as what privileges they have are dumped to a file (SNAPINS.OLD).
 
 
 
 3.2  SYMBOLS
 
C Since Symbols can be used to 're-direct' an operation to another,
 C ie.   if  a  symbol  DIRECTORY was set up to preform the function
 C PURGE.  When the user asked for  a  directory  listing  he  would
 C receive  something  else.   All the currently defined Symbols are
 ! dumped to a file (SNAPSYM.OLD).
  
 
 
 3.3  LOGICAL NAMES
 
C Logical assignments are another area  which  can  're-direct'  an
 C operation  so  as  a precaution all the currently defined logical
 + names are dumped to a file (SNAPLOG.OLD).
  
 
 
 3.4  DEVICE PROTECTION
 
C Each physical device on the  system  carries  with  it  a  access
 C protection  scheme  which  is  used  to control who has access to
 C what.  In order to monitor any changes in that area a list of all
 B devices and their protection are dumped to a file (SNAPDEV.OLD).
 
 
 
 3.5  SYSGEN PARAMETERS
 
C An obvious area is that of what Sysgen parameters  are  currently
 C in  effect.   A full list of System parameter settings are dumped
 C to a  file  (SNAPGEN.OLD)  as  well  as  the  /CONFIGURATION  and
  /ADAPTER output.
D SYSTEM SNAPSHOT                                            Page 3
 
 
 3.6  SYSUAF ENTRIES
  
C Since it would be possible to just be 'up  front'  and  have  the
 C SYSUAF.DAT  file  modified,  a  dump  of  all  the current SYSUAF
 ! entries is made to SNAPUAF.OLD.
  
 
 
 3.7  SYSTEM/USER FILE ACCESS
 
C Within any  system  their  are  files  which  require  controlled
 C access.   Setting  the VMS file protection on them is fine unless
 C it get changed after  the  fact.   There  exists  a  file  called
 C SNAPFIL.LST  into  which  you the user can add any files you wish
 C checked with your system.  At  present  the  degree  of  checking
 C extends  to  making  sure  that  the  file  exists  and  that the
 C protection as well as the files 'revision' date, has not  changes
 C since  the  last 'authorized' change.  The command file will read
 C SNAPFIL.LST and create a file with the  current  file  protection
 C and rev-date called SNAPFIL.OLD.  The only exception to this rule
 C is the file SYS$SYSTEM:SYSUAF.DAT which,  if  checked,  will  not
 C have  the  'revision  date' written to the SNAPFIL.OLD file.  The
 C reason for this is that any 'use' of the MAIL Utility will result
 C in   the   SYSUAF  file  being  updated  which  would  result  in
 @ SNAP$RECIPIENT getting a mail every time that SNAPSHOT is run.
 
 
 
 3.8  LOG-FAIL ANALYSIS
 
C An obvious area to check for attempted entry to  your  system  is
 C the  number  of  log  fails  which  has  occurred  within a given
 C 'check-interval'.  On my system, I have it set up to run SNAPSHOT
 C every  night  at  midnight.  The first time this module is run it
 C will  create  an  Index-sequential  data   file   by   the   name
 C SNAPLFAIL.DAT.   This  file  will  hold  the date and time of the
 C 'last' check made, as well as an entry for each  User  which  has
 C had   log-fails.    The   procedure   will   access  the  current
 C Accounting.dat file for any log-fails this  'check-interval'  and
 C write  that information to a temporary holding file.  The holding
 C file is then accessed and the number of log-fails for a  user  is
 C compared  to  the  'average' number of log-fails which is on file
 C for that user.  If the actual number  of  log-fails  exceeds  the
 C average  the  User  name  and log-fail information is sent to the
 C SNAP$RECIPIENT.  In an effort to 'clean  up'  after  itself,  the
 C procedure will also read all users which are in the SNAPLFAIL.DAT
 C file and access the SYS$SYSTEM:SYSUAF.DAT file  to  see  if  they
 C exist  on  the  system.   If  not,  that  specific User record in
 C SNAPLFAIL.DAT is removed.  A word of caution should be  added  in
 C that  if, on your system, you 'close' your system accounting file
 C and then start up a new version  be  sure  that  SNAPSHOT  has  a
 ; chance to run prior to switching over to the new version.
 D SYSTEM SNAPSHOT                                            Page 4
 
 
 3.9  DECnet RELATED CHECKS
 
C DECnet is also an  access  within  the  System  which  should  be
 C monitored.   At the present time this module is under development
 C and is not ready for the cold cruel world.  I would  expect  that
 = it will make it's appearance in the not too distant future.
  
 
 
 4.0  INSTALLATION INSTRUCTION   
     ____________ ___________
 
 
C       o  Copy the files into a directory  or  sub-directory  that
 C          they  will  be run from.  This location will also be the
 /          area that the SNAPxxx.OLD will live.
  
C       o  Define the logical name SYS$SNAP to point  to  the  area
 C          that  the  Snapshot files live.  This can be system wide
 9          or go into SNAPSHOT.COM as a local definition.
  
C       o  Define the logical name SNAP$RECIPIENT if you  wish  the
 C          MAIL  output from SNAPSHOT to be directed to any account
 C          other  than  'SYSTEM'.    The   default   SNAP$RECIPIENT
 "          definition is 'SYSTEM'.
 
C       o  Add any additional file you  wish  to  be  monitored  by
 ,          adding the files in SNAPFIL.LST .
 
C       o  The SNAPSHOT system can be run manually or submitted via
 7          BATCH to run at some interval that you wish.
  
 
 
 

 5.0  FEEDBACK  
     ________
 
C I would be interested to hear what 'additional' areas of interest
 C or  modification  have  been made to the SNAPSHOT package once it
 C gets out in the world on it's own.  To that end, please feel free
 C to  give me a call and share whatever you have found,...  I shall
  do the same.
