AWS Credential Access RDS Password reset

Original Source: [splunk source]
Name:AWS Credential Access RDS Password reset
id:6153c5ea-ed30-4878-81e6-21ecdb198189
version:4
date:2024-09-30
author:Gowthamaraj Rajendran, Splunk
status:production
type:TTP
Description:The following analytic detects the resetting of the master user password for an Amazon RDS DB instance. It leverages AWS CloudTrail logs to identify events where the `ModifyDBInstance` API call includes a new `masterUserPassword` parameter. This activity is significant because unauthorized password resets can grant attackers access to sensitive data stored in production databases, such as credit card information, PII, and healthcare data. If confirmed malicious, this could lead to data breaches, regulatory non-compliance, and significant reputational damage. Immediate investigation is required to determine the legitimacy of the password reset.
Data_source:
  • -AWS CloudTrail ModifyDBInstance
search:`cloudtrail` eventSource="rds.amazonaws.com" eventName=ModifyDBInstance "requestParameters.masterUserPassword"=*
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.dBInstanceIdentifier) as database_id by src awsRegion eventName userAgent user_arn| `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)`
| `aws_credential_access_rds_password_reset_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:Users may genuinely reset the RDS password.
References:
  -https://aws.amazon.com/premiumsupport/knowledge-center/reset-master-user-password-rds
drilldown_searches:
name:'View the detection results for - "$database_id$"'
search:'%original_detection_search% | search database_id = "$database_id$"'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
name:'View risk events for the last 7 days for - "$database_id$"'
search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$database_id$") 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:
    - 'AWS Identity and Access Management Account Takeover'
  asset_type:AWS Account
  confidence:70
  impact:70
  message:$database_id$ password has been reset from IP $src$
  mitre_attack_id:
    - 'T1586'
    - 'T1586.003'
    - 'T1110'
  observable:
    name:'database_id'
    type:'Endpoint'
    - role:
      - 'Victim'
    name:'src'
    type:'IP Address'
    - role:
      - 'Attacker'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'eventName'
    - 'eventSource'
    - 'requestParameters.dBInstanceIdentifier'
    - 'userAgent'
    - 'sourceIPAddress'
    - 'awsRegion'
  risk_score:49
  security_domain:threat

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.002/aws_rds_password_reset/aws_cloudtrail_events.json
  source: aws_cloudtrail
  sourcetype: aws:cloudtrail
  update_timestamp: True
manual_test:None