GPT(GUID Partition Table)
각 파티션에 GUID(고유 식별자)를 부여하고, 대용량 디스크를 지원하는 파티션 구조다. UEFI 시스템에서 사용되며, MBR의 한계를 극복하기 위해 만들어졌다.
GPT(GUID Partition Table) 구조 분석
1. 가상 하드 디스크(VHD) 생성
Windows + X → "디스크 관리" → "동작" → "VHD 만들기" 실행
2. 생성한 가상 하드 디스크(VHD) 초기화
생성한 가상 하드 디스크(VHD) 우클릭 → "디스크 초기화" → "GPT" 선택
3. 파티션 2개(20 MB) 생성
"할당되지 않음" 우클릭 → "새 단순 볼륨" 실행
4. 관리자 권한으로 HxD 실행 및 디스크 열기
관리자 권한으로 HxD 실행 → "도구" → "디스크 열기" → "읽기전용으로 읽기" 해제 → "수락" → 경고 "수락" 실행
GPT(GUID Partition Table) 구조
- Protective MBR (섹터 0): 기존 MBR과 동일
- Primary GPT Header (섹터 1): 파티션 테이블 크기 및 위치를 정의, 헤더 및 파티션 테이블 체크섬 포함, 오류 또는 수정 사항 감지
- Primary Partition Table (섹터 2~섹터 33): 파티션 정보 저장
- Partition Area (섹터 34~섹터 -34): 실제 파티션 데이터 저장
- Backup Partition Table (섹터 -33~섹터 -2): 파티션 정보 백업 복사본 저장
- Backup Area(=Backup GPT Header) (섹터 -1): GPT Header의 백업 복사본 저장
Protective MBR (섹터 0)
가상 하드 디스크(VHD)를 성공적으로 열면 아래 이미지와 같이 0번 섹터가 MBR과 동일한 구조를 보이는 것을 확인할 수 있다.
Partition Table Entry #1를 분석하면 다음과 같은 정보를 확인할 수 있다.
- Partition Type: 0xEE(EFI GPT Disk)
- Starting LBA Address: 01 00 00 00 → 리틀엔디안 변환 → 00 00 00 01 → 1번 섹터
- Size in Sector: FF FF FF FF → 리틀엔디안 변환 → FF FF FF FF → 4,294,967,295 섹터
즉, 1번 섹터에서 GPT 파티션 테이블 정보가 시작되는 것이다.
1번 섹터로 이동하면 GPT Header가 위치하고 있음을 확인할 수 있다.
Primary GPT Header (섹터 1)
파티션 테이블의 크기와 위치를 정의하며, 헤더와 파티션 테이블의 체크섬도 포함되어, 오류 또는 수정 사항을 감지할 수 있다.
Offset | Size (bytes) | Information |
0x200~0x207 | 8 bytes | Signature (“EFI PART”) |
0x208~0x20B | 4 bytes | Version 버전 정보 |
0x20C~0x20F | 4 bytes | Size of GPT header in bytes GPT header 크기 (보통 0x5C) |
0x210~0x213 | 4 bytes | CRC32 checksum of GPT header GPT header에 대한 CRC32 체크섬 값 |
0x214~0x217 | 4 bytes | Reserved 예약 영역(사용 X) |
0x218~0x21F | 8 bytes | LBA of current GPT header structure GPT header의 논리적 주소 (0x01) |
0x220~0x227 | 8 bytes | LBA of the other GPT header structure GPT header 백업 복사본 위치 |
0x228~0x22F | 8 bytes | LBA of start of partition area partition area 시작 위치 |
0x230~0x237 | 8 bytes | LBA of end of partition area partition area 끝 위치 |
0x238~0x247 | 16 bytes | Disk GUID 디스크 GUID 값 |
0x248~0x24F | 8 bytes | LBA of the start of the partition table partition table 시작 위치 (0x02) |
0x250~0x253 | 4 bytes | Number of entries in partition table partition table의 entry 수 (0x80 제한) |
0x254~0x257 | 4 bytes | Size of each entry in partition table patition table의 entry 크기 (0x80) |
0x258~0x25B | 4 bytes | CRC32 checksum of partition table partition table에 대한 CRC32 체크섬 값 |
LBA of the start of the partition table가 0x02로, 2번 섹터에서 partition table이 위치함을 확인할 수 있다.
Size of each entry in partition table이 0x80으로 partiton table의 entry 크기가 128 byte이고, Number of entries in partition table이 0x80으로 partition table의 entry 수가 128개임을 확인할 수 있다.
Primary Partition Table (섹터 2 ~ 섹터 33)
partition table의 entry 크기가 128 bytes이므로 한 섹터에 4개의 partition table entry가 들어갈 수 있다. 즉, parition table entry 수는 128개, 한 섹터에 4개의 partition table entry가 들어가 총 32개 섹터까지 Partition Table을 표시할 수 있다.
※ 파티션을 2개만 생성했지만 3개가 있는 것을 알 수 있다. 이는 첫 번째 파티션은 윈도우에서 자동 생성한 파티션이기 때문이다.
Size (bytes) | Information |
16 bytes | Partition type GUID 파티션 유형 GUID (리틀엔디안 변환) 인텔에서 정의 (00000000-0000-0000-0000-000000000000: Unallocated entry) (C12A7328-F81F-11D2-BA4B-00A0C93EC93B: EFI system partition) (024DEE41-33E7-11d3-9D69-0008C781F39F: Partition with DOS partition table inside) 마이크로소프트에서 정의 (E3C9E316-0B5C-4DB8-817D-f92DF00215AE: Microsoft Reserved Partition (MRP)) (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7: Primary partition (basic disk)) (5808C8AA-7E8F-42E0-85D2-E1E90434CFB3: LDM metadata partition (dynamic disk)) (AF9B60A0-1431-4F62-BC68-3311714A69AD: LDM data partition (dynamic disk)) |
16 bytes | Unique partition GUID 파티션 고유 GUID |
8 bytes | Starting LBA of partition 파티션 시작 주소 |
8 bytes | Ending LBA of partition 파티션 끝 주소 |
8 bytes | Partition attributes 파티션 속성 값 |
71 bytes | Partition name in Unicode 파티션 이름 |
- Partition type GUID와 Partition name in Unicode가 동일함을 확인할 수 있다.
Partition Table Entry #1 (윈도우 자동 생성)
- Starting LBA of partition: 22 00 00 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 00 00 22 → 34번 섹터
- Ending LBA of partition: FF 7F 00 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 00 7F FF → 32,767번 섹터
- 전체 섹터 수 = Ending LBA of partition - Starting LBA of partition + 1 = 32,767 - 34 + 1 = 32,734개 섹터
Partition Table Entry #2 (사용자 직접 생성)
- Starting LBA of partition: 00 80 00 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 00 80 00 → 32,768번 섹터
- Ending LBA of partition: FF 1F 01 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 01 1F FF → 73,727번 섹터
- 전체 섹터 수 = Ending LBA of partition - Starting LBA of partition + 1 = 73,727 - 32,768 + 1 = 40,960개 섹터
Partition Table Entry #3 (사용자 직접 생성)
- Starting LBA of partition: 00 20 01 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 01 20 00 → 73,728번 섹터
- Ending LBA of partition: FF BF 01 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 01 BF FF → 114,687번 섹터
- 전체 섹터 수 = Ending LBA of partition - Starting LBA of partition + 1 = 114,687 - 73,728 + 1 = 40,960개 섹터
Partition Area (섹터 34~섹터 -34)
GPT Header(섹터 1)의 LBA of start of partition area, LBA of end of partition area로 Partition Area의 시작 주소 및 끝 주소를 확인할 수 있다.
Backup Area(=Backup GPT Header) (섹터 -1)
GPT Header의 LBA of the other GPT header structure로 이동한다.
LBA of the other GPT header structure: FF 3F 06 00 00 00 00 00 → 리틀엔디안 변환 → 00 00 00 00 00 06 3F FF → 409,599 섹터
GPT Header (섹터 1)와 다른 부분은 다음과 같다.
- CRC32 checksum of GPT header
- LBA of current GPT header structure
- LBA of the other GPT header structure
- LBA of the start of the partition table
LBA of current GPT header structure(409,599번 섹터)와 LBA of the other GPT header structure(1번 섹터)로 앞선 GPT Header에서와 서로 반대의 값을 가지고 있음을 확인할 수 있다.
LBA of the start of the partition table(409,567번 섹터)로 이동하면 Backup Partition Table을 확인할 수 있다.
Backup Partition Table (섹터 -33~섹터 -2)
Partition Table (섹터 2~섹터 33)과 완전히 동일한 구조임을 확인할 수 있다.
'Disk Forensic' 카테고리의 다른 글
[디지털 포렌식] FAT32 File System-Reserved Area 분석 (0) | 2025.05.06 |
---|---|
[디지털 포렌식] FAT32 File System 생성 및 구조 분석 (0) | 2025.05.05 |
[디지털 포렌식] GPT Header & Partition Table Entry 복구 (0) | 2025.05.03 |
[디지털 포렌식] MBR(Master Boot Record) 생성 및 분석 (0) | 2025.05.02 |
[디지털 포렌식] 가상 하드 디스크(VHD) 만들기 (1) | 2025.04.30 |