-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prisma Cloud Compute Mapping (#30098)
* Created PrismaCloudCompute mapping * ParsingRule * RN * ParsingRule * Updated README * Updated README * Updated ModelingRules * Update Packs/PrismaCloudCompute/README.md Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com> * Update Packs/PrismaCloudCompute/README.md Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com> * Update Packs/PrismaCloudCompute/README.md Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com> * Update Packs/PrismaCloudCompute/README.md Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com> * Update Packs/PrismaCloudCompute/README.md Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com> * Updated ModelingRules * Updated ModelingRules * Updated ModelingRules * Updated ModelingRules * Updated ModelingRules * Updated ModelingRules * Updated README * Updated README --------- Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com>
- Loading branch information
1 parent
8fcf3ab
commit c02cd00
Showing
8 changed files
with
289 additions
and
4 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
Packs/PrismaCloudCompute/ModelingRules/PrismaCloudCompute/PrismaCloudCompute.xif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[MODEL: dataset = prisma_cloud_compute_raw] | ||
alter | ||
lowercase_tags = lowercase(tags), | ||
lowercase_osDistro = lowercase(osDistro), | ||
lowercase_provider = lowercase(provider), | ||
get_label_image_name_1 = json_extract_scalar(labels, "$['baseimage.name']"), | ||
get_label_image_name_2 = json_extract_scalar(labels, "$['org.opencontainers.image.ref.name']"), | ||
get_label_image_name_3 = json_extract_scalar(labels, "$.Name"), | ||
get_label_image_name_4 = json_extract_scalar(labels, "$.name"), | ||
get_label_image_os = json_extract_scalar(labels, "$['org.opencontainers.image.version']"), | ||
get_label_image_author = json_extract_scalar(labels, "$['org.opencontainers.image.authors']"), | ||
get_label_app = json_extract_scalar(labels, "$.app"), | ||
get_label_maintainer = json_extract_scalar(labels, "$.maintainer"), | ||
get_label_osDistro = lowercase(json_extract_scalar(labels, "$.osDistro")), | ||
get_label_osVersion = json_extract_scalar(labels, "$.osVersion") | ||
| alter | ||
check_image = coalesce(image, get_label_image_name_1, get_label_image_name_2, get_label_image_name_3, get_label_image_name_4), | ||
check_osDistro = coalesce(lowercase_osDistro, get_label_osDistro), | ||
check_origin_vendor = coalesce(get_label_maintainer, get_label_image_author), | ||
check_fullos_1 = get_label_osDistro + get_label_osVersion, | ||
check_fullos_2 = get_label_image_name_2 + get_label_image_os | ||
| alter | ||
xdm.target.user.username = user, | ||
xdm.target.host.fqdn = fqdn, | ||
xdm.target.host.hostname = host, | ||
xdm.network.rule = rule, | ||
xdm.event.tags = arraycreate(if(lowercase_tags ~= "auth", XDM_CONST.EVENT_TAG_AUTHENTICATION, lowercase_tags ~= "vpn", XDM_CONST.EVENT_TAG_VPN, lowercase_tags ~= "network", XDM_CONST.EVENT_TAG_NETWORK, lowercase_tags = null, null, to_string(lowercase_tags))), | ||
xdm.event.type = type, | ||
xdm.target.agent.identifier = check_image, | ||
xdm.alert.description = coalesce(aggregatedAlerts, aggregated), | ||
xdm.target.host.manufacturer = labels, | ||
xdm.target.location.region = region, | ||
xdm.event.description = message, | ||
xdm.target.application.name = get_label_app, | ||
xdm.alert.category = category, | ||
xdm.target.resource.type = if(function != null, "function", check_image != null, "INSTANCE", container != null, "container", null), | ||
xdm.target.resource.value = if(function != null, "function", check_image != null, check_image, container != null, container, null), | ||
xdm.target.host.os_family = if(check_osDistro ~= "win", XDM_CONST.OS_FAMILY_WINDOWS, check_osDistro ~= "mac", XDM_CONST.OS_FAMILY_MACOS, check_osDistro ~= "linux|amzn", XDM_CONST.OS_FAMILY_LINUX, get_label_maintainer ~= "Red Hat", XDM_CONST.OS_FAMILY_LINUX, check_osDistro ~= "android", XDM_CONST.OS_FAMILY_ANDROID, check_osDistro ~= "ios", XDM_CONST.OS_FAMILY_IOS, check_osDistro ~= "ubuntu", XDM_CONST.OS_FAMILY_UBUNTU, check_osDistro ~= "debian", XDM_CONST.OS_FAMILY_DEBIAN, check_osDistro ~= "fedora", XDM_CONST.OS_FAMILY_FEDORA, check_osDistro ~= "centos", XDM_CONST.OS_FAMILY_CENTOS, check_osDistro ~= "chromeos", XDM_CONST.OS_FAMILY_CHROMEOS, check_osDistro ~= "solaris", XDM_CONST.OS_FAMILY_SOLARIS, check_osDistro ~= "scada", XDM_CONST.OS_FAMILY_SCADA, check_osDistro = null, null, to_string(lowercase_osDistro)), | ||
xdm.target.cloud.provider = if(lowercase_provider ~= "aws|amazon|amz", XDM_CONST.CLOUD_PROVIDER_AWS, check_osDistro ~= "aws|amazon|amz", XDM_CONST.CLOUD_PROVIDER_AWS, lowercase_provider ~= "gcp|google", XDM_CONST.CLOUD_PROVIDER_GCP, lowercase_provider ~= "azure|microsoft", XDM_CONST.CLOUD_PROVIDER_AZURE, lowercase_provider ~= "baba|alibaba", XDM_CONST.CLOUD_PROVIDER_ALIBABA, lowercase_provider = null, null, to_string(lowercase_provider)), | ||
xdm.target.cloud.project = accountID, | ||
xdm.target.process.container_id = container, | ||
xdm.target.host.os = coalesce(osRelease, check_fullos_1, check_fullos_2), | ||
xdm.target.host.device_category = to_string(collections), | ||
//xdm.alert.risks = vulnerabilities, | ||
xdm.target.process.command_line = if(command = null, arraystring(regextract(message, "command:\s+(.*)"), ""), command), | ||
xdm.target.process.name = if(startupProcess = "#startupProcess", null, startupProcess), | ||
xdm.target.application.publisher = check_origin_vendor; |
6 changes: 6 additions & 0 deletions
6
Packs/PrismaCloudCompute/ModelingRules/PrismaCloudCompute/PrismaCloudCompute.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fromversion: 8.3.0 | ||
id: Prisma_Cloud_Compute_ModelingRule | ||
name: Prisma Cloud Compute Modeling Rule | ||
rules: '' | ||
schema: '' | ||
tags: '' |
136 changes: 136 additions & 0 deletions
136
Packs/PrismaCloudCompute/ModelingRules/PrismaCloudCompute/PrismaCloudCompute_schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"prisma_cloud_compute_raw": { | ||
"type": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"container": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"image": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"imageID": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"tags": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"host": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"fqdn": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"function": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"region": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"provider": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"osRelease": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"osDistro": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"runtime": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"appID": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"rule": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"message": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"aggregated": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"rest": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"forensics": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"accountID": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"cluster": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"category": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"labels": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"collections": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"complianceIssues": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"vulnerabilities": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"aggregatedAlerts": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"dropped": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"command": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"startupProcess": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"namespaces": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"user": { | ||
"type": "string", | ||
"is_array": false | ||
}, | ||
"accountIDs": { | ||
"type": "string", | ||
"is_array": false | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Packs/PrismaCloudCompute/ParsingRules/PrismaCloudCompute/PrismaCloudCompute.xif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[INGEST:vendor="prisma", product="cloud_compute", target_dataset="prisma_cloud_compute_raw", no_hit=keep] | ||
alter | ||
tmp_extract_time = replex(arraystring(regextract(time, ".*\d{2}:\d{2}:\d{2}"), ""), ",", "") | ||
| alter | ||
_time = parse_timestamp("%h %d %Y %H:%M:%S", tmp_extract_time) | ||
| fields -tmp_extract_time; |
6 changes: 6 additions & 0 deletions
6
Packs/PrismaCloudCompute/ParsingRules/PrismaCloudCompute/PrismaCloudCompute.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: Prisma Cloud Compute Parsing Rule | ||
id: Prisma_Cloud_Compute_ParsingRule | ||
fromversion: 8.3.0 | ||
tags: [] | ||
rules: '' | ||
samples: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#### Modeling Rules | ||
|
||
##### New: Prisma Cloud Compute Modeling Rule | ||
|
||
Added a Modeling Rule for the pack (Available from Cortex XSIAM 2.0). | ||
|
||
#### Parsing Rules | ||
|
||
##### New: Prisma Cloud Compute Parsing Rule | ||
|
||
Added a Parsing Rule for the pack (Available from Cortex XSIAM 2.0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters