1 00:00:00,000 --> 00:00:07,820 Alright, so let's move ahead with our next talk and before we go ahead, some little requests. 2 00:00:07,820 --> 00:00:12,060 One is to keep your phones on silent because that would end up disturbing the speaker. 3 00:00:12,120 --> 00: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. 4 00:00:22,920 --> 00:00:27,900 So you can reach out to him over there and continue with asking your questions if the time ends over here. 5 00:00:28,160 --> 00:00:31,120 Alright, so up next we have the very famous Dr. 6 00:00:31,120 --> 00: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. 7 00:00:41,600 --> 00:00:42,800 Previously, Dr. 8 00:00:42,800 --> 00:00:49,340 Sinema worked as a CIO, consultant, trainer and a university lecturer for over 20 years. 9 00:00:49,520 --> 00:00:55,220 And yes, he speaks in regular conferences, he's been Microsoft's most valuable security researcher. 10 00:00:55,220 --> 00: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. 11 00:01:05,260 --> 00:01:06,620 So please welcome Dr. 12 00:01:06,620 --> 00:01:07,920 Nestori Sinema. 13 00:01:13,670 --> 00:01:16,390 Thank you, for kind words. 14 00:01:16,390 --> 00:01:19,230 Let's try to make them work. 15 00:01:19,230 --> 00:01:20,550 Okay, so... 16 00:01:22,450 --> 00:01:24,210 Does it work? 17 00:01:24,710 --> 00:01:26,170 Of course it doesn't. 18 00:01:26,170 --> 00:01:26,930 That's nice. 19 00:01:26,950 --> 00:01:28,230 Now we know. 20 00:01:28,230 --> 00:01:32,130 Okay, so well, you already introduced me, so thanks about that. 21 00:01:32,130 --> 00:01:33,550 So again, my name is Dr. 22 00:01:33,550 --> 00:01:38,630 Nestori Sinema and I come from Finland, but everything else you said is true, so we can move forward. 23 00:01:38,630 --> 00:01:42,210 By the way, follow me on Twitter or X or whatever it's called nowadays. 24 00:01:42,610 --> 00:01:45,270 And Mastodon and Blue Sky, so I'm everywhere. 25 00:01:45,930 --> 00:01:47,610 With the same title, Dr. 26 00:01:47,610 --> 00:01:48,590 Azure AD. 27 00:01:49,050 --> 00:01:53,590 And most of you, know me best of my two AD internals. 28 00:01:53,590 --> 00:01:54,710 Who has used that? 29 00:01:55,590 --> 00:02:00,950 Okay, if you haven't, you should, because APT29 uses that too. 30 00:02:01,050 --> 00:02:02,670 Also known as Nobilium. 31 00:02:03,010 --> 00:02:07,470 Well, at least they have used the same techniques according to my attack framework. 32 00:02:08,630 --> 00:02:09,510 Okay, what else? 33 00:02:09,510 --> 00:02:10,070 Yes, so... 34 00:02:12,550 --> 00: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. 35 00:02:24,350 --> 00:02:27,630 And that's very great for a guy whose handle is Dr. 36 00:02:27,630 --> 00:02:28,550 Azure AD. 37 00:02:29,150 --> 00:02:31,610 And the tool name is AAD internals. 38 00:02:31,810 --> 00: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. 39 00:02:40,370 --> 00:02:43,050 And I chose a vanity place to that. 40 00:02:43,490 --> 00:02:44,930 And of course, that's AAD. 41 00:02:45,870 --> 00:02:46,230 So... 42 00:02:51,760 --> 00:02:57,360 So every time Microsoft is doing rebranding, it costs me 1000 euros, so it's pretty much the same as dollars. 43 00:02:59,180 --> 00:03:01,500 Okay, so I have some slides and demos. 44 00:03:04,660 --> 00:03:07,920 And I asked, do you want to have recorded or live demos? 45 00:03:07,920 --> 00:03:12,180 And most of you wanted to have recorded, so recorded it's going to be. 46 00:03:12,180 --> 00:03:16,520 Well, I have one live demo at the end, but otherwise all the demos are recorded. 47 00:03:18,120 --> 00:03:21,360 And let's start with some background information. 48 00:03:21,360 --> 00:03:26,020 So how many of you know what is Azure AD or Android AD? 49 00:03:26,200 --> 00:03:30,760 Okay, but short introduction, just for the background information. 50 00:03:30,760 --> 00:03:34,480 So it's Microsoft cloud-based identity and access management. 51 00:03:35,060 --> 00:03:35,880 Closer? 52 00:03:35,880 --> 00:03:36,880 Oh, okay. 53 00:03:38,540 --> 00:03:39,500 Better? 54 00:03:40,020 --> 00:03:41,060 Okay. 55 00:03:41,860 --> 00:03:44,320 So let's try to get this to work. 56 00:03:44,320 --> 00:03:44,560 Okay. 57 00:03:44,560 --> 00: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. 58 00:03:52,820 --> 00:03:56,640 And it has multiple authentication options, so that's important for attackers. 59 00:03:56,640 --> 00:03:58,180 We will get back to it later. 60 00:03:58,220 --> 00: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. 61 00:04:06,520 --> 00:04:13,020 And that is done using Azure AD Connect or Cloud Sync, so there are two different things to do that. 62 00:04:15,400 --> 00: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. 63 00:04:29,620 --> 00: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. 64 00:04:37,200 --> 00:04:40,440 So let's start with Fortune 500 organizations. 65 00:04:40,440 --> 00:04:47,340 So about 80 months ago, 88% was using Azure AD, which is a quite big number. 66 00:04:48,220 --> 00:04:52,700 But in Finland, where I come from, the percentage is 98. 67 00:04:53,440 --> 00:04:55,360 So it's a lot more. 68 00:04:55,900 --> 00:05:00,560 And then top universities roughly 95% is using. 69 00:05:00,820 --> 00:05:02,540 And this next one is funny. 70 00:05:02,540 --> 00:05:09,880 So in Finland, we have like 302 municipalities, like cities and towns, and there's one who doesn't use. 71 00:05:11,580 --> 00:05:14,100 So it's almost 100%. 72 00:05:14,100 --> 00:05:16,080 But if you round up, it's 100%. 73 00:05:16,080 --> 00:05:21,100 So it's fair to say that everybody in Finland is using, and globally also like 90%. 74 00:05:21,100 --> 00:05:24,800 So that is very interesting to attackers. 75 00:05:24,800 --> 00:05:30,280 So there's a lot of organizations who are using, but you still need to know what to attack. 76 00:05:30,620 --> 00:05:35,140 So not just that they are using, but are there something that you can actually attack? 77 00:05:36,140 --> 00:05:39,260 So well, this is... everybody knows this. 78 00:05:39,260 --> 00:05:42,580 So at least some kind of version about cyber killshame. 79 00:05:42,640 --> 00:05:45,960 So we are in the recon village, so we are in the first wave. 80 00:05:45,960 --> 00:05:51,480 So we want to gather information so that we can start the weaponization, then the actual attack. 81 00:05:51,480 --> 00:05:54,420 But we are not doing anything bad at this point. 82 00:05:54,420 --> 00:05:57,660 Well, oh, nothing bad. 83 00:05:57,720 --> 00:06:01,340 So we are not attacking, but of course, we are gathering intelligent information. 84 00:06:01,340 --> 00:06:03,440 So that is kind of also bad. 85 00:06:04,380 --> 00:06:11,540 But luckily, there's a lot of stuff available like for free, and even without any authentication. 86 00:06:12,060 --> 00:06:15,920 Okay, so I told you that there are multiple authentication options. 87 00:06:16,060 --> 00:06:19,960 And usually you have connected your on-prem to cloud. 88 00:06:19,960 --> 00:06:25,740 And here are four, at least currently, available authentication options. 89 00:06:25,740 --> 00:06:31,800 So I'm not going to deep dive into the details, but still, I'm going to introduce each of those. 90 00:06:31,900 --> 00: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. 91 00:06:42,340 --> 00:06:46,040 So have any of you heard about golden time attacks? 92 00:06:46,620 --> 00:06:48,360 Yes, so this is the one. 93 00:06:48,600 --> 00:06:49,980 You can do that. 94 00:06:50,220 --> 00:06:50,720 Okay. 95 00:06:50,720 --> 00:06:57,800 And this was the first available option that allows you to use the same credentials in on-prem and cloud. 96 00:06:58,500 --> 00:07:02,940 Okay, but it's very like a big environment. 97 00:07:02,940 --> 00:07:05,300 So you need to have at least four servers to run that. 98 00:07:05,300 --> 00:07:08,780 And that's not a very good option for small businesses, for instance. 99 00:07:09,040 --> 00:07:12,340 So then Microsoft introduced the password hash synchronization. 100 00:07:12,580 --> 00: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. 101 00:07:22,440 --> 00:07:27,540 Well, technically yes, but they are re-hashed a thousand times, so that's okay. 102 00:07:28,320 --> 00: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. 103 00:07:38,040 --> 00: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. 104 00:07:50,200 --> 00:07:52,480 And the last one is certificate-based authentication. 105 00:07:53,780 --> 00: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. 106 00:08:03,540 --> 00: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. 107 00:08:14,080 --> 00:08:20,040 So there's five different ways, at least, how you can attack the authentication stuff. 108 00:08:21,200 --> 00:08:22,960 And why this is important? 109 00:08:22,960 --> 00:08:25,160 Well, I have a couple of slides here. 110 00:08:25,160 --> 00:08:26,820 So first one is for ADFS. 111 00:08:26,880 --> 00: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. 112 00:08:35,340 --> 00:08:41,460 So this is very complicated, and you can just get one of those paths and you are good to go. 113 00:08:41,500 --> 00:08:47,180 So if you want to protect against those, that's not that easy, and it's good for attackers, right? 114 00:08:47,700 --> 00:08:49,540 And the second one is for PTA. 115 00:08:50,100 --> 00: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. 116 00:09:11,680 --> 00:09:13,380 And that's quite neat. 117 00:09:13,620 --> 00:09:16,480 So if they are using that, it would be nice to know. 118 00:09:17,160 --> 00:09:21,580 Well, unfortunately, at least now we can't know if they are using PTA. 119 00:09:21,580 --> 00:09:23,600 Other methods, yes, but not the PTA. 120 00:09:24,020 --> 00: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. 121 00:09:32,020 --> 00:09:36,500 Okay, then about hybrid cloud security, a couple of words. 122 00:09:36,500 --> 00:09:40,380 So people have asked me for years, is cloud safe? 123 00:09:40,380 --> 00:09:42,100 And I would say that yes, it is. 124 00:09:43,400 --> 00:09:49,400 At least until recently when they stole that token signing certificate, but usually it's okay. 125 00:09:50,100 --> 00: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. 126 00:09:58,180 --> 00:09:59,400 So it's easy to use. 127 00:09:59,400 --> 00:10:04,140 But it's not good for bad guys, because they don't have the proof of identity. 128 00:10:04,400 --> 00:10:05,500 So they have two options. 129 00:10:05,500 --> 00: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. 130 00:10:14,080 --> 00:10:16,200 And how can they do that? 131 00:10:16,380 --> 00:10:24,240 Well, if you have connected your on-prem environment to cloud, you're actually drilling holes to that safe cloud. 132 00:10:24,500 --> 00: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. 133 00:10:33,320 --> 00:10:35,820 So this is what happened with Solarigate, actually. 134 00:10:38,900 --> 00:10:43,860 Okay, and then some goals to our recon. 135 00:10:43,960 --> 00:10:49,140 So what we want to do, we want to enumerate authentication options, so that we know where to attack. 136 00:10:49,140 --> 00:10:55,680 We want to find valid accounts and domains, so that we might do some social engineering, for instance. 137 00:10:57,040 --> 00:11:01,640 And of course, we could do phishing much easier if we know the valid accounts. 138 00:11:01,640 --> 00: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. 139 00:11:10,900 --> 00:11:13,380 That would be otherwise quite a stupid recon. 140 00:11:14,460 --> 00:11:21,760 Okay, so then how to get OSINT, or open source intelligence? 141 00:11:22,040 --> 00:11:23,600 So we have two options. 142 00:11:23,600 --> 00:11:27,200 So we have anonymous API calls, and this is for everybody. 143 00:11:27,200 --> 00:11:31,240 So everyone can use these APIs to get that information. 144 00:11:31,820 --> 00: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. 145 00:11:40,640 --> 00:11:42,560 It doesn't have to be the target tenant. 146 00:11:42,560 --> 00:11:46,040 You can just sign up for a trial, and that's it. 147 00:11:46,040 --> 00: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. 148 00:11:53,200 --> 00:11:57,900 So this is how Azure AD is done, or built. 149 00:12:00,260 --> 00:12:04,760 Okay, so what can you get using these anonymous API calls? 150 00:12:04,760 --> 00:12:10,840 So first of all, you will get all registered domains that the target tenant has. 151 00:12:11,260 --> 00: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. 152 00:12:20,380 --> 00:12:21,860 That's always good to know. 153 00:12:21,860 --> 00:12:28,480 And by the way, you only need one domain being federated, so that you can do those attacks. 154 00:12:29,160 --> 00:12:34,800 And of course, you can have DNS information, so are there any mail exchange records, or SPF records, and so on. 155 00:12:34,800 --> 00:12:39,340 So you know that is that organization routing mail through Microsoft 365. 156 00:12:39,860 --> 00:12:42,080 You can have tenant ID with domain name. 157 00:12:42,080 --> 00:12:45,280 You can find out does the user exist. 158 00:12:45,820 --> 00:12:48,160 So if you have a username, you can try that. 159 00:12:48,160 --> 00:12:50,480 Is that real username? 160 00:12:50,860 --> 00: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. 161 00:13:04,540 --> 00:13:10,400 So this Cloud Sync is a new version that Microsoft would like us to use, but usually we don't. 162 00:13:11,180 --> 00:13:17,280 And then we also can find out that is the tenant using Microsoft Defender for identity? 163 00:13:17,280 --> 00:13:21,760 So we will more likely get caught if they are using. 164 00:13:21,880 --> 00:13:24,040 So it's good to know beforehand. 165 00:13:25,060 --> 00:13:27,220 Okay, so domain names. 166 00:13:27,220 --> 00:13:28,800 So how can we get those? 167 00:13:28,800 --> 00: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. 168 00:13:49,200 --> 00:13:57,140 However, if you want to, you can make a federation between two Exchange organizations. 169 00:13:57,160 --> 00: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. 170 00:14:04,320 --> 00:14:05,960 So that's the federation. 171 00:14:06,260 --> 00: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. 172 00:14:15,780 --> 00:14:20,640 And I actually talked today with one of the Microsoft guys, he might be. 173 00:14:20,720 --> 00:14:24,980 So he asked me that, is it really true that you can get this information from Azure AD? 174 00:14:24,980 --> 00:14:30,780 Because the documentation said that you need to be at least a guest to get that information. 175 00:14:30,800 --> 00:14:32,800 And I said, no, that's not true. 176 00:14:32,800 --> 00: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. 177 00:14:47,000 --> 00: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. 178 00:14:54,080 --> 00:14:56,680 So they have just registered domains there and so on. 179 00:14:57,220 --> 00:15:01,680 So yeah, and also we can see that the Exchange version is 2015, which is quite old. 180 00:15:02,500 --> 00:15:06,260 I don't know, is it really that old, but at least it says so. 181 00:15:06,360 --> 00:15:07,920 So that was the first one. 182 00:15:09,100 --> 00:15:15,560 And then there's different APIs you can call to get information about the domains itself. 183 00:15:15,560 --> 00:15:20,160 So what's the domain type, is it managed or federated, or does the user exist? 184 00:15:20,260 --> 00:15:23,880 So there's different endpoints to do that. 185 00:15:24,140 --> 00: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? 186 00:15:31,400 --> 00:15:33,000 So that was the Kerberos stuff. 187 00:15:33,000 --> 00: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. 188 00:15:43,400 --> 00:15:47,920 And then you can also see that is the certificate-based authentication enabled? 189 00:15:48,160 --> 00:15:51,940 So a lot of information, and these are all like open APIs. 190 00:15:52,860 --> 00:15:57,660 And then, I don't know, did you see Nick's talk yesterday? 191 00:15:57,660 --> 00:16:03,460 But he actually found a nice way to enumerate users using OneDrives. 192 00:16:03,740 --> 00: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. 193 00:16:13,380 --> 00: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. 194 00:16:28,060 --> 00:16:32,380 And then you make HTTP head request to that URL. 195 00:16:32,880 --> 00:16:38,240 And if that returns 200 or something like that, the user exists. 196 00:16:38,240 --> 00:16:40,280 And if it's 400, it doesn't exist. 197 00:16:40,280 --> 00:16:41,700 So quite a neat way. 198 00:16:41,700 --> 00:16:45,720 And this is good because there's no login events anywhere. 199 00:16:45,900 --> 00:16:49,600 So a target organization can detect this. 200 00:16:49,800 --> 00:16:53,700 Only Microsoft can, but not the target organization. 201 00:16:53,700 --> 00:16:56,280 And these are also not throttled. 202 00:16:56,460 --> 00:16:58,040 These other APIs are. 203 00:16:58,040 --> 00:17:04,820 So after 100,000 something, you will get false positives that it exists, even though it doesn't. 204 00:17:06,440 --> 00:17:07,400 Okay. 205 00:17:07,820 --> 00: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. 206 00:17:18,880 --> 00:17:21,240 So you can parse it, for instance, from here. 207 00:17:21,820 --> 00:17:23,680 So quite easy, neat way to do that. 208 00:17:26,180 --> 00:17:29,720 And then the Azure AD Connect Cloud Sync. 209 00:17:29,720 --> 00:17:32,160 So how do we know if the organization is using that? 210 00:17:32,160 --> 00:17:35,080 Well, they decided to make their username standard. 211 00:17:35,080 --> 00:17:38,000 I mean, the admin, sorry, the service account name is standard. 212 00:17:38,000 --> 00:17:39,240 It's always the same. 213 00:17:39,280 --> 00:17:42,700 AD2AD Sync service account at domain name. 214 00:17:42,700 --> 00:17:46,020 And if that user exists, you know that they are using that. 215 00:17:46,320 --> 00:17:51,400 So quite easy way, again, to find out internal information of the organization. 216 00:17:52,760 --> 00:17:55,480 And the last one is the Defender for Identity. 217 00:17:55,480 --> 00:18:00,540 So if these DNS names exist, then you know that they are using that. 218 00:18:00,940 --> 00:18:02,320 So again, quite easy way. 219 00:18:02,320 --> 00: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. 220 00:18:15,340 --> 00:18:16,060 Okay. 221 00:18:16,060 --> 00:18:21,540 And here are all the commands you can use with my AD internal toolkit. 222 00:18:22,240 --> 00:18:24,980 So I'm going to show demos for this. 223 00:18:24,980 --> 00:18:30,080 So four commands, and each are doing one bit, and then the last one is going to do all the stuff. 224 00:18:31,160 --> 00:18:33,080 So let's start with the first one. 225 00:18:33,340 --> 00:18:36,640 So we want to get login information to a certain domain. 226 00:18:36,640 --> 00: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. 227 00:18:44,100 --> 00:18:46,100 So we can see that what we can see. 228 00:18:46,100 --> 00:18:49,040 We can see that account type is federated, for instance. 229 00:18:49,560 --> 00:18:51,440 So Microsoft.com is federated. 230 00:18:54,080 --> 00:18:57,440 And then let's move forward to the next one. 231 00:18:58,580 --> 00:19:02,600 So we're going to get the tenant ID, but this is quite simple. 232 00:19:02,600 --> 00:19:06,380 You just give a domain name, and it will return you the tenant ID. 233 00:19:06,940 --> 00: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. 234 00:19:14,080 --> 00:19:16,600 So it's a very valuable information. 235 00:19:17,460 --> 00:19:23,100 And the next one, we're going to list all the domains of the organization. 236 00:19:23,360 --> 00:19:24,960 And this is actually quite fast. 237 00:19:24,960 --> 00:19:29,020 So it's second or something, and it will list all the domains. 238 00:19:29,020 --> 00:19:33,720 For instance, Microsoft has about 280 or something domains. 239 00:19:34,340 --> 00:19:36,500 Like tune.net. 240 00:19:36,500 --> 00:19:38,220 Does anybody remember that? 241 00:19:38,540 --> 00:19:39,660 Yeah. 242 00:19:41,580 --> 00:19:42,180 Okay. 243 00:19:42,180 --> 00:19:48,300 And the last one is the actual like kill chain functionality I've included in my tool. 244 00:19:48,880 --> 00:19:53,660 So it provides some domain name, and it will do all the stuff. 245 00:19:53,660 --> 00:19:58,740 So it will gather all the information it can, especially from the domains. 246 00:19:58,740 --> 00:20:01,800 So the last part is FT means format table. 247 00:20:01,880 --> 00:20:07,240 But this takes a lot, so I, you know, cut away something. 248 00:20:07,240 --> 00:20:09,440 And here we can see a lot of new information. 249 00:20:10,160 --> 00:20:13,160 And let's just scroll back up. 250 00:20:17,410 --> 00:20:18,070 Yes. 251 00:20:18,070 --> 00:20:24,210 So here we have like what is tenant brand, tenant name, tenant ID, tenant region. 252 00:20:24,210 --> 00:20:25,530 That's Bird Wild. 253 00:20:25,970 --> 00:20:26,850 Yes. 254 00:20:26,890 --> 00:20:31,010 And it doesn't use desktop SSO and the Cloud Sync they are using. 255 00:20:31,010 --> 00:20:32,510 So that's a good information. 256 00:20:32,650 --> 00: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? 257 00:20:43,530 --> 00:20:45,190 Is it sending it from the Cloud? 258 00:20:45,190 --> 00:20:49,290 So if there's SPF record, it means that it is sending outside also. 259 00:20:49,650 --> 00:20:53,730 And DMARC is, well, it also says that it is using that for sending email. 260 00:20:54,090 --> 00:20:55,950 But all that kind of information you can get. 261 00:20:55,950 --> 00:21:02,270 And also the STS means that what is the Federation server name that that particular domain is using. 262 00:21:06,030 --> 00:21:07,070 OK. 263 00:21:07,190 --> 00: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. 264 00:21:17,230 --> 00:21:22,550 And what you can get is the you can get the tenant name or domain from tenant ID. 265 00:21:22,690 --> 00:21:24,290 And where do you use this? 266 00:21:24,290 --> 00:21:26,130 Well, actually, this is more like for admins. 267 00:21:26,130 --> 00:21:31,850 So if you have you can see that some people are logging in using some weird application. 268 00:21:32,090 --> 00:21:36,410 You can't see who created that, but you can see the tenant ID who created that application. 269 00:21:36,410 --> 00:21:39,990 So you can do like a reverse lookup for that. 270 00:21:40,630 --> 00: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. 271 00:21:47,030 --> 00:21:52,550 You can have a user's display name and also user's UPN or user principal name. 272 00:21:52,790 --> 00:21:53,850 But this is also neat. 273 00:21:53,850 --> 00:21:56,350 You can see team status of that user. 274 00:21:56,370 --> 00:21:58,710 If the user is using Teams. 275 00:22:00,410 --> 00:22:06,090 And here are the commands again, which I have in AAD internals. 276 00:22:06,090 --> 00: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. 277 00:22:16,680 --> 00:22:18,120 So let's start. 278 00:22:20,100 --> 00:22:23,740 So first, we need to get an access token because we need to be authenticated. 279 00:22:23,740 --> 00:22:25,420 And this is for our own tenant. 280 00:22:25,700 --> 00: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. 281 00:22:34,800 --> 00:22:36,500 So you need to have that. 282 00:22:38,280 --> 00:22:41,840 And you need to be actually global admin in your own tenant. 283 00:22:41,960 --> 00: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. 284 00:22:46,420 --> 00:22:49,600 And now you can get ask information about other tenants. 285 00:22:50,740 --> 00:22:53,840 The next one is, what was it? 286 00:22:54,040 --> 00:22:56,640 Access token for Teams. 287 00:22:57,020 --> 00:23:07,780 Because Teams has quite interesting APIs, and one of them is that you can search external user. 288 00:23:08,400 --> 00:23:14,020 And when you give the user principal name of the target user, it will get a lot of nice information. 289 00:23:16,940 --> 00: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. 290 00:23:29,840 --> 00:23:34,260 Now, I don't know why that information is revealed, but it is there. 291 00:23:34,880 --> 00: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. 292 00:23:42,340 --> 00:23:43,740 So let's see how that goes. 293 00:23:49,640 --> 00: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. 294 00:23:56,700 --> 00: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. 295 00:24:08,240 --> 00:24:14,980 And they had an all-hands meeting on Friday at a certain time, because they were all offline. 296 00:24:15,060 --> 00:24:18,140 And now we can see that this particular person is offline. 297 00:24:18,360 --> 00:24:21,680 And this is... I don't know why this information is available. 298 00:24:21,680 --> 00:24:25,800 Well, because, well, information must be free and so on. 299 00:24:27,940 --> 00:24:28,860 Okay. 300 00:24:28,860 --> 00:24:29,620 But yes. 301 00:24:29,620 --> 00:24:37,940 So basically, that was all I got for those internals commands. 302 00:24:37,940 --> 00:24:42,780 But for those who don't want to type PowerShell, I made a tool, online tool. 303 00:24:43,120 --> 00:24:45,560 It's from aadinternals.com. 304 00:24:45,640 --> 00:24:49,820 And it can tell you the same thing that I showed to you. 305 00:24:49,820 --> 00:24:52,340 And I'm going to demonstrate that, by the way, next. 306 00:24:54,700 --> 00:24:56,780 So here we are. 307 00:24:56,880 --> 00:25:02,220 And we go to aadinternals.com. 308 00:25:03,100 --> 00:25:07,140 And let's zoom a bit. 309 00:25:08,820 --> 00:25:11,400 So here you can give a tenant ID. 310 00:25:11,400 --> 00:25:14,860 You can give domain name or email address of a user. 311 00:25:15,300 --> 00:25:17,060 Let's try this. 312 00:25:17,060 --> 00:25:24,200 So we can see that it's the CIO of Microsoft doing something. 313 00:25:28,620 --> 00:25:29,480 Okay. 314 00:25:29,540 --> 00:25:33,280 So we can see what's the logo of that organization. 315 00:25:33,280 --> 00:25:35,780 We have tenant branding, tenant ID worldwide. 316 00:25:36,320 --> 00:25:40,560 They are not using single sign-on, but they are using the Azure Cloud Connect sync. 317 00:25:40,600 --> 00:25:43,580 No certificate-based authentication, at least for this user. 318 00:25:43,740 --> 00:25:45,860 And they have that much verified domains. 319 00:25:48,160 --> 00:25:50,960 I might mistype this, actually. 320 00:25:50,980 --> 00:25:52,180 I always do that. 321 00:25:52,180 --> 00:25:53,260 Let's try again. 322 00:25:59,860 --> 00:26:00,640 So yes. 323 00:26:00,640 --> 00:26:02,280 Now we can see that he's away. 324 00:26:02,380 --> 00:26:04,480 So there's no calling to him. 325 00:26:06,220 --> 00: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. 326 00:26:12,640 --> 00:26:13,980 What is he doing? 327 00:26:14,340 --> 00:26:15,580 So is he available? 328 00:26:15,580 --> 00:26:16,560 Is he not? 329 00:26:16,700 --> 00:26:20,540 And then you can, like, well, you know what you can do with that information. 330 00:26:20,680 --> 00:26:22,260 And you know where people are. 331 00:26:22,660 --> 00:26:25,160 And also, like, we have links to... 332 00:26:27,220 --> 00:26:28,600 So we can click here. 333 00:26:29,180 --> 00:26:30,260 Let's see how this works. 334 00:26:30,260 --> 00:26:32,620 So it wants me to sign in. 335 00:26:32,620 --> 00:26:35,760 And let's see, does this work? 336 00:26:36,580 --> 00:26:37,780 No, it didn't. 337 00:26:37,920 --> 00:26:39,780 So, but usually there's AD FS service. 338 00:26:39,780 --> 00:26:42,640 They are asking that, where do you want to log in? 339 00:26:42,640 --> 00:26:45,900 So you can actually see other organizations. 340 00:26:45,900 --> 00:26:48,620 This organization has business relationships. 341 00:26:48,620 --> 00:26:55,640 And that's also more information for you to start, like, searching for more or gathering more intelligence. 342 00:26:58,120 --> 00:26:59,240 Okay. 343 00:26:59,520 --> 00:27:01,760 But yes, that was all. 344 00:27:01,760 --> 00:27:02,740 Thank you.