PowerPoint Presentation

Similar documents
PowerPoint Presentation


DBPIA-NURIMEDIA

쿠폰형_상품소개서

DocsPin_Korean.pages

(Humphery Kim) RAD Studio : h=p://tech.devgear.co.kr/ : h=p://blog.hjf.pe.kr/ Facebook : h=p://d.com/hjfactory :

歯sql_tuning2

목 차

강의 개요

SMB_ICMP_UDP(huichang).PDF

슬라이드 1

SRC PLUS 제어기 MANUAL

C# Programming Guide - Types

1217 WebTrafMon II

chap 5: Trees

Oracle Database 10g: Self-Managing Database DB TSC

MS-SQL SERVER 대비 기능

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

MySQL-.. 1

<30372E20B1E8B5B5C7F6B4D42E687770>

BMP 파일 처리

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600

Microsoft PowerPoint - o8.pptx

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

Microsoft Word doc

김기남_ATDC2016_160620_[키노트].key

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

The Pocket Guide to TCP/IP Sockets: C Version

Microsoft PowerPoint - a10.ppt [호환 모드]

FD¾ØÅÍÇÁ¶óÀÌÁî(Àå¹Ù²Þ)-ÀÛ¾÷Áß

MySQL-Ch10

bn2019_2

歯MW-1000AP_Manual_Kor_HJS.PDF

TTA Verified : HomeGateway :, : (NEtwork Testing Team)

목차 1. 제품 소개 특징 개요 Function table 기능 소개 Copy Compare Copy & Compare Erase


untitled

<FEFF E002D B E E FC816B CBDFC1B558B202E6559E830EB C28D9>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

T100MD+

Macaron Cooker Manual 1.0.key

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O


Index

The Pocket Guide to TCP/IP Sockets: C Version

NoSQL

휠세미나3 ver0.4

adfasdfasfdasfasfadf

PRO1_09E [읽기 전용]

문서 템플릿

Intra_DW_Ch4.PDF

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

11장 포인터

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

Orcad Capture 9.x

Web Application Hosting in the AWS Cloud Contents 개요 가용성과 확장성이 높은 웹 호스팅은 복잡하고 비용이 많이 드는 사업이 될 수 있습니다. 전통적인 웹 확장 아키텍처는 높은 수준의 안정성을 보장하기 위해 복잡한 솔루션으로 구현

Microsoft PowerPoint Python-DB

[ 네트워크 1] 3 주차 1 차시. IPv4 주소클래스 3 주차 1 차시 IPv4 주소클래스 학습목표 1. IP 헤더필드의구성을파악하고요약하여설명할수있다. 2. Subnet ID 및 Subnet Mask 를설명할수있고, 각클래스의사용가능한호스트수와사설 IP 주소및네트

Interstage5 SOAP서비스 설정 가이드

#편집인협회보381호_0422

T/F 월간 보고

PowerPoint 프레젠테이션

BGP AS AS BGP AS BGP AS 65250

PowerPoint Presentation

第 1 節 組 織 11 第 1 章 檢 察 의 組 織 人 事 制 度 등 第 1 項 大 檢 察 廳 第 1 節 組 대검찰청은 대법원에 대응하여 수도인 서울에 위치 한다(검찰청법 제2조,제3조,대검찰청의 위치와 각급 검찰청의명칭및위치에관한규정 제2조). 대검찰청에 검찰총장,대

untitled

thesis

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

0. 들어가기 전

디지털포렌식학회 논문양식

uFOCS

Dropbox Forensics


282서비스업관리-마트


양성내지b72뼈訪?303逞



자식농사웹완

chungo_story_2013.pdf

*중1부

2

Çѱ¹ÀÇ ¼º°øº¥Ã³µµÅ¥

...._


전반부-pdf

표1.4출력

003-p.ps

<4D F736F F F696E74202D20312E20B0E6C1A6C0FCB8C15F3136B3E2C7CFB9DDB1E25F325FC6ED28C0BA292E >

_

12월월간보고서내지편집3

중앙도서관소식지겨울내지33

에너지포커스 2007년 가을호


01_당선자공약_서울

인권문예대회_작품집4-2




Transcription:

FORENSICINSIGHT SEMINAR SQLite Recovery zurum herosdfrc@google.co.kr

Contents 1. SQLite! 2. SQLite 구조 3. 레코드의삭제 4. 삭제된영역추적 5. 레코드복원기법 forensicinsight.org Page 2 / 22

SQLite! - What is.. - and why? forensicinsight.org Page 3 / 50

SQLite! What is.. DataBase! (Local DB) Open Source & Library Small & Fast SQLite & MySQL, MSSQL, Oracle.. etc RDBMS 의장점계승 표준 SQL 쿼리사용 SQLite & plist, xml.. etc 어플리케이션단위운용 활용방안유사 운용데이터저장및활용 forensicinsight.org Page 4 / 22

SQLite! 약진! forensicinsight.org Page 5 / 22

SQLite! Digital Forensics & SQLite Analysis 포렌식분석가와 SQLite 분석?! 활용도 스마트폰포렌식 Mac Artifact 분석 SQLite 파일구조의특징 다소복잡하고체계적인방법으로레코드를적립 구조를분석하여레코드복원을해보는것으로파일구조분석및복원에대한학습에효과적 forensicinsight.org Page 6 / 22

Structure of SQLite DataBase - File Structure - Page Structure - Cell Structure forensicinsight.org Page 7 / 50

SQLite DataBase File Structure SQLite DataBase File 전체구조 페이지단위 (Number of header page == 1) Page 1 (Header Page) Page 2,3,4.. (Table B-Tree, Index B-Tree, Free, OverFlow) forensicinsight.org Page 8 / 22

SQLite DataBase File Structure SQLite DataBase File Header Page DataBase Header Page 1 (Header Page) SQLite DataBase Signature : SQLite 데이터베이스식별정보 Page Size : 페이지크기 (0x200 alignment) Text Encoding : 문자열인코딩 ( 0: UTF-8, 1: UTF-16 LE, 2: UTF-16 BE ) Auto Vacuum mode : 삭제시데이터자동정리여부 forensicinsight.org Page 9 / 22

SQLite DataBase File Structure SQLite DataBase File Header Page Schema String Page 1 (Header Page) 생성시의 Query 형태 ( 문자열 ) 로저장 복원시필드명확인에필요 ( 가능할경우획득 ) forensicinsight.org Page 10 / 22

SQLite DataBase File Structure SQLite DataBase File Pages in the SQLite database file Pages Pages for Table B-Tree(Main target) Page 1 Pages for Index B-Tree(Get Row ID) Overflow Page Free Page Page 2 Page 3 Page 4 forensicinsight.org Page 11 / 22

Table B-Tree Overview - Tree 의각노드 - 하나의페이지 - Internal 페이지 - 하위페이지의번호를포함 - Leaf 페이지 - 실제데이터 ( 레코드 ) 를포함 forensicinsight.org Page 12 / 22

Pages Page Structure Page Header Cell offset 0 Cell offset 1 Cell offset 2 Free Space Page Header Table b-tree Offset 0 0x05 - Internal page 0x0D Leaf page Size 12 Byte Internal page 8 Byte - Leaf page Cell Offset 2byte Big endian integer Cell 2 Cell 1 Cell 0 forensicinsight.org Page 13 / 22

Pages Page headers Internal Page header Page Flag(Internal : 0x05, Leaf : 0x0D) offset of first block of free space Number of record Offset of the first bytes of the record Num of fragmented free bytes Page number of right most child-page (Intenal page only) forensicinsight.org Page 14 / 22

Pages Page Header 0x200 + 0x134 = 0x334 0x200 + 0xE9= 0x2E9 Cell Offsets Cells Links forensicinsight.org Page 15 / 22

Cells Internal Cell Internal Cell 트리순회를위해존재 Child page number Var Int(Unknown) forensicinsight.org Page 16 / 22

Cells Internal Cell Simulation(B-Tree Traverse) mmssms.db Header Page Root Page 확인 Internal Page Flag 확인 Root(Internal Page) Cell 위치확인 forensicinsight.org Page 17 / 22

Cells Internal Cell Simulation(B-Tree Traverse) mmssms.db Root(Internal Page) 자식페이지번호확인 Data Page Flag 확인 Leaf Page forensicinsight.org Page 18 / 22

Cells Leaf Cell Cell Header and Variable length integer Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Byte Value range Bit pattern 1 7 bit 0XXXXXXX 2 14 bit 1XXXXXXX 0XXXXXXX 3 21 bit 1XXXXXXX 1XXXXXXX 0XXXXXXX 4 28 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 0XXXXXXX 5 35 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 0XXXXXXX 6 42 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 0XXXXXXX 7 49 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 0XXXXXXX 8 56 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 0XXXXXXX 9 64 bit 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX 1XXXXXXX XXXXXXXX forensicinsight.org Page 19 / 22

Cells Leaf Cell and transfer table Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Value Data Type Data Size 0 NULL 0 N (N=1-4) Signed Integer N 5 6 6 Signed Integer 8 7 IEEE float 8 8-11 Reserved N>12 (N:even) N>13 (N:odd) BLOB TEXT (N-12)/2 (N-13)/2 forensicinsight.org Page 20 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte (182) 0x8136(var Int) 10000001 001101102 (var Int) 101101102 182 Start of Cell forensicinsight.org Page 21 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) 0x8E0F(var Int) 10001110 000011112 (var Int) 111000011112 1807 forensicinsight.org Page 22 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) forensicinsight.org Page 23 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) Value Data Type Data Size 0 NULL 0 N (N=1-4) N 5 Signed Integer 6 6 8 7 IEEE float 8 8-11 Reserved N>12 (N:even) BLOB (N-12)/2 N>13 (N:odd) TEXT (N-13)/2 forensicinsight.org Page 24 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) 0x02 2 byte Signed Integer Data of Fields Area forensicinsight.org Page 25 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) 0x23 35 = (N*2)+13 N = 11 11 Byte text value Data of Fields Area forensicinsight.org Page 26 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) 0x05 6 byte Signed Integer Data of Fields Area forensicinsight.org Page 27 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) 0x01 1 byte Signed Integer Data of Fields Area forensicinsight.org Page 28 / 22

Cells Leaf Cell Simulation(Cell parsing) mmssms.db Cell Header Row ID Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N Variable length integer 2 Byte Row ID(1807) (182) (0x40-0x2 = 0x3E = 62) 0x8101(val int) 10000001 000000012(val int) 100000012 129 = (N*2)+13 N = 58 58 Byte text value Data of Fields Area forensicinsight.org Page 29 / 22

Index B-Tree Index B-Tree Index 생성시생성 Table B-Tree 와 Leaf Cell 의구조를제외할경우, 동일 Leaf Cell 셀최상단의길이정보가자기자신을포함 RowID 가최하단에위치 Cell Length of Cell Field 1 Field 2... Field N Data of Field 1 Data of Field 2... Data of Field N RowID Var Int 2 Byte forensicinsight.org Page 30 / 22

Overflow Page Overflow Page 연속된필드의값을한페이지안에전부담을수없는경우생성되는페이지 데이터를계산시그길이에미처도달하기전에끝나고마지막 4바이트가정수형태일경우 해당정수가가리키는페이지 (Overflow Page) 에잔여값존재 Overflow Page 의최상위 4 바이트는다음 Overflow Page 의번호 (0 일경우마지막 ) 레코드의길이에도달치못하고 4 바이트정수가나타난경우 해당정수의 page 에나머지데이터존재 0x200 * (3-1) = 0x400 Next overflow page number forensicinsight.org Page 31 / 22

Free Page Free Page Overflow page 와연결된필드가삭제된경우 Overflow page 는 free page 로전환 헤더에 Free page 관리를위한정보기록 forensicinsight.org Page 32 / 22

Thank you for listenig Q&A forensicinsight.org Page 33 / 22