ORACLE FORENSICS IN A NUTSHELL 25/03/2007



Similar documents
Oracle Database 11g: Security Release 2. Course Topics. Introduction to Database Security. Choosing Security Solutions

All About Oracle Auditing A White Paper February 2013

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

D50323GC20 Oracle Database 11g: Security Release 2

12. User-managed and RMAN-based backups.

Oracle Database 11g: Security Release 2

Oracle Database 11g: Security. What you will learn:

Oracle Database 10g: Backup and Recovery 1-2

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Database Recovery For Newbies

Backup Types. Backup and Recovery. Categories of Failures. Issues. Logical. Cold. Hot. Physical With. Statement failure

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Oracle Database 11g: Security

MSc Computer Security and Forensics. Examinations for / Semester 1

Monitor Oracle Event Logs using EventTracker

ORACLE DATABASE SECURITY. Keywords: data security, password administration, Oracle HTTP Server, OracleAS, access control.

ORACLE CORE DBA ONLINE TRAINING

Oracle 11g Database Administration

Best Approaches to Database Auditing: Strengths and Weaknesses.

Oracle 1Z0-528 Exam Questions & Answers

Frequently Asked Questions. Secure Log Manager. Last Update: 6/25/ Barfield Road Atlanta, GA Tel: Fax:

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

Need for Database Security. Whitepaper

Oracle Database Security. Nathan Aaron ICTN 4040 Spring 2006

Performing Database and File System Backups and Restores Using Oracle Secure Backup

Oracle Database 11g: New Features for Administrators DBA Release 2

Protecting Sensitive Data Reducing Risk with Oracle Database Security

Backup/Restore Oracle 8i/9i/10g

Digital Forensics. Module 7 CS 996

Oracle 11g New Features - OCP Upgrade Exam

Database security tutorial. Part I

Setting up SQL Translation Framework OBE for Database 12cR1

Oracle Audit in a Nutshell - Database Audit but how?

Oracle 11g DBA Training Course Content

MySQL Security: Best Practices

Oracle Database Vault: Design Failures

<Insert Picture Here> Oracle Database Security Overview

IBM Software InfoSphere Guardium. Planning a data security and auditing deployment for Hadoop

Oracle Database 11g: Security

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Developing Value from Oracle s Audit Vault For Auditors and IT Security Professionals

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Oracle Database 10g: New Features for Administrators

Oracle Database Security Solutions

Using RMAN to restore a database to another server in an ASM environment

The safer, easier way to help you pass any IT exams. Exam : 1Z Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

ORACLE DATABASE 11G: COMPLETE

Device Integration: Checkpoint Firewall-1

ensure prompt restart of critical applications and business activities in a timely manner following an emergency or disaster

1 Copyright 2012, Oracle and/or its affiliates. All rights reserved. Public Information

Enforcive / Enterprise Security

Oracle Audit Vault and Database Firewall

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Database Auditing Report submitted by: D. Murali Krishna S.M Siva Rama Krishna

Achieving Security Compliancy and Database Transparency Using Database Activity Monitoring Systems

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

A Database Security Management White Paper: Securing the Information Business Relies On. November 2004

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - New Features for Administrators Release 2. 5 Jours [35 Heures]

Penetration Testing: Advanced Oracle Exploitation Page 1

All Things Oracle Database Encryption

PCI Compliance Can Make Your Organization Stronger and Fitter. Brent Harman Manager, Systems Consultant Team West NetPro Computing, Inc.

Forensics source: Edward Fjellskål, NorCERT, Nasjonal sikkerhetsmyndighet (NSM)

Oracle Database Security. Paul Needham Senior Director, Product Management Database Security

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide

Securing Oracle E-Business Suite in the Cloud

INCIDENT RESPONSE CHECKLIST

BrightStor ARCserve Backup

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

Guardium Change Auditing System (CAS)

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved.

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Encrypting Sensitive Data in Oracle E-Business Suite

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Oracle Database 12c: Administration Workshop NEW

Guidelines for Website Security and Security Counter Measures for e-e Governance Project

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Oracle Database 10g Express

Netwrix Auditor for SQL Server

The Comprehensive Guide to PCI Security Standards Compliance

Installing and Configuring Guardium, ODF, and OAV

Guide to Auditing and Logging in the Oracle E-Business Suite

PCI DSS Best Practices with Snare Enterprise Agents PCI DSS Best Practices with Snare Enterprise Agents

Oracle Database 11g R1 & R2: New Features for Administrators

MANAGED FILE TRANSFER: 10 STEPS TO SOX COMPLIANCE

Credit Cards and Oracle E-Business Suite Security and PCI Compliance Issues

AlienVault Unified Security Management (USM) 4.x-5.x. Deployment Planning Guide

Data Privacy: The High Cost of Unprotected Sensitive Data 6 Step Data Privacy Protection Plan

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

CorreLog Alignment to PCI Security Standards Compliance

Securing SharePoint 101. Rob Rachwald Imperva

Guide to Computer Forensics and Investigations, Second Edition

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Security Auditing

Oracle Security Auditing

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Transcription:

ORACLE FORENSICS IN A NUTSHELL 25/03/2007 The aim of this paper is to summarize Oracle Forensics in a time efficient manner as follows. 1.0 Definition 2.0 Process Methodology 3.0 Core technical tasks and Techniques used 4.0 Main Sources of evidence 5.0 Legal Context 6.0 Conclusion 1.0 DEFINITION Recommended prior and supporting reading: http://www.cl.cam.ac.uk/~rja14/book.html http://philip.greenspun.com/sql/ http://www.porcupine.org/forensics/forensic -discovery/ http://www.sleuthkit.org/ http://www.e-fense.com./helix/ http://cuddletech.com/articles/oracle/index.html http://www.sans.org/score/oraclechecklist.php Gathering and analyzing data in a manner as free from distortion or bias as possible to reconstruct data or what has happened in the past on a system. Farmer and Venema, 1999. http://www.porcupine.org/forensics/forensic -discovery/appendixb.html 2.0 PROCESS METHODOLOGY Principles: Process: 1. Documented processes to produce repeatable results 2. Best evidence for court i.e. analysis done on the copy 3. Chain of custody implemented to enforce evidence accountability 1. Initiate a documented timeline of computer based events 2. Identify and contain the incident 3. Back up electronic files as evidence in chain of custody 4. Recover service and deleted data 5. Collecting and sorting electronic metadata by time 6. Integrate all event information into the timeline which includes log aggregation 7. Analysis of metadata timeline 8. Detailed examination of key data at lower level 9. Document the process to make findings repeatable 10. Apply the evidence to a criminal or legal context

3.0 CORE TECHNICAL TASKS AND TECHNIQUES USED 1. Backing up evidence in a verifiable way using checksums, file size and timestamps. At the OS: Start netcat listener on forensic_host to capture an image #nc -l -p 33333 > /tmp/driveimage.dd Use dd to collect image and netcat to send it across the network #dd if=/dev/hda2 nc host 33333 w 3 Can check integrity using md5sum on a drive or bit image file # md5sum /dev/hda1 In the DB: 1. RMAN http://www.oracle.com/technology/deploy/availability/htdocs/rman_overview.htm 2. Full logical export $ORACLE_HOME/exp "sys/password as sysdba" full=y file=export.dmp 3. Cold backup ~ offline cp /oracle/oradata/sid/*.dbf /oracle/oradata/clone/ cp /oracle/oradata/sid/*.log /oracle/oradata/clone/ cp /oracle/oradata/sid/*.ctl /oracle/oradata/clone/ 4. Hot backup ~ online alter tablespace data begin backup alter database backup controlfile to c:\backupcontrolfile.bak 5. Verify dbv file=c:\oracle\datafile.bak logfile=c:\dbverifylog

2. Recovering deleted data such as that which an attacker may have attempted to hide. At the OS: To recover deleted files from Linux OS. This script requires installation of The Coroners Toolkit from http://www.porcupine.org/forensics/tct.html # ils rf linux-ext2 /evidence/driveimage.img \ awk F ($2== f {print $1} \ while read i; \ do /usr/local/src/sleuthkit/bin/icat -f linux-ext2 \ /evidence/driveimage.img $i > \ /deletedfiles/$i; \ Done http://project.honeynet.org/scans/scan15/proj/t/analysis-scan-may-2001.txt Foremost will carve out files based on their headers. #foremost -v -c foremost.conf ext2binarycopy.dd http://sourceforge.net/projects/foremost/ At the DB: Flashback select ora_rowscn, name from sys.user$; SELECT To_Char(TIME_DP, dd/mm/yyyy hh24:mi:ss, SCN_BAS FROM SYS.SMON_SCN_TIME; FLASHBACK TABLE SQUIRRELPATCH TO SCN 2202666520; Redo Logs using LogMiner http://www.giac.org/certified_professionals/practicals/gcfa/0159.php http://orafaq.com/papers/redolog.pdf

3. In depth data analysis entailing lower level inspection of data than normal At the OS Hexedit, WinHex forensic version http://www.x-ways.net/winhex/forensics.html Ethereal hexadecimal network packet analyzer, Ultra-Edit binary editor. http://home.online.no/~espensa/khexedit/ DUDE or JDUL allows examination of Oracle datafiles that would not normally be possible http://www.ora600.nl/introduction.htm Can use BBED http://orafaq.com/papers/dissassembling_the_data_block.pdf or directly analyse the dbf s themselves. http://www.oracleforensics.com/wordpress/index.php/2007/03/21/dbf-recordsprevious-state -of-each-row/ At the DB Oradebug see http://julian.dyke.users.btopenworld.com/oracle/diagnostics/tools/oradebug/oradeb UG.html Ian Redfern s TNS protocol analysis http://www.ukcert.org.uk/oracle/oracle%20protocol.htm Pete Finnigan s PLSQL unwrapping http://www.insight.co.uk/files/presentations/blackhat%20conference.pdf All of the above allow the analyst to understand what is happening in Oracle which is required to be able to make judgements about electronic evidence with a high level of certainty. In terms of analysing the actions of an attacker a good understanding of Oracle attacks is crucial therefore the Oracle Hacker s Handbook would be a good read so that the forensics analyst knows what to look for. http://eu.wiley.com/wileycda/wileytitle/productcd-0470080221.html

4. Timeline analysis by placing evidence on a timeline to show order of past events. At the OS and at the DB! Create a body file using this command. # fls -f linux-ext2 -m / -r /driveimage.img > /driveimage.fls Other datafile s can be parsed into the body file. Then use mactime perl script to sort the entries by timestamp. Mactime is part of the Sleuthkit. http://www.sleuthkit.org/sleuthkit/man/mactime.html # mactime -b /bodyfile/body.mac >/bodyfile/body.all MACtimes = Modified, Accessed and Changed times. Problem is that the timestamps could have been changed therefore need to keep logs off the server being protected on a secure central loghost. This can be done more easily with Oracle now by utilising its SYSLOG functionality. ALTER SYSTEM SET audit_trail=os SCOPE=SPFILE; SQL> ALTER SYSTEM SET audit_syslog_level='user.alert' SCOPE=SPFILE; System altered. Syslogger download http://bent.latency.net/bent/darcs/minirsyslogd-1.02/src/minirsyslogd-1.02.tar.gz Installing the remote syslog host using these links. http://bent.latency.net/bent/darcs/minirsyslogd-1.02/spec vi /etc/syslog.conf and configure syslog as normal. http://www.linuxjournal.com/article/5476 Place the sources of evidence from the next section onto the Depository loghost along with the SYSLOG basic Oracle audit and then create a timeline using external tables to query the logs using one SQL VIEW which uses TIMESTAMP as both foreign and primary key. It will be useful to measure TIMESTAMP to a higher decimal place precision so that the primary key timestamps stay unique. This is an example of mapping a listener logfile to db table for SQL. create directory LISTENERDIR as '/u01/app/oracle/oracle/product/10.2.0/db_4/network/log' / create table listenerlog ( logtime1 timestamp, connect1 varchar2(300, protocol1 varchar2(300, action1 varchar2(15, service1 varchar2(15, return1 number(10 organization external ( type oracle_loader default directory LISTENERDIR access parameters ( records delimited by newline nobadfile nologfile nodiscardfile fields terminated by "*" lrtrim missing field values are null (

logtime1 char(30 date_format date mask "DD-MON-YYYY HH24:MI:SS", connect1, protocol1, action1, service1, return1 location ('listener.log' reject limit unlimited / Marcus Ranum and Tina Birds site at http://www.loganalysis.org/ is good for log analysis. Time synchronisation is key to the accuracy of timelines created. Refer to http://www.ukcert.org.uk/time_security.html for more detail. For detailed information on creating a Depository consult my Oracle Forensics book from http://www.rampantbooks.com and this URL in the future www.oracleforensics.com/depository.html 4.0 MAIN SOURCES OF EVIDENCE 1. Listener log logs connections to the listener, use lsnrctl to administrate it. Can be found in /u01/app/oracle/oracle/product/10.2.0/db_4/network/listener.log 2. Alert log system alerts important to DB e.g processes starting and stopping. Can be found in /u01/app/oracle/admin/orcl/bdump 3. Sqlnet.log some failed connection attempts such as Fatal NI connect error 12170. 4. Redo logs - current changes that have not been checkpointed into the datafiles (.dbf. /u01/app/oracle/oradata/orcl/redo02.log /u01/app/oracle/oradata/orcl/redo01.log /u01/app/oracle/oradata/orcl/redo03.log 5. Archived redo logs previous redo logs that can be applied to bring back the data in the db to a previous state using SCN as the main sequential identifier. This can be mapped to timestamp. 6. Fine-Grained Auditing audit logs viewable from FGA_LOG$ and DBA_FGA_AUDIT_TRAIL VIEW. 7. Oracle database audit SYS.AUD$ table and DBA_AUDIT_TRAIL VIEW. 8. Oracle mandatory and OS audit /u01/app/oracle/admin/orcl/adump 9. Home-made trigger audit trails - bespoke to the system. 10. Agntsrvc.log contains logs about the Oracle Intelligent agent. 11. IDS, Web server and firewall logs should also be integrated to the incident handling timeline. This will rely heavily on well synchronised time in the network as previously mentioned.

5.0 LEGAL CONTEXT The experience passed on to me by Forensic expert witnesses is that the main challenge lies in translating the technicalities of an analysis to the level of understanding held by the court officials and jury. This can be overcome by use of demonstrations and simplified examples. The other main challenge is placing the evidence and analysis results correctly in their legal context which requires the collaboration of legal and technical minds. The more that each know of the two subject areas the more effective this collaboration, therefore below are listed the main laws and standards that will affect Oracle Forensics cases in the future in the US. Computer Fraud and Abuse Act, 18 U.S.C. 1030 - Network Crimes Wiretap Act, 18 U.S.C. 2511 - Wiretapping and Snooping Privacy Act, 18 U.S.C. 2701 - Electronic Communications Sarbanes Oxley section 404 enforce financial standards to limit chance of fraud. http://news.findlaw.com/hdocs/docs/gwbush/sarbanesoxley072302.pdf http://thecaq.aicpa.org/resources/sarbanes+oxley/ HIPAA see Oracle Privacy Auditing Donald Burleson & Arup Nanda. http://www.dba - oracle.com/bp/bp_book11_audit.htm and http://www.cms.hhs.gov/hipaa/ Fair Credit Reporting Act (FCRA limits use and distributio n of personal data, and allows consumers to access the information held about them, though it only applies to information primarily used to make eligibility determinations http://www.gao.gov/new.items/d06674.pdf Graham Leach Billey - http://banking.senate.gov/conf/grmleach.htm requires disclosure of privacy policies to customers and financial standards in general. These policies should restrict the passing on a non-public personal information and requires this information to be safeguarded. Financial Anti-Terrorism Act (H.R. 3004 of 2001 as part of the Patriot Act. Basel II Stipulates a relationship between the risk assessed for a bank and the amount of capital that needs to be set aside to balance that risk. Therefore Basel II provides a financial incentive for banks to reduce risk. SB 1386 California Data Breach act New York Data Breach act NY version of SB1386 PCI Credit card security standard requires installation of patches https://sdp.mastercardintl.com/pdf/pcd_manual.pdf 6.1.1 Install relevant security patches within one month of release. Also should be encrypted credit card details in the db. https://www.pcisecuritystandards.org/tech/index.htm Data protection act 1998 UK and similar acts globally as referenced by the Safe Harbor Act http://www.opsi.gov.uk/acts/acts1998/19980029.htm http://www.export.gov/safeharbor/. Expert legal advice can be sought from http://richardsalgado.home.att.net/instructors.htm 6.0 CONCLUSION This paper has summarized the field of Oracle Forensics to give a time efficient overview of the subject. For a more in-depth description then Oracle Forensics by the Author Paul M. Wright http://www.rampant-books.com/book_2007_1_oracle_forensics.htm should be consulted along with this website www.oracleforensics.com. Feedback to paul.wright@oracleforensics.com The paper will be updated over time at http://www.oracleforensics.com/summary.html