-
Notifications
You must be signed in to change notification settings - Fork 59
/
network-traffic.json
330 lines (330 loc) · 11.2 KB
/
network-traffic.json
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
{
"$id": "http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/network-traffic.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "network-traffic",
"description": "The Network Traffic Object represents arbitrary network traffic that originates from a source and is addressed to a destination.",
"type": "object",
"allOf": [
{
"$ref": "../common/cyber-observable-core.json"
},
{
"properties": {
"type": {
"type": "string",
"description": "The value of this property MUST be `network-traffic`.",
"enum": [
"network-traffic"
]
},
"id": {
"title": "id",
"pattern": "^network-traffic--"
},
"extensions": {
"$ref": "#/definitions/network-traffic-extensions-dictionary",
"description": "The Network Traffic Object defines the following extensions. In addition to these, producers MAY create their own. Extensions: http-ext, tcp-ext, icmp-ext, socket-ext"
},
"start": {
"$ref": "../common/timestamp.json",
"description": "Specifies the date/time the network traffic was initiated, if known."
},
"end": {
"$ref": "../common/timestamp.json",
"description": "Specifies the date/time the network traffic ended, if known."
},
"src_ref": {
"description": "Specifies the source of the network traffic, as a reference to an Observable Object.",
"type": "string"
},
"dst_ref": {
"description": "Specifies the destination of the network traffic, as a reference to an Observable Object.",
"type": "string"
},
"src_port": {
"type": "integer",
"description": "Specifies the source port used in the network traffic, as an integer. The port value MUST be in the range of 0 - 65535.",
"minimum": 0,
"maximum": 65535
},
"dst_port": {
"type": "integer",
"description": "Specifies the destination port used in the network traffic, as an integer. The port value MUST be in the range of 0 - 65535.",
"minimum": 0,
"maximum": 65535
},
"protocols": {
"type": "array",
"description": "Specifies the protocols observed in the network traffic, along with their corresponding state.",
"items": {
"type": "string"
},
"minItems": 1
},
"src_byte_count": {
"type": "integer",
"description": "Specifies the number of bytes sent from the source to the destination."
},
"dst_byte_count": {
"type": "integer",
"description": "Specifies the number of bytes sent from the destination to the source."
},
"src_packets": {
"type": "integer",
"description": "Specifies the number of packets sent from the source to the destination."
},
"dst_packets": {
"type": "integer",
"description": "Specifies the number of packets sent destination to the source."
},
"ipfix": {
"description": "Specifies any IP Flow Information Export (IPFIX) data for the traffic.",
"allOf": [{ "$ref": "../common/dictionary.json" }],
"patternProperties": {
"^[a-zA-Z0-9_-]{0,250}$": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
}
},
"src_payload_ref": {
"description": "Specifies the bytes sent from the source to the destination.",
"type": "string"
},
"dst_payload_ref": {
"description": "Specifies the bytes sent from the source to the destination.",
"type": "string"
},
"encapsulates_refs": {
"type": "array",
"description": "Links to other network-traffic objects encapsulated by a network-traffic.",
"items": {
"type": "string"
},
"minItems": 1
},
"encapsulated_by_ref": {
"description": "Links to another network-traffic object which encapsulates this object.",
"type": "string"
}
}
}
],
"required": [
"protocols"
],
"anyOf": [
{
"required": [
"src_ref"
]
},
{
"required": [
"dst_ref"
]
}
],
"oneOf": [
{
"properties": {
"is_active": {
"type": "boolean",
"enum": [
false
],
"description": "Indicates whether the network traffic is still ongoing."
}
},
"required": [
"is_active"
]
},
{
"properties": {
"is_active": {
"type": "boolean",
"enum": [
true
],
"description": "Indicates whether the network traffic is still ongoing."
}
},
"required": [
"is_active"
],
"not": {
"required": [
"end"
]
}
},
{
"not": {
"required": [
"is_active"
]
}
}
],
"definitions": {
"network-traffic-extensions-dictionary": {
"allOf": [{ "$ref": "../common/dictionary.json" }],
"patternProperties": {
"^http-request-ext$": {
"type": "object",
"description": "The HTTP request extension specifies a default extension for capturing network traffic properties specific to HTTP requests.",
"properties": {
"request_method": {
"type" : "string",
"description": "Specifies the HTTP method portion of the HTTP request line, as a lowercase string."
},
"request_value": {
"type": "string",
"description": "Specifies the value (typically a resource path) portion of the HTTP request line."
},
"request_version": {
"type": "string",
"description": "Specifies the HTTP version portion of the HTTP request line, as a lowercase string."
},
"request_header": {
"allOf": [{ "$ref": "../common/dictionary.json" }],
"description": "Specifies all of the HTTP header fields that may be found in the HTTP client request, as a dictionary.",
"patternProperties": {
"^.+$": {
"type": "string"
}
},
"additionalProperties": false
},
"message_body_length": {
"type": "integer",
"description": "Specifies the length of the HTTP message body, if included, in bytes."
},
"message_body_data_ref": {
"description": "Specifies the data contained in the HTTP message body, if included.",
"type": "string"
}
},
"required": [
"request_method",
"request_value"
]
},
"^icmp-ext$": {
"type": "object",
"description": "The ICMP extension specifies a default extension for capturing network traffic properties specific to ICMP.",
"properties": {
"icmp_type_hex": {
"$ref": "../common/hex.json",
"description": "Specifies the ICMP type byte."
},
"icmp_code_hex": {
"$ref": "../common/hex.json",
"description": "Specifies the ICMP code byte."
}
},
"required": [
"icmp_type_hex",
"icmp_code_hex"
]
},
"^socket-ext$": {
"type": "object",
"description": "The Network Socket extension specifies a default extension for capturing network traffic properties associated with network sockets.",
"properties": {
"address_family": {
"type": "string",
"description": "Specifies the address family (AF_*) that the socket is configured for.",
"enum": [
"AF_UNSPEC",
"AF_INET",
"AF_IPX",
"AF_APPLETALK",
"AF_NETBIOS",
"AF_INET6",
"AF_IRDA",
"AF_BTH"
]
},
"is_blocking": {
"type": "boolean",
"description": "Specifies whether the socket is in blocking mode."
},
"is_listening": {
"type": "boolean",
"description": "Specifies whether the socket is in listening mode."
},
"options": {
"allOf": [{ "$ref": "../common/dictionary.json" }],
"description": "Specifies any options (SO_*) that may be used by the socket, as a dictionary.",
"patternProperties": {
"^(SO|ICMP|ICMP6|IP|IPV6|MCAST|TCP|IRLMP)(_[A-Z]+)+$": {
"type": "integer"
}
},
"additionalProperties": false
},
"socket_type": {
"type": "string",
"description": "Specifies the type of the socket.",
"enum": [
"SOCK_STREAM",
"SOCK_DGRAM",
"SOCK_RAW",
"SOCK_RDM",
"SOCK_SEQPACKET"
]
},
"socket_descriptor": {
"type": "integer",
"minimum": 0,
"description": "Specifies the socket file descriptor value associated with the socket, as a non-negative integer."
},
"socket_handle": {
"type": "integer",
"description": "Specifies the handle or inode value associated with the socket."
}
},
"required": [
"address_family"
]
},
"^tcp-ext$": {
"type": "object",
"description": "The TCP extension specifies a default extension for capturing network traffic properties specific to TCP.",
"allOf": [
{
"properties": {
"src_flags_hex": {
"$ref": "../common/hex.json",
"description": "Specifies the source TCP flags, as the union of all TCP flags observed between the start of the traffic (as defined by the start property) and the end of the traffic (as defined by the end property). "
},
"dst_flags_hex": {
"$ref": "../common/hex.json",
"description": "Specifies the destination TCP flags, as the union of all TCP flags observed between the start of the traffic (as defined by the start property) and the end of the traffic (as defined by the end property)."
}
}
},
{
"anyOf": [
{ "required": ["src_flags_hex"] },
{ "required": ["dst_flags_hex"] }
]
}
]
}
},
"additionalProperties": {
"$ref": "../common/dictionary.json",
"description": "Custom file extension"
}
}
}
}