Atlantiraptor Docs

Cloud.AWS.RootActivity

Type: Server

Hunts for use of the AWS root user, which day-to-day work should never need: high for changes made as root, medium for read-only calls. One row per action and source address. Console sign-ins are reported by Cloud.AWS.ConsoleLogins.

Needs the SecurityAudit policy on the role.

Parameters

Name Type Default Description
AWSSecret string Name of the “AWS Creds” secret for the account.
LookbackHours int 720

Source

Defined in artifacts/definitions/Cloud/AWS/RootActivity.yaml.

name: Cloud.AWS.RootActivity
description: |
  Hunts for use of the AWS root user, which day-to-day work should never
  need: **high** for changes made as root, **medium** for read-only
  calls. One row per action and source address. Console sign-ins are
  reported by `Cloud.AWS.ConsoleLogins`.

  Needs the `SecurityAudit` policy on the role.

type: SERVER

parameters:
  - name: AWSSecret
    description: Name of the "AWS Creds" secret for the account.
  - name: LookbackHours
    type: int
    default: 720

sources:
  - query: |
      LET Events = SELECT * FROM foreach(row={
          SELECT Region FROM aws_regions(secret=AWSSecret)
      }, query={
          SELECT * FROM aws_cloudtrail(secret=AWSSecret, region=Region, username="root",
                                       start=now() - LookbackHours * 3600)
          WHERE UserType = "Root" AND EventName != "ConsoleLogin"
      }, workers=4)

      SELECT timestamp(string=min(item=Time)) AS Time,
             if(condition=ReadOnly, then="medium", else="high") AS Severity,
             if(condition=ReadOnly, then="Root user made read-only calls",
                else="Root user made changes") AS Detection,
             "root" AS User, SourceIP AS IPAddress, Region AS Location, UserAgent AS Device,
             dict(Event=EventName, Service=EventSource, Calls=count(),
                  LastCall=max(item=Time), Error=ErrorCode, MFA=MFA,
                  Request=Request) AS Details
      FROM Events
      GROUP BY EventName, SourceIP, Region

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.