You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sentinel/stix-objects-api.md
+83-10Lines changed: 83 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,12 +57,15 @@ Acquire a Microsoft Entra access token with [OAuth 2.0 authentication](../active
57
57
58
58
The version of the token (v1.0 or v2.0) received is determined by the `accessTokenAcceptedVersion` property in the [app manifest](/entra/identity-platform/reference-app-manifest#manifest-reference) of the API that your application is calling. If `accessTokenAcceptedVersion` is set to 1, then your application receives a v1.0 token.
59
59
60
-
Use Microsoft Authentication Library [(MSAL)](/entra/identity-platform/msal-overview) to acquire either a v1.0 or v2.0 access token. Or, send requests to the REST API in the following format:
60
+
Use Microsoft Authentication Library [(MSAL)](/entra/identity-platform/msal-overview) to acquire either a v1.0 or v2.0 access token. Use the access token to create the authorization header which contains the bearer token.
61
+
62
+
For example, a request to the upload API uses the following elements to retrieve an access token and create the authorization header, which is used in each request:
61
63
- POST `https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token`
62
-
- Headers for using Microsoft Entra App:
64
+
65
+
Headers for using Microsoft Entra App:
63
66
- grant_type: "client_credentials"
64
67
- client_id: {Client ID of Microsoft Entra App}
65
-
- client_secret: {secret of Microsoft Entra App}
68
+
- client_secret or client_certificate: {secrets of the Microsoft Entra App}
If `accessTokenAcceptedVersion` in the app manifest is set to 1, your application receives a v1.0 access token even though it's calling the v2 token endpoint.
@@ -88,22 +91,79 @@ Method: `POST`<br>
88
91
#### Request body
89
92
The JSON object for the body contains the following fields:
90
93
91
-
|Field name|Data Type|Description|
94
+
|Field name|Data Type|Description|
92
95
|---|---|---|
93
96
|`sourcesystem` (required) | string | Identify your source system name. The value `Microsoft Sentinel` is restricted.|
94
97
|`stixobjects` (required) | array | An array of STIX objects in [STIX 2.0 or 2.1 format](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_muftrcpnf89v)|
95
98
96
99
Create the array of STIX objects using the STIX format specification. Some of the STIX property specifications are expanded here for your convenience with links to the relevant STIX document sections. Also note some properties, while valid for STIX, don't have corresponding object schema properties in Microsoft Sentinel.
97
100
101
+
>[!WARNING]
102
+
>If you're using a Microsoft Sentinel Logic App to connect to the upload API, note there are three threat intelligence actions available. Only use the [**Threat Intelligence - Upload STIX Objects (Preview)**](/connectors/azuresentinel/#threat-intelligence---upload-stix-objects-(preview)). The other two will fail with this endpoint and JSON body fields.
103
+
104
+
#### Sample request message
105
+
106
+
Here's a sample PowerShell function that uses a self-signed certificate uploaded to an Entra app registration to generate the access token and authorization header:
107
+
108
+
```PowerShell
109
+
function Test-UploadApi {
110
+
<#
111
+
.SYNOPSIS
112
+
requires Powershell module MSAL.PS version 4.37 or higher
All the objects you import with the upload API share these common properties.
101
161
102
-
|Property Name|Type |Description |
162
+
|Property Name|Type |Description |
103
163
|----|----|----|
104
164
|`id` (required)| string | An ID used to identify the STIX object. See section [2.9](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_64yvzeku5a5c) for specifications on how to create an `id`. The format looks something like `indicator--<UUID>`|
105
165
|`spec_version` (optional) | string | STIX object version. This value is required in the STIX specification, but since this API only supports STIX 2.0 and 2.1, when this field isn't set, the API defaults to `2.1`|
106
-
|`type` (required)|string | The value of this property *must* be a supported STIX object.|
166
+
|`type` (required)|string | The value of this property *must* be a supported STIX object.|
107
167
|`created` (required) | timestamp | See section [3.2](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_xzbicbtscatx) for specifications of this common property.|
108
168
|`created_by_ref` (optional) | string | The created_by_ref property specifies the ID property of the entity that created this object.<br><br>If this attribute is omitted, the source of this information is undefined. For object creators who wish to remain anonymous, keep this value undefined.|
109
169
|`modified` (required) | timestamp | See section [3.2](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_xzbicbtscatx) for specifications of this common property.|
@@ -119,9 +179,9 @@ For more information, see [STIX common properties](https://docs.oasis-open.org/c
119
179
120
180
#### Indicator
121
181
122
-
|Property Name|Type |Description |
182
+
|Property Name|Type |Description |
123
183
|----|----|----|
124
-
|`name` (optional)|string | A name used to identify the indicator.<br><br>Producers *should* provide this property to help products and analysts understand what this indicator actually does.|
184
+
|`name` (optional)|string | A name used to identify the indicator.<br><br>Producers *should* provide this property to help products and analysts understand what this indicator actually does.|
125
185
|`description` (optional) | string | A description that provides more details and context about the indicator, potentially including its purpose and its key characteristics.<br><br>Producers *should* provide this property to help products and analysts understand what this indicator actually does. |
126
186
|`indicator_types` (optional) | list of strings | A set of categorizations for this indicator.<br><br>The values for this property *should* come from the [indicator-type-ov](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_cvhfwe3t9vuo)|
127
187
|`pattern` (required) | string | The detection pattern for this indicator *might* be expressed as a [STIX Patterning](https://docs.oasis-open.org/cti/stix/v2.1/cs01/stix-v2.1-cs01.html#_e8slinrhxcc9) or another appropriate language such as SNORT, YARA, etc. |
@@ -135,18 +195,26 @@ For more information, see [STIX indicator](https://docs.oasis-open.org/cti/stix/
135
195
136
196
#### Attack pattern
137
197
198
+
Follow the STIX specifications for creating an attack pattern STIX object. Use [this example](#sample-attack-pattern) as an extra reference.
199
+
138
200
For more information, see [STIX attack pattern](https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_axjijf603msy).
139
201
140
202
#### Identity
141
203
204
+
Follow the STIX specifications for creating an identity STIX object. Use [this example](#sample-relationship-with-threat-actor-and-identity) as an extra reference.
205
+
142
206
For more information, see [STIX identity](https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_wh296fiwpklp).
143
207
144
208
#### Threat actor
145
209
210
+
Follow the STIX specifications for creating a threat actor STIX object. Use [this example](#sample-relationship-with-threat-actor-and-identity) as an extra reference.
211
+
146
212
For more information, see [STIX threat actor](https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_k017w16zutw).
147
213
148
214
#### Relationship
149
215
216
+
Follow the STIX specifications for creating a relationship STIX object. Use [this example](#sample-relationship-with-threat-actor-and-identity) as an extra reference.
217
+
150
218
For more information, see [STIX relationship](https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_e2e1szrqfoan).
151
219
152
220
### Process the response message
@@ -166,7 +234,7 @@ The response body is an array of error messages in JSON format:
166
234
167
235
|Field name | Data Type | Description |
168
236
|----|----|----|
169
-
|errors| Array of error objects | List of validation errors |
237
+
|errors| Array of error objects | List of validation errors |
170
238
171
239
**Error object**
172
240
@@ -291,6 +359,9 @@ The objects are sent as an array, so the `recordIndex` begins at `0`.
291
359
292
360
In this example, the indicator is marked with the green TLP by using `marking-definition--089a6ecb-cc15-43cc-9494-767639779123` in the `object_marking_refs` common property. More extension attributes of `toxicity` and `rank` are also included. Although these properties aren't in the Microsoft Sentinel schema for indicators, ingesting an object with these properties doesn't trigger an error. The properties simply aren't referenced or indexed in the workspace.
293
361
362
+
> [!NOTE]
363
+
> This indicator has the `revoked` property set to `$true` and its `valid_until` date is in the past. This indicator as-is doesn't work in analytics rules and isn't returned in queries unless an appropriate time range is specified.
364
+
294
365
```json
295
366
{
296
367
"sourcesystem": "TestStixObjects",
@@ -364,6 +435,8 @@ In this example, the indicator is marked with the green TLP by using `marking-de
364
435
365
436
#### Sample attack pattern
366
437
438
+
This attack pattern and any other non-indicator STIX objects are only viewable in the management interface unless you opt in to the new STIX tables. For more information about the tables required to view objects like this in KQL, see [View your threat intelligence](understand-threat-intelligence.md#view-your-threat-intelligence).
439
+
367
440
```json
368
441
{
369
442
"sourcesystem": "TestStixObjects",
@@ -601,4 +674,4 @@ To learn more about how to work with threat intelligence in Microsoft Sentinel,
0 commit comments