Skip to content

Commit 80f3d94

Browse files
Palo Alto XDR ASimAlert Parser (#14401)
* Palo Alto XDR ASimAlert Parser * pr details to change logs * copilot comments * arm file generation * custom table validation * missing itemid field in table validation * kql validations - common type * commit * sample logs file name change * ASimSchemaTester - resolve errors * arm updates --------- Co-authored-by: v-atulyadav <v-atulyadav@microsoft.com>
1 parent f1aec18 commit 80f3d94

17 files changed

Lines changed: 1253 additions & 8 deletions

.script/tests/KqlvalidationsTests/CustomTables/PaloAltoCortexXDR_Alerts_CL.json

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

Parsers/ASimAlertEvent/ARM/ASimAlertEvent/ASimAlertEvent.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"displayName": "Alert Event ASIM parser",
2828
"category": "ASIM",
2929
"FunctionAlias": "ASimAlertEvent",
30-
"query": "let DisabledParsers=materialize(_GetWatchlist('ASimDisabledParsers') | where SearchKey in ('Any', 'ExcludeASimAlertEvent') | extend SourceSpecificParser=column_ifexists('SourceSpecificParser','') | distinct SourceSpecificParser| where isnotempty(SourceSpecificParser));\nlet ASimBuiltInDisabled=toscalar('ExcludeASimAlertEvent' in (DisabledParsers) or 'Any' in (DisabledParsers)); \nlet parser=(pack:bool=false){\nunion isfuzzy=true\n vimAlertEventEmpty,\n ASimAlertEventBitdefenderGravityZone (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventBitdefenderGravityZone' in (DisabledParsers))), pack=pack),\n ASimAlertEventMicrosoftDefenderXDR (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventMicrosoftDefenderXDR' in (DisabledParsers)))),\n ASimAlertEventSentinelOneSingularity (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventSentinelOneSingularity' in (DisabledParsers)))),\n ASimAlertEventCiscoSecureEndpoint (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventCiscoSecureEndpoint' in (DisabledParsers))), pack=pack)\n}; \nparser (pack=pack)\n",
30+
"query": "let DisabledParsers=materialize(_GetWatchlist('ASimDisabledParsers') | where SearchKey in ('Any', 'ExcludeASimAlertEvent') | extend SourceSpecificParser=column_ifexists('SourceSpecificParser','') | distinct SourceSpecificParser| where isnotempty(SourceSpecificParser));\nlet ASimBuiltInDisabled=toscalar('ExcludeASimAlertEvent' in (DisabledParsers) or 'Any' in (DisabledParsers)); \nlet parser=(pack:bool=false){\nunion isfuzzy=true\n vimAlertEventEmpty,\n ASimAlertEventBitdefenderGravityZone (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventBitdefenderGravityZone' in (DisabledParsers))), pack=pack),\n ASimAlertEventMicrosoftDefenderXDR (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventMicrosoftDefenderXDR' in (DisabledParsers)))),\n ASimAlertEventSentinelOneSingularity (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventSentinelOneSingularity' in (DisabledParsers)))),\n ASimAlertEventCiscoSecureEndpoint (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventCiscoSecureEndpoint' in (DisabledParsers))), pack=pack),\n ASimAlertEventPaloAltoXDR (disabled=(ASimBuiltInDisabled or ('ExcludeASimAlertEventPaloAltoXDR' in (DisabledParsers))), pack=pack)\n}; \nparser (pack=pack)\n",
3131
"version": 1,
3232
"functionParameters": "pack:bool=False"
3333
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"Workspace": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "The Microsoft Sentinel workspace into which the function will be deployed. Has to be in the selected Resource Group."
9+
}
10+
},
11+
"WorkspaceRegion": {
12+
"type": "string",
13+
"defaultValue": "[resourceGroup().location]",
14+
"metadata": {
15+
"description": "The region of the selected workspace. The default value will use the Region selection above."
16+
}
17+
}
18+
},
19+
"resources": [
20+
{
21+
"type": "Microsoft.OperationalInsights/workspaces/savedSearches",
22+
"apiVersion": "2020-08-01",
23+
"name": "[concat(parameters('Workspace'), '/ASimAlertEventPaloAltoXDR')]",
24+
"location": "[parameters('WorkspaceRegion')]",
25+
"properties": {
26+
"etag": "*",
27+
"displayName": "Alert Event ASIM parser for Palo Alto XDR",
28+
"category": "ASIM",
29+
"FunctionAlias": "ASimAlertEventPaloAltoXDR",
30+
"query": "let PaloXDRParser = (\n disabled: bool=false,\n pack: bool=false\n)\n{\n PaloAltoCortexXDR_Alerts_CL\n | where not(disabled)\n | where Source startswith 'XDR Analytics' //filter out custom IOCs\n | where AgentOSType != 'NO_HOST' //filter out firewall detections\n | project-rename\n EventUid = _ItemId,\n EventOriginalUid = ExternalId,\n EventProductVersion = AgentVersion,\n AlertName = Name,\n AlertDescription = Description,\n ThreatId = MatchingServiceRuleId,\n ThreatFirstReportedTime = DetectionTimestamp,\n ThreatLastReportedTime = LocalInsert,\n Username = UserName,\n DvcIpAddr = HostIp,\n DvcHostname = HostName,\n EventOriginalSeverity = Severity,\n DvcId = EndpointId,\n DvcOs = AgentOSType,\n DvcAction = ActionPretty,\n DvcOriginalAction = Action\n | mv-apply i = split(DvcIpAddr, ',') to typeof(string) on (\n extend InternalIP = (ipv4_is_private(i))\n | extend\n DvcIpAddr = iff(InternalIP == true, i, ''),\n ExternalIpAddr = iff(InternalIP == false, i, '')\n | summarize DvcIpAddr = take_anyif(DvcIpAddr, isnotempty(DvcIpAddr)), ExternalIpAddr = take_anyif(ExternalIpAddr, isnotempty(ExternalIpAddr)), AllImpactedIpAddr = make_set_if(DvcIpAddr, isnotempty(DvcIpAddr)) by EventOriginalUid\n )\n | extend\n AlertId = EventOriginalUid,\n DetectionMethod = 'EDR',\n ThreatCategory = case(\n EventType == 'Process Execution' and AlertName has 'user', 'Security Policy Violation',\n EventType == 'Network Connections' and AlertName has 'Domain', 'MaliciousUrl',\n 'Unknown'\n ),\n ThreatIsActive = (DvcAction !startswith 'Prevented'),\n AttackTactics = replace_regex(tostring(MitreTacticIdAndName), @'(TA\\d{4})\\s+-\\s+([\\w\\s]+)', @'\\2 (\\1)'),\n AttackTechniques = replace_regex(tostring(MitreTechniqueIdAndName), @'(T[\\d\\.]+)\\s+-\\s+([\\w\\s-:]+)', @'\\2 (\\1)'),\n User = tostring(split(Username, @'\\')[1]),\n UserType = case(\n Username has 'SYSTEM', 'System',\n Username has_any ('LOCAL SERVICE', 'NETWORK SERVICE'), 'Service',\n isempty(Username), '',\n 'Regular'\n ),\n UsernameType = case(\n Username has @'\\', 'Windows',\n Username has '@', 'UPN',\n 'Simple'\n ),\n Url = coalesce(tostring(MaliciousUrls), DstActionExternalHostname),\n DvcIdType = iff(isnotempty(DvcId), 'Other', '')\n | project-away\n MitreTacticIdAndName,\n MitreTechniqueIdAndName\n | project-rename\n ThreatOriginalCategory = EventType\n | extend\n ProcessId = tostring(coalesce(OsActorProcessOsPid, ActorProcessOsPid)),\n ProcessCommandLine = coalesce(ActionProcessImageCommandLine, ActorProcessCommandLine, CausalityActorProcessCommandLine),\n ProcessName = coalesce(ActionProcessImageName, ActorProcessImageName, CausalityActorProcessImageName),\n ProcessFileCompany = coalesce(ActionProcessSignatureVendor, ActorProcessSignatureVendor),\n FileName = coalesce(OsActorProcessImageName, ActionProcessImageName, ActorProcessImageName, CausalityActorProcessImageName),\n FilePath = coalesce(OsActorProcessImagePath, ActorProcessImagePath, CausalityActorProcessImagePath),\n FileSHA256 = coalesce(OsActorProcessImageSha256, ActorProcessImageSha256, CausalityActorProcessImageSha256),\n FileMD5 = coalesce(ActorProcessImageMd5, CausalityActorProcessImageMd5)\n | extend //Common Fields\n EventCount = toint(1),\n EventStartTime = ThreatFirstReportedTime,\n EventEndTime = ThreatLastReportedTime,\n EventType = 'Alert',\n EventSubType = 'Threat',\n EventMessage = AlertDescription,\n IpAddr = DvcIpAddr,\n Hostname = DvcHostname,\n Dvc = DvcHostname,\n EventSchema = 'AlertEvent',\n EventSchemaVersion = '0.1',\n EventSeverity = case(\n EventOriginalSeverity == 'high', 'High',\n EventOriginalSeverity == 'medium', 'Medium',\n EventOriginalSeverity == 'low', 'Low',\n 'Informational'\n ),\n EventProduct = 'Cortex XDR',\n EventVendor = 'Palo Alto'\n | extend AdditionalFields = iff (\n pack,\n bag_pack(\n 'MatchingStatus', MatchingStatus,\n 'AttemptCounter', AttemptCounter,\n 'Whitelisted', Whitelisted,\n 'Starred', Starred,\n 'Category', Category,\n 'CausalityActorCausalityId', CausalityActorCausalityId,\n 'ActorProcessSignatureStatus', ActorProcessSignatureStatus,\n 'CausalityActorProcessCommandLine', CausalityActorProcessCommandLine,\n 'CausalityActorProcessImageName', CausalityActorProcessImageName,\n 'CausalityActorProcessImagePath', CausalityActorProcessImagePath,\n 'CausalityActorProcessSignatureStatus', CausalityActorProcessSignatureStatus,\n 'ActionCountry', ActionCountry,\n 'ActorProcessImageName', ActorProcessImageName,\n 'ActorProcessCommandLine', ActorProcessCommandLine,\n 'ActionLocalIp', ActionLocalIp,\n 'ActionRemoteIp', ActionRemoteIp,\n 'ActionLocalPort', ActionLocalPort,\n 'ActionRemotePort', ActionRemotePort,\n 'OsActorProcessCommandLine', OsActorProcessCommandLine,\n 'OsActorProcessImageName', OsActorProcessImageName,\n 'OsActorProcessImagePath', OsActorProcessImagePath,\n 'ProcessInstanceId', tostring(coalesce(ActorProcessInstanceId, ActorProcessCausalityId, ActorCausalityId, OsActorProcessCausalityId)),\n 'IdentityType', tostring(coalesce(IdentityType, \"\")),\n 'FwEmailRecipient', tostring(coalesce(FwEmailRecipient, \"\")),\n 'FwEmailSender', tostring(coalesce(FwEmailSender, \"\")),\n 'FwEmailSubject', tostring(coalesce(FwEmailSubject, \"\")),\n 'DnsQueryName', tostring(coalesce(DnsQueryName, \"\")),\n 'ExternalIpAddr', tostring(coalesce(columnifexists(\"ExternalIpAddr\", \"\"), \"\")),\n 'AllImpactedIpAddr', tostring(coalesce(columnifexists(\"AllImpactedIpAddr\", \"\"), \"\"))\n ),\n dynamic([])\n )\n | project\n TimeGenerated,\n Type,\n EventUid,\n EventOriginalUid,\n EventProductVersion,\n AlertName,\n AlertDescription,\n ThreatId,\n ThreatFirstReportedTime,\n ThreatLastReportedTime,\n Username,\n UsernameType,\n DvcIpAddr,\n DvcHostname,\n EventOriginalSeverity,\n DvcId,\n DvcIdType,\n DvcOs,\n DvcAction,\n DvcOriginalAction,\n Url,\n AlertId,\n DetectionMethod,\n ThreatCategory,\n ThreatIsActive,\n AttackTactics,\n AttackTechniques,\n User,\n ThreatOriginalCategory,\n UserType,\n ProcessId,\n ProcessCommandLine,\n ProcessName,\n ProcessFileCompany,\n FileName,\n FilePath,\n FileSHA256,\n FileMD5,\n EventCount,\n EventStartTime,\n EventEndTime,\n EventType,\n EventSubType,\n EventMessage,\n IpAddr,\n Hostname,\n Dvc,\n EventSchema,\n EventSchemaVersion,\n EventSeverity,\n EventProduct,\n EventVendor,\n AdditionalFields\n};\nPaloXDRParser(\n disabled = disabled,\n pack = pack\n)",
31+
"version": 1,
32+
"functionParameters": "disabled:bool=False,pack:bool=False"
33+
}
34+
}
35+
]
36+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Palo Alto XDR ASIM AlertEvent Normalization Parser
2+
3+
ARM template for ASIM AlertEvent schema parser for Palo Alto XDR.
4+
5+
This ASIM parser supports normalizing the Palo Alto XDR logs (via Codeless Connector Framework) to the ASIM Alert normalized schema.
6+
7+
8+
The Advanced Security Information Model (ASIM) enables you to use and create source-agnostic content, simplifying your analysis of the data in your Microsoft Sentinel workspace.
9+
10+
For more information, see:
11+
12+
- [Normalization and the Advanced Security Information Model (ASIM)](https://aka.ms/AboutASIM)
13+
- [Deploy all of ASIM](https://aka.ms/DeployASIM)
14+
- [ASIM AlertEvent normalization schema reference](https://aka.ms/ASimAlertEventDoc)
15+
16+
For the changelog, see:
17+
- [CHANGELOG](https://github.com/Azure/Azure-Sentinel/blob/master/Parsers/ASimAlertEvent/CHANGELOG/ASimAlertEventPaloAltoXDR.md)
18+
19+
<br>
20+
21+
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FParsers%2FASimAlertEvent%2FARM%2FASimAlertEventPaloAltoXDR%2FASimAlertEventPaloAltoXDR.json) [![Deploy to Azure Gov](https://aka.ms/deploytoazuregovbutton)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FParsers%2FASimAlertEvent%2FARM%2FASimAlertEventPaloAltoXDR%2FASimAlertEventPaloAltoXDR.json)

Parsers/ASimAlertEvent/ARM/FullDeploymentAlertEvent.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,26 @@
9898
}
9999
}
100100
},
101+
{
102+
"type": "Microsoft.Resources/deployments",
103+
"apiVersion": "2020-10-01",
104+
"name": "linkedASimAlertEventPaloAltoXDR",
105+
"properties": {
106+
"mode": "Incremental",
107+
"templateLink": {
108+
"uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Parsers/ASimAlertEvent/ARM/ASimAlertEventPaloAltoXDR/ASimAlertEventPaloAltoXDR.json",
109+
"contentVersion": "1.0.0.0"
110+
},
111+
"parameters": {
112+
"Workspace": {
113+
"value": "[parameters('Workspace')]"
114+
},
115+
"WorkspaceRegion": {
116+
"value": "[parameters('WorkspaceRegion')]"
117+
}
118+
}
119+
}
120+
},
101121
{
102122
"type": "Microsoft.Resources/deployments",
103123
"apiVersion": "2020-10-01",
@@ -218,6 +238,26 @@
218238
}
219239
}
220240
},
241+
{
242+
"type": "Microsoft.Resources/deployments",
243+
"apiVersion": "2020-10-01",
244+
"name": "linkedvimAlertEventPaloAltoXDR",
245+
"properties": {
246+
"mode": "Incremental",
247+
"templateLink": {
248+
"uri": "https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Parsers/ASimAlertEvent/ARM/vimAlertEventPaloAltoXDR/vimAlertEventPaloAltoXDR.json",
249+
"contentVersion": "1.0.0.0"
250+
},
251+
"parameters": {
252+
"Workspace": {
253+
"value": "[parameters('Workspace')]"
254+
},
255+
"WorkspaceRegion": {
256+
"value": "[parameters('WorkspaceRegion')]"
257+
}
258+
}
259+
}
260+
},
221261
{
222262
"type": "Microsoft.Resources/deployments",
223263
"apiVersion": "2020-10-01",

0 commit comments

Comments
 (0)