Skip to content

Commit 94191f0

Browse files
Fix Microsoft Entra ID content pack to support array of ip (#41973)
* update xif * update xif * update rn
1 parent 10620be commit 94191f0

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

Packs/MicrosoftEntraID/ModelingRules/MicrosoftEntraID/MicrosoftEntraID.xif

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,17 @@ alter
321321
check_initiatedBy_ipAddress_v4 = if(get_initiatedBy_ipAddress ~= "(?:\d{1,3}\.){3}\d{1,3}", get_initiatedBy_ipAddress),
322322
check_initiatedBy_ipAddress_v6 = if(get_initiatedBy_ipAddress ~= "(?:[a-fA-F\d]{0,4}\:){1,7}[a-fA-F\d]{0,4}", get_initiatedBy_ipAddress)
323323
| alter
324-
xdm.source.host.ipv4_addresses = arraycreate(check_parsed_fields_ipaddr_v4, check_initiatedBy_ipAddress_v4),
324+
source_ipv4 = arraydistinct(arrayconcat(arrayfilter(split(check_initiatedBy_ipAddress_v4, ", "), is_ipv4("@element")), arrayfilter(arraycreate(check_parsed_fields_ipaddr_v4), is_ipv4("@element"))))
325+
| alter
326+
xdm.source.host.ipv4_addresses = source_ipv4,
325327
xdm.source.host.ipv6_addresses = arraycreate(check_parsed_fields_ipaddr_v6, check_initiatedBy_ipAddress_v6),
326-
xdm.source.host.ipv4_public_addresses = arrayfilter(arraycreate(check_parsed_fields_ipaddr_v4, check_initiatedBy_ipAddress_v4),
327-
not incidr("@element", "10.0.0.0/8")
328-
and not incidr("@element", "172.16.0.0/12")
329-
and not incidr("@element", "192.168.0.0/16")
330-
and not incidr("@element", "127.0.0.0/8")
331-
and not incidr("@element", "169.254.0.0/16")
332-
and not incidr("@element", "100.64.0.0/10")),
328+
xdm.source.host.ipv4_public_addresses = arrayfilter(source_ipv4,
329+
not incidr("@element", "10.0.0.0/8")
330+
and not incidr("@element", "172.16.0.0/12")
331+
and not incidr("@element", "192.168.0.0/16")
332+
and not incidr("@element", "127.0.0.0/8")
333+
and not incidr("@element", "169.254.0.0/16")
334+
and not incidr("@element", "100.64.0.0/10")),
333335
xdm.event.id = id,
334336
xdm.event.outcome = if(result = "success", XDM_CONST.OUTCOME_SUCCESS, result = "failure", XDM_CONST.OUTCOME_FAILED, result = "unknownFutureValue", XDM_CONST.OUTCOME_UNKNOWN, result = "timeout", XDM_CONST.OUTCOME_PARTIAL),
335337
xdm.event.original_event_type = category,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#### Modeling Rules
3+
4+
##### Microsoft Entra ID Modeling Rule
5+
6+
- Updated the Microsoft Entra ID Modeling Rule to enhance IP address validation and improve xdm.source.host.ipv4_addresses, xdm.source.host.ipv4_public_addresses fields mapping.

Packs/MicrosoftEntraID/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Azure Logs",
33
"description": "Normalizes various Azure logs to the Cortex Data Model (XDM) schema, including Azure Entra ID events ingested via the Office 365 data source and Azure logs ingested via the Azure Event Hub data source.",
44
"support": "xsoar",
5-
"currentVersion": "1.0.21",
5+
"currentVersion": "1.0.22",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)