Database Forensic Analysis with DBCarver James Wagner, Alexander - - PowerPoint PPT Presentation

database forensic analysis with dbcarver
SMART_READER_LITE
LIVE PREVIEW

Database Forensic Analysis with DBCarver James Wagner, Alexander - - PowerPoint PPT Presentation

Database Forensic Analysis with DBCarver James Wagner, Alexander Rasin , Tanu Malik, Karen Heart, Hugo Jehle, Jonathan Grier 1 Data Systems and Optimization Lab at DePaul Tanu Malik James Wagner Jonathan Grier Hugo Jehle Karen Heart 2


slide-1
SLIDE 1

Database Forensic Analysis with DBCarver

James Wagner, Alexander Rasin, Tanu Malik, Karen Heart, Hugo Jehle, Jonathan Grier

1

slide-2
SLIDE 2

Data Systems and Optimization Lab at DePaul

2

James Wagner

Tanu Malik Karen Heart Hugo Jehle

Jonathan Grier

slide-3
SLIDE 3

Motivation

  • Cyber-crime
  • Detecting (and proving) data

theft

  • JP Morgan/Dow Jones
  • Mobile device analysis
  • FBI, 4Discovery
  • Involves a database

3

slide-4
SLIDE 4

Motivation

  • Example Queries
  • Reconstruct deleted data
  • Identify recent access, modifications
  • Detect catalog/data tampering
  • Un-trusted environment

4

slide-5
SLIDE 5

Forensic Analysis Targets

  • Logs
  • Audit, Query, WAL
  • RAM
  • Buffer cache, intermediate data
  • Buffer cache, intermediate data
  • Query-able DB content
  • Tables, MVs, Catalog
  • Un-query-able content
  • Indexes, Deleted data, Free-listed data

5

slide-6
SLIDE 6

Forensic Analysis Targets

  • Logs
  • Audit, Query, WAL
  • RAM
  • Buffer cache, intermediate data

DB RECOVERY

  • Buffer cache, intermediate data
  • Query-able DB content
  • Tables, MVs, Catalog
  • Un-query-able content
  • Indexes, Deleted data, Free-listed data

6

Chain of Custody?

slide-7
SLIDE 7

File Carving (JPEG)

Header File Fragment 1

7

1 File Fragment 2 Footer

slide-8
SLIDE 8

Forensic Analysis Targets

  • Logs
  • Audit, Query, WAL
  • RAM
  • Buffer cache, intermediate data

FILE CARVING

  • Buffer cache, intermediate data
  • Query-able DB content
  • Tables, MVs, Catalog
  • Un-query-able content
  • Indexes, Deleted data, Free-listed data

8

slide-9
SLIDE 9

Generalized Page Carving

Page Header Row Directory Other Structures

Row1 Address Row2 Address Row3 Address Row4 Address Table Data Customer

20%

9

Row Data

Row4: 4, Mark, Boston Row3: 3, Mary, Dallas Row2: 2, Jane, Chicago Row1: 1, John, Boston

Row4 Address

Free space, etc.

80%

slide-10
SLIDE 10

Forensic Analysis Targets

  • Logs
  • Audit, Query, WAL
  • RAM
  • Buffer cache, int. data

DB CARVING

  • Buffer cache, int. data
  • Query-able DB content
  • Tables, MVs, Catalog
  • Un-query-able content
  • Indexes, Deleted data, Free-listed data

10

slide-11
SLIDE 11

Parameter Detector

Database

Management

System

Iteratively load synthetic data Capture DB storage Generate DB

DBCarver Architecture

DB Carver

DB config. files Generate DB

  • config. file

DBMS disk image DBMS RAM image

Updated, Deleted rows Cached index/data pages Catalog, logs, etc Unallocated (free) pages

slide-12
SLIDE 12

Parameter Detector

Database

Management

System

Iteratively load synthetic data Capture DB storage Generate DB

DBCarver Architecture

DB Carver

DB config. files Generate DB

  • config. file

DBMS disk image DBMS RAM image

Updated, Deleted rows Cached index/data pages Catalog, logs, etc Unallocated (free) pages

slide-13
SLIDE 13

Oracle PostgreSQL SQLite Firebird DB2 SQLServer MySQL Apache Derby

Structure Identifier

Yes No Yes No

Unique Page ID

Yes No

Row Dir.

Sequence

Top-to-bottom insertion Bottom-to-top insertion

Row Identifier

No Yes No Yes

Column Count

Yes No Yes No Yes

13

Column Count

Yes No Yes No Yes

3-column row

4, Mark, Boston Row4 4, Mark, Boston Row4 4 4, Mark, Boston Row4 3 4, Mark, Boston

slide-14
SLIDE 14

Parameter Detector

Database

Management

System

Iteratively load synthetic data Capture DB storage Generate DB

DBCarver Architecture

DB Carver

DB config. files Generate DB

  • config. file

DBMS disk image DBMS RAM image

Updated, Deleted rows Cached index/data pages Catalog, logs, etc Unallocated (free) pages

slide-15
SLIDE 15

DBCarver Output (SQLite on Android)

Number of Active Rows Internal RowID

Deleted Row

slide-16
SLIDE 16

Forensic Value of an Index (Update)

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K Doe Jack

Employee Index

  • n (LastName)

Employee Table

16

333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K 222

  • I. NotSmith

… Emp. 35K Jack Locke NotSmith Smith

slide-17
SLIDE 17

Forensic Value of Caching (Update)

17

Disk Storage Memory (RAM)

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K

Data Page

slide-18
SLIDE 18

Forensic Value of Caching (Update)

Data Page (a copy in RAM)

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K

18

Disk Storage Memory (RAM)

Data Page

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K

slide-19
SLIDE 19

Forensic Value of Caching (Update)

Data Page (a copy in RAM)

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K 222

  • I. NotSmith

… Emp. 35K

19

Disk Storage Memory (RAM)

Data Page

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K 222

  • I. NotSmith

… Emp. 35K

slide-20
SLIDE 20

Forensic Value of Caching (Update)

Data Page (a copy in RAM)

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K 222

  • I. NotSmith

… Emp. 35K

20

Disk Storage Memory (RAM)

Data Page

111

  • J. Doe

… Emp. 42K 222

  • J. Smith

… Emp. 35K 333 A.Locke … Mgr. 65K 444

  • P. Jack

… Emp. 37K 222

  • I. NotSmith

… Emp. 35K 222

  • I. NotSmith

… Emp. 35K

slide-21
SLIDE 21

Delete Progression

  • Storage state:

– Issue the delete command – ??? (Profit?) – Value is gone – Value is gone

  • Observe disk and RAM state

– In Table, Index (e.g., Unique), MV

21

slide-22
SLIDE 22

Delete Progression

  • T0: Load the data (Table, Index, MV)
  • T1: Delete a unique value (222)
  • T2: Refresh the MV
  • T3: Flush_buffer_cache()
  • T4: Overwrite the buffer cache
  • T5: Vacuum Table, Index and MV

22

slide-23
SLIDE 23

T0 T1 T2 222 222 222 222 222 222 222 222 222

Disk RAM

222 222 222 222 222

Table Index MV Table Index MV

23

T2 T3 T4 T5 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222

slide-24
SLIDE 24

Recover Corrupted Data

  • Load SSBM Scale1 data
  • Simulate disk corruption (random writes)

24

DWDate Supplier Customer Part Lineorder Full JOIN

slide-25
SLIDE 25

Conclusions/Future Work

  • DB Carving
  • No apriori assumptions
  • Forensic Meta-Queries

– Reconstruct deleted data – Detect recently updated values – Identify log tampering

25

slide-26
SLIDE 26

26