-
Notifications
You must be signed in to change notification settings - Fork 0
/
watchguard_sysa_dl.ksy
137 lines (111 loc) · 2.16 KB
/
watchguard_sysa_dl.ksy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
meta:
id: watchguard_sysa_dl
title: Watchguard Fireware web update (Sysa-dl) file format
file-extension: sysa-dl
license: MIT
endian: be
seq:
- id: fw_header
size: 24
type: fw_header
- id: sections
size: fw_header.file_size
type: sections
types:
fw_header:
seq:
- id: md5sum
size: 0x10
doc: MD5 sum of whole "sections" block
- id: file_size
type: u4
- id: magic
type: u4
enum: magic
sections:
seq:
- id: sections
type: section
repeat: eos
section:
seq:
- id: head
type: head
- id: data
size: head.data_size
type:
switch-on: head.name.content
cases:
'"REBOOT"': reboot_data
'"info"': info_data
'"HMAC"': hmac_data
'"WGPKG"': wgpkg_data
name:
seq:
- id: type2_magic
type: u1
if: is_type2
- id: content
type: strz
size: 'is_type2 ? 0xf : 0x10'
encoding: ASCII
instances:
type2:
pos: 0
type: u1
is_type2:
value: type2 == 0x7f
head:
seq:
- id: name
size: 0x10
type: name
- id: unknown_data
size: 24
if: name.is_type2
- id: data_size
type: u4
- id: md5sum
size: 0x10
if: name.is_type2
reboot_data:
seq:
- id: perm
size: 0x8
type: encoded_perm
encoded_perm:
seq:
- id: unknown_dword1
type: u4
- id: unknown_dword2
type: u4
info_data:
seq:
- id: info
size-eos: true
type: strz
encoding: ASCII
hmac_data:
seq:
- id: hmac_sha1_value
size: 20
wgpkg_data:
seq:
- id: meta_info
type: strz
encoding: ASCII
- id: magic
contents: "WGPKG\0"
- id: unknown_word
size: 2
- id: unknown_dword
type: u4
- id: data_size
type: u4
- id: compressed_wpkg
size: data_size
doc: compressed_wpkg is bzip2 compresed
enums:
magic:
0x1261_1920: type1
0x1561_1928: type2