-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathseader.asn1
More file actions
250 lines (201 loc) · 6.79 KB
/
Copy pathseader.asn1
File metadata and controls
250 lines (201 loc) · 6.79 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
Seader DEFINITIONS IMPLICIT TAGS ::=
BEGIN
Protocol ::= OCTET STRING -- UHF module constrains this to SIZE (1..2)
RfStatus ::= OCTET STRING
SamResponse ::= OCTET STRING
-- omnikey_5326_dfr_softwaredeveloperguide 4.2
PAC ::= BIT STRING
NoArguments ::= NULL
-- omnikey_5326_dfr_softwaredeveloperguide 3.3
Payload ::= CHOICE {
samCommand [0] SamCommand, --aka SioAPI
nfcCommand [1] NFCCommand,
i2cCommand [10] I2CCommand,
response [29] Response,
errorResponse [30] ErrorResponse
}
I2CCommand ::= SEQUENCE {
header [0] OCTET STRING,
busAddress [1] INTEGER,
uhfModuleCommand [22] UHFModuleCommand
}
ErrorResponse ::= SEQUENCE {
errorCode [0] INTEGER,
data [1] OCTET STRING
}
SamCommand ::= CHOICE {
version [2] NULL,
cardDetected [13] CardDetected,
processSNMPMessage [20] OCTET STRING,
serialNumber [22] NoArguments,
getItemKCV [43] OCTET STRING,
requestPacs2 [30] RequestPacs,
processConfigCard [26] NoArguments
}
CardDetected ::= SEQUENCE {
detectedCardDetails [0] CardDetails
}
Pacs2 ::= SEQUENCE {
bits [0] OCTET STRING OPTIONAL,
oid [1] OCTET STRING OPTIONAL,
type [2] SoMediaEdgeType OPTIONAL
}
SamResponse2 ::= CHOICE {
pacs [0] Pacs2
}
Response ::= CHOICE {
nfcResponse [0] NFCResponse,
samResponse [10] SamResponse,
uhfModuleResponse [23] UHFModuleResponse,
samResponse2 [19] SamResponse2
}
NFCResponse ::= CHOICE {
nfcRx [0] NFCRx,
nfcAck [2] NULL
}
NFCRx ::= SEQUENCE {
data [0] OCTET STRING OPTIONAL,
rfStatus [1] RfStatus
}
NFCCommand ::= CHOICE {
nfcSend [1] NFCSend,
nfcOff [2] NULL
}
NFCSend ::= SEQUENCE {
data [0] OCTET STRING,
protocol [1] Protocol,
timeOut [2] INTEGER,
format [5] OCTET STRING OPTIONAL
}
-- omnikey_5326_dfr_softwaredeveloperguide 4.2
RequestPacs ::= SEQUENCE {
contentElementTag [0] ContentElementTag,
oid [4] OCTET STRING OPTIONAL
}
-- omnikey_5326_dfr_softwaredeveloperguide 4.2
-- omnikey_5025_cl_software_developer_guide_mn_en 6.2
ContentElementTag ::= ENUMERATED {
implicitFormatPhysicalAccessBits (4)
}
FrameProtocol ::= ENUMERATED {
none (0),
nfc (2),
iclass (4)
}
SoMediaEdgeType ::= ENUMERATED {
unknown (0),
desfire (1),
mifare (2),
picoPass (3),
mifarePlus (6),
seos (7),
uhf (10)
}
SamVerionDetails ::= SEQUENCE {
zero [0] OCTET STRING,
one [1] OCTET STRING,
two [2] OCTET STRING,
three [3] OCTET STRING
}
SamVersion ::= SEQUENCE {
version [0] OCTET STRING,
firmware [1] OCTET STRING,
type [2] OCTET STRING,
extra [5] SamVerionDetails OPTIONAL
}
-- Black Hat Asia 25: Dismantling-the-seos-protocol.
Key ::= SEQUENCE {
referenceId [1] OCTET STRING,
crypto OCTET STRING
}
PACS ::= SEQUENCE {
payload [5] OCTET STRING
}
SIO ::= SEQUENCE {
rid [1] OCTET STRING,
unknown3 [3] OCTET STRING OPTIONAL,
unknown5 [5] NULL,
key [6] Key,
pacs [7] PACS,
unknown9 [9] NULL
}
-- UHF Module reverse engineering from U90
-- Boxed INTEGER constrained to uint32 range; used as RF run-timer ms value
RunTimerValue ::= INTEGER (0..4294967295)
CardDetails ::= SEQUENCE {
protocol [0] Protocol,
csn [1] OCTET STRING,
atsOrAtqbOrAtr [2] OCTET STRING OPTIONAL, -- aka atqa/atqb/atr
sak [3] OCTET STRING (SIZE (0..1)) OPTIONAL,
cid [4] OCTET STRING (SIZE (0..1)) OPTIONAL,
fwi [5] OCTET STRING (SIZE (0..1)) OPTIONAL,
runTimer [6] RunTimerValue OPTIONAL,
doTcl [7] BOOLEAN OPTIONAL,
fsd [8] INTEGER OPTIONAL
}
I2CClockSpeed ::= ENUMERATED {
i2c100KHz (100), -- 0x0064
i2c400KHz (400), -- 0x0190
i2c1000KHz (1000) -- 0x03E8
}
UHFModuleTransactionStatus ::= ENUMERATED {
unknown (0),
success (1),
failure (2),
antipassBackRejected (3)
}
-- Commands (host -> UHF module); each alternative identified by context tag [0]..[7]
UHFModuleCommandGetVersion ::= NULL -- request firmware/hardware version string
UHFModuleCommandGetStatus ::= NULL -- request current field/inventory status
UHFModuleCommandTransceive ::= SEQUENCE { -- send raw RF command bits to a tag
command [0] BIT STRING
}
UHFModuleCommandDeactivateMedia ::= SEQUENCE { -- mark a specific tag as used/deactivated
mediaEPC [0] OCTET STRING,
transactionStatus [1] UHFModuleTransactionStatus
}
UHFModuleCommandGetProperties ::= NULL -- query module capability properties
UHFModuleCommandSetConfiguration ::= SEQUENCE { -- write module configuration (not used?)
unknown [0] OCTET STRING OPTIONAL
}
UHFModuleCommandSetAccessPassword ::= OCTET STRING -- EPC Gen2 access password
UHFModuleCommandGetPrivateData ::= NULL -- read TID and user-data memory banks
UHFModuleCommand ::= CHOICE {
uhfModuleCommandGetVersion [0] UHFModuleCommandGetVersion,
uhfModuleCommandGetStatus [1] UHFModuleCommandGetStatus,
uhfModuleCommandTransceive [2] UHFModuleCommandTransceive,
uhfModuleCommandDeactivateMedia [3] UHFModuleCommandDeactivateMedia,
uhfModuleCommandGetProperties [4] UHFModuleCommandGetProperties,
uhfModuleCommandSetConfiguration [5] UHFModuleCommandSetConfiguration,
uhfModuleCommandSetAccessPassword [6] UHFModuleCommandSetAccessPassword,
uhfModuleCommandGetPrivateData [7] UHFModuleCommandGetPrivateData
}
-- Responses (UHF module -> host); tag assignments mirror UHFModuleCommand
UHFModuleResponseVersion ::= OCTET STRING -- version payload (firmware/hardware string)
UHFModuleResponseStatus ::= SEQUENCE { -- current status; mediaInfo present when tag in field
mediaInfo [0] CardDetails OPTIONAL
}
UHFModuleResponseTransceive ::= SEQUENCE { -- raw RF response bits; absent on error
response [0] BIT STRING OPTIONAL
}
UHFModuleResponseDeactivateMedia ::= NULL -- deactivate acknowledged
UHFModuleResponseGetProperties ::= SEQUENCE {
i2cMaxClockSpeedInKHz [0] I2CClockSpeed OPTIONAL
}
UHFModuleResponseSetConfiguration ::= NULL -- configuration write acknowledged
UHFModuleResponseSetAccessPassword ::= NULL -- access password write acknowledged
UHFModuleResponseGetPrivateData ::= SEQUENCE { -- TID + user memory read response
tid [0] OCTET STRING,
userData [1] OCTET STRING
}
UHFModuleResponse ::= CHOICE {
uhfModuleResponseVersion [0] UHFModuleResponseVersion,
uhfModuleResponseStatus [1] UHFModuleResponseStatus,
uhfModuleResponseTransceive [2] UHFModuleResponseTransceive,
uhfModuleResponseDeactivateMedia [3] UHFModuleResponseDeactivateMedia,
uhfModuleResponseGetProperties [4] UHFModuleResponseGetProperties,
uhfModuleResponseSetConfiguration [5] UHFModuleResponseSetConfiguration,
uhfModuleResponseSetAccessPassword [6] UHFModuleResponseSetAccessPassword,
uhfModuleResponseGetPrivateData [7] UHFModuleResponseGetPrivateData
}
END