Breaking Red

Breaking Red: One instance takes an OCI tenancy

Nov 17, 2026 · 1 min

Key takeaways

  • A limited user that can read the tenancy is enough to start.
  • One of four dynamic groups, platform-admin, can manage every resource.
  • A matching rule lets that user join the group by launching one instance.
  • The instance principal is tenancy-admin. The rule is then restored and the instance is terminated.

What is an OCI tenancy

Oracle Cloud Infrastructure (OCI) is Oracle's public cloud. A tenancy is the root account and the root compartment. Regions, compartments, users, groups, policies, and resources all live inside that one boundary. A company usually runs on a single tenancy.

Identity in the tenancy is IAM. Users, groups, dynamic groups, and policies are the pieces. Nothing can act unless a policy says so.

Tenancy-admin can manage all resources inside that boundary, which means every compartment under it. The goal of this chain is that identity, starting from a limited user.

Key concepts of an OCI tenancy

Compartment

A compartment divides the tenancy. The root compartment is the tenancy itself. A child compartment holds one team, one application, or one environment. A resource belongs to exactly one compartment.

Dynamic group

A dynamic group is a set of resources, not people. Compute instances join when they match a rule, and any policy on the group applies to every member.

Policy

A policy grants a group its permissions. It names the group, the verb, the resource, and where: one compartment, or the whole tenancy.

Matching rule

A matching rule decides which resources belong to a dynamic group. It can match one instance, a tag, or every instance in a compartment.

Instance principal

An instance principal is how a compute instance calls OCI as itself. There is no user and no password. If the instance is in a dynamic group, it holds that group's policies.

Attack chain

  1. 01Map the tenancy

    oci-dg-posture starts with what the limited user can already read. A dynamic group is a way up only when a policy grants it something, so the groups and their policies have to be on the table before any of them is treated as admin. The read returns four dynamic groups and ten policies. The entry user is allowed to read them.

  2. 02Read each group's policy

    A group is a way up only if its policy grants admin. One of the ten policies can manage all resources in the tenancy. The rest are scoped to a single job.

  3. 03Rule out three decoys

    log-forwarders is read-only, backup-agents is volume-only, and metrics-scrapers is metrics-only. Each one drops out on its policy.

  4. 04Find platform-admin

    discover names the remaining group platform-admin. That policy is tenancy-admin.

  5. 05Hijack the matching rule

    UpdateDynamicGroup points the platform-admin rule at a sandbox compartment the limited user can already reach. The rule on oci-cy-dg1-platform-admin now trusts that compartment.

  6. 06Launch one instance principal

    LaunchInstance creates one instance in the sandbox. The instance matches the rule, so its instance principal joins platform-admin.

  7. 07Confirm tenancy-admin, then put it back

    acquire_admin records the proof that the identity is tenancy-admin. The matching rule and the instance are then removed, so the tenancy is left as it was found. goal_met is true. Access is oci-tenancy-admin. The rule is restored, the instance is terminated, and nothing is left behind.

Full chain

One limited user, one matching rule, one instance. The instance principal is tenancy-admin, then the rule is restored and the instance is terminated.

How do you attack an OCI tenancy?

An OCI tenancy is attacked with a permission the account already has. A limited user reads which dynamic group can manage all resources, then joins that group by launching an instance its matching rule trusts. The instance principal is tenancy-admin. The steps above are that path in this tenancy.

What are the threats on an OCI tenancy?

The threats are conditions already inside the tenancy. Each one is ordinary on its own. Together they are a path to tenancy-admin.

A policy over the whole tenancy

One statement reaches every compartment. That is tenancy-admin, whatever the group is named.

A matching rule on a compartment

Membership changes when someone launches an instance, not when an admin adds a user.

An instance principal

The credential is the instance. There is nothing to rotate except the instance itself.

Read plus rewrite

Seeing the groups finds the path. Permission to change the rule takes it. Either one alone stops this chain.

Groups that look alike

A list of group names does not show which policy is admin. A scanner sees the group and the instance and calls both routine.

Standing tenancy-admin

A stolen session or a phished user that already holds tenancy-admin skips the chain and still has every compartment.

Defending your OCI tenancy

Each control removes one condition from the path.

Scope the policy to the job

Grant the verb and the resource the job needs, in one compartment. Do not grant manage-all-resources on the tenancy to a group whose members can change.

Match a specific instance

Write the matching rule for one instance. Do not trust every instance in a compartment.

Split the two permissions

Do not give the same user both permission to update a dynamic group and permission to launch in the compartment the rule trusts.

Alert on the change that matters

Alert when a matching rule changes, and when a policy can manage all resources in the tenancy.

Limit who can read IAM

A read of groups and policies is the start of the search. Keep that read with the people who administer identity.

Automatic cleanup

After the identity is confirmed, restore the matching rule and terminate the instance.

How do you red team an OCI tenancy?

Red teaming an OCI tenancy means connecting the tenancy and proving a path from a limited identity to tenancy-admin. Cloud Exposure Validation maps those paths, runs the chain, and checks whether detection covered it.

IAM, compartments, and dynamic groups

It reads identity policies, the compartment hierarchy, and dynamic group matching rules. A policy over the whole tenancy, or a matching rule that trusts a compartment, is the path this video runs.

The chain, run by an agent

Agent O takes a low-privileged identity to tenancy-admin, then restores the matching rule and terminates the instance. The steps above are that run.

Continuous exposure validation

The same paths are re-tested as the tenancy changes, around the clock, including whether detection saw the run.

Transcript

Every other cloud tool hands you a list of vulnerabilities. OFFENSAI's agents reason over a knowledge graph of how clouds actually get breached and find the chain on their own. No human in the loop, no cloud AI.

A low-privileged OCI user maps the tenancy. Four dynamic groups, and only one is a way up. Reading each group's policy, the agent finds the one that matters. Platform admin, the single group whose policy can manage every resource in the tenancy.

Step two, the move. A dynamic group trusts any instance inside a compartment. So the agent rewrites that group's matching rule to trust the sandbox, launches one small instance there, and the cloud itself hands that instance the group's identity. Manage every resource in the tenancy.

A scanner sees a dynamic group and a running instance and calls both routine. The agent saw a matching rule it could rewrite into an identity it controls, and did.

Goal met. Tenancy admin. The keys to every compartment. The agent then restored the original matching rule and terminated the instance. Zero residue. No human wrote a line of the attack. It reasoned the path from the graph.

One limited user, one dynamic group rule. Full tenancy admin. Found, proven, and gone. Find out if your cloud is susceptible.

Shift happens.
Be ready when it does.

Move from cloud exposure detection to controlled validation, technical evidence, and risk-based prioritization, powered by AI.

OFFENSAI autonomous agent for cloud exploit validation