Name:AWS ECR Container Scanning Findings Medium id:0b80e2c8-c746-4ddb-89eb-9efd892220cf version:4 date:2024-09-30 author:Patrick Bareiss, Splunk status:production type:Anomaly Description:The following analytic identifies medium-severity findings from AWS Elastic Container Registry (ECR) image scans. It leverages AWS CloudTrail logs, specifically the DescribeImageScanFindings event, to detect vulnerabilities in container images. This activity is significant for a SOC as it highlights potential security risks in containerized applications, which could be exploited if not addressed. If confirmed malicious, these vulnerabilities could lead to unauthorized access, data breaches, or further exploitation within the container environment, compromising the overall security posture. Data_source:
-AWS CloudTrail DescribeImageScanFindings
search:`cloudtrail` eventSource=ecr.amazonaws.com eventName=DescribeImageScanFindings | spath path=responseElements.imageScanFindings.findings{} output=findings | mvexpand findings | spath input=findings| search severity=MEDIUM | rename name as finding_name, description as finding_description, requestParameters.imageId.imageDigest as imageDigest, requestParameters.repositoryName as repository, userIdentity.principalId as user| eval finding = finding_name.", ".finding_description | eval phase="release" | eval severity="medium" | stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, imageDigest, repository, user, src_ip, finding, phase, severity | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `aws_ecr_container_scanning_findings_medium_filter`
how_to_implement:You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs. known_false_positives:unknown References: -https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html drilldown_searches: name:'View the detection results for - "$repository$"' search:'%original_detection_search% | search repository = "$repository$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$repository$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$repository$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' tags: analytic_story: - 'Dev Sec Ops' asset_type:AWS Account confidence:70 impact:30 message:Vulnerabilities with severity $severity$ found in repository $repository$ mitre_attack_id: - 'T1204.003' - 'T1204' observable: name:'user' type:'User' - role: - 'Attacker' name:'repository' type:'Other' - role: - 'Victim' product: - 'Splunk Enterprise' - 'Splunk Enterprise Security' - 'Splunk Cloud' required_fields: - 'eventSource' - 'eventName' - 'responseElements.imageScanFindings.findings{}' - 'awsRegion' - 'requestParameters.imageId.imageDigest' - 'requestParameters.repositoryName' - 'user' - 'userName' - 'src_ip' risk_score:21 security_domain:network