#!/bin/csh ############################################################ # Auditor Name : Michael Peters # Audit Date : 12/31/2005 # Client Name : # Description : Oracle Database Review ############################################################ #!/bin/csh # # # ---------------------------------------- # Lazarus Alliance Inc. UNIX Audit Script # FDL - 2005 # ---------------------------------------- # #set -x onintr quit set prompt="Press to continue" set version=2.6.0 set UNAMEa=`uname -a` set basedir=/tmp/lazscan set HOSTNAME=`hostname` set INDEXF=index.html #set SYSTEMF=system.out.txt set SYSTEMF=system.html #set SPECIFICF=specific.out.txt set SPECIFICF=specific.html set INDEXO=${basedir}/${INDEXF} set SYSTEMO=${basedir}/${SYSTEMF} set SPECIFICO=${basedir}/${SPECIFICF} set TEXTO=${basedir}/lazarus-${HOSTNAME}.txt main: while (1) clear echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. " echo " FDL - 2004 - 2005 " echo " ---------------------------------------------------" echo " Please make your selection from the options below: " echo "" echo " 1) Run the script on this host " echo " 2) FDL Information " echo " 3) Exit " echo "" echo -n " Enter Selection: " set OUTPUTTYPE=$< switch ($OUTPUTTYPE) case 1: goto systemtype case 2: goto CopyRight case 3: exit default: clear echo "Invalid selection" echo -n "$prompt" tmp=$< goto main endsw end CopyRight: clear echo "" echo " ------------------------------------------------------------------------------------------" echo " echo " Lazarus Alliance Inc. has provided this script without liability, charge, or expectations." echo " Use freely and wisely. echo " echo " ------------------------------------------------------------------------------------------" sleep 5 goto main systemtype: clear echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. " echo " FDL - 2004 - 2005 " echo " ---------------------------------------------------" echo " Please select the system type: " echo "" echo " 1) Linux " echo " 2) All other Unix flavors " echo "" echo -n " Enter Selection: " set OUTPUTTYPE=$< switch ($OUTPUTTYPE) case 1: goto systeminfo1 case 2: goto systeminfo2 default: clear echo "Invalid selection" echo -n "$prompt" tmp=$< goto systemtype endsw end systeminfo1: clear echo "" echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. " echo " FDL - 2004 - 2005 " echo " ---------------------------------------------------" echo " Please enter some of the system specifics " echo "" echo -n " 1) What is the Operating System Version?: " set version = `head -1` echo -n " 2) What is the System Hostname?: " set sysname = `head -1` echo -n " 3) What is the Administrator's Name?: " set adminname = `head -1` echo -n " 4) What is the Client's Name?: " set clientname = `head -1` echo -n " 5) Enter Auditor's Full Name: " set auditorname = `head -1` echo -n " 6) Enter Server Information / Note To Auditor: " set servinfo = `head -1` clear echo "" echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. Script - ${lazversion} " echo " FDL - 2005 " echo " ---------------------------------------------------" echo " System specifics " echo " " echo " 1) OS Version Number: ${version}" echo " 2) System Name: ${sysname}" echo " 3) Administrator's Name: ${adminname}" echo " 4) Client's Name: ${clientname}" echo " 5) Auditor's Full Name: ${auditorname}" echo " 6) Server Information / Note To Auditor: ${servinfo}" echo "" echo -n " Is the above information correct? [y/n]: " set ans=$< # if (!(($ans == "y") || ($ans == "Y"))) then clear goto systeminfo1 else clear goto Query endif systeminfo2: clear echo "" echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. " echo " FDL - 2005 " echo " ---------------------------------------------------" echo " Please enter some of the system specifics " echo " " echo -n " 1) What is the Operating System Version?: " set version = $< echo -n " 2) What is the System Hostname?: " set sysname = $< echo -n " 3) What is the Administrator's Name?: " set adminname = $< echo -n " 4) What is the Client's Name?: " set clientname = $< echo -n " 5) Enter Auditor's Full Name: " set auditorname = $< echo -n " 6) Enter Server Information / Note To Auditor: " set servinfo = $< clear echo "" echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. Script - ${lazversion} " echo " FDL - 2005 " echo " ---------------------------------------------------" echo " System specifics " echo " " echo " 1) OS Version Number: ${version}" echo " 2) System Name: ${sysname}" echo " 3) Administrator's Name: ${adminname}" echo " 4) Client's Name: ${clientname}" echo " 5) Auditor's Full Name: ${auditorname}" echo " 6) Server Information / Note To Auditor: ${servinfo}" echo "" echo -n " Is the above information correct? [y/n]: " set ans=$< # if (!(($ans == "y") || ($ans == "Y"))) then clear goto systeminfo2 else clear goto Query endif Query: echo "" echo " ---------------------------------------------------" echo " Lazarus Alliance Inc. Script - ${lazversion} " echo " FDL - 2005 " echo " ---------------------------------------------------" echo " The query script is now running. Please wait..." echo "" echo "" sleep 3 #*** Set up output formatting. # # This component of the script ensures that the output directory and files are resident on the system being reviewed. # if (!(-d ${basedir})) then mkdir ${basedir} chmod 700 ${basedir} endif touch ${INDEXO} touch ${SPECIFICO} touch ${SYSTEMO} # Add new html output files to the list here: echo "specific.out

Specific to this flavor of UNIX

" > ${SPECIFICO}
     echo "system.out

System files

" > ${SYSTEMO}
     echo "UNIX Script

Lazarus Alliance UNIX Script

" > ${INDEXO} # End of new html output files # System specifics to include on index page # echo "${UNAMEa}
" >>& ${INDEXO} echo "OS Version: ${version}
">>& ${INDEXO} echo "Adminstrator: ${adminname}
">>& ${INDEXO} echo "Client: ${clientname}
">>& ${INDEXO} echo "Auditor's Full Name: ${auditorname}
">>& ${INDEXO} echo "Lazarus Alliance Script Version Number: ${lazversion}
">>& ${INDEXO} echo "Server Information / Note To Auditor: ${servinfo}