Security Audi,ng CS460/ECE422 Spring 2012 Reading - - PowerPoint PPT Presentation
Security Audi,ng CS460/ECE422 Spring 2012 Reading - - PowerPoint PPT Presentation
Security Audi,ng CS460/ECE422 Spring 2012 Reading Material Chapter 18 of text General Defini,on of Audit From Wikipedia The general defini,on of
Reading ¡Material ¡
- Chapter ¡18 ¡of ¡text ¡
General ¡Defini,on ¡of ¡Audit ¡
- From ¡Wikipedia ¡
– The ¡general ¡defini,on ¡of ¡an ¡audit ¡is ¡an ¡evalua,on ¡of ¡a ¡ person, ¡organiza,on, ¡system, ¡process, ¡enterprise, ¡ project ¡or ¡product. ¡ – Audits ¡are ¡performed ¡to ¡ascertain ¡the ¡validity ¡and ¡ reliability ¡of ¡informa,on; ¡also ¡to ¡provide ¡an ¡ assessment ¡of ¡a ¡system's ¡internal ¡control. ¡The ¡goal ¡of ¡ an ¡audit ¡is ¡to ¡express ¡an ¡opinion ¡of ¡the ¡person ¡/ ¡
- rganiza,on ¡/ ¡system ¡(etc.) ¡in ¡ques,on, ¡under ¡
evalua,on ¡based ¡on ¡work ¡done ¡on ¡a ¡test ¡basis. ¡
Security ¡Audit ¡
- Security ¡audit ¡– ¡An ¡independent ¡review ¡and ¡
examina,on ¡of ¡a ¡system’s ¡records ¡and ¡ac,vi,es ¡to ¡ determine ¡the ¡adequacy ¡of ¡system ¡controls, ¡ensure ¡ compliance ¡with ¡established ¡security ¡policy ¡and ¡ procedures, ¡detect ¡breaches ¡in ¡security ¡services, ¡and ¡ recommend ¡any ¡changes. ¡
- Security ¡audit ¡trail ¡– ¡A ¡chronological ¡record ¡of ¡system ¡
ac,vi,es ¡that ¡is ¡sufficient ¡to ¡enable ¡the ¡reconstruc,on ¡ and ¡examina,on ¡of ¡the ¡sequence ¡of ¡environments ¡and ¡ ac,vi,es ¡surrounding ¡or ¡leading ¡to ¡an ¡opera,on, ¡ procedure, ¡or ¡event ¡in ¡a ¡security-‑relevant ¡transac,on. ¡
Logging ¡
- Applica,on ¡or ¡system ¡logging ¡events ¡
– Create ¡security ¡audit ¡trail ¡ – Debugging ¡services/daemons ¡ – Input ¡to ¡intrusion ¡detec,on/correla,on ¡engines ¡
General ¡Audit ¡Architecture ¡
CC ¡Audit ¡Func,onal ¡Requirements ¡
What ¡to ¡log? ¡
- Session ¡ini,aliza,on ¡
- Authen,ca,on ¡informa,on ¡
- Authoriza,on ¡decisions ¡
- Access ¡to ¡sensi,ve ¡data ¡
- Changes ¡to ¡security ¡policy ¡
- Key ¡system ¡calls ¡
- Network ¡connec,ons ¡
- Everything? ¡
Audit ¡Event ¡Analysis ¡
- Need ¡to ¡log ¡enough ¡informa,on ¡to ¡review ¡correct ¡
enforcement ¡of ¡security ¡policy ¡
– Don’t ¡collect ¡enough, ¡miss ¡security-‑relevant ¡ac,ons ¡ – Collect ¡too ¡much, ¡nega,vely ¡impact ¡performance ¡
- Some ¡events ¡dictated ¡by ¡need ¡to ¡comply ¡with ¡laws ¡or ¡
industry ¡standards ¡
– E.g., ¡HIPPA, ¡SOX, ¡GLB, ¡PCI ¡
- Timestamped ¡
- Events ¡to ¡consider ¡
– Session ¡ini,aliza,on ¡(login/network) ¡ – Changes ¡to ¡security ¡policy ¡system ¡ – Access/modify ¡sensi,ve ¡data ¡ – Sta,s,cal ¡informa,on ¡
Example ¡Audit ¡Events ¡
- Database ¡containing ¡customer ¡sensi,ve ¡
informa,on. ¡ ¡What ¡audit ¡events ¡should ¡be ¡ logged? ¡
Storing ¡Audit ¡Trail ¡
- Ideally, ¡infinite ¡write-‑only ¡log ¡
- Realis,c ¡op,ons ¡
– Read/Write ¡media ¡with ¡appropriate ¡OS ¡access ¡controls ¡ – Write-‑once ¡media ¡such ¡as ¡CD-‑ROM ¡ – Write-‑only ¡media ¡such ¡as ¡paper ¡ – Write-‑Once ¡Read-‑Many ¡drives ¡(WORM) ¡ – Networked ¡system ¡
- What ¡should ¡happen ¡when ¡audit ¡trail ¡space ¡is ¡exhausted? ¡
- Archiving ¡
– How ¡long ¡should ¡the ¡audit ¡trail ¡be ¡stored? ¡ – Where ¡should ¡it ¡be ¡stored? ¡
Windows ¡Event ¡Log ¡
- Three ¡sublogs ¡
– Security ¡Log ¡– ¡generated ¡by ¡local ¡security ¡authority ¡ – System ¡Log ¡– ¡generated ¡by ¡system ¡services, ¡drivers, ¡ components ¡or ¡applica,ons ¡affec,ng ¡system ¡health ¡ – Applica,on ¡Log ¡– ¡generated ¡by ¡applica,ons. ¡ ¡Open ¡to ¡any ¡ applica,on ¡
- Each ¡event ¡contains ¡
– Numeric ¡ID ¡ – Timestamp ¡ – Set ¡of ¡aeributes, ¡e.g. ¡task, ¡opcode, ¡level, ¡version, ¡keywords ¡ – Programmer-‑specified ¡data ¡
- Can ¡be ¡exported ¡to ¡XML ¡form ¡for ¡external ¡analysis ¡
Example ¡Windows ¡Security ¡Event ¡
Log ¡Name: ¡ ¡ ¡ ¡ ¡ ¡Security ¡ Source: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Microsog-‑Windows-‑Security-‑Audi,ng ¡ Date: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡11/5/2011 ¡11:58:50 ¡AM ¡ Event ¡ID: ¡ ¡ ¡ ¡ ¡ ¡5061 ¡ Task ¡Category: ¡System ¡Integrity ¡ Level: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Informa,on ¡ Keywords: ¡ ¡ ¡ ¡ ¡ ¡Audit ¡Success ¡ User: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡N/A ¡ Computer: ¡ ¡ ¡ ¡ ¡ ¡Rhino ¡ Descrip,on: ¡ Cryptographic ¡opera,on. ¡ ¡ Subject: ¡ ¡Security ¡ID: ¡ ¡LOCAL ¡SERVICE ¡ ¡Account ¡Name: ¡ ¡LOCAL ¡SERVICE ¡ ¡Account ¡Domain: ¡ ¡NT ¡AUTHORITY ¡ ¡Logon ¡ID: ¡ ¡0x3e5 ¡ ¡ Cryptographic ¡Parameters: ¡ ¡Provider ¡Name: ¡Microsog ¡Sogware ¡Key ¡Storage ¡Provider ¡ ¡Algorithm ¡Name: ¡RSA ¡ ¡Key ¡Name: ¡5917ebdc-‑3374-‑4f30-‑a9fd-‑0f6d0e25d463 ¡ ¡Key ¡Type: ¡Machine ¡key. ¡ ¡ Cryptographic ¡Opera,on: ¡ ¡Opera,on: ¡Open ¡Key. ¡ ¡Return ¡Code: ¡0x0 ¡
Syslog ¡
- Event ¡Logging ¡system ¡supported ¡on ¡Unix/Linux. ¡
– Events ¡can ¡be ¡sent ¡across ¡the ¡network. ¡ ¡Generally ¡ using ¡UDP. ¡ ¡Syslog ¡events ¡generated ¡by ¡most ¡network ¡
- devices. ¡
- Every ¡event ¡contains ¡
– PRI: ¡The ¡facili,es ¡and ¡severity ¡values ¡(see ¡next ¡page) ¡ – Header: ¡
- Timestamp ¡
- hostname ¡or ¡IP ¡
– MSG: ¡
- TAG ¡– ¡name ¡of ¡genera,ng ¡program ¡or ¡process ¡
- CONTENT ¡– ¡details ¡of ¡message ¡
Syslog ¡Facili,es ¡
- Iden,fies ¡at ¡a ¡coarse ¡level ¡the ¡en,ty ¡that ¡generated ¡the ¡log ¡
– User ¡– ¡user ¡process ¡ – Kern ¡– ¡system ¡kernel ¡ – Mail ¡– ¡email ¡system ¡ – Daemon ¡– ¡system ¡daemon ¡ – Auth ¡– ¡authoriza,on ¡program ¡ – Lpr ¡– ¡prin,ng ¡system ¡ – News ¡– ¡UseNet ¡news ¡system ¡ – UUCP ¡– ¡UUCP ¡system ¡ – Cron ¡– ¡cron ¡or ¡at ¡ – Local0-‑7 ¡– ¡Up ¡to ¡8 ¡locally ¡defined ¡categories ¡ – Mark ¡– ¡syslog, ¡for ¡,mestamping ¡logs ¡
Syslog ¡Severity ¡Levels ¡
- Levels ¡
– Emerg ¡– ¡Most ¡sever ¡messages ¡such ¡as ¡immediate ¡system ¡shutdown ¡ – Alert ¡– ¡system ¡condi,ons ¡requiring ¡immediate ¡aeen,on ¡ – Crit ¡– ¡cri,cal ¡system ¡issues ¡such ¡as ¡failing ¡hardware ¡ ¡ – Err ¡– ¡other ¡system ¡errors ¡ – Warning ¡– ¡warning ¡messages ¡ – No,ce ¡– ¡unusual ¡situa,on ¡that ¡merits ¡inves,ga,on ¡ – Info ¡– ¡informa,onal ¡messages ¡ – Debug ¡– ¡messages ¡for ¡debugging ¡purposes. ¡
- Can ¡set ¡severity ¡level ¡at ¡system ¡or ¡applica,on ¡level ¡
– E.g., ¡set ¡applica,on’s ¡syslog ¡level ¡to ¡Err ¡
- Applica,on ¡will ¡ignore ¡calls ¡generate ¡info ¡level ¡syslog ¡messages ¡
- Applica,on ¡will ¡generate ¡syslog ¡messages ¡for ¡severity ¡levels ¡of ¡err ¡and ¡above ¡
Example ¡syslog ¡message ¡
- From ¡the ¡auth.log ¡on ¡a ¡unix ¡system ¡
– Nov ¡27 ¡12:16:19 ¡lab1 ¡sshd[19556]: ¡ ¡ Accepted ¡password ¡for ¡root ¡from ¡XX.XX.XX.XX ¡ port ¡61177 ¡ssh2 ¡
Network ¡Security ¡Events ¡
- Network ¡Device ¡generates ¡syslog ¡messages ¡
- Intrusion ¡Detec,on ¡Device ¡creates ¡events ¡
- Neqlow ¡Events ¡
– Track ¡the ¡start ¡and ¡end ¡of ¡network ¡flows ¡
- Encodes ¡5 ¡tuple ¡and ¡,mestamps ¡
– Generated ¡directly ¡by ¡Cisco ¡devices ¡ – Created ¡indirectly ¡by ¡network ¡appliances ¡
Ensuring ¡Applica,ons ¡Audit ¡
- Review/rewrite ¡applica,on ¡to ¡insert ¡audit ¡log ¡
calls ¡
- Interpose ¡library ¡
– Use ¡dynamically ¡linked ¡library ¡to ¡audit ¡then ¡ perform ¡the ¡original ¡library ¡call ¡ – E.g., ¡Audit ¡the ¡open ¡of ¡a ¡file ¡before ¡calling ¡open() ¡
- r ¡fopen() ¡or ¡CreateFile() ¡
Audit ¡Analysis ¡
- Originally ¡envisioned ¡to ¡be ¡direct ¡human ¡analysis ¡
– S,ll ¡the ¡case ¡for ¡some ¡forensic ¡analysis, ¡but ¡generally ¡some ¡ analysis ¡tools ¡are ¡used ¡
- Baselining ¡
– Understand ¡the ¡,me ¡of ¡audit ¡events ¡generated ¡in ¡normal ¡ situa,ons. ¡ ¡Do ¡anomaly ¡detec,on ¡against ¡the ¡baseline ¡
- Never ¡Seen ¡Before ¡– ¡DHCP ¡example ¡
- Thresholding ¡– ¡only ¡concerned ¡if ¡events ¡fall ¡beyond ¡a ¡
threshold ¡
– E.g., ¡volume ¡of ¡data ¡acquired ¡or ¡number ¡of ¡failed ¡connec,ons ¡
- Windowing ¡– ¡only ¡concerned ¡with ¡events ¡that ¡fall ¡outside ¡a ¡
,ming ¡window ¡
– E.g., ¡login ¡events ¡outside ¡the ¡normal ¡office ¡hours ¡
Example ¡Audit ¡Analysis ¡Systems ¡
- Security ¡informa,on ¡and ¡event ¡management ¡
(SIEM) ¡
- NetForensics ¡
www.neqorensics.com/products/ security_informa,on_management/ ¡
- Cisco ¡MARS ¡– ¡discussed ¡in ¡text ¡
- LogLogic ¡hep://loglogic.com/ucf ¡
¡
Cisco ¡MARS ¡Steps ¡
- Parse ¡Log ¡Events ¡
– Very ¡hard ¡to ¡keep ¡up ¡all ¡devices ¡and ¡versions ¡of ¡
- sogware. ¡ ¡Log ¡messages ¡containing ¡cri,cal ¡
informa,on ¡are ¡generally ¡free-‑form. ¡
- Normalize ¡informa,on ¡to ¡a ¡common ¡log ¡format ¡
- Perform ¡correla,on ¡analysis ¡to ¡link ¡related ¡
events ¡
– Create ¡sessions ¡
- Run ¡sessions ¡and ¡unrelated ¡events ¡against ¡rule ¡
engine ¡
- Do ¡some ¡fixups ¡to ¡avoid ¡false ¡posi,ves ¡
Conclusions ¡
- Audit ¡Trail ¡is ¡necessary ¡
– Tends ¡to ¡be ¡overlooked ¡or ¡haphazardly ¡generated ¡ – No ¡direct ¡func,onal ¡benefit ¡ – Essen,al ¡to ¡determine ¡that ¡things ¡are ¡opera,ng ¡per ¡ security ¡policy ¡requirements ¡
- Audit ¡Trail ¡Analysis ¡