Spacebar Campaigns

AL-001 CloudTrail GetCallerIdentity Log

Log ID:
AL-001
Source:
AWS CloudTrail
Representative Path:
Wazuh-AWS / /var/ossec/logs/archives/archives.log
Collection:
Wazuh aws-s3 module
Primary Use:
EC2 Instance Profile 임시 자격증명의 AWS API 호출 사용 여부 확인

공격 행위 요약

AL-001은 공격자가 획득한 임시 AWS 자격증명으로 STS GetCallerIdentity API를 호출한 행위를 설명하는 CloudTrail 로그이다.

GetCallerIdentity는 현재 사용 중인 AWS 자격증명의 계정과 ARN을 확인하는 API이며, 공격자는 이를 통해 탈취한 자격증명이 실제 AWS API 호출에 사용 가능한지 확인했다.

CloudTrail에서 AssumedRole, vuln-eks-node-role, GetCallerIdentity가 함께 확인되므로, EC2 Instance Profile 기반 임시 자격증명이 AWS API 호출에 사용되었음을 판단할 수 있다.

로그 발생 위치

구분위치설명
AWSCloudTrailAWS API 호출 이벤트 기록
StorageCloudTrail S3CloudTrail 원본 JSON 저장
WazuhWazuh-AWSWazuh가 수집한 CloudTrail 로그 확인

수집 방식

구분방식
AWSCloudTrail이 STS GetCallerIdentity 관리 이벤트를 기록
DestinationCloudTrail 원본 JSON 로그를 S3 버킷에 저장
CollectorWazuh manager의 aws-s3 모듈이 CloudTrail S3 로그를 수집
ParsingWazuh가 수집 로그를 integration="aws" 형식으로 파싱
Storage수집된 이벤트를 Wazuh archives에 저장
AnalysiseventName="GetCallerIdentity" 기준으로 AL-001 이벤트 확인

로그 출력 명령어

sudo docker exec single-node_wazuh.manager_1 grep -R '"eventName": "GetCallerIdentity"' /var/ossec/logs/archives

실제 관측 로그

/var/ossec/logs/archives/2026/May/ossec-archive-27.log
2026 May 27 09:39:33 wazuh->Wazuh-AWS
{
  "integration": "aws",
  "aws": {
    "log_info": {
      "s3bucket": "nodefall-cloudtrail-814871720550",
      "log_file": "AWSLogs/814871720550/CloudTrail/ap-northeast-2/2026/05/27/814871720550_CloudTrail_ap-northeast-2_20260527T0905Z_aUtE3wUGzYa1V31F.json.gz"
    },
    "eventTime": "2026-05-27T08:59:11Z",
    "eventSource": "sts.amazonaws.com",
    "eventName": "GetCallerIdentity",
    "awsRegion": "ap-northeast-2",
    "sourceIPAddress": "13.125.8.139",
    "userAgent": "Boto3/1.34.46 md/Botocore#1.34.46 os/linux#6.17.0-1007-aws lang/python#3.12.3",
    "userIdentity": {
      "type": "AssumedRole",
      "arn": "arn:aws:sts::814871720550:assumed-role/vuln-eks-node-role/i-0fceb9d1e28db3cd7",
      "accountId": "814871720550",
      "sessionContext": {
        "sessionIssuer": {
          "type": "Role",
          "arn": "arn:aws:iam::814871720550:role/vuln-eks-node-role",
          "userName": "vuln-eks-node-role"
        },
        "attributes": {
          "creationDate": "2026-05-27T08:43:59Z",
          "mfaAuthenticated": "false"
        },
        "ec2RoleDelivery": "2.0"
      },
      "inScopeOf": {
        "issuerType": "AWS::EC2::Instance",
        "credentialsIssuedTo": "arn:aws:ec2:ap-northeast-2:814871720550:instance/i-0fceb9d1e28db3cd7"
      }
    },
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "eventCategory": "Management",
    "source": "cloudtrail"
  }
}

주요 필드

필드의미예시
locationWazuh 수집 위치wazuh->Wazuh-AWS
eventTimeAWS API 호출 발생 시각2026-05-27T08:59:11Z
eventSource호출된 AWS 서비스sts.amazonaws.com
eventName호출된 AWS APIGetCallerIdentity
userIdentity.typeAPI 호출에 사용된 자격증명 유형AssumedRole
userIdentity.arnAPI 호출에 사용된 Role 세션arn:aws:sts::814871720550:assumed-role/vuln-eks-node-role/i-0fceb9d1e28db3cd7
credentialsIssuedTo임시 자격증명이 발급된 EC2 인스턴스arn:aws:ec2:ap-northeast-2:814871720550:instance/i-0fceb9d1e28db3cd7

커버 대상 Techniques Used

Primary LogTechniqueMapping Reason
AL-001T1552.005 Unsecured Credentials: Cloud Instance Metadata APIIMDS를 통해 획득한 EC2 Instance Profile 임시 자격증명으로 STS GetCallerIdentity API를 호출하여 AWS API 사용 가능성을 확인한 행위를 설명한다.
FL-005T1552.005 Unsecured Credentials: Cloud Instance Metadata APIIMDS 엔드포인트와 /latest/meta-data/iam/security-credentials/ 경로 접근을 통해 EC2 Instance Profile 임시 자격증명을 조회한 런타임 행위를 설명한다.

탐지 포인트

Technique관찰 행위주요 필드
T1552.005 Unsecured Credentials: Cloud Instance Metadata APIWazuh에 CloudTrail 로그가 Wazuh-AWS 위치로 수집되었는지 확인한다.location
T1552.005 Unsecured Credentials: Cloud Instance Metadata APISTS GetCallerIdentity API 호출이 발생했는지 확인한다. 이는 사용 중인 AWS 자격증명을 식별하는 행위다.eventSource, eventName, eventTime
T1552.005 Unsecured Credentials: Cloud Instance Metadata APIAPI 호출 주체가 Role 기반 임시 자격증명인지 확인한다.userIdentity.type
T1552.005 Unsecured Credentials: Cloud Instance Metadata API호출에 사용된 Role 세션이 EC2 노드 Role인지 확인한다.userIdentity.arn
T1552.005 Unsecured Credentials: Cloud Instance Metadata API해당 임시 자격증명이 특정 EC2 인스턴스에 발급된 자격증명인지 확인한다.credentialsIssuedTo