Skip to content
This repository was archived by the owner on Dec 14, 2024. It is now read-only.

Commit 7df551e

Browse files
committed
feat(addon): Significantly improve and modernize CIM compliance
BREAKING CHANGE(addon): pan_traffic_start logs no longer included in CIM BREAKING CHANGE(addon): pan_traffic_end logs moved from Network Session to Network Traffic datamodel BREAKING CHANGE(addon): pan_threat event type now includes wildfire and data logs BREAKING CHANGE(addon): pan_file logs moved from Web to IDS datamodel BREAKING CHANGE(addon): pan_virus logs moved from Malware to IDS datamodel BREAKING CHANGE(addon): pan_wildfire logs moved from Malware to IDS datamodel BREAKING CHANGE(addon): pan_email removed from Email datamodel
2 parents 935ab5b + c58944e commit 7df551e

File tree

8 files changed

+179
-74
lines changed

8 files changed

+179
-74
lines changed

Splunk_TA_paloalto/app.manifest

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,24 @@
1717
"releaseDate": null,
1818
"description": "The Palo Alto Networks Add-on allows a Splunk Enterprise administrator to collect data from Palo Alto Networks Next-Generation Firewall devices, Panorama, Advanced Endpoint Protection, Aperture SaaS Security, AutoFocus Threat Intelligence, and MineMeld.",
1919
"classification": {
20-
"intendedAudience": null,
21-
"categories": [],
20+
"intendedAudience": "IT Professionals",
21+
"categories": [
22+
"IT Operations",
23+
"Security, Fraud & Compliance"
24+
],
2225
"developmentStatus": "Production/Stable"
2326
},
24-
"commonInformationModels": null,
27+
"commonInformationModels": {
28+
"Authentication":"4.19.0",
29+
"Alert":"4.19.0",
30+
"Change":"4.19.0",
31+
"Endpoint":"4.19.0",
32+
"Network Traffic":"4.19.0",
33+
"Malware":"4.19.0",
34+
"Intrusion Detection":"4.19.0",
35+
"Network Sessions":"4.19.0",
36+
"Web":"4.19.0"
37+
},
2538
"license": {
2639
"name": null,
2740
"text": null,

Splunk_TA_paloalto/default/eventtypes.conf

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,36 @@ search = sourcetype=pan_config OR sourcetype=pan:config
1515

1616
[pan_traffic]
1717
search = sourcetype=pan_traffic OR sourcetype=pan:traffic OR (sourcetype=pan:firewall_cloud AND LogType="TRAFFIC")
18-
#tags = network communicate
1918

2019
[pan_traffic_start]
2120
search = sourcetype=pan_traffic OR sourcetype=pan:traffic OR (sourcetype=pan:firewall_cloud AND LogType="TRAFFIC") AND log_subtype="start"
22-
#tags = network session start
2321

2422
[pan_traffic_end]
2523
search = sourcetype=pan_traffic OR sourcetype=pan:traffic OR (sourcetype=pan:firewall_cloud AND LogType="TRAFFIC") AND log_subtype="end"
26-
#tags = network session end
24+
#tags = network communicate
2725

2826
[pan_system]
2927
search = sourcetype=pan_system OR sourcetype=pan:system OR (sourcetype=pan:firewall_cloud AND LogType="SYSTEM")
30-
#tags = update status
28+
29+
[pan_system_auth]
30+
search = sourcetype=pan_system OR sourcetype=pan:system AND log_subtype="globalprotect" OR description="*Failed password*" NOT description="*client configuration released*" NOT description="*client configuration generated*"
31+
#tags = authentication default
32+
33+
[pan_system_alert]
34+
search = sourcetype=pan_system OR sourcetype=pan:system AND log_subtype="url-filtering"
35+
#tags = alert
36+
37+
[pan_system_change]
38+
search = sourcetype=pan_system OR sourcetype=pan:system description="*config cleared*" AND NOT (log_subtype IN ("routing", "ras", "vpn"))
39+
#tags = change
3140

3241
[pan_threat]
33-
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype != "url" log_subtype != "file" log_subtype != "wildfire" log_subtype != "data"
42+
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype != "url" log_subtype != "file"
3443
#tags = ids attack
3544

3645
[pan_file]
3746
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype = "file"
38-
#tags = web
47+
#tags = ids attack
3948

4049
[pan_url]
4150
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype = "url"
@@ -47,7 +56,7 @@ search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firew
4756

4857
[pan_virus]
4958
search = (sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT")) AND (log_subtype = "virus" OR log_subtype = "wildfire-virus")
50-
#tags = malware attack
59+
#tags = ids attack
5160

5261
[pan_spyware]
5362
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype = "spyware"
@@ -62,11 +71,11 @@ search = sourcetype=pan_decryption OR sourcetype=pan:decryption OR (sourcetype=p
6271

6372
[pan_wildfire_malicious]
6473
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype="wildfire" AND verdict=malicious
65-
#tags = malware attack
74+
#tags = ids attack
6675

6776
[pan_wildfire]
6877
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND log_subtype = "wildfire"
69-
#tags = malware operations
78+
#tags = ids attack
7079

7180
[pan_malware_attacks]
7281
search = sourcetype=pan:threat_traps
@@ -86,6 +95,7 @@ search = sourcetype=pan:analytics_traps OR sourcetype=pan:threat_traps OR source
8695

8796
[pan_correlation]
8897
search = sourcetype=pan_correlation OR sourcetype=pan:correlation OR (sourcetype=pan:firewall_cloud AND LogType="CORRELATION")
98+
#tags = alert
8999

90100
[pan_email]
91101
search = sourcetype=pan_threat OR sourcetype=pan:threat OR (sourcetype=pan:firewall_cloud AND LogType="THREAT") AND recipient="*" AND sender="*"
@@ -95,18 +105,22 @@ search = sourcetype=pan_aperture OR sourcetype=pan:aperture
95105

96106
[pan_aperture_incident]
97107
search = sourcetype=pan_aperture OR sourcetype=pan:aperture AND log_type="incident"
108+
#tags = alert
98109

99110
[pan_aperture_remediation]
100111
search = sourcetype=pan_aperture OR sourcetype=pan:aperture AND log_type="remediation"
112+
#tags = alert
101113

102114
[pan_aperture_policy_violation]
103115
search = sourcetype=pan_aperture OR sourcetype=pan:aperture AND log_type="policy_violation"
116+
#tags = alert
104117

105118
[pan_aperture_activity_monitoring]
106119
search = sourcetype=pan_aperture OR sourcetype=pan:aperture AND log_type="activity_monitoring"
107120

108121
[pan_aperture_admin_audit]
109122
search = sourcetype=pan_aperture OR sourcetype=pan:aperture AND log_type="admin_audit"
123+
#tags = authentication
110124

111125
[pan_iot_alert]
112126
search = (sourcetype=pan:iot_alert)

Splunk_TA_paloalto/default/props.conf

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,13 @@ rename = pan:threat
173173

174174
[pan:threat]
175175
SHOULD_LINEMERGE = false
176+
EVENT_BREAKER_ENABLE = true
177+
KV_MODE = none
176178
TIME_PREFIX = ^(?:[^,]*,){6}
177179
MAX_TIMESTAMP_LOOKAHEAD = 32
180+
TIME_FORMAT = %Y/%m/%d %H:%M:%S
178181

179-
REPORT-search = extract_threat, extract_threat_id, extract_threat_name, extract_dest_hostname, extract_http_referrer_name, extract_major_content_type, extract_filename
182+
REPORT-search = extract_threat, extract_threat_id, extract_threat_name, extract_dest_hostname, extract_http_referrer_name, extract_major_content_type, extract_filename, extract_url_domain
180183

181184
FIELDALIAS-app = app as application
182185
FIELDALIAS-virtual_system = vsys as virtual_system
@@ -191,6 +194,7 @@ FIELDALIAS-dvc_for_pan_threat = host as dvc
191194
FIELDALIAS-http_content_type_for_pan_threat = content_type as http_content_type
192195
FIELDALIAS-http_user_agent_for_pan_threat = user_agent as http_user_agent
193196
FIELDALIAS-http_referrer_for_pan_threat = referrer as http_referrer
197+
FIELDALIAS-http_referrer_domain_pan_threat = http_referrer_name as http_referrer_domain
194198
EVAL-http_user_agent_length = len(user_agent)
195199
EVAL-url_length = len(url)
196200

@@ -205,14 +209,12 @@ EVAL-sender = split(replace(sender,"^From: (.*?);?$","\1"),";")
205209
EVAL-recipient = split(replace(recipient,"^To: (.*?);?$","\1"),";")
206210
EVAL-subject = replace(subject,"^Sub: ","")
207211

208-
EVAL-user = coalesce(src_user,dest_user,recipient,sender,"unknown")
212+
EVAL-user = coalesce(src_user,dest_user,recipient,sender)
209213
# All url logs have an http_method field, this makes ES and Web Proxy app work better. Also make method uppercase for CIM.
210214
EVAL-http_method = if(log_subtype == "url", if(isnull(http_method), "unknown", upper(http_method)), null)
211215
# Misc field is used by pan_url logs for full URL accessed. Alias to url field.
212216
FIELDALIAS-url_for_pan_threat = misc as url
213217

214-
FIELDALIAS-protocol_for_pan_threat = protocol as vendor_protocol
215-
216218
# Determine client and server ip address based on direction of flow
217219
EVAL-server_ip = if(version >= 2049 OR (version < 2049 AND (isnull(direction) OR direction="client-to-server")), dest_ip, src_ip)
218220
EVAL-client_ip = if(version >= 2049 OR (version < 2049 AND (isnull(direction) OR direction="client-to-server")), src_ip, dest_ip)
@@ -226,7 +228,10 @@ EVAL-report_id = if(log_subtype=="wildfire", coalesce(report_id,threat_id)
226228
EVAL-http_category = if(log_subtype=="url", raw_category, null())
227229
EVAL-verdict = if(log_subtype=="wildfire", raw_category, null())
228230
EVAL-threat_category = if(log_subtype!="url" AND log_subtype!="file", if(threat_category=="unknown",log_subtype,coalesce(threat_category,log_subtype)), null())
229-
EVAL-category = if(log_subtype=="url" OR log_subtype=="file", raw_category, threat_category)
231+
EVAL-category = if(log_subtype=="url", if(raw_category!="unknown",raw_category,null()), if(threat_category=="unknown",log_subtype,coalesce(threat_category,log_subtype)))
232+
EVAL-protocol = case(transport IN ("tcp", "udp"), "ip", transport=="icmp", "icmp", true(), protocol)
233+
EVAL-protocol_version = if(match(coalesce(src_ip,dest_ip),":"), "ipv6", if(match(coalesce(src_ip,dest_ip), "(?:\d+\.\d+\.\d+\.\d+)"),"ipv4", null))
234+
EVAL-vendor_protocol = case(transport IN ("tcp", "udp"), "ip", transport=="icmp", "icmp", true(), protocol)
230235

231236
# Decode hex flags
232237
EVAL-flags = mvappend(if(floor(tonumber(session_flags,16) / pow(2, 31))%2==0,null(),"pcap"),if(floor(tonumber(session_flags,16) / pow(2, 28))%2==0,null(),"credential_detected"),if(floor(tonumber(session_flags,16) / pow(2, 25))%2==0,null(),"ipv6"),if(floor(tonumber(session_flags,16) / pow(2, 24))%2==0,null(),"decrypted"),if(floor(tonumber(session_flags,16) / pow(2, 23))%2==0,null(),"denied_by_url_filtering"),if(floor(tonumber(session_flags,16) / pow(2, 22))%2==0,null(),"nat"),if(floor(tonumber(session_flags,16) / pow(2, 21))%2==0,null(),"captive_portal"),if(floor(tonumber(session_flags,16) / pow(2, 19))%2==0,null(),"x_forwarded_for"),if(floor(tonumber(session_flags,16) / pow(2, 18))%2==0,null(),"http_proxy"),if(floor(tonumber(session_flags,16) / pow(2, 15))%2==0,null(),"container_page"),if(floor(tonumber(session_flags,16) / pow(2, 13))%2==0,null(),"implicit_application"),if(floor(tonumber(session_flags,16) / pow(2, 11))%2==0,null(),"symmetric_return"))
@@ -247,8 +252,11 @@ rename = pan:traffic
247252

248253
[pan:traffic]
249254
SHOULD_LINEMERGE = false
255+
EVENT_BREAKER_ENABLE = true
256+
KV_MODE = none
250257
TIME_PREFIX = ^(?:[^,]*,){6}
251258
MAX_TIMESTAMP_LOOKAHEAD = 32
259+
TIME_FORMAT = %Y/%m/%d %H:%M:%S
252260

253261
REPORT-search = extract_traffic
254262

@@ -259,9 +267,12 @@ EVAL-vendor_action = action
259267
LOOKUP-vendor_action = pan_vendor_action_lookup vendor_action OUTPUT action
260268
# bytes, bytes_in, bytes_out
261269
FIELDALIAS-dest_for_pan_traffic = dest_ip as dest
262-
FIELDALIAS-dvc_for_pan_traffic = host as dvc
263-
FIELDALIAS-protocol_for_pan_traffic = protocol as vendor_protocol
270+
EVAL-dvc = coalesce(dvc_name, host)
264271
FIELDALIAS-src_for_pan_traffic = src_ip as src
272+
FIELDALIAS-session_start_signature = rule as signature
273+
EVAL-protocol = case(transport IN ("tcp", "udp"), "ip", transport=="icmp", "icmp", true(), protocol)
274+
EVAL-protocol_version = if(match(coalesce(src_ip,dest_ip),":"), "ipv6", if(match(coalesce(src_ip,dest_ip), "(?:\d+\.\d+\.\d+\.\d+)"),"ipv4", null))
275+
EVAL-vendor_protocol = case(transport IN ("tcp", "udp"), "ip", transport=="icmp", "icmp", true(), protocol)
265276

266277
# Set user field
267278
EVAL-user = coalesce(src_user,dest_user,"unknown")
@@ -291,17 +302,27 @@ rename = pan:system
291302

292303
[pan:system]
293304
SHOULD_LINEMERGE = false
305+
EVENT_BREAKER_ENABLE = true
306+
KV_MODE = none
294307
TIME_PREFIX = ^(?:[^,]*,){6}
295308
MAX_TIMESTAMP_LOOKAHEAD = 32
296309

297-
REPORT-search = extract_system, extract_globalprotect_user, extract_globalprotect_ip, extract_globalprotect_loginip, extract_globalprotect_clientversion, extract_globalprotect_message
310+
REPORT-search = extract_system, extract_globalprotect_user, extract_globalprotect_ip, extract_globalprotect_loginip, extract_globalprotect_clientversion, extract_globalprotect_message, extract_general_user, extract_system_alert_src, extract_system_auth
298311

299312
FIELDALIAS-virtual_system = vsys as virtual_system
300313
# Field Aliases to map specific fields to the Splunk Common Information Model - Update
301314
FIELDALIAS-dvc_for_pan_system = host as dvc
302315
FIELDALIAS-dest_for_pan_system = host as dest
303316
FIELDALIAS-signature = event_id as signature
317+
FIELDALIAS-src_user = user as src_user
318+
FIELDALIAS-reason = description as reason
319+
FIELDALIAS-body = description as body
304320
LOOKUP-vendor_info_for_pan_config = pan_vendor_info_lookup sourcetype OUTPUT vendor,product,vendor_product
321+
EVAL-action = case(match(description,"(?i)succeeded"),"success",match(description,"(?i)cleared"),"cleared",match(description,"(?i)GlobalProtect gateway agent message"),"success",match(description,"(?i)Failed"),"failure")
322+
EVAL-app = "Palo Alto Networks Firewall"
323+
EVAL-type = "event"
324+
EVAL-src = coalesce(src,src_ip)
325+
305326

306327
# GlobalProtect logs introduced in PANOS 9.1
307328
[pan_globalprotect]
@@ -338,6 +359,8 @@ rename = pan:config
338359

339360
[pan:config]
340361
SHOULD_LINEMERGE = false
362+
EVENT_BREAKER_ENABLE = true
363+
KV_MODE = none
341364
TIME_PREFIX = ^(?:[^,]*,){6}
342365
MAX_TIMESTAMP_LOOKAHEAD = 32
343366

@@ -350,6 +373,11 @@ FIELDALIAS-config = configuration_path as path
350373
# Field Aliases to map specific fields to the Splunk Common Information Model - Change Analysis
351374
FIELDALIAS-dvc_for_pan_config = host as dvc
352375
FIELDALIAS-dest_for_pan_config = host as dest
376+
FIELDALIAS-src_for_pan_config = host_name as src
377+
FIELDALIAS-user_for_pan_config = admin as user
378+
FIELDALIAS-src_user_for_pan_config = admin as src_user
379+
380+
EVAL-status = if(result=="Succeeded" OR result=="Submitted", "success", null)
353381

354382
# Manually set log_subtype because it isn't in the log
355383
EVAL-log_subtype = "config"
@@ -379,24 +407,28 @@ LOOKUP-src_class = classification_lookup cidr as src_ip OUTPU
379407

380408
[pan:correlation]
381409
SHOULD_LINEMERGE = false
410+
EVENT_BREAKER_ENABLE = true
411+
KV_MODE = none
382412
TIME_PREFIX = ^(?:[^,]*,){6}
383413
MAX_TIMESTAMP_LOOKAHEAD = 32
414+
TIME_FORMAT = %Y/%m/%d %H:%M:%S
384415
REPORT-search = extract_correlation
385416
FIELDALIAS-virtual_system = vsys as virtual_system
386417
FIELDALIAS-src_for_pan_correlation = src_ip as src
387-
FIELDALIAS-dest_ip_for_pan_correlation = src_ip as dest_ip
388418
FIELDALIAS-client_ip = src_ip as client_ip
389-
FIELDALIAS-dest_for_pan_correlation = src_ip as dest
419+
FIELDALIAS-dest_for_pan_correlation = host as dest
390420
FIELDALIAS-dvc_for_pan_correlation = host as dvc
391-
EVAL-user = coalesce(src_user,"unknown")
392-
FIELDALIAS-user_for_pan_correlation = src_user as dest_user
421+
FIELDALIAS-user_for_pan_correlation = src_user as user
393422
EVAL-log_subtype = "correlation"
394423
FIELDALIAS-category = object AS category
395424
FIELDALIAS-threat_category = object AS threat_category
396425
FIELDALIAS-threat_name = evidence AS threat_name
397426
FIELDALIAS-signature = evidence AS signature
427+
FIELDALIAS-body = evidence AS body
398428
EVAL-vendor_action = "allowed"
399429
EVAL-action = "allowed"
430+
EVAL-type = case(severity IN ("informational","low","medium"),"event",severity IN ("high","critical"),"alert",1==1,log_type)
431+
EVAL-app = "Palo Alto Networks Firewall"
400432

401433

402434
[pan:userid]
@@ -505,10 +537,9 @@ TIME_FORMAT=%Y-%m-%dT%H:%M:%S%z
505537
MAX_TIMESTAMP_LOOKAHEAD=25
506538
KV_MODE = JSON
507539
SHOULD_LINEMERGE = false
508-
EVAL-action = coalesce(action, action_taken, "unknown")
509540
EVAL-dvc = "aperture"
510-
EVAL-src_user = coalesce(user, item_owner)
511-
EVAL-user = coalesce(user, item_owner)
541+
EVAL-src_user = coalesce(user, item_owner, admin_id)
542+
EVAL-user = coalesce(user, item_owner, admin_id)
512543
FIELDALIAS-admin = action_taken_by as admin
513544
FIELDALIAS-log_subtype = log_type as log_subtype
514545
FIELDALIAS-object = item_name as object
@@ -519,12 +550,20 @@ FIELDALIAS-object_creator = item_creator as object_creator
519550
FIELDALIAS-object_category = item_type as object_category
520551
FIELDALIAS-category = incident_category as category
521552
FIELDALIAS-threat_category = incident_category as threat_category
522-
FIELDALIAS-signature = policy_rule_name as signature
523-
FIELDALIAS-src_ip = source_ip as src_ip
524-
FIELDALIAS-client_ip = source_ip as client_ip
525553
EVAL-threat_name = coalesce(policy_rule_name,log_subtype)
526-
LOOKUP-vendor_info_for_pan_aperture = pan_vendor_info_lookup sourcetype OUTPUT vendor,product,vendor_product
527-
554+
LOOKUP-vendor_info_for_pan_aperture = pan_vendor_info_lookup sourcetype OUTPUTNEW vendor,product,vendor_product, vendor_product as app
555+
556+
EVAL-src = coalesce(ip, source_ip)
557+
EVAL-type = if(log_type IN ("incident", "remediation"), "alert", "event")
558+
FIELDALIAS-user_role = admin_role as user_role
559+
FIELDALIAS-id = incident_id as id
560+
FIELDALIAS-signature_id = policy_rule_name as signature_id
561+
FIELDALIAS-severity_id = severity as severity_id
562+
EVAL-action = coalesce(case(action IN ("sign_in", "sign_out"), "success"), action, action_taken)
563+
EVAL-client_ip = coalesce(source_ip, ip)
564+
EVAL-src_ip = coalesce(source_ip, ip)
565+
EVAL-signature = coalesce(policy_rule_name, event_type)
566+
EVAL-severity = case(severity <= 1, "informational", severity <=2, "low", severity <=3, "medium", severity <=4, "high", severity <=5, "critical")
528567

529568
[pan:minemeld]
530569
SHOULD_LINEMERGE = 0

0 commit comments

Comments
 (0)