WEBVTT

00:00.000 --> 00:07.820
Alright, so let's move ahead with our next talk and before we go ahead, some little requests.

00:07.820 --> 00:12.060
One is to keep your phones on silent because that would end up disturbing the speaker.

00:12.120 --> 00:22.920
Apart from that, if we end the discussion, if the discussion ends and if there are some questions that you'd like to ask, the speaker would be available in the speaker's lounge next door.

00:22.920 --> 00:27.900
So you can reach out to him over there and continue with asking your questions if the time ends over here.

00:28.160 --> 00:31.120
Alright, so up next we have the very famous Dr.

00:31.120 --> 00:41.220
Nestori Sinema and he is, I mean, so we all know him, he's a very famous person and he's a Senior Principal Information Security Researcher at SecureWorks CTU.

00:41.600 --> 00:42.800
Previously, Dr.

00:42.800 --> 00:49.340
Sinema worked as a CIO, consultant, trainer and a university lecturer for over 20 years.

00:49.520 --> 00:55.220
And yes, he speaks in regular conferences, he's been Microsoft's most valuable security researcher.

00:55.220 --> 01:05.260
He also holds multiple Microsoft certifications and yep, he has spoken in a lot of conferences with respect to Microsoft 365 and Azure AD Security.

01:05.260 --> 01:06.620
So please welcome Dr.

01:06.620 --> 01:07.920
Nestori Sinema.

01:13.670 --> 01:16.390
Thank you, for kind words.

01:16.390 --> 01:19.230
Let's try to make them work.

01:19.230 --> 01:20.550
Okay, so...

01:22.450 --> 01:24.210
Does it work?

01:24.710 --> 01:26.170
Of course it doesn't.

01:26.170 --> 01:26.930
That's nice.

01:26.950 --> 01:28.230
Now we know.

01:28.230 --> 01:32.130
Okay, so well, you already introduced me, so thanks about that.

01:32.130 --> 01:33.550
So again, my name is Dr.

01:33.550 --> 01:38.630
Nestori Sinema and I come from Finland, but everything else you said is true, so we can move forward.

01:38.630 --> 01:42.210
By the way, follow me on Twitter or X or whatever it's called nowadays.

01:42.610 --> 01:45.270
And Mastodon and Blue Sky, so I'm everywhere.

01:45.930 --> 01:47.610
With the same title, Dr.

01:47.610 --> 01:48.590
Azure AD.

01:49.050 --> 01:53.590
And most of you, know me best of my two AD internals.

01:53.590 --> 01:54.710
Who has used that?

01:55.590 --> 02:00.950
Okay, if you haven't, you should, because APT29 uses that too.

02:01.050 --> 02:02.670
Also known as Nobilium.

02:03.010 --> 02:07.470
Well, at least they have used the same techniques according to my attack framework.

02:08.630 --> 02:09.510
Okay, what else?

02:09.510 --> 02:10.070
Yes, so...

02:12.550 --> 02:23.910
I was in summer holiday with my wife in Spain and in July 11th, Microsoft decided to change the name of the product, so it's not anymore Azure AD, now it's Android AD.

02:24.350 --> 02:27.630
And that's very great for a guy whose handle is Dr.

02:27.630 --> 02:28.550
Azure AD.

02:29.150 --> 02:31.610
And the tool name is AAD internals.

02:31.810 --> 02:40.090
But that's not the first, sorry, first part, because I actually ordered a new car before we went to the holidays and it was then delivered after that.

02:40.370 --> 02:43.050
And I chose a vanity place to that.

02:43.490 --> 02:44.930
And of course, that's AAD.

02:45.870 --> 02:46.230
So...

02:51.760 --> 02:57.360
So every time Microsoft is doing rebranding, it costs me 1000 euros, so it's pretty much the same as dollars.

02:59.180 --> 03:01.500
Okay, so I have some slides and demos.

03:04.660 --> 03:07.920
And I asked, do you want to have recorded or live demos?

03:07.920 --> 03:12.180
And most of you wanted to have recorded, so recorded it's going to be.

03:12.180 --> 03:16.520
Well, I have one live demo at the end, but otherwise all the demos are recorded.

03:18.120 --> 03:21.360
And let's start with some background information.

03:21.360 --> 03:26.020
So how many of you know what is Azure AD or Android AD?

03:26.200 --> 03:30.760
Okay, but short introduction, just for the background information.

03:30.760 --> 03:34.480
So it's Microsoft cloud-based identity and access management.

03:35.060 --> 03:35.880
Closer?

03:35.880 --> 03:36.880
Oh, okay.

03:38.540 --> 03:39.500
Better?

03:40.020 --> 03:41.060
Okay.

03:41.860 --> 03:44.320
So let's try to get this to work.

03:44.320 --> 03:44.560
Okay.

03:44.560 --> 03:52.740
And it's used by, of course, Microsoft's own products like 365 and thousands of third-party applications, so there's a lot of them.

03:52.820 --> 03:56.640
And it has multiple authentication options, so that's important for attackers.

03:56.640 --> 03:58.180
We will get back to it later.

03:58.220 --> 04:06.520
And usually all the stuff that is in there is synchronized from on-prem environment or on-prem AD, so that's how it's usually done.

04:06.520 --> 04:13.020
And that is done using Azure AD Connect or Cloud Sync, so there are two different things to do that.

04:15.400 --> 04:29.620
Yes, so about... well, the information I'm going to share with you today, I used that actually last year to gather some data about how many of people are using Azure AD actually.

04:29.620 --> 04:37.020
And I think Nick's geek had a presentation earlier... well, it was yesterday, and so he had some background information, but I have also.

04:37.200 --> 04:40.440
So let's start with Fortune 500 organizations.

04:40.440 --> 04:47.340
So about 80 months ago, 88% was using Azure AD, which is a quite big number.

04:48.220 --> 04:52.700
But in Finland, where I come from, the percentage is 98.

04:53.440 --> 04:55.360
So it's a lot more.

04:55.900 --> 05:00.560
And then top universities roughly 95% is using.

05:00.820 --> 05:02.540
And this next one is funny.

05:02.540 --> 05:09.880
So in Finland, we have like 302 municipalities, like cities and towns, and there's one who doesn't use.

05:11.580 --> 05:14.100
So it's almost 100%.

05:14.100 --> 05:16.080
But if you round up, it's 100%.

05:16.080 --> 05:21.100
So it's fair to say that everybody in Finland is using, and globally also like 90%.

05:21.100 --> 05:24.800
So that is very interesting to attackers.

05:24.800 --> 05:30.280
So there's a lot of organizations who are using, but you still need to know what to attack.

05:30.620 --> 05:35.140
So not just that they are using, but are there something that you can actually attack?

05:36.140 --> 05:39.260
So well, this is... everybody knows this.

05:39.260 --> 05:42.580
So at least some kind of version about cyber killshame.

05:42.640 --> 05:45.960
So we are in the recon village, so we are in the first wave.

05:45.960 --> 05:51.480
So we want to gather information so that we can start the weaponization, then the actual attack.

05:51.480 --> 05:54.420
But we are not doing anything bad at this point.

05:54.420 --> 05:57.660
Well, oh, nothing bad.

05:57.720 --> 06:01.340
So we are not attacking, but of course, we are gathering intelligent information.

06:01.340 --> 06:03.440
So that is kind of also bad.

06:04.380 --> 06:11.540
But luckily, there's a lot of stuff available like for free, and even without any authentication.

06:12.060 --> 06:15.920
Okay, so I told you that there are multiple authentication options.

06:16.060 --> 06:19.960
And usually you have connected your on-prem to cloud.

06:19.960 --> 06:25.740
And here are four, at least currently, available authentication options.

06:25.740 --> 06:31.800
So I'm not going to deep dive into the details, but still, I'm going to introduce each of those.

06:31.900 --> 06:41.980
So the version on the left is called Identity Federation, or ADFS is the, well, the product or Windows feature you use to implement that.

06:42.340 --> 06:46.040
So have any of you heard about golden time attacks?

06:46.620 --> 06:48.360
Yes, so this is the one.

06:48.600 --> 06:49.980
You can do that.

06:50.220 --> 06:50.720
Okay.

06:50.720 --> 06:57.800
And this was the first available option that allows you to use the same credentials in on-prem and cloud.

06:58.500 --> 07:02.940
Okay, but it's very like a big environment.

07:02.940 --> 07:05.300
So you need to have at least four servers to run that.

07:05.300 --> 07:08.780
And that's not a very good option for small businesses, for instance.

07:09.040 --> 07:12.340
So then Microsoft introduced the password hash synchronization.

07:12.580 --> 07:21.880
So basically we have a component, this Azure AD Connect, and it's synchronizing both users and other objects, but also password hashes, but not the NT hashes.

07:22.440 --> 07:27.540
Well, technically yes, but they are re-hashed a thousand times, so that's okay.

07:28.320 --> 07:38.040
And then there's a new stuff introduced a couple of years ago called password authentication, which means that you install a small agent on your on-prem environment.

07:38.040 --> 07:50.180
And then when people are trying to authenticate, those credentials are sent to that agent, and then it tries to log in using your Windows domain, and if that's okay, the user gets in.

07:50.200 --> 07:52.480
And the last one is certificate-based authentication.

07:53.780 --> 08:03.540
And also there's a funny thing called seamless single sign-on, which is Kerberos-based single sign-on, which all the deficiencies that the Kerberos has.

08:03.540 --> 08:13.880
So basically, if you are able to steal a certain NT hash from your on-prem AD, you can log in as any user you want to cloud, if they are using that.

08:14.080 --> 08:20.040
So there's five different ways, at least, how you can attack the authentication stuff.

08:21.200 --> 08:22.960
And why this is important?

08:22.960 --> 08:25.160
Well, I have a couple of slides here.

08:25.160 --> 08:26.820
So first one is for ADFS.

08:26.880 --> 08:34.780
So there are actually eight different ways, at least, how you can obtain the token signing certificate and perform calls and attacks.

08:35.340 --> 08:41.460
So this is very complicated, and you can just get one of those paths and you are good to go.

08:41.500 --> 08:47.180
So if you want to protect against those, that's not that easy, and it's good for attackers, right?

08:47.700 --> 08:49.540
And the second one is for PTA.

08:50.100 --> 09:11.300
And the PTA is a very interesting product, because if you are able to compromise the server that is running that PTA agent, you can export the certificate, and after that you have a persistent undetectable way to perform denial-of-service attacks, and also use that as a backdoor.

09:11.680 --> 09:13.380
And that's quite neat.

09:13.620 --> 09:16.480
So if they are using that, it would be nice to know.

09:17.160 --> 09:21.580
Well, unfortunately, at least now we can't know if they are using PTA.

09:21.580 --> 09:23.600
Other methods, yes, but not the PTA.

09:24.020 --> 09:30.720
But this is just to show you that these things are very complicated, and when they're complicated, they are always vulnerable somehow.

09:32.020 --> 09:36.500
Okay, then about hybrid cloud security, a couple of words.

09:36.500 --> 09:40.380
So people have asked me for years, is cloud safe?

09:40.380 --> 09:42.100
And I would say that yes, it is.

09:43.400 --> 09:49.400
At least until recently when they stole that token signing certificate, but usually it's okay.

09:50.100 --> 09:58.180
So if you want to, as a user, access the cloud, you need to have like some proof of identity, and that's it.

09:58.180 --> 09:59.400
So it's easy to use.

09:59.400 --> 10:04.140
But it's not good for bad guys, because they don't have the proof of identity.

10:04.400 --> 10:05.500
So they have two options.

10:05.500 --> 10:13.920
So they can either get the proof of identity, like using phishing, and then they are able to log in, or they can spoof the identity.

10:14.080 --> 10:16.200
And how can they do that?

10:16.380 --> 10:24.240
Well, if you have connected your on-prem environment to cloud, you're actually drilling holes to that safe cloud.

10:24.500 --> 10:33.320
And now the attackers can attack using the old methods they already know to those on-prem components, and via them they can go and attack your cloud.

10:33.320 --> 10:35.820
So this is what happened with Solarigate, actually.

10:38.900 --> 10:43.860
Okay, and then some goals to our recon.

10:43.960 --> 10:49.140
So what we want to do, we want to enumerate authentication options, so that we know where to attack.

10:49.140 --> 10:55.680
We want to find valid accounts and domains, so that we might do some social engineering, for instance.

10:57.040 --> 11:01.640
And of course, we could do phishing much easier if we know the valid accounts.

11:01.640 --> 11:10.900
And we don't want to leave any traces, meaning that we don't want a target organization to detect us, obviously.

11:10.900 --> 11:13.380
That would be otherwise quite a stupid recon.

11:14.460 --> 11:21.760
Okay, so then how to get OSINT, or open source intelligence?

11:22.040 --> 11:23.600
So we have two options.

11:23.600 --> 11:27.200
So we have anonymous API calls, and this is for everybody.

11:27.200 --> 11:31.240
So everyone can use these APIs to get that information.

11:31.820 --> 11:40.640
And then another way is to use authenticated APIs calls, and that requires that you need to have an Azure AD tenant.

11:40.640 --> 11:42.560
It doesn't have to be the target tenant.

11:42.560 --> 11:46.040
You can just sign up for a trial, and that's it.

11:46.040 --> 11:52.920
You just need to have one, which means that you need to log into your own tenant, so that you can get information from other tenants.

11:53.200 --> 11:57.900
So this is how Azure AD is done, or built.

12:00.260 --> 12:04.760
Okay, so what can you get using these anonymous API calls?

12:04.760 --> 12:10.840
So first of all, you will get all registered domains that the target tenant has.

12:11.260 --> 12:20.380
You may find out that is that domain managed or federated, and if it's federated, it's open for code on some attacks.

12:20.380 --> 12:21.860
That's always good to know.

12:21.860 --> 12:28.480
And by the way, you only need one domain being federated, so that you can do those attacks.

12:29.160 --> 12:34.800
And of course, you can have DNS information, so are there any mail exchange records, or SPF records, and so on.

12:34.800 --> 12:39.340
So you know that is that organization routing mail through Microsoft 365.

12:39.860 --> 12:42.080
You can have tenant ID with domain name.

12:42.080 --> 12:45.280
You can find out does the user exist.

12:45.820 --> 12:48.160
So if you have a username, you can try that.

12:48.160 --> 12:50.480
Is that real username?

12:50.860 --> 13:04.360
And then you can see that is the tenant using, or is the tenant ever used, a thing called Azure AD Connect Cloud Sync, which is a new kind of tool instead of Azure AD Connect.

13:04.540 --> 13:10.400
So this Cloud Sync is a new version that Microsoft would like us to use, but usually we don't.

13:11.180 --> 13:17.280
And then we also can find out that is the tenant using Microsoft Defender for identity?

13:17.280 --> 13:21.760
So we will more likely get caught if they are using.

13:21.880 --> 13:24.040
So it's good to know beforehand.

13:25.060 --> 13:27.220
Okay, so domain names.

13:27.220 --> 13:28.800
So how can we get those?

13:28.800 --> 13:48.580
So technically, this is using Exchange Online Auto Discover Service, which is used usually for for that, that if your user have your Outlook client, and they type in their username, then the Outlook can go to the Auto Discover Service to get information that where that Outlook should connect.

13:49.200 --> 13:57.140
However, if you want to, you can make a federation between two Exchange organizations.

13:57.160 --> 14:04.320
And a federation means that if your organization A and organization B, you can allow them to see other calendars, for instance.

14:04.320 --> 14:05.960
So that's the federation.

14:06.260 --> 14:15.240
And for that purpose, the Auto Discover is also used that you can ask that, okay, here's a domain name, what other domains there are.

14:15.780 --> 14:20.640
And I actually talked today with one of the Microsoft guys, he might be.

14:20.720 --> 14:24.980
So he asked me that, is it really true that you can get this information from Azure AD?

14:24.980 --> 14:30.780
Because the documentation said that you need to be at least a guest to get that information.

14:30.800 --> 14:32.800
And I said, no, that's not true.

14:32.800 --> 14:46.640
So basically, there's an API endpoint, you send there a SOAP request that has a domain, and as a return, you will get a list of all the other domains that tenant has.

14:47.000 --> 14:54.080
And it's very good for recon, because there might be some new product name, for instance, or there might be some mergers coming up.

14:54.080 --> 14:56.680
So they have just registered domains there and so on.

14:57.220 --> 15:01.680
So yeah, and also we can see that the Exchange version is 2015, which is quite old.

15:02.500 --> 15:06.260
I don't know, is it really that old, but at least it says so.

15:06.360 --> 15:07.920
So that was the first one.

15:09.100 --> 15:15.560
And then there's different APIs you can call to get information about the domains itself.

15:15.560 --> 15:20.160
So what's the domain type, is it managed or federated, or does the user exist?

15:20.260 --> 15:23.880
So there's different endpoints to do that.

15:24.140 --> 15:31.400
And then you can also see that this technical name, desktop SSO, the sailing name is seamless single sign-on, is that enabled?

15:31.400 --> 15:33.000
So that was the Kerberos stuff.

15:33.000 --> 15:42.980
So if you can get that, if he has a certain service account, you can then log in as any user to the cloud, if they are using this.

15:43.400 --> 15:47.920
And then you can also see that is the certificate-based authentication enabled?

15:48.160 --> 15:51.940
So a lot of information, and these are all like open APIs.

15:52.860 --> 15:57.660
And then, I don't know, did you see Nick's talk yesterday?

15:57.660 --> 16:03.460
But he actually found a nice way to enumerate users using OneDrives.

16:03.740 --> 16:12.600
So usually if you have a user who has a license for Teams, for instance, that user also will have a OneDrive.

16:13.380 --> 16:28.020
And basically what you do is that if your organization is like, let's say, Microsoft, and the username is like user at microsoft.com, you need to normalize that, which means that you just replace at and dots with an underscore.

16:28.060 --> 16:32.380
And then you make HTTP head request to that URL.

16:32.880 --> 16:38.240
And if that returns 200 or something like that, the user exists.

16:38.240 --> 16:40.280
And if it's 400, it doesn't exist.

16:40.280 --> 16:41.700
So quite a neat way.

16:41.700 --> 16:45.720
And this is good because there's no login events anywhere.

16:45.900 --> 16:49.600
So a target organization can detect this.

16:49.800 --> 16:53.700
Only Microsoft can, but not the target organization.

16:53.700 --> 16:56.280
And these are also not throttled.

16:56.460 --> 16:58.040
These other APIs are.

16:58.040 --> 17:04.820
So after 100,000 something, you will get false positives that it exists, even though it doesn't.

17:06.440 --> 17:07.400
Okay.

17:07.820 --> 17:18.880
Tenant ID, just call that API, call, sorry, that URL with a domain name, and you will get back in a JSON file where the tenant ID exists.

17:18.880 --> 17:21.240
So you can parse it, for instance, from here.

17:21.820 --> 17:23.680
So quite easy, neat way to do that.

17:26.180 --> 17:29.720
And then the Azure AD Connect Cloud Sync.

17:29.720 --> 17:32.160
So how do we know if the organization is using that?

17:32.160 --> 17:35.080
Well, they decided to make their username standard.

17:35.080 --> 17:38.000
I mean, the admin, sorry, the service account name is standard.

17:38.000 --> 17:39.240
It's always the same.

17:39.280 --> 17:42.700
AD2AD Sync service account at domain name.

17:42.700 --> 17:46.020
And if that user exists, you know that they are using that.

17:46.320 --> 17:51.400
So quite easy way, again, to find out internal information of the organization.

17:52.760 --> 17:55.480
And the last one is the Defender for Identity.

17:55.480 --> 18:00.540
So if these DNS names exist, then you know that they are using that.

18:00.940 --> 18:02.320
So again, quite easy way.

18:02.320 --> 18:12.980
So just ping that if it answers or just do other NS lookup, and if you can find that, you know that they are using Microsoft Defender for Identity.

18:15.340 --> 18:16.060
Okay.

18:16.060 --> 18:21.540
And here are all the commands you can use with my AD internal toolkit.

18:22.240 --> 18:24.980
So I'm going to show demos for this.

18:24.980 --> 18:30.080
So four commands, and each are doing one bit, and then the last one is going to do all the stuff.

18:31.160 --> 18:33.080
So let's start with the first one.

18:33.340 --> 18:36.640
So we want to get login information to a certain domain.

18:36.640 --> 18:44.100
We just give a domain name, and it is calling three or four different APIs, and then just put them all together.

18:44.100 --> 18:46.100
So we can see that what we can see.

18:46.100 --> 18:49.040
We can see that account type is federated, for instance.

18:49.560 --> 18:51.440
So Microsoft.com is federated.

18:54.080 --> 18:57.440
And then let's move forward to the next one.

18:58.580 --> 19:02.600
So we're going to get the tenant ID, but this is quite simple.

19:02.600 --> 19:06.380
You just give a domain name, and it will return you the tenant ID.

19:06.940 --> 19:14.080
And tenant ID you will need to use in certain API calls if you are doing some hacking, if you get inside the organization.

19:14.080 --> 19:16.600
So it's a very valuable information.

19:17.460 --> 19:23.100
And the next one, we're going to list all the domains of the organization.

19:23.360 --> 19:24.960
And this is actually quite fast.

19:24.960 --> 19:29.020
So it's second or something, and it will list all the domains.

19:29.020 --> 19:33.720
For instance, Microsoft has about 280 or something domains.

19:34.340 --> 19:36.500
Like tune.net.

19:36.500 --> 19:38.220
Does anybody remember that?

19:38.540 --> 19:39.660
Yeah.

19:41.580 --> 19:42.180
Okay.

19:42.180 --> 19:48.300
And the last one is the actual like kill chain functionality I've included in my tool.

19:48.880 --> 19:53.660
So it provides some domain name, and it will do all the stuff.

19:53.660 --> 19:58.740
So it will gather all the information it can, especially from the domains.

19:58.740 --> 20:01.800
So the last part is FT means format table.

20:01.880 --> 20:07.240
But this takes a lot, so I, you know, cut away something.

20:07.240 --> 20:09.440
And here we can see a lot of new information.

20:10.160 --> 20:13.160
And let's just scroll back up.

20:17.410 --> 20:18.070
Yes.

20:18.070 --> 20:24.210
So here we have like what is tenant brand, tenant name, tenant ID, tenant region.

20:24.210 --> 20:25.530
That's Bird Wild.

20:25.970 --> 20:26.850
Yes.

20:26.890 --> 20:31.010
And it doesn't use desktop SSO and the Cloud Sync they are using.

20:31.010 --> 20:32.510
So that's a good information.

20:32.650 --> 20:43.310
And then if you want to do some phishing stuff, it's good to know that is it using this particular like domain for for Mail Exchange?

20:43.530 --> 20:45.190
Is it sending it from the Cloud?

20:45.190 --> 20:49.290
So if there's SPF record, it means that it is sending outside also.

20:49.650 --> 20:53.730
And DMARC is, well, it also says that it is using that for sending email.

20:54.090 --> 20:55.950
But all that kind of information you can get.

20:55.950 --> 21:02.270
And also the STS means that what is the Federation server name that that particular domain is using.

21:06.030 --> 21:07.070
OK.

21:07.190 --> 21:17.230
And then we have the authenticated API calls, which means that you need to have your own tenant where you can log in and then gather stuff of other other tenants.

21:17.230 --> 21:22.550
And what you can get is the you can get the tenant name or domain from tenant ID.

21:22.690 --> 21:24.290
And where do you use this?

21:24.290 --> 21:26.130
Well, actually, this is more like for admins.

21:26.130 --> 21:31.850
So if you have you can see that some people are logging in using some weird application.

21:32.090 --> 21:36.410
You can't see who created that, but you can see the tenant ID who created that application.

21:36.410 --> 21:39.990
So you can do like a reverse lookup for that.

21:40.630 --> 21:46.950
And then if you have the user's email, you will get the user's object ID in Azure AD using that email.

21:47.030 --> 21:52.550
You can have a user's display name and also user's UPN or user principal name.

21:52.790 --> 21:53.850
But this is also neat.

21:53.850 --> 21:56.350
You can see team status of that user.

21:56.370 --> 21:58.710
If the user is using Teams.

22:00.410 --> 22:06.090
And here are the commands again, which I have in AAD internals.

22:06.090 --> 22:13.690
So you can get the domain, you can find the Teams user, and then you can see if that user is available.

22:16.680 --> 22:18.120
So let's start.

22:20.100 --> 22:23.740
So first, we need to get an access token because we need to be authenticated.

22:23.740 --> 22:25.420
And this is for our own tenant.

22:25.700 --> 22:34.580
So I'm just going to get one for Microsoft Graph, which you can use to get that tenant ID, sorry, tenant domain using tenant ID.

22:34.800 --> 22:36.500
So you need to have that.

22:38.280 --> 22:41.840
And you need to be actually global admin in your own tenant.

22:41.960 --> 22:46.280
I don't know why, but you need to be global admin, but because it's your own tenant, you can be.

22:46.420 --> 22:49.600
And now you can get ask information about other tenants.

22:50.740 --> 22:53.840
The next one is, what was it?

22:54.040 --> 22:56.640
Access token for Teams.

22:57.020 --> 23:07.780
Because Teams has quite interesting APIs, and one of them is that you can search external user.

23:08.400 --> 23:14.020
And when you give the user principal name of the target user, it will get a lot of nice information.

23:16.940 --> 23:28.840
Well, for obvious reasons, I'm not showing those to you, but it shows what is the user's tenant ID, what is the user's user principal name, what is the display name, and then what is the object ID.

23:29.840 --> 23:34.260
Now, I don't know why that information is revealed, but it is there.

23:34.880 --> 23:42.180
And one thing that you can do with the object ID is that you can see that is that user online in Teams.

23:42.340 --> 23:43.740
So let's see how that goes.

23:49.640 --> 23:56.420
So you can provide either user principal name or the object ID, and then it will tell you is this user online or not.

23:56.700 --> 24:08.060
And actually, in Nick Skeak's talk, he had a nice graph that he used this API to get information that were Microsoft employees working or not.

24:08.240 --> 24:14.980
And they had an all-hands meeting on Friday at a certain time, because they were all offline.

24:15.060 --> 24:18.140
And now we can see that this particular person is offline.

24:18.360 --> 24:21.680
And this is... I don't know why this information is available.

24:21.680 --> 24:25.800
Well, because, well, information must be free and so on.

24:27.940 --> 24:28.860
Okay.

24:28.860 --> 24:29.620
But yes.

24:29.620 --> 24:37.940
So basically, that was all I got for those internals commands.

24:37.940 --> 24:42.780
But for those who don't want to type PowerShell, I made a tool, online tool.

24:43.120 --> 24:45.560
It's from aadinternals.com.

24:45.640 --> 24:49.820
And it can tell you the same thing that I showed to you.

24:49.820 --> 24:52.340
And I'm going to demonstrate that, by the way, next.

24:54.700 --> 24:56.780
So here we are.

24:56.880 --> 25:02.220
And we go to aadinternals.com.

25:03.100 --> 25:07.140
And let's zoom a bit.

25:08.820 --> 25:11.400
So here you can give a tenant ID.

25:11.400 --> 25:14.860
You can give domain name or email address of a user.

25:15.300 --> 25:17.060
Let's try this.

25:17.060 --> 25:24.200
So we can see that it's the CIO of Microsoft doing something.

25:28.620 --> 25:29.480
Okay.

25:29.540 --> 25:33.280
So we can see what's the logo of that organization.

25:33.280 --> 25:35.780
We have tenant branding, tenant ID worldwide.

25:36.320 --> 25:40.560
They are not using single sign-on, but they are using the Azure Cloud Connect sync.

25:40.600 --> 25:43.580
No certificate-based authentication, at least for this user.

25:43.740 --> 25:45.860
And they have that much verified domains.

25:48.160 --> 25:50.960
I might mistype this, actually.

25:50.980 --> 25:52.180
I always do that.

25:52.180 --> 25:53.260
Let's try again.

25:59.860 --> 26:00.640
So yes.

26:00.640 --> 26:02.280
Now we can see that he's away.

26:02.380 --> 26:04.480
So there's no calling to him.

26:06.220 --> 26:12.320
And actually, if you think about this team status, that's a very good recon information, because you can actually follow somebody.

26:12.640 --> 26:13.980
What is he doing?

26:14.340 --> 26:15.580
So is he available?

26:15.580 --> 26:16.560
Is he not?

26:16.700 --> 26:20.540
And then you can, like, well, you know what you can do with that information.

26:20.680 --> 26:22.260
And you know where people are.

26:22.660 --> 26:25.160
And also, like, we have links to...

26:27.220 --> 26:28.600
So we can click here.

26:29.180 --> 26:30.260
Let's see how this works.

26:30.260 --> 26:32.620
So it wants me to sign in.

26:32.620 --> 26:35.760
And let's see, does this work?

26:36.580 --> 26:37.780
No, it didn't.

26:37.920 --> 26:39.780
So, but usually there's AD FS service.

26:39.780 --> 26:42.640
They are asking that, where do you want to log in?

26:42.640 --> 26:45.900
So you can actually see other organizations.

26:45.900 --> 26:48.620
This organization has business relationships.

26:48.620 --> 26:55.640
And that's also more information for you to start, like, searching for more or gathering more intelligence.

26:58.120 --> 26:59.240
Okay.

26:59.520 --> 27:01.760
But yes, that was all.

27:01.760 --> 27:02.740
Thank you.

