Skip to content

Commit 2509cd8

Browse files
sentinel_one: Add support for application data stream.
Added support for ingesting data through the SentinelOne application data stream. This includes necessary configuration changes and input adjustments to enable collection and parsing of application-related events. Tested on the live samples collected through the SentinelOne API.
1 parent a929fc2 commit 2509cd8

File tree

26 files changed

+2434
-7
lines changed

26 files changed

+2434
-7
lines changed

packages/sentinel_one/_dev/build/docs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ This is the `alert` dataset.
6565

6666
{{fields "alert"}}
6767

68+
### application
69+
70+
This is the `application` dataset.
71+
72+
{{event "application"}}
73+
74+
{{fields "application"}}
75+
6876
### group
6977

7078
This is the `group` dataset.

packages/sentinel_one/_dev/deploy/docker/files/config.yml

Lines changed: 323 additions & 0 deletions
Large diffs are not rendered by default.

packages/sentinel_one/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.37.0"
3+
changes:
4+
- description: Add support for application data stream.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/14834
27
- version: "1.36.0"
38
changes:
49
- description: Add configuration option to filter results by Site IDs.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fields:
2+
tags:
3+
- preserve_duplicate_custom_fields
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"accountName":"Elastic","applicationInstallationDate":"2023-04-28T07:15:57Z","applicationInstallationPath":null,"applicationName":"7-Zip","coreCount":4,"cpe":"cpe:2.3:a:7-zip:7-zip:22.1:*:*:*:*:*:*:*","cpuCount":2,"detectionDate":"2025-06-02T04:46:51.710561Z","endpointId":"2162143406517023959","endpointName":"DESKTOP-R1E2DQ2","endpointType":"desktop","endpointUuid":"187d5f3c7af341079041baeb9f88a511","fileSize":5601,"groupName":"Default Group","id":"2228104980080385459","osArch":"64 bit","osName":"Windows 10 Pro","osType":"windows","osVersion":"Windows 10 Pro 19044","siteName":"Default site","version":"22.01"}
2+
{"accountName":"Elastic","applicationInstallationDate":"2023-04-19T18:30:00Z","applicationInstallationPath":null,"applicationName":"Brave","coreCount":4,"cpe":"cpe:2.3:a:brave:brave:112.1.50.121:*:*:*:*:*:*:*","cpuCount":2,"detectionDate":"2025-06-02T04:46:51.710582Z","endpointId":"2162143406517023959","endpointName":"DESKTOP-R1E2DQ2","endpointType":"desktop","endpointUuid":"187d5f3c7af341079041baeb9f88a511","fileSize":null,"groupName":"Default Group","id":"2228104980315266498","osArch":"64 bit","osName":"Windows 10 Pro","osType":"windows","osVersion":"Windows 10 Pro 19044","siteName":"Default site","version":"112.1.50.121"}
3+
{"accountName":"Elastic","applicationInstallationDate":"2025-03-13T10:45:01Z","applicationInstallationPath":null,"applicationName":"Elastic Agent","coreCount":2,"cpe":"cpe:2.3:a:elastic:elastic_agent:8.17.3:*:*:*:*:*:*:*","cpuCount":1,"detectionDate":"2025-05-19T18:00:51.166610Z","endpointId":"2169705024028266268","endpointName":"srv-win-defend-03","endpointType":"server","endpointUuid":"eb655be8be894dae97711ebb9a9091ae","fileSize":517364,"groupName":"Default Group","id":"2218357748550497214","osArch":"64 bit","osName":"Windows Server 2022 Datacenter","osType":"windows","osVersion":"Windows Server 2022 Datacenter 20348","siteName":"Default site","version":"8.17.3"}
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
{
2+
"expected": [
3+
{
4+
"ecs": {
5+
"version": "8.17.0"
6+
},
7+
"event": {
8+
"category": [
9+
"package"
10+
],
11+
"kind": "event",
12+
"original": "{\"accountName\":\"Elastic\",\"applicationInstallationDate\":\"2023-04-28T07:15:57Z\",\"applicationInstallationPath\":null,\"applicationName\":\"7-Zip\",\"coreCount\":4,\"cpe\":\"cpe:2.3:a:7-zip:7-zip:22.1:*:*:*:*:*:*:*\",\"cpuCount\":2,\"detectionDate\":\"2025-06-02T04:46:51.710561Z\",\"endpointId\":\"2162143406517023959\",\"endpointName\":\"DESKTOP-R1E2DQ2\",\"endpointType\":\"desktop\",\"endpointUuid\":\"187d5f3c7af341079041baeb9f88a511\",\"fileSize\":5601,\"groupName\":\"Default Group\",\"id\":\"2228104980080385459\",\"osArch\":\"64 bit\",\"osName\":\"Windows 10 Pro\",\"osType\":\"windows\",\"osVersion\":\"Windows 10 Pro 19044\",\"siteName\":\"Default site\",\"version\":\"22.01\"}",
13+
"type": [
14+
"info"
15+
]
16+
},
17+
"host": {
18+
"name": "DESKTOP-R1E2DQ2",
19+
"os": {
20+
"full": "Windows 10 Pro 19044",
21+
"name": "Windows 10 Pro",
22+
"type": "windows"
23+
},
24+
"type": "desktop"
25+
},
26+
"package": {
27+
"installed": "2023-04-28T07:15:57.000Z",
28+
"name": "7-Zip",
29+
"size": 5601,
30+
"version": "22.01"
31+
},
32+
"related": {
33+
"hosts": [
34+
"DESKTOP-R1E2DQ2"
35+
]
36+
},
37+
"sentinel_one": {
38+
"application": {
39+
"account_name": "Elastic",
40+
"application_installation_date": "2023-04-28T07:15:57.000Z",
41+
"application_name": "7-Zip",
42+
"core_count": 4,
43+
"cpe": "cpe:2.3:a:7-zip:7-zip:22.1:*:*:*:*:*:*:*",
44+
"cpu_count": 2,
45+
"detection_date": "2025-06-02T04:46:51.710Z",
46+
"endpoint_id": "2162143406517023959",
47+
"endpoint_name": "DESKTOP-R1E2DQ2",
48+
"endpoint_type": "desktop",
49+
"endpoint_uuid": "187d5f3c7af341079041baeb9f88a511",
50+
"file_size": 5601,
51+
"group_name": "Default Group",
52+
"id": "2228104980080385459",
53+
"os_arch": "64 bit",
54+
"os_name": "Windows 10 Pro",
55+
"os_type": "windows",
56+
"os_version": "Windows 10 Pro 19044",
57+
"site_name": "Default site",
58+
"version": "22.01"
59+
}
60+
},
61+
"tags": [
62+
"preserve_duplicate_custom_fields"
63+
]
64+
},
65+
{
66+
"ecs": {
67+
"version": "8.17.0"
68+
},
69+
"event": {
70+
"category": [
71+
"package"
72+
],
73+
"kind": "event",
74+
"original": "{\"accountName\":\"Elastic\",\"applicationInstallationDate\":\"2023-04-19T18:30:00Z\",\"applicationInstallationPath\":null,\"applicationName\":\"Brave\",\"coreCount\":4,\"cpe\":\"cpe:2.3:a:brave:brave:112.1.50.121:*:*:*:*:*:*:*\",\"cpuCount\":2,\"detectionDate\":\"2025-06-02T04:46:51.710582Z\",\"endpointId\":\"2162143406517023959\",\"endpointName\":\"DESKTOP-R1E2DQ2\",\"endpointType\":\"desktop\",\"endpointUuid\":\"187d5f3c7af341079041baeb9f88a511\",\"fileSize\":null,\"groupName\":\"Default Group\",\"id\":\"2228104980315266498\",\"osArch\":\"64 bit\",\"osName\":\"Windows 10 Pro\",\"osType\":\"windows\",\"osVersion\":\"Windows 10 Pro 19044\",\"siteName\":\"Default site\",\"version\":\"112.1.50.121\"}",
75+
"type": [
76+
"info"
77+
]
78+
},
79+
"host": {
80+
"name": "DESKTOP-R1E2DQ2",
81+
"os": {
82+
"full": "Windows 10 Pro 19044",
83+
"name": "Windows 10 Pro",
84+
"type": "windows"
85+
},
86+
"type": "desktop"
87+
},
88+
"package": {
89+
"installed": "2023-04-19T18:30:00.000Z",
90+
"name": "Brave",
91+
"version": "112.1.50.121"
92+
},
93+
"related": {
94+
"hosts": [
95+
"DESKTOP-R1E2DQ2"
96+
]
97+
},
98+
"sentinel_one": {
99+
"application": {
100+
"account_name": "Elastic",
101+
"application_installation_date": "2023-04-19T18:30:00.000Z",
102+
"application_name": "Brave",
103+
"core_count": 4,
104+
"cpe": "cpe:2.3:a:brave:brave:112.1.50.121:*:*:*:*:*:*:*",
105+
"cpu_count": 2,
106+
"detection_date": "2025-06-02T04:46:51.710Z",
107+
"endpoint_id": "2162143406517023959",
108+
"endpoint_name": "DESKTOP-R1E2DQ2",
109+
"endpoint_type": "desktop",
110+
"endpoint_uuid": "187d5f3c7af341079041baeb9f88a511",
111+
"group_name": "Default Group",
112+
"id": "2228104980315266498",
113+
"os_arch": "64 bit",
114+
"os_name": "Windows 10 Pro",
115+
"os_type": "windows",
116+
"os_version": "Windows 10 Pro 19044",
117+
"site_name": "Default site",
118+
"version": "112.1.50.121"
119+
}
120+
},
121+
"tags": [
122+
"preserve_duplicate_custom_fields"
123+
]
124+
},
125+
{
126+
"ecs": {
127+
"version": "8.17.0"
128+
},
129+
"event": {
130+
"category": [
131+
"package"
132+
],
133+
"kind": "event",
134+
"original": "{\"accountName\":\"Elastic\",\"applicationInstallationDate\":\"2025-03-13T10:45:01Z\",\"applicationInstallationPath\":null,\"applicationName\":\"Elastic Agent\",\"coreCount\":2,\"cpe\":\"cpe:2.3:a:elastic:elastic_agent:8.17.3:*:*:*:*:*:*:*\",\"cpuCount\":1,\"detectionDate\":\"2025-05-19T18:00:51.166610Z\",\"endpointId\":\"2169705024028266268\",\"endpointName\":\"srv-win-defend-03\",\"endpointType\":\"server\",\"endpointUuid\":\"eb655be8be894dae97711ebb9a9091ae\",\"fileSize\":517364,\"groupName\":\"Default Group\",\"id\":\"2218357748550497214\",\"osArch\":\"64 bit\",\"osName\":\"Windows Server 2022 Datacenter\",\"osType\":\"windows\",\"osVersion\":\"Windows Server 2022 Datacenter 20348\",\"siteName\":\"Default site\",\"version\":\"8.17.3\"}",
135+
"type": [
136+
"info"
137+
]
138+
},
139+
"host": {
140+
"name": "srv-win-defend-03",
141+
"os": {
142+
"full": "Windows Server 2022 Datacenter 20348",
143+
"name": "Windows Server 2022 Datacenter",
144+
"type": "windows"
145+
},
146+
"type": "server"
147+
},
148+
"package": {
149+
"installed": "2025-03-13T10:45:01.000Z",
150+
"name": "Elastic Agent",
151+
"size": 517364,
152+
"version": "8.17.3"
153+
},
154+
"related": {
155+
"hosts": [
156+
"srv-win-defend-03"
157+
]
158+
},
159+
"sentinel_one": {
160+
"application": {
161+
"account_name": "Elastic",
162+
"application_installation_date": "2025-03-13T10:45:01.000Z",
163+
"application_name": "Elastic Agent",
164+
"core_count": 2,
165+
"cpe": "cpe:2.3:a:elastic:elastic_agent:8.17.3:*:*:*:*:*:*:*",
166+
"cpu_count": 1,
167+
"detection_date": "2025-05-19T18:00:51.166Z",
168+
"endpoint_id": "2169705024028266268",
169+
"endpoint_name": "srv-win-defend-03",
170+
"endpoint_type": "server",
171+
"endpoint_uuid": "eb655be8be894dae97711ebb9a9091ae",
172+
"file_size": 517364,
173+
"group_name": "Default Group",
174+
"id": "2218357748550497214",
175+
"os_arch": "64 bit",
176+
"os_name": "Windows Server 2022 Datacenter",
177+
"os_type": "windows",
178+
"os_version": "Windows Server 2022 Datacenter 20348",
179+
"site_name": "Default site",
180+
"version": "8.17.3"
181+
}
182+
},
183+
"tags": [
184+
"preserve_duplicate_custom_fields"
185+
]
186+
}
187+
]
188+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
input: cel
2+
service: sentinel_one
3+
vars:
4+
url: http://{{Hostname}}:{{Port}}
5+
api_token: xxxx
6+
data_stream:
7+
vars:
8+
batch_size: 2
9+
preserve_original_event: true
10+
preserve_duplicate_custom_fields: true
11+
assert:
12+
hit_count: 4
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
config_version: 2
2+
interval: {{interval}}
3+
resource.tracer:
4+
enabled: {{enable_request_tracer}}
5+
filename: "../../logs/cel/http-request-trace-*.ndjson"
6+
maxbackups: 5
7+
{{#if proxy_url}}
8+
resource.proxy_url: {{proxy_url}}
9+
{{/if}}
10+
{{#if ssl}}
11+
resource.ssl: {{ssl}}
12+
{{/if}}
13+
{{#if http_client_timeout}}
14+
resource.timeout: {{http_client_timeout}}
15+
{{/if}}
16+
resource.url: {{url}}
17+
state:
18+
api_token: {{api_token}}
19+
batch_size: {{batch_size}}
20+
redact:
21+
fields:
22+
- api_token
23+
program: |
24+
(
25+
has(state.?worklist.data) && size(state.worklist.data) > 0 ?
26+
state
27+
:
28+
state.with(
29+
request("GET",
30+
state.url.trim_right("/") + "/web/api/v2.1/application-management/inventory?" + {
31+
"skipCount": ["true"],
32+
"limit": [string(state.batch_size)],
33+
?"cursor": state.?next_page.token.optMap(v, [v]),
34+
}.format_query()
35+
).with({
36+
"Header":{
37+
"Authorization": ["ApiToken " + state.api_token],
38+
},
39+
}).do_request().as(resp, resp.StatusCode == 200 ?
40+
resp.Body.decode_json().as(body,
41+
{
42+
"worklist": body,
43+
"next_page": {
44+
?"token": body.?pagination.nextCursor.orValue(null) != null ? optional.of(body.pagination.nextCursor) : optional.none(),
45+
},
46+
"fetch_more": body.?pagination.nextCursor.orValue(null) != null,
47+
}
48+
)
49+
:
50+
{
51+
"events": {
52+
"error": {
53+
"code": string(resp.StatusCode),
54+
"id": string(resp.Status),
55+
"message": "GET " + state.url.trim_right("/") + "/web/api/v2.1/application-management/inventory" +
56+
(
57+
size(resp.Body) != 0 ?
58+
string(resp.Body)
59+
:
60+
string(resp.Status) + " (" + string(resp.StatusCode) + ")"
61+
),
62+
},
63+
},
64+
"want_more": false,
65+
"offset": 0,
66+
}
67+
)
68+
)
69+
).as(state,
70+
state.with(
71+
!has(state.worklist) ? // Exit early due to GET failure.
72+
state
73+
: (has(state.worklist.data) && size(state.worklist.data) > 0) ?
74+
request("GET",
75+
state.url.trim_right("/") + "/web/api/v2.1/application-management/inventory/endpoints?" + {
76+
"skipCount": ["true"],
77+
"applicationName": [string(state.worklist.data[0].applicationName)],
78+
"applicationVendor": [string(state.worklist.data[0].applicationVendor)],
79+
"limit": [string(state.batch_size)],
80+
?"cursor": state.?next_chain.token.optMap(v, [v]),
81+
}.format_query()
82+
).with({
83+
"Header":{
84+
"Authorization": ["ApiToken " + state.api_token],
85+
}
86+
}).do_request().as(resp, resp.StatusCode == 200 ?
87+
resp.Body.decode_json().as(body, {
88+
"events": (
89+
has(body.data) && body.data.size() > 0 ?
90+
body.data.map(e,{
91+
"message": e.encode_json(),
92+
})
93+
:
94+
[{"message": "retry"}]
95+
),
96+
"next_chain": {
97+
?"token": body.?pagination.nextCursor.orValue(null) != null ? optional.of(body.pagination.nextCursor) : optional.none(),
98+
},
99+
"worklist": {
100+
"data": body.?pagination.nextCursor.orValue(null) != null ? state.worklist.data : tail(state.worklist.data),
101+
},
102+
"want_more": state.?fetch_more.orValue(false) ? state.fetch_more : body.?pagination.nextCursor.orValue(null) != null,
103+
})
104+
:
105+
{
106+
"events": {
107+
"error": {
108+
"code": string(resp.StatusCode),
109+
"id": string(resp.Status),
110+
"message": "GET " + state.url.trim_right("/") + "/web/api/v2.1/application-management/inventory/endpoints" +
111+
(
112+
size(resp.Body) != 0 ?
113+
string(resp.Body)
114+
:
115+
string(resp.Status) + " (" + string(resp.StatusCode) + ")"
116+
),
117+
},
118+
},
119+
"want_more": false,
120+
}
121+
)
122+
:
123+
{
124+
"events": [],
125+
"want_more": false,
126+
}
127+
)
128+
)
129+
tags:
130+
{{#if preserve_original_event}}
131+
- preserve_original_event
132+
{{/if}}
133+
{{#if preserve_duplicate_custom_fields}}
134+
- preserve_duplicate_custom_fields
135+
{{/if}}
136+
{{#each tags as |tag|}}
137+
- {{tag}}
138+
{{/each}}
139+
{{#contains "forwarded" tags}}
140+
publisher_pipeline.disable_host: true
141+
{{/contains}}
142+
{{#if processors}}
143+
processors:
144+
{{processors}}
145+
{{/if}}

0 commit comments

Comments
 (0)