Passionate about cyber security, I build today’s defenses with Microsoft Security for tomorrow’s threats. As a security consultant, I share what I learn here through posts, my Today I Learned series, and occasionally on stage at conferences.
24 days. 24 KQL riddles. One toy factory in trouble. Your December just got a lot more interesting. The Kusto Advent Riddle is a free KQL advent calendar for the security community. From 1 December, a new riddle opens every day. Each one is a CTF-style challenge that runs right inside the calendar, with a built-in Kusto Terminal next to it. There’s nothing to set up: sign up, open the door, write your KQL, and capture the flag riddle. Solve them all, collect badges, and sharpen your Kusto skills along the way. 🕵️
Sign-up is open! The first three warm-up challenges are already waiting for you, and on 1 December the first door opens.
Sign up for the Kusto Advent Riddle The Kusto Advent Riddle challenges What is the Kusto Advent Riddle? # In short: it’s a KQL capture-the-flag, built like an advent calendar. From 1 to 24 December, a new riddle unlocks every day at 12 PM (CET). Your job is to dig through the toy factory’s logs, find the answer and submit the flag.
Federated credentials reduce the risks of token exposure and leaked secrets, but they can leave dangling trust relationships too. In my previous post, I covered subject recycling in Microsoft Entra ID: how to find GitHub Actions and GitLab trusts that rely on mutable subjects and how to switch to immutable identifiers.
This time, I’m looking at AWS IAM role trust policies. The question is the same: does the trust rely on an immutable identifier or a name that could be recycled?
As a quick recap, here’s how mutable and immutable subjects differ:
GitLab example:
-"sub": "project_path:nicolonsky/ITDR:ref_type:branch:ref:main" +"sub": "project_id:715070358:ref_type:branch:ref:main" GitHub example:
-"sub": "repo:nicolonsky/ITDR:ref:refs/heads/main" +"sub": "repo:nicolonsky@32899754/ITDR@715070358:ref:refs/heads/main" AWS IAM role trust policies # If you’re coming from the Microsoft world, it’s worth distinguishing three core AWS IAM concepts:
Permissions policy: Defines which actions are allowed or denied on which resources. For example, s3:ListBucket allows listing objects in a bucket. The permissions are comparable to those in an Azure RBAC role. 1 2 Role trust policy: Defines who can assume a role and under which conditions. In the Microsoft world, principals always refer to Entra ID objects, such as users, groups and service principals (instances of app registrations). AWS can delegate trust directly to an external identity provider without local objects. 3 IAM role: Combines a trust policy with permissions policies. 4 Example configuration # Before using GitHub Actions or GitLab as a federated principal, add the IdP as an OIDC provider in IAM:
Managing multiple tenants in the Microsoft ecosystem has always been a challenge for enterprises. Before the Unified Security Operations Platform (USOP), Azure Lighthouse was an option for managing Microsoft Sentinel across tenants. With the move to the Defender XDR portal, the focus shifted to multitenant management through B2B accounts or granular delegated admin privileges (GDAP)1. But some organizations did not want to use B2B because of organizational policies or onboarding requirements, and GDAP access was limited to Microsoft Cloud Solution Partners (CSPs).
Now that tenant governance relationships extend to Defender XDR, I wanted to explore the setup, the use cases, and the benefits for organizations with multiple tenants. Microsoft documents the setup in its guide to configuring delegated access with governance relationships.2
Tip Under the hood, Defender XDR uses the native Entra tenant governance capabilities.3 This integration makes them more accessible to security teams working primarily in Defender XDR.
Dangling DNS records and OIDC redirect URIs are well-known, actively exploited security misconfigurations. While federated identity credentials reduce the risks of token exposure and leaked secrets, they can leave dangling trust relationships too.
Federated credentials are usually tied to two important token claims: iss (issuer) and sub (subject). For federated credentials in GitHub Actions pipelines, the GitHub IdP issues tokens with the following claims (truncated):
{ "payload": { "aud": "api://AzureADTokenExchange", "iss": "https://token.actions.githubusercontent.com", "ref": "refs/heads/main", "repository": "nicolonsky/ITDR", "repository_id": "715070358", "repository_owner": "nicolonsky", "repository_owner_id": "32899754", "sub": "repo:nicolonsky/ITDR:ref:refs/heads/main" } } Regardless of whether your repository belongs to an individual or an organization, the owner and repository names are constructed from your username or organization name.
Get a GitHub Action OIDC token In a JavaScript GitHub Action, @actions/core provides getIDToken to request a JWT from GitHub’s OIDC provider. You can then acquire a token with const token = await core.getIDToken(audience);.
See the OIDC token documentation for @actions/core for the full example.
The GitHub Actions workflow also needs the following permission:
permissions: id-token: write # required to request the OIDC token
If you’ve been in the Defender XDR portal, you might have noticed some new badges and banners hinting that Microsoft Defender now comes with native case management:
The feature was also part of the ISOC announcement and is now rolling out in public preview to Defender customers. Microsoft also published a message center post:
Microsoft Defender is introducing native Case Management to help security teams investigate and resolve threats faster while reducing tool sprawl. MC1477993
Sometimes SOC teams handle incidents in Defender but track the actual work, such as ownership, tasks, SLAs and handover notes, in separate tools. These can be ticketing systems or sometimes even Jira, while other teams use dedicated SOAR solutions. Many of those also have a sunset date, like Palo Alto XSOAR in 2029 1. So Microsoft keeps up the pace and adds incident management capabilities under the name of cases. Cases aim to bring work back from external tools directly into the Defender portal.
Case types # Case management currently supports two case types:
Incident cases (preview): Created by the service from correlated incident activity. During this phase, each incident case maps one-to-one to an incident.2 Generic cases: Created manually to track SecOps work outside the incident workflow, for example, a threat hunt, a hardening follow-up or an audit request. Microsoft recommends incident cases as the new experience for managing incidents. The legacy incident experience remains available during the preview.3