How the attack works
AWS Organizations is where preventive guardrails live: service control policies (SCPs), the organization CloudTrail trail and security services that report to a delegated administrator. LeaveOrganization, called from a member account, removes that account from the organization; RemoveAccountFromOrganization does the same from the management account. Once the account is out, inherited SCPs no longer apply to it, the organization trail stops capturing its events, GuardDuty findings stop reaching the central security account and the account drops out of consolidated billing alerts. The AWS Customer Incident Response Team reported in May 2026 that threat actors use this after they gain control of a customer account.
An attacker who reaches the management account, or a delegated administrator for Organizations policies, gets the same result without moving the account: DetachPolicy, DeletePolicy, UpdatePolicy and DisablePolicyType remove or weaken an SCP for a root, an organizational unit or an account, and the change takes effect immediately. Organizations events are recorded only in US East (N. Virginia) and in the account that made the call: LeaveOrganization in the member account, removals and policy changes in the management account. Organizations also logs an AccountDepartedOrganization membership event in the management account when an account leaves. The same access allows two quieter moves: AttachPolicy can put a deny policy above accounts to lock their administrators out, and MoveAccount can move an account into an organizational unit with weaker policies. CloseAccount starts the closure of a member account.
What an attacker needs
- To leave: credentials in the member account allowed to call organizations:LeaveOrganization (the root user or an administrator role), no SCP that denies it, and an account that already has the contact details, payment method and support plan a standalone account needs. Accounts created in the organization cannot leave during their first four days.
- To remove an account from the outside: access to the management account. To detach, change or delete SCPs: the management account or a member account that is a delegated administrator for Organizations.
Impact
The account runs without the organization's preventive controls and outside central visibility. The attacker can do what the SCPs denied, such as stopping logging or using blocked Regions and services, while the security team loses the organization trail and the central findings for that account and has to investigate from inside it.
Detection rules
Account Left or Was Removed from the AWS Organization
Detects an account leaving its AWS organization: LeaveOrganization called in the member account, RemoveAccountFromOrganization called in the management account, and the AccountDepartedOrganization membership event that Organizations logs in the management account. Outside a planned migration this removes the account from SCPs, the organization trail and central security services. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: Account Left or Was Removed from the AWS Organization
id: 1f83c0d3-d58d-48a2-864d-c9818d3deb9c
status: experimental
description: >-
Detects an account leaving its AWS organization: LeaveOrganization called in
the member account, RemoveAccountFromOrganization called in the management
account, and the AccountDepartedOrganization membership event that
Organizations logs in the management account. Outside a planned migration
this removes the account from SCPs, the organization trail and central
security services.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_LeaveOrganization.html
- https://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html
- https://aws.amazon.com/blogs/security/cirt-insights-how-to-help-prevent-unauthorized-account-removals-from-aws-organizations/
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.t1666
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: organizations.amazonaws.com
eventName:
- LeaveOrganization
- RemoveAccountFromOrganization
- AccountDepartedOrganization
condition: selection
falsepositives:
- Planned account migrations and divestitures run by the cloud platform team; confirm the change record. One departure can produce both an API call event and the membership event.
level: high
False positives
- Planned account migrations and divestitures run by the cloud platform team; confirm the change record. One departure can produce both an API call event and the membership event.
AWS Account Moved to Another Organizational Unit or Closed
Detects MoveAccount and CloseAccount calls in AWS Organizations. MoveAccount, which only the management account can call, moves an account to another root or organizational unit, and the account then inherits the policies of its new parent, so a move into an OU with weaker service control policies removes guardrails without touching a policy. CloseAccount starts the closure of a member account, whose resources AWS deletes after 90 days unless the account is reopened through AWS Support. AWS publishes an example record of CloseAccount with the account in requestParameters.accountId, and Organizations logs a CloseAccountResult service event when the closure completes. For MoveAccount the rule matches the event name only: read the account and the source and destination parents in the request parameters. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: AWS Account Moved to Another Organizational Unit or Closed
id: 15a5f85f-d15d-485d-81c4-1eaba30ae84c
status: experimental
description: >-
Detects MoveAccount and CloseAccount calls in AWS Organizations. MoveAccount,
which only the management account can call, moves an account to another
root or organizational unit, and the account then inherits the policies of
its new parent, so a move into an OU with weaker service control policies
removes guardrails without touching a policy. CloseAccount starts the
closure of a member account, whose resources AWS deletes after 90 days
unless the account is reopened through AWS Support. AWS publishes an
example record of
CloseAccount with the account in requestParameters.accountId, and
Organizations logs a CloseAccountResult service event when the closure
completes. For MoveAccount the rule matches the event name only: read the
account and the source and destination parents in the request parameters.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_MoveAccount.html
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html
- https://attack.mitre.org/techniques/T1666/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.t1666
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: organizations.amazonaws.com
eventName:
- MoveAccount
- CloseAccount
condition: selection
falsepositives:
- Account vending, which creates an account and moves it into its organizational unit, reorganizations of the OU structure and the planned closure of unused accounts by the cloud platform team. Confirm the change record, and add the account vending role to a filter_* selection on userIdentity.arn.
level: medium
False positives
- Account vending, which creates an account and moves it into its organizational unit, reorganizations of the OU structure and the planned closure of unused accounts by the cloud platform team. Confirm the change record, and add the account vending role to a filter_* selection on userIdentity.arn.
AWS Organizations Policy Attached to a Root, OU or Account
Detects AttachPolicy calls in AWS Organizations. Attaching a policy changes what every principal under the target may do at once: a service control policy that denies access can lock the administrators of the affected accounts out, and a permissive policy attached in place of a strict one widens what those accounts may do. AWS publishes an example record of the event with the policy in requestParameters.policyId and the root, organizational unit or account in requestParameters.targetId. The event does not carry the content of the policy, and the same call attaches other policy types (resource control, tag and backup policies), so look the policy up by its ID. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: AWS Organizations Policy Attached to a Root, OU or Account
id: 641b033c-1466-49fe-8661-902661f01512
status: experimental
description: >-
Detects AttachPolicy calls in AWS Organizations. Attaching a policy changes
what every principal under the target may do at once: a service control
policy that denies access can lock the administrators of the affected
accounts out, and a permissive policy attached in place of a strict one
widens what those accounts may do. AWS publishes an example record of the
event with the policy in requestParameters.policyId and the root,
organizational unit or account in requestParameters.targetId. The event
does not carry the content of the policy, and the same call attaches other
policy types (resource control, tag and backup policies), so look the
policy up by its ID.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_AttachPolicy.html
- https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.privilege-escalation
- attack.t1484
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: organizations.amazonaws.com
eventName: AttachPolicy
condition: selection
falsepositives:
- Guardrails rolled out by the cloud platform team, AWS Control Tower or infrastructure-as-code pipelines, and policies attached to new accounts and organizational units. Add those roles to a filter_* selection on userIdentity.arn and review attachments made by anyone else.
level: low
False positives
- Guardrails rolled out by the cloud platform team, AWS Control Tower or infrastructure-as-code pipelines, and policies attached to new accounts and organizational units. Add those roles to a filter_* selection on userIdentity.arn and review attachments made by anyone else.
AWS Organizations Policy Detached, Deleted, Changed or Disabled
Detects DetachPolicy, DeletePolicy, UpdatePolicy and DisablePolicyType calls in AWS Organizations. Each can remove or weaken a service control policy for a root, an organizational unit or an account, with immediate effect. The same calls manage other policy types (resource control, tag and backup policies), so check requestParameters.policyId and targetId to see which policy and target were affected. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: AWS Organizations Policy Detached, Deleted, Changed or Disabled
id: ae7e1be2-a043-45d9-96d2-2ac117ee518c
status: experimental
description: >-
Detects DetachPolicy, DeletePolicy, UpdatePolicy and DisablePolicyType calls
in AWS Organizations. Each can remove or weaken a service control policy for
a root, an organizational unit or an account, with immediate effect. The
same calls manage other policy types (resource control, tag and backup
policies), so check requestParameters.policyId and targetId to see which
policy and target were affected.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_DetachPolicy.html
- https://docs.aws.amazon.com/organizations/latest/APIReference/API_DisablePolicyType.html
- https://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.privilege-escalation
- attack.t1484
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: organizations.amazonaws.com
eventName:
- DetachPolicy
- DeletePolicy
- UpdatePolicy
- DisablePolicyType
condition: selection
falsepositives:
- Guardrail changes deployed by the cloud platform team, AWS Control Tower or infrastructure-as-code pipelines; allow-list those roles and review changes made by anyone else.
level: medium
False positives
- Guardrail changes deployed by the cloud platform team, AWS Control Tower or infrastructure-as-code pipelines; allow-list those roles and review changes made by anyone else.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Organizations policy detached and attached again shortly after
An attacker who needs a guardrail gone for one action detaches the policy, acts and attaches it again, so that the organization looks unchanged afterwards. A detachment and a new attachment of the same policy on the same target within a short time marks that window.
- A
DetachPolicyevent fromorganizations.amazonaws.com. Note the policy and the target, which AWS shows asrequestParameters.policyIdandrequestParameters.targetIdin its example record ofAttachPolicy. - Within 2 hours an
AttachPolicyevent with the samerequestParameters.policyIdandrequestParameters.targetId. - Review what the accounts under that target did between the two events, with priority on the actions the policy denies.
EventsDetachPolicyAttachPolicy
LimitsPipelines that replace a policy detach and attach in one run, usually within seconds and from a known role. The 2 hours are a starting point. A policy that stays detached does not match and is covered by the single-event rule on this page.
Triage
- Identify the caller (userIdentity.arn) and the account or policy involved, and check for an approved migration or policy change.
- Look for AcceptHandshake and InviteAccountToOrganization events around the same time; they show the account joining a different organization.
- For policy changes, read requestParameters.policyId and targetId, compare the policy content before and after, and list the accounts that lost a deny.
- If not approved, treat the account as compromised, regain control of it with its root user or an existing cross-account role, invite it back into the organization and attach the policies again.
Response
Once the attack is confirmed:
- If the account has left the organization, work from inside it. Sign in with its root user or a role that still exists there, then deactivate the access keys and revoke the role sessions of the principal that called
LeaveOrganization. - If the account has joined another organization, treat that organization as controlled by the attacker and take the account out of it before you invite it back into yours.
- For a policy that was detached, deleted, changed or disabled, restore the original policy on the same root, organizational unit or account from the management account, and contain the principal that changed it, because it holds rights over the whole organization.
- Review what happened while the guardrail was missing, using the CloudTrail records of the affected account itself, with priority on the actions your SCPs deny, such as stopping logging or using blocked Regions and services.
- Once the account is back, confirm that the organization trail records its events again, that its findings reach the central security account, and that the SCP that denies
organizations:LeaveOrganizationcovers it.
Mitigation
- Attach an SCP that denies organizations:LeaveOrganization to the organization root or to every OU that holds workloads, and keep a separate transition OU without it for planned account moves.
- Centralize root access and delete member account root credentials, so that the root user cannot be used to leave.
- Keep the management account for organization administration only, limit who can change policies there, and alert on these events from US East (N. Virginia) in near real time, because the organization trail stops covering an account once it has left.
Frequently asked questions
In which account and Region do I find these Organizations events?
AWS Organizations records its events only in US East (N. Virginia) and in the account that made the call. `LeaveOrganization` is logged in the member account. `RemoveAccountFromOrganization`, the policy changes and the `AccountDepartedOrganization` membership event are logged in the management account. A SIEM that does not collect that Region, or collects only member accounts, misses part of them.
Why is the organization trail not enough once an account has left?
The organization trail captures the events of member accounts. When an account is out, the trail stops capturing its events, so what the attacker does afterwards is recorded only inside that account. The alert on the departure therefore has to arrive in near real time, and the investigation continues from inside the account.
Does the policy rule fire only for service control policies?
No. `DetachPolicy`, `DeletePolicy`, `UpdatePolicy` and `DisablePolicyType` also manage other policy types, such as resource control, tag and backup policies, and the rule matches all of them. Read `requestParameters.policyId` and `targetId` to see which policy and which root, organizational unit or account was affected.
Why do I get two alerts when one account leaves?
One departure can produce both an API call event and the membership event. The API call is `LeaveOrganization` in the member account or `RemoveAccountFromOrganization` in the management account, and Organizations also logs `AccountDepartedOrganization` in the management account. Both describe the same departure, so correlate them by account before you count incidents.
References
- MITRE ATT&CK T1666: Modify Cloud Resource Hierarchy
- CIRT insights: How to help prevent unauthorized account removals from AWS Organizations
- Logging API calls with AWS CloudTrail for AWS Organizations
- AWS Organizations API Reference: LeaveOrganization
- AWS Organizations API Reference: DetachPolicy
- Essential security controls to prevent unauthorized account removal in AWS Organizations
- Revoke IAM role temporary security credentials