Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Cloud & Identity · fwd:cloudsec · · 22:23 runtime

Any App, No Permission: Two Independent Authorization Bypasses in Microsoft Entra Verified ID

In the wiki MicrosoftMicrosoft Entra Verified IDMicrosoft Entra IDMicrosoft Security Response Center
Transcript 2882 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

So thank thanks for having me here on this incredible stage. Uh my name is Vlad Fichuk and today I want to talk about a research journey that started from a very simple question. What will happen if we will strip permissions away? So this talk is about two authorization bypasses that I found under Asure under the verified ID um

service. uh this research uh reported to MSRC under a coordinated disclosure and

was uh cleared for publication. Um the first one involved the first author authorization bypass involved in an unexpected authorization uh pass through the directory role and the second one uh with much more interesting one includes service principle with very

interesting uh set of permissions.

Uh a little bit about me first. My name is Vlad Fchuk and I'm a cloud security researcher with a background of a red teaming insert response and military service as an officer. Um a lot of my work include in the past um building offensive tooling um creating cloud identity attacks in Azure and um helping

institutions and internal security teams in the cloud um topic. So just before we

will start this is uh our agenda for today verified ID I will give you some context regarding uh this service. Next we will go through the authorization in general that um happening inside Azure.

uh then we will uh break this uh authorization twice and finally we will

get into the impact and the vendor response and of course some takeaways from this um research.

So before we will start please please raise your hand how many of you guys hear about this service before.

Okay. Um, not so much. Um, so verified

ID is a Microsoft implementation uh for issuing and verifying um cryptographically signed document that exist in Azure. Uh we will call it verifiable uh credential. And once an employee get this kind of document he can present uh this document uh in front of a relying party that uh asked to prove the identity of this employee and

uh you you might think like in a badge of every employee that work in a company. So just to give you an example,

let's look in a real uh scenario. When an employee uh lost his MFA and now he want to recover his uh account, he might

probably get into one of the uh survey desk uh or IT guy uh in the company. uh

this IT guy will ask him uh probably

what his uh school name or what uh was

his first pet name or if he is a fan of

a football club uh what the name of this

football club Real Madrid and then uh

and then uh if this uh IT guy will

satisfy with the answers they can proceed to the actual recovery um uh

process. So so this is uh uh exactly what uh verified ID coming actually to

solve. Um if we will uh look at the components that constructing this kind of service in the background, we can find the the issuer um component that actually

issuing and signing the um the document

uh behind the scenes. It's using a private key that exist in the tenant and it's using uh some of other configuration files that exist in the uh administrative panel um in the verified ID service. So uh this uh configuration

files is configuration and credential um

contract. [snorts] So on once this document is signed um the employee got

the uh verifiable credential we will call it the VC and uh once uh he got

this document he store it inside his wallet and in Microsoft it's called an

authentic authenticator app and uh once

he want to uh uh prove his identity he

can present it in in front of the relying party. So only authorized administrators should be able to change this kind of configurations and uh if an attacker can alter any of these components uh they can influence what users trust inside the Microsoft flow. So the next thing

that matters uh is that verified ID um

exposed through more than one uh surface. uh first of all it exist in the graph which is exist under the graph uh

microsoft.com uh endpoint and this this

is the side where all the verifications uh happening and this is the side where for example the profiles live and in contrast we have the admin API uh endpoint that is responsible more uh about the issuing side and all the

administrator ative uh things that happening um in Asia. So they belong to

the same product area but they are different components with different token audience and as I eventually learned um uh with different authorization implementation. So regarding the authorization process that exist in Azure. So many of you who

uh did worked with Asia in the past, you probably know that uh in every service that you are sending a request, you got you have an JWT token um uh constructed

inside that um request. And if we will

uh look into the JWT uh anatomy, we will

find uh here um few important

attributes. For example, the audience uh the identity type which might be an app

or a delegated user. App is an service

principle that running with O permission

attached. And the delegated user is actually an application that running on behalf of that user with the oath permission attached to it as well. we can find this attri this uh permissions inside the roles and the SCP attributes and on top of all of it we have the wids which is the well-known ids uh where exist the goods that

represent a role entra directory roles

that exist in Asure. So this is where usually Azure uh complexity starts to show up. In Azure authorization doesn't come from one single place. So uh

depending on the API and the identity flow um access might be based on an oath

permission or the entra ID roles. So

ultimately the API receives all of these uh claims and decide which one he want to evaluate and trust. And let's have a look into one of the uh legitimate requests that h might be sent to the graph. So I decided to take a global reader as we can see in the top of the screenshot and we got 200. Okay.

So for those of you who not familiar with this site a entra uh role action

advertisers uh this site inspect uh the entra role actions mappings and see which uh documented operation are associated with each um role. So we can see here for

example that the global reader has an uh

uh read operation uh against the verified ID service. So let's actually start with the first um authorization bypass.

I decided to took a service principle without any oath permissions and I probe it with a few um role ids as

we can see in the next few slides. In the first example, I decided to took uh a security reader and surprisingly I got 200. Okay, why surprisingly? because uh for those of you who can see uh the search operation uh I'm doing here in the top of the uh of the screenshot the security reader doesn't uh appear to be a part of the documented operations read operations that exist uh in this

service. Then I tested security administrator as well and surprisingly I got 200. Okay,

one more time. So just like the security reader, the security administrator had zero published verified ID actions in the role action mapping that we can see here in the in this screenshot. So at this point the documentation and the runtime behavior starting to have a disagreement. So just to sum up of what we just saw until now, the global reader uh did have

a read u oper uh operation in the

documentation and this is why he could uh read um something from the graph. But

the security reader and security administrator uh were able to do the same thing uh although they didn't uh found in the documentation itself.

Um and this is where you might probably say hey Vlatty um you are talking here about privilege identities. So uh that

were the access uh that were access to sensitive information. That's it. this this is why you came here on this stage. So of course not h at this point I decided to leave this vector for later and move to the other parts of the attack surface. As uh we saw previously we have the second one which is the admin API. So in the graph uh wids look

like the control knob. Uh so changing that claim changed the authorization result. So I decided to test uh the verified ID admin panel um focusing on

the wids [snorts] uh attribute. So just

as a note um the simulation that I'm going to present in the next few slides is not 100% aligned with the order of the probes that I made in my simulations in my research and I decided to uh to present

it in this uh way just because of matter of time and in order to tell you it's in a kind of a story line. So here we are focusing on the second authorization bypass where a service principle with a global reader that exist in the wids uh without any oath

permission uh and I decided to check it against uh two different identity flows. The first one is the app only with the patch verb and the second one is the delegated permission with the patch verb as well. and we got two different responses. So same with different identity type opposite results. So I decided to probe it one more time now with the security reader and we got

the same inconsistency between these two

um responses. So I decided to go further with the app only approach and to focus on it because it looked more promising.

At this time I took a service principle with the uh verifiable credential read

operation and I run it against two

different endpoints. The first one is the authorities and the second one is the on board. And as you can see here one more time we got two different responses. So um this is what immediately gave me the next question. What will happen if I will remove the application permission and strip it away? Because as you can see here, the read operation permission attached to my service principle um probably don't have to patch and be

able to patch the authority endpoint.

So I remove the application uh permission as well. And now I'm running with service principle without any permissions at all. No oath and no entra

directory role and uh again I probe it against the authorities endpoint and the onboard and I got the same two responses 200 okay

against the forbidden. So that in that point uh this is where the issue became clear and app only identity uh inside the tenant did not

without any documented authorization is

able to probe the authorities endpoint and is able to get post and patch this endpoint uh on his behalf. So just uh

one more time to sum up uh what we just

uh saw a service principle without any permission is able to do pretty much everything. What I mean by that it could enumerate and read the verified ID authority configuration. It could retrieve the uh the VCs the credential configuration that we saw in the tenant. [snorts] But it was not limited only for a get operation. it was able to uh to

patch every aspect of the verified ID service. So if we will see at the documentation

uh of that published by Microsoft

um for example the authorities uh endpoint uh we were able to create a new private key that later we can use in order to sign a new VC a new uh document

or we can see and have a look uh in

other um endpoint the gener generate well-known D configuration endpoint where we can generate uh the sign did configuration uh file that later could

be uh used and influenced by the um

signing process that happening in the background. So this is just an appc of uh how I run

it in my uh lab. I took a service principle as you can see here uh without any permissions at all and it was able to uh patch the authority uh of the verified ID panel as he

wanted. So this vulnerability turns this from a simple configuration exposure uh into an integrity trust problem in general.

And regarding the impact itself, so let's say there is a leaked uh client secret uh credentials that leaked somewhere in the tenant uh for example

automated account logs or even outside

the tenant for example in a GitHub page

uh that uh expos somewhere in the wild.

So, an attacker that put his hand on this kind of client secret might be able to negotiate now with the verifiable credential uh endpoint in order to patch

it as he wanted in order to be able to

create documents on behalf of every

employee that exist in the tenant.

And this is pretty much game over. So

the impact is not just a data exposure, it's an unauthorized control over the

tenants user that they are asked to trust. And regarding the uh vendor response, so

uh MSRC said regarding the second authorization bypass uh regarding the admin API finding

um it was very clear and they reproduced

it and fixed it immediately. And regarding the second one, uh their uh answer were quite funny because first of

all they said that they see the issue and they will fix it uh as soon as possible but later when I talked to them they said that now they can't see any issue at all. So few takeaways from this um presentation. A valid token is not a a valid authorization decision. An app only token or delegated uh one or any

equivalent uh may hit different code paths. So test them both even if their behavior the entities looks the same. And published permissions are hypothetis. H runtime claims and response are the only evident evidences that matter. Um thank you for listening for my uh research. Uh please if you want to discuss on any aspect related to this uh research uh DM me and if you have any

question I'm here to answer it. [applause]

Thank you, Vlad. Um, now we'll have some questions from the audience and I'll check the Slack channel as well for questions. Um, I get a first one from myself. Uh, Vlatty, do you see many organizations using uh verified ID or is it still fairly new? How how widely is it adopted from your experience? Yeah, actually as we saw here as well with the hands that raised before h we saw it

quite a while in the in implemented in organizations. So yeah probably uh um

related to any uh company that using this kind of uh service. >> Perfect. Thank you. Uh any other questions from the room? >> I see one over here. I see two over here.

uh on your first bypass that you found >> I didn't hear. Sorry. >> Sorry. On the on the first by bypass that you found do you you think where security reader security admin could access those endpoints? Do you think that is sort of intended functionality for Microsoft I with your knowledge of verified ID would you expect the security reader to be able to hit those end points? Um I understand your

question and this kind of authorization bypass it's not an uh some weak user

that were able to access some any privileged sensitive information. It was more like MSRC doesn't have it in the documentation and this is the roles that indeed uh be able

to do it although they did they didn't exist in the documentation itself. So this is the the actual the the the thing that was matter and on top of it I want to add that this is the the real thing with the weeds and with the well-known ids that it gave me the the uh the

thinking of what to do in front uh of

the verified ID panel uh service.

So it was like a training stuff. >> Okay, one last question over here. Uh yeah. [clears throat] So uh did on the last response you got from MSRC uh did they give you any reason why they changed their uh opinion about why they don't didn't care about Not really not

really they probably just saw that I'm

talking here about the privile privilege identities security administrator and security reader. So probably they have a lot of other issues to to fix and they just put it as a side.

Perfect. All right, I think uh over to questions. Thank you again, Vlatty. Thank [applause] you.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 551 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks