Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Created March 7, 2023 12:05
Show Gist options
  • Save Hugoberry/6a1db3c3b0bf554970a2895804b955b5 to your computer and use it in GitHub Desktop.
Save Hugoberry/6a1db3c3b0bf554970a2895804b955b5 to your computer and use it in GitHub Desktop.
The Kaitai definition of ABF SQL Server Analysis Services backup file. The structure defined in [MS-XLDM] open spec document.
meta:
id: abf
endian: le
title: Spreadsheet Data Model File
seq:
- id: bom
type: bom_t
- id: stream_signature
type: stream_signature_t
- id: backup_log_header
type: backup_log_header_t
- id: start
type: bom_t
instances:
virtual_directory:
pos: 303104
size: 4150
additional_log:
pos: 4096
size: 112
partitions:
pos: 4208
size: 28
# more files
metadata_sqlitedb:
#get the name from log that is the last entry
pos: 10144
size: 278528
log:
pos: 288672
size: 13180
types:
bom_t:
seq:
- id: byte_order_mark
contents: [ 0xff, 0xfe ]
stream_signature_t:
seq:
- id: signature
contents: [0x53, 0, 0x54, 0, 0x52, 0, 0x45, 0, 0x41, 0, 0x4d, 0, 0x5f, 0, 0x53, 0, 0x54, 0, 0x4f, 0, 0x52, 0, 0x41, 0, 0x47, 0, 0x45, 0, 0x5f, 0, 0x53, 0, 0x49, 0, 0x47, 0, 0x4e, 0, 0x41, 0, 0x54, 0, 0x55, 0, 0x52, 0, 0x45, 0, 0x5f, 0, 0x29, 0, 0x21, 0, 0x40, 0, 0x23, 0, 0x24, 0, 0x25, 0, 0x5e, 0, 0x26, 0, 0x2a, 0, 0x28, 0]
#contents: [ STREAM_STORAGE_SIGNATURE_)!@#$%^&*( ]
#size: 70
backup_log_header_t:
seq:
- id: backup_restore_sync_version
type: str
encoding: UTF-16LE
size: 4096 - 70 - 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment