{"id":"b94bf91e-c2bf-4047-9c43-c6810f43baad","title":"AWS ECS Task Definition That Queries The Credential Endpoint","description":"Detects when an Elastic Container Service (ECS) Task Definition includes a command to query the credential endpoint.\nThis can indicate a potential adversary adding a backdoor to establish persistence or escalate privileges.\n","author":"Darin Smith","status":"test","level":"medium","date":"2022-06-07","modified":"2023-04-24","tags":["attack.persistence","attack.t1525"],"technique_ids":["T1525"],"logsource":{"product":"aws","service":"cloudtrail"},"falsepositives":["Task Definition being modified to request credentials from the Task Metadata Service for valid reasons"],"references":["https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/ecs__backdoor_task_def/main.py","https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html","https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html"],"source_path":"rules/cloud/aws/cloudtrail/aws_ecs_task_definition_cred_endpoint_query.yml","source_sha256":"4af2f599145bc049284a6f45d738b737e5e55b2f73b0baa539c25f8db1dfbd14","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/cloud/aws/cloudtrail/aws_ecs_task_definition_cred_endpoint_query.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: AWS ECS Task Definition That Queries The Credential Endpoint\nid: b94bf91e-c2bf-4047-9c43-c6810f43baad\nstatus: test\ndescription: |\n    Detects when an Elastic Container Service (ECS) Task Definition includes a command to query the credential endpoint.\n    This can indicate a potential adversary adding a backdoor to establish persistence or escalate privileges.\nreferences:\n    - https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/ecs__backdoor_task_def/main.py\n    - https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html\n    - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html\nauthor: Darin Smith\ndate: 2022-06-07\nmodified: 2023-04-24\ntags:\n    - attack.persistence\n    - attack.t1525\nlogsource:\n    product: aws\n    service: cloudtrail\ndetection:\n    selection:\n        eventSource: 'ecs.amazonaws.com'\n        eventName:\n            - 'DescribeTaskDefinition'\n            - 'RegisterTaskDefinition'\n            - 'RunTask'\n        requestParameters.containerDefinitions.command|contains: '$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI'\n    condition: selection\nfalsepositives:\n    - Task Definition being modified to request credentials from the Task Metadata Service for valid reasons\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1525","id":"T1525","name":"Implant Internal Image","page":"techniques/enterprise/T1525/"}],"data_path":"data/detection-rules/b94bf91e-c2bf-4047-9c43-c6810f43baad.json","kind":"sigma"}
