1 00:00:00,000 --> 00:00:07,220 So, hello everyone. Thanks for joining this talk, especially so early in the morning. 2 00:00:08,140 --> 00:00:13,320 My name is Emmanuel Bouillon, and I'm going to discuss with you today some security issues 3 00:00:13,320 --> 00:00:17,060 that you might have to cope with when dealing with federated identity. 4 00:00:17,860 --> 00:00:21,640 And more precisely, I'm going to discuss a specific type of federated identity, 5 00:00:21,800 --> 00:00:24,000 which is a sample-based federated identity. 6 00:00:24,920 --> 00:00:32,740 So, first, I'm an infosec guy, and more importantly, everything that I'm going to say today 7 00:00:32,740 --> 00:00:35,720 expresses only my own view, my own views, 8 00:00:35,860 --> 00:00:41,040 and especially do not involve any of my previous, current, and future employer years. 9 00:00:41,520 --> 00:00:44,420 And everything is provided for educational purpose only. 10 00:00:45,820 --> 00:00:49,060 Okay, so that being said, here is the outline of this presentation. 11 00:00:49,580 --> 00:00:51,080 It's made of six parts. 12 00:00:51,620 --> 00:00:53,260 First, an introduction. 13 00:00:53,560 --> 00:00:53,980 What is it? 14 00:00:53,980 --> 00:00:56,160 What is it about, and why should we care? 15 00:00:56,700 --> 00:01:01,240 In the second part, I'm going to discuss what is the problem we are trying to solve, 16 00:01:01,400 --> 00:01:04,120 and how have we been doing it up to now. 17 00:01:04,760 --> 00:01:09,820 And then, in the third part, I'm going to introduce some, not all, 18 00:01:09,940 --> 00:01:14,640 but some of the standards and specifications around the federated identity area. 19 00:01:16,560 --> 00:01:20,300 And I'm just going to give the minimum material so that everybody will have in mind 20 00:01:20,300 --> 00:01:23,960 what is needed to take the most of the research. 21 00:01:23,980 --> 00:01:24,100 And I'm going to give the minimum material so that everybody will have in mind what is needed to take the most of the research. 22 00:01:24,100 --> 00:01:24,420 And the rest of the presentation. 23 00:01:25,300 --> 00:01:28,020 And the rest of the presentation is going to be made of two parts. 24 00:01:28,160 --> 00:01:36,300 One is how can we adapt classical web application scanner 25 00:01:36,300 --> 00:01:39,480 in order to have them to better cope with the sample-based, 26 00:01:40,320 --> 00:01:43,560 sample-protected web application, web applications. 27 00:01:43,960 --> 00:01:50,500 And in this part, I'm going to illustrate how the type of results that these kind of tools can provide. 28 00:01:51,620 --> 00:01:53,080 And in the last part, 29 00:01:53,980 --> 00:01:58,340 I'm going to present and to discuss some security considerations 30 00:01:58,340 --> 00:02:05,480 and issues that we need to have in mind prior to considering joining or creating such a federation. 31 00:02:06,580 --> 00:02:07,540 And finally, a conclusion. 32 00:02:08,560 --> 00:02:09,520 So let's get started. 33 00:02:10,200 --> 00:02:13,240 So SAML stands for Security Accession Market Language. 34 00:02:13,680 --> 00:02:17,880 And this talk is about SAML token and claims-based identity and access management. 35 00:02:18,220 --> 00:02:22,040 So I'm going to take a radically low-level approach of this protocol. 36 00:02:22,720 --> 00:02:23,960 That means I'm not... 37 00:02:23,980 --> 00:02:29,840 I'm not going to discuss the API provided to developers in order to implement this kind of protocol. 38 00:02:30,160 --> 00:02:35,300 Maybe you're familiar with Windows identity foundation API, 39 00:02:35,620 --> 00:02:44,760 which is the .NET API that allows developers to somehow transparently integrate SAML protocols in their applications. 40 00:02:45,640 --> 00:02:49,200 So I'm not going to use this kind of level of abstraction. 41 00:02:50,060 --> 00:02:53,960 But I'm just going to look at the lowest level of... 42 00:02:53,980 --> 00:02:54,780 of those protocol. 43 00:02:55,560 --> 00:03:01,600 And also, this presentation is not about a consistent and formal study of every involved standards. 44 00:03:01,860 --> 00:03:05,220 I'm just going to cursorily introduce two of them. 45 00:03:05,340 --> 00:03:09,240 But you'll see that that's enough to get some interesting results. 46 00:03:11,940 --> 00:03:17,020 So basically, the approach I've been using is some sort of standards reverse engineering. 47 00:03:17,300 --> 00:03:19,540 Basically, find vulnerabilities and then see... 48 00:03:19,540 --> 00:03:23,720 go back into the specification and see why something got wrong. 49 00:03:24,860 --> 00:03:27,720 So what are going to be the takeaways of this presentation? 50 00:03:28,840 --> 00:03:35,120 First, tools, adapted tools in order to have classical web application scanners 51 00:03:35,120 --> 00:03:38,600 to better cope with SAML-protected web applications. 52 00:03:39,340 --> 00:03:42,700 Then, I'm going to demonstrate an assumption, 53 00:03:42,860 --> 00:03:49,420 which is that involved standards can be read as an attempt to circumvent the same origin policy. 54 00:03:50,560 --> 00:03:52,740 I'm going to show a demonstration about that. 55 00:03:52,900 --> 00:03:53,960 And finally, some inputs. 56 00:03:53,980 --> 00:03:57,980 I'm going to show some important security considerations that you might have in mind 57 00:03:57,980 --> 00:04:00,600 before joining or creating such a federation. 58 00:04:02,140 --> 00:04:03,480 So why should you care? 59 00:04:03,880 --> 00:04:08,740 The thing is that the protocol and specification I'm going to discuss in this presentation 60 00:04:08,740 --> 00:04:11,000 are getting more and more prevalent. 61 00:04:11,500 --> 00:04:17,800 Actually, many influential major industrial players are currently pursuing the development 62 00:04:17,800 --> 00:04:21,440 of SAML-based protocol to achieve federated identity management. 63 00:04:22,740 --> 00:04:31,160 And also, it's support of federations that makes SAML particularly suitable for cloud deployment. 64 00:04:31,340 --> 00:04:32,940 That's why it's getting ubiquitous. 65 00:04:33,360 --> 00:04:35,560 So whether you like it or not, it's coming your way. 66 00:04:36,140 --> 00:04:40,560 And the last point is that depending on the context of deployment you're considering, 67 00:04:40,760 --> 00:04:46,300 being business-to-business, banking, government for, let's say, tax payment, for instance, 68 00:04:46,960 --> 00:04:51,420 this kind of deployment and the associated security issues might entail, for example, 69 00:04:51,420 --> 00:04:57,720 some very thorny contractual, legal, and even privacy issues. 70 00:04:57,900 --> 00:04:59,600 That's why it's important to take care of that. 71 00:05:01,300 --> 00:05:03,260 So now, where do we come from? 72 00:05:03,800 --> 00:05:07,820 What is the main problem that this kind of standard tries to solve? 73 00:05:10,580 --> 00:05:17,140 Let's say that the single sign-on solution or issue within a single domain has been solved now for a while. 74 00:05:17,320 --> 00:05:21,280 So initial solution for this single sign-on, 75 00:05:21,420 --> 00:05:25,720 a problem in a single domain, were very efficient from an administrator point of view, 76 00:05:25,760 --> 00:05:29,760 but maybe not that satisfactory from a security point of view. 77 00:05:29,820 --> 00:05:36,740 Maybe some of you still have in mind the Sun Yellow Page solutions and NIS system, for instance. 78 00:05:36,940 --> 00:05:39,220 So that was very interesting from an administrator point of view, 79 00:05:39,260 --> 00:05:41,640 but maybe not that interesting from a security point of view. 80 00:05:42,100 --> 00:05:47,420 But today, this problem has been solved by more robust protocols, like Kerberos, for instance. 81 00:05:47,800 --> 00:05:51,400 Kerberos is a protocol you use very commonly to solve the single sign-on issue. 82 00:05:51,420 --> 00:05:52,700 Kerberos is a protocol you use very commonly to solve the single sign-on issue within a single domain. 83 00:05:52,960 --> 00:05:56,380 Typically, that's what you're using if you're using Active Directory environment. 84 00:05:57,480 --> 00:06:04,200 The thing is that now we need to solve this single sign-on solution, but between organizations, between different domains. 85 00:06:04,460 --> 00:06:07,020 And that's typically what SAML tries to solve. 86 00:06:07,580 --> 00:06:13,240 So the goal is to have a user and administrator friendly cross-organization boundaries single sign-on. 87 00:06:13,340 --> 00:06:15,520 So here I'm going to focus on web applications. 88 00:06:16,200 --> 00:06:19,760 So that needs to be secure, scalable, easy to manage, 89 00:06:19,960 --> 00:06:21,400 and ideally taking care of the security. 90 00:06:21,400 --> 00:06:23,200 And ideally taking care of privacy and anonymity issues. 91 00:06:24,680 --> 00:06:29,300 So this problem is not new, and of course, previous solutions has already been deployed. 92 00:06:30,360 --> 00:06:36,940 Usually, these solutions rely either on duplicating user accounts, more or less intelligently, 93 00:06:37,100 --> 00:06:43,680 or by establishing trust relationships between security domains. 94 00:06:43,900 --> 00:06:48,080 Typically, Kerberos trust relationships between Active Directory domains, 95 00:06:48,860 --> 00:06:51,100 be it unilateral or bilateral. 96 00:06:51,780 --> 00:06:52,940 Bidirectional trust relationships. 97 00:06:53,440 --> 00:06:58,920 And of course, these type of solutions come up with some drawbacks. 98 00:06:59,140 --> 00:07:03,260 And that's this kind of drawbacks that SAML tries to solve and to tackle. 99 00:07:04,380 --> 00:07:07,260 And also, regarding the problem of privacy and anonymity, 100 00:07:07,720 --> 00:07:13,100 some previous standards have been defined, but never really been deployed nor widely adopted. 101 00:07:14,980 --> 00:07:18,940 So what do we need to know about federated identity standards? 102 00:07:19,220 --> 00:07:21,380 So in this part, I'm just going to give a very, very high level. 103 00:07:21,400 --> 00:07:25,780 View of some of the involved standards around federated identity. 104 00:07:26,200 --> 00:07:33,120 So here, you have a diagram that shows the complete ecosystems of specification around 105 00:07:33,120 --> 00:07:33,820 federated identity. 106 00:07:34,640 --> 00:07:36,560 As you can see, they are quite numerous. 107 00:07:36,880 --> 00:07:42,220 And most of them are supported by an organization called OASIS, the OASIS consortium, which 108 00:07:42,220 --> 00:07:47,920 OASIS stands for Organization for the Advancement of Structured Information Standards. 109 00:07:48,500 --> 00:07:51,220 So I'm not going to discuss all of them, but just to 110 00:07:51,400 --> 00:07:52,840 introduce two of them. 111 00:07:53,280 --> 00:08:00,200 So first, the SAML specification, which, in fact, it's a set of specifications in itself. 112 00:08:00,460 --> 00:08:09,120 And secondly, the WS Federation specification, which basically describes how to orchestrate 113 00:08:09,120 --> 00:08:13,300 flows in order to achieve this multi-domain single sign-on solution. 114 00:08:14,780 --> 00:08:16,920 So let's start with SAML. 115 00:08:17,320 --> 00:08:19,900 SAML stands for Security Assertion Markup Language. 116 00:08:21,400 --> 00:08:29,140 And basically, it consists of building stone components, which, once put together, allow 117 00:08:29,900 --> 00:08:32,240 a given number of use cases to be supported. 118 00:08:32,700 --> 00:08:40,040 And these components primarily allow the transfer of identity information, like authorization, 119 00:08:40,380 --> 00:08:45,620 attributes, and so forth, between autonomous organizations that have an established trust 120 00:08:45,620 --> 00:08:45,960 relationship. 121 00:08:46,240 --> 00:08:48,380 That's the primary goal of SAML. 122 00:08:49,280 --> 00:08:50,360 And there is also, 123 00:08:51,400 --> 00:08:55,560 something you need to know if you start looking at this kind of specification and document, 124 00:08:55,760 --> 00:09:02,480 that's the fact that there are some terms which have a specific definition in this context. 125 00:09:02,720 --> 00:09:04,080 So it's better to know their definition. 126 00:09:04,520 --> 00:09:08,740 So basically, you have SAML assertions, SAML protocol, bindings, and profile. 127 00:09:09,480 --> 00:09:16,220 So SAML assertions, I'm going to go back to that later, but typically it's a signed XML document, 128 00:09:17,060 --> 00:09:21,140 which contains statements about principles. 129 00:09:21,400 --> 00:09:27,040 So you have a protocol, a user, for instance, that a given asserting party claims to be true. 130 00:09:28,540 --> 00:09:31,840 SAML protocol are basically the description of request and response 131 00:09:32,420 --> 00:09:38,080 that are needed in order to obtain or to submit a SAML assertion. 132 00:09:38,660 --> 00:09:45,560 And SAML bindings are the mapping between SAML protocols and other layer of transport protocol. 133 00:09:45,700 --> 00:09:48,500 Typically, you have bindings for SAML and SOAP. 134 00:09:48,620 --> 00:09:50,800 You have the HTTP redirect binding. 135 00:09:51,400 --> 00:09:52,740 And the HTTP post binding. 136 00:09:53,660 --> 00:09:57,380 And finally, you have what they call SAML profiles, 137 00:09:57,800 --> 00:10:02,580 which basically is the combination of assertions, protocol, and bindings 138 00:10:02,580 --> 00:10:06,640 in order to support a given number of use case or federated scenarios. 139 00:10:07,400 --> 00:10:11,140 So within the standard, there are several profiles defined, 140 00:10:12,200 --> 00:10:16,960 like the web browser SSO profile or the single logout profile. 141 00:10:17,460 --> 00:10:21,180 I'm just going to mention two of them during this talk. 142 00:10:21,400 --> 00:10:25,140 First, the web browser SSO profile, because that's really the most common use case, 143 00:10:25,820 --> 00:10:30,000 the most widely used use case regarding SAML specification. 144 00:10:30,820 --> 00:10:34,460 And the second one is identity provider discovery profile. 145 00:10:34,840 --> 00:10:39,920 I'm going to mention this one because actually it is prone to some security issue. 146 00:10:41,560 --> 00:10:43,320 So what are SAML assertions? 147 00:10:43,420 --> 00:10:48,360 So as I said, a SAML assertion is a signed XML document containing claims or attributes 148 00:10:48,360 --> 00:10:49,140 about a user. 149 00:10:49,660 --> 00:10:50,220 So... 150 00:10:50,220 --> 00:10:51,360 And it's a set of... 151 00:10:51,360 --> 00:10:56,140 Claims contained in the SAML assertions that define the identity in regard to the 152 00:10:56,880 --> 00:10:58,220 what we call the relying parties. 153 00:10:58,300 --> 00:10:59,640 That means, let's say, the web application. 154 00:11:00,600 --> 00:11:01,000 So... 155 00:11:01,000 --> 00:11:05,860 And what you need to have in manual is that these claims do not need to be distinctive 156 00:11:05,860 --> 00:11:06,560 for this user. 157 00:11:06,780 --> 00:11:08,960 It doesn't have to be a login name, for instance, or something like that. 158 00:11:09,140 --> 00:11:14,960 It can just be a statement like, yes, this user has paid this monthly fee for the public 159 00:11:14,960 --> 00:11:15,240 library. 160 00:11:15,560 --> 00:11:17,820 Or yes, this user is over 21. 161 00:11:19,560 --> 00:11:21,340 So here is how... 162 00:11:21,340 --> 00:11:21,900 It looks like. 163 00:11:22,080 --> 00:11:22,940 So it's... 164 00:11:23,520 --> 00:11:24,260 Is no surprise. 165 00:11:24,500 --> 00:11:29,780 It's a signed XML document which follows the XML signature standard. 166 00:11:30,460 --> 00:11:31,400 So you... 167 00:11:31,400 --> 00:11:33,680 Get information regarding the staff. 168 00:11:34,440 --> 00:11:37,420 Regarding the signature, how it has been computed, et cetera. 169 00:11:37,980 --> 00:11:40,780 You get information about the subject. 170 00:11:41,220 --> 00:11:47,640 And more interestingly, you get the information about the attributes 171 00:11:47,640 --> 00:11:49,640 contained within the pickत normal assertion. 172 00:11:49,780 --> 00:11:51,320 And, typically, in the years that are next, we don't need to be able to to use that on, some other client. 173 00:11:51,320 --> 00:11:57,280 in the enterprise use case, these attributes are obtained from an enterprise directory. 174 00:11:57,580 --> 00:12:05,180 That can be group membership, yes, this user has this role in my organization or yes, this 175 00:12:05,180 --> 00:12:11,780 user has this email address in my organization. And as you can see above, there is also some 176 00:12:11,780 --> 00:12:16,020 specific attributes that can be of interest like the audience attribute. So the audience 177 00:12:16,020 --> 00:12:22,800 attribute is basically the statement that says for which relying party this has been made 178 00:12:22,800 --> 00:12:30,120 off. So that's interesting because that allows to prevent some attack. But for this to be 179 00:12:30,120 --> 00:12:33,360 effective, it needs to be taken into account by the relying party side of the implementation. 180 00:12:33,720 --> 00:12:37,920 And as we'll see later, it's not always the case. So implementations do not verify that. And 181 00:12:37,920 --> 00:12:45,500 that's obviously a security issue. So how is SAML used? SAML is standard based, so a 182 00:12:45,500 --> 00:12:46,000 wide range of applications. SAML is standard based, so a wide range of applications. And 183 00:12:46,020 --> 00:12:50,960 SAML is supported and supposedly interoperable between implementations. And the underlying 184 00:12:50,960 --> 00:12:58,680 standards include XML encryption, XML digital signatures, and X509 certificates. It heavily 185 00:12:58,680 --> 00:13:06,180 relies on HTTP for conveying the SAML assertion to the network. So that easily goes through 186 00:13:06,180 --> 00:13:12,540 firewall. There are several ways or types of deployment. It can be deployed in a local 187 00:13:12,540 --> 00:13:16,000 network. It doesn't have to be in a federated environment. It's supported and supposedly 188 00:13:16,000 --> 00:13:22,840 supported branch offices deployment. It allows remote users to access the corporate network. But 189 00:13:23,360 --> 00:13:29,360 also and more importantly, it supports federation and the federated scenario. And I'm going to 190 00:13:29,360 --> 00:13:35,600 discuss that more into detail later. Into more detail later. And so basically the idea is to have 191 00:13:35,600 --> 00:13:45,260 a nice, neat cross domain single solution so that users, our beloved users are happy with their 192 00:13:45,260 --> 00:13:51,400 experience. So how does it work? Here I'm going to focus on the web browser SSO profile. 193 00:13:52,020 --> 00:14:02,400 Basically it's a four-step process. First you have your user who requests access to a claims 194 00:14:02,400 --> 00:14:07,880 aware web application. And add this request do not contain any SAML assertion. The web 195 00:14:07,880 --> 00:14:14,820 application is going to redirect the web browser to the user's identity provider using the 196 00:14:14,820 --> 00:14:23,240 HTTP error code 302. And at this point the user's identity provider is going to authenticate 197 00:14:23,240 --> 00:14:27,740 the user one way or another. So you don't have to know the type of authentication that's 198 00:14:27,740 --> 00:14:32,000 going to be used at that point. It can be providing a login password or just using the 199 00:14:32,000 --> 00:14:38,400 corporate single sign-on solution, typically based. So once the identity provider 200 00:14:38,400 --> 00:14:44,700 has authenticated the user, then the entity provider is going to build the claim with a 201 00:14:44,820 --> 00:14:50,300 appropriate attribute inside and send it back to the user's 202 00:14:50,300 --> 00:14:55,080 browser with an HTTP post form with an auto submit request to 203 00:14:55,080 --> 00:14:57,800 the web application. So that's how it's going to be 204 00:14:57,800 --> 00:15:04,340 transparently sent back to the web application and as this web 205 00:15:04,340 --> 00:15:07,100 application is claims aware it's going to grant access to this 206 00:15:07,100 --> 00:15:14,560 user according to what is inside the claim. And that's how you 207 00:15:14,560 --> 00:15:18,740 achieve a single solution so our users are happy with that. And 208 00:15:18,740 --> 00:15:21,500 that's really interesting from an administrator and developer 209 00:15:22,100 --> 00:15:27,220 point of view because in fact from the web application side you 210 00:15:27,220 --> 00:15:30,480 don't have to know and to deal with what kind of authentication 211 00:15:30,480 --> 00:15:34,100 mechanism has been used. So the corporate environment can 212 00:15:34,100 --> 00:15:37,300 completely change the way authenticator users are 213 00:15:37,300 --> 00:15:41,040 authenticated. The code of the web application still remains the 214 00:15:41,040 --> 00:15:43,480 same. That's what makes it really interesting from a 215 00:15:43,480 --> 00:15:44,240 developer point of view. 216 00:15:45,360 --> 00:15:49,720 So now you could say so what? Because indeed, okay, we have a 217 00:15:49,720 --> 00:15:52,380 single solution for web applications but actually there 218 00:15:52,380 --> 00:15:58,500 are other ways to achieve that. Typically you can use SPNiGO over 219 00:15:58,500 --> 00:16:03,700 GSS API with either Kerberos or NTLM as a security underlying 220 00:16:03,700 --> 00:16:08,240 party. So you could say, okay, why bother about that? So the 221 00:16:08,240 --> 00:16:11,960 main, actually the main idea for that is that it supports 222 00:16:11,960 --> 00:16:14,400 federation. That is the sharing of identity between the 223 00:16:14,560 --> 00:16:18,120 domains. What they call in the specifications a multi-domain 224 00:16:18,120 --> 00:16:21,880 SSO issue. It also supports delegation. That's the maintenance 225 00:16:21,880 --> 00:16:26,720 of identity to back-end services. And also it provides an enhanced 226 00:16:26,720 --> 00:16:32,000 access control which we call role-based access control. It's a 227 00:16:32,000 --> 00:16:37,120 very finer, it provides a finer granularity regarding how you can 228 00:16:37,120 --> 00:16:42,380 provide access control to your web application. And so that's it 229 00:16:42,380 --> 00:16:43,120 for SAML. 230 00:16:44,560 --> 00:16:48,580 So the next standard I wanted to introduce here is the WS 231 00:16:48,580 --> 00:16:52,780 federation standard. So WS federation is an approved OSE specification 232 00:16:53,640 --> 00:16:57,160 that defines mechanism to allow different security realism to 233 00:16:57,160 --> 00:17:01,100 federate. So what does it mean? Basically access to resources 234 00:17:01,100 --> 00:17:05,800 managed in one realm can be provided to users or principles whose 235 00:17:05,800 --> 00:17:09,380 identities and attributes are managed in other realms. So that's 236 00:17:09,380 --> 00:17:14,460 how you guarantee the fact that users management stays on a 237 00:17:14,560 --> 00:17:19,640 side of their own authoritative domain. You don't have to bother about 238 00:17:19,640 --> 00:17:22,540 users management of the other domain. So that's why it's really 239 00:17:22,540 --> 00:17:27,440 interesting. And also it includes mechanism for brokering of identity 240 00:17:27,440 --> 00:17:33,640 attribute and authentication between realms. And in this document, in 241 00:17:33,640 --> 00:17:38,440 this specification, the last chapter is about security considerations. So 242 00:17:38,440 --> 00:17:42,720 it's a very small chapter. It's one page. And the last bullet of this 243 00:17:42,720 --> 00:17:44,080 chapter is about compromise. 244 00:17:44,860 --> 00:17:48,260 And I'm mentioning it here because I'm going to get back to that later 245 00:17:48,260 --> 00:17:52,060 and see how this kind of consideration might really be an issue depending 246 00:17:52,060 --> 00:17:57,060 on the type of deployment you're considering. So here is basically how 247 00:17:57,060 --> 00:18:05,600 it works. So it's a very simple use case. It starts by having your web 248 00:18:05,600 --> 00:18:09,140 browser or your client connected to a web application. As you don't 249 00:18:09,140 --> 00:18:12,840 provide any claim to this application, it's going to redirect you to its 250 00:18:12,840 --> 00:18:13,980 own identity provider. 251 00:18:14,560 --> 00:18:19,840 At that point, the target domain provider is going to redirect the 252 00:18:20,440 --> 00:18:25,380 browser to the user's entity provider. At that point, the user provider is 253 00:18:25,380 --> 00:18:31,480 going to authenticate one way or another the user. And if once authenticated, 254 00:18:31,700 --> 00:18:36,180 the entity provider is going to retrieve some attribute typically from an 255 00:18:36,180 --> 00:18:41,800 enterprise directory, build a claim, sign it, and send it back to the 256 00:18:41,800 --> 00:18:44,540 browser using a post redirect to be signed back to the web application. So 257 00:18:44,540 --> 00:18:48,440 it's sent back to the identity provider of the web application. And at that 258 00:18:48,440 --> 00:18:53,080 point, the identity provider of the web application is going to, of course, 259 00:18:53,100 --> 00:18:57,900 verify the signature and also possibly change, add, remove any attributes 260 00:18:57,900 --> 00:19:02,100 within the claim, sign it back, sign it, and send it back to the web 261 00:19:02,820 --> 00:19:06,440 browser with a post redirect to the web application. At that point, the 262 00:19:06,440 --> 00:19:11,580 web application which is going to receive this signed claim, this claim is 263 00:19:11,580 --> 00:19:14,520 signed by its own identity provider. So it's going to send back to the web 264 00:19:14,520 --> 00:19:18,280 provider. So it's going to be trusted. And according to attributes contained in 265 00:19:18,280 --> 00:19:22,260 this claim, it's going to grant access to its resources. So that's basically how 266 00:19:22,840 --> 00:19:29,280 this multidomain SQL sign-on solution at a very high level is achieved. And 267 00:19:29,280 --> 00:19:35,220 just to be complete, just be aware that there are ‑‑ okay. I've just 268 00:19:35,220 --> 00:19:41,380 introduced a very simplest use case. But there are more complex architecture 269 00:19:41,800 --> 00:19:44,500 supported by the standard and the specification. And I'm going to show you 270 00:19:44,520 --> 00:19:47,420 some examples. And like typically what they call the broker federation model, 271 00:19:47,700 --> 00:19:52,660 which basically is when you have a centralized identity provider which is 272 00:19:52,660 --> 00:20:01,080 trusted by many others. And also, please be aware that users can be ‑‑ can 273 00:20:01,080 --> 00:20:06,480 have several identity provider depending on its context. And that's in some sort ‑‑ 274 00:20:06,480 --> 00:20:10,120 the user can have several identity and doesn't only have to trust one identity 275 00:20:10,120 --> 00:20:14,500 provider. So that's it about the introduction of the web application. And 276 00:20:14,500 --> 00:20:18,300 now I'm going to show you some examples of the standards. Just to be complete, 277 00:20:18,560 --> 00:20:24,920 I've just added a list of what I consider as important security studies, 278 00:20:24,980 --> 00:20:29,440 previous security studies on that domain. So some security issues have already been 279 00:20:29,440 --> 00:20:35,060 discovered regarding SAML. So either regarding SAML standards themselves or regarding 280 00:20:35,060 --> 00:20:44,360 some of SAML implementations. So now that's where things are getting interesting. When you 281 00:20:44,500 --> 00:20:48,740 look at the ‑‑ within the complete documentation of oasis regarding SAML, there is one document 282 00:20:48,740 --> 00:20:53,320 called SAML technical overview. So it's still a draft. But basically that's 283 00:20:53,320 --> 00:21:00,080 in the document where they explain all the rationale behind SAML. And what is really 284 00:21:00,080 --> 00:21:04,780 interesting at that point is that the really main driver ‑‑ and that's how it is written 285 00:21:04,780 --> 00:21:10,820 in the document. The main driver for SAML is the limitations of browser cookies. And 286 00:21:10,820 --> 00:21:14,480 it's written like that. Typically browser cookies are never translated, and that's 287 00:21:14,480 --> 00:21:18,540 over DNS domain and basically when you read that you have the things that they consider 288 00:21:18,540 --> 00:21:26,460 that's quite sad. And Samuel solves this problem. So, of course, the multidomain solution is 289 00:21:26,460 --> 00:21:33,800 relevant and legitimate issue to be solved. But on the other hand, if browser cookies do 290 00:21:33,800 --> 00:21:40,000 not fly between DNS domain, there are good reasons for that. And basically it's part of the 291 00:21:40,000 --> 00:21:45,840 same origin policy. So from a security point of view what I mean here is we could read that as 292 00:21:46,300 --> 00:21:53,440 okay, soaps sucks. Let's build a workaround. So from a security point of view these kinds of 293 00:21:53,440 --> 00:21:59,600 considerations or rational has a great potential for security issues. So the question is, is it a 294 00:21:59,600 --> 00:22:06,320 fail or not? Typically can a bad guy steal cookies? I'm going to provide the response later so 295 00:22:06,320 --> 00:22:09,980 you need to be patient. To conclude with this part, I would like to thank you for your 296 00:22:09,980 --> 00:22:16,440 attention. Just a few words regarding implementation security. For the for typically for 297 00:22:16,440 --> 00:22:22,040 our implementation, I have been looking at like GFS, shibboleth or simple MLPHP. There are some 298 00:22:22,040 --> 00:22:28,180 good aspects like the fact that by default tokens are encrypted. And by default also replay 299 00:22:28,180 --> 00:22:37,100 attacks are properly addressed. So you might also meet some problem regarding the compliance 300 00:22:37,100 --> 00:22:39,800 with the standard. Like the fact that on-site. 301 00:22:39,980 --> 00:22:47,820 log out request gets accepted or the fact that the attribute is not verified. And finally 302 00:22:47,820 --> 00:22:55,640 you also have some implementations which have some vulnerability. And I'm going to 303 00:22:55,640 --> 00:23:00,480 demonstrate two of them. An open redirection vulnerability and a cookie leak or a cookie 304 00:23:00,480 --> 00:23:11,380 theft within one implementation. So before that, I'm just going to explain how to adapt our 305 00:23:11,380 --> 00:23:16,740 classical web application scanners in order to have them to properly cope with some 306 00:23:16,740 --> 00:23:24,500 protected web applications. So regarding our tool set, I think that these considerations have 307 00:23:24,500 --> 00:23:29,840 already been mentioned this morning by the presentation related to SOAP and how to adapt 308 00:23:31,960 --> 00:23:39,120 web application scanners to better cope with, to better assess web service based on SOAP. 309 00:23:39,340 --> 00:23:45,660 But typically, web application scanner tool set is made of several kinds, a combination of 310 00:23:45,660 --> 00:23:52,460 different tools chosen by more or less objective criteria. So typically it can be made of 311 00:23:52,460 --> 00:23:59,240 professional or community edition of commercial tools like WebInspect, Acunetix, and others. 312 00:23:59,600 --> 00:24:00,460 You can use them in a variety of ways. You can use them in a variety of ways. You can use them 313 00:24:00,480 --> 00:24:00,640 in a variety of ways. You can use them in a variety of ways. You can use them in a variety of ways. 314 00:24:00,640 --> 00:24:07,880 free and open source software for web application scanning, Skipfish, Nicto, and typically some 315 00:24:07,880 --> 00:24:14,480 Firefox plugins also. And also very often when you discuss with people doing that for a living, 316 00:24:14,640 --> 00:24:19,900 they very often use their own homemade custom scripts that they have been developing 317 00:24:19,900 --> 00:24:24,060 throughout their year of experience. Regarding methodology, it's a little bit of the same. 318 00:24:24,220 --> 00:24:30,460 Supposedly some more or less formal procedure are supposed to be followed. And you can see 319 00:24:30,460 --> 00:24:36,400 that you can rely on some generally accepted best practices like the OWASP testing guide or 320 00:24:36,400 --> 00:24:43,960 the OSSTMM framework. But finally, it always heavily relies on habits and personal preferences. 321 00:24:44,420 --> 00:24:51,540 And also still many manual ad hoc and improvised steps are needed. So that's why I think we 322 00:24:51,540 --> 00:24:59,560 still need to adapt our tool set. Even though if some great presentation regarding how to do 323 00:24:59,560 --> 00:25:05,380 web application assessment states that we should not be a tool, the only tool which is 324 00:25:05,380 --> 00:25:11,380 in our brain, I still think that properly using the right tool often makes a difference, 325 00:25:11,580 --> 00:25:16,520 especially because usually it's a time constraint exercise. And regarding SAML, there are two 326 00:25:16,520 --> 00:25:22,900 reasons to adapt our tool set. The fact that it allows traditional assessment of web application 327 00:25:22,900 --> 00:25:27,920 scanner to cope with SAML token, to cope with SAML protected web applications. And also these 328 00:25:27,920 --> 00:25:36,860 kind of applications and their security, they often relies on very complex configuration 329 00:25:36,860 --> 00:25:44,160 settings. So we need ‑‑ so these configurations are prone to error and we need tools to assess 330 00:25:44,160 --> 00:25:51,760 the good configuration setting are effectively in place. So the thing is there are already some 331 00:25:51,760 --> 00:25:57,900 existing tools that can help the web application scanner, the web application pen tester or 332 00:25:57,920 --> 00:26:03,740 when they have to cope with SAML. So I've listed some of them here. At least all those I know 333 00:26:03,740 --> 00:26:13,020 of. So you've got the UNINET SAML tracer, which allows you to see decoded SAML token that your 334 00:26:13,020 --> 00:26:21,640 browser is receiving and sending. You have the SAML debugger, it's an online application that 335 00:26:21,640 --> 00:26:27,440 allows you to submit a token, either encoded or decoded, and then you receive the answer, which 336 00:26:27,440 --> 00:26:27,880 is ‑‑ it's an online application that allows you to submit a token, either encoded or decoded, and then you receive the answer, which is a 337 00:26:27,920 --> 00:26:35,240 decoded or encoded. And the last one is really interesting one. It's ‑‑ it is provided by 338 00:26:35,240 --> 00:26:42,320 the entity federation, part of their initiative called federation lab. Basically it's an online 339 00:26:42,320 --> 00:26:49,800 automated checks of service provider implementation. So if you have a SAML implementation of the 340 00:26:49,800 --> 00:26:57,900 service provider side, you can trust the federated lab STS and then online start asking the 341 00:26:57,900 --> 00:27:03,720 scan of your implementation. And then you're going to get a result of how compliant is your implementation 342 00:27:03,720 --> 00:27:08,740 regarding the standard. So I'm going to show you the result of this kind of scan just later. And, of 343 00:27:08,740 --> 00:27:17,620 course, you can always use a manual approach to encode and decode SAML token. So here you can see an 344 00:27:17,620 --> 00:27:25,740 example of a report from a federation lab service provider tester. So I've just installed an 345 00:27:25,740 --> 00:27:27,880 out‑of‑the‑book hello world application. And I'm going to show you how it works. So you can see the 346 00:27:28,840 --> 00:27:33,880 application using a simple SAML PHP, which is one implementation of SAML standards. So the good news is 347 00:27:33,880 --> 00:27:39,700 that you have many success, so that means somehow some compliances with the protocol. But you also 348 00:27:39,700 --> 00:27:46,580 get some errors regarding these compliances, like the fact that, indeed, single log‑out ‑‑ unsigned 349 00:27:46,580 --> 00:27:52,540 single log‑out requests are accepted and that the targeted audience attribute is not checked by the 350 00:27:52,540 --> 00:27:56,000 service provider side, which is, in fact, a security issue. 351 00:27:58,160 --> 00:28:03,720 We still need to adapt our tool set. And there is one area where this is proved to be very, very 352 00:28:03,720 --> 00:28:11,120 useful. It's when encoding and decoding a SAML token. And the gain of this encoding and decoding 353 00:28:11,120 --> 00:28:18,080 touches several parts of the assessment of the efficiency of the web application scanner. First, 354 00:28:18,320 --> 00:28:26,140 having access to clear to the SAML token or having access to the SAML token decoded allows you to 355 00:28:26,140 --> 00:28:27,880 really more easily decode the application. So you don't have to worry about having to decode the 356 00:28:27,900 --> 00:28:31,680 application, but you can more accurately understand the meaning of all these requests and what 357 00:28:31,680 --> 00:28:39,940 these tokens are made for, what are the attributes involved, for which party. So that helps 358 00:28:39,940 --> 00:28:45,860 understanding what is going on. Also, it allows you to do some more relevant request mumbling. And 359 00:28:45,860 --> 00:28:53,660 if your web application scanner happens to be a fuzzer, then you ‑‑ instead of fuzzing a big 360 00:28:53,660 --> 00:28:57,880 chunk of meaningless data, you're going to fuzz properly, more accurately, and you're going to 361 00:28:57,900 --> 00:29:02,760 see more accurately each specific parameters. And also, it allows you to sort some anti‑replace 362 00:29:02,760 --> 00:29:08,920 safeguards, like the fact that you need to change random numbers at each different request. And it 363 00:29:08,920 --> 00:29:16,500 allows you also to update timestamp on the fly, which then allows you to have longer scans to 364 00:29:16,500 --> 00:29:24,120 unfold properly, which avoids some false negative results. So here is the approach I've been 365 00:29:24,120 --> 00:29:27,880 using. So it's not a new approach, because typically it has already been developed. But it's 366 00:29:27,900 --> 00:29:34,680 been used by people from GDS security when they have been assessing the Microsoft proprietary 367 00:29:35,280 --> 00:29:42,400 binary encoding of SOAP requests for WCF. So the idea is to chain proxies. So first you have a 368 00:29:42,400 --> 00:29:49,600 preprocessing proxy, which role is to ‑‑ whose role is to decode requests and encode responses. 369 00:29:50,280 --> 00:29:57,500 The middle proxy is actually your real scanner when you have ‑‑ when you do your real, let's say, 370 00:29:57,900 --> 00:30:03,260 web assessment, when your intelligence as a pen tester takes place. And then you have the 371 00:30:03,260 --> 00:30:12,080 post-processing proxy, which encodes the request back and decodes the response back. So this way, 372 00:30:12,160 --> 00:30:17,400 the application still receives the request in the proper expected format, so it can work properly. 373 00:30:19,000 --> 00:30:25,240 So to implement that, I've been using BERT ProSuite. So I guess most of you know this web 374 00:30:25,240 --> 00:30:27,880 assessment tool. It has a very, very good web assessment tool. It's a very, very good web 375 00:30:27,900 --> 00:30:33,340 assessment tool for the cost benefit ratio. And what is really interesting with this tool is 376 00:30:33,340 --> 00:30:39,180 that it provides a Java API to extend BERT ProSuite functionalities, and it's particularly 377 00:30:39,180 --> 00:30:45,820 suitable for pre‑ and post‑processing. And also there exists some abiding both for 378 00:30:45,820 --> 00:30:51,900 Python and Ruby. So I've been using the Ruby framework to extend BERT ProSuite, which is called 379 00:30:51,900 --> 00:30:57,780 . Recently a very complete tutorial has been presented and is available on the 380 00:30:57,780 --> 00:30:57,880 website. And I'm trying to help you with that. So thank you for the opportunity. 381 00:30:57,900 --> 00:31:04,640 internet. And for this kind of tool, you only need to hook either event proxy message or 382 00:31:04,640 --> 00:31:10,760 event HTTP message. So the proof of concept I've been developing is freely available at 383 00:31:10,760 --> 00:31:16,200 this URL and you can use and test it basically to retrieve all the results I'm going to present 384 00:31:16,200 --> 00:31:21,640 now. So I'm not going to discuss the code itself. Just going to show you how it looks like. 385 00:31:21,640 --> 00:31:31,780 So here is preprocessing proxy which received the initial request. So as you can see, or maybe 386 00:31:31,780 --> 00:31:38,120 you can just guess that you see an uncoded token. So very difficult to understand. And this 387 00:31:38,120 --> 00:31:44,220 preprocessing proxy is going to edit this request and decode the token. So now you have in 388 00:31:44,220 --> 00:31:51,620 the request the complete decoded token which is sent to your middle proxy and then you can 389 00:31:51,640 --> 00:31:56,760 see which is actually your real web application scanner. So typically if you're using burp as a 390 00:31:56,760 --> 00:32:02,940 middle proxy, then you can send this request to burp intruder, for instance, to have specific 391 00:32:02,940 --> 00:32:10,800 parameters to be mongered with. And at that point, the middle proxy is going to send this 392 00:32:10,800 --> 00:32:18,700 request like that and to the post-processing proxy which will receive the decoded token in 393 00:32:18,700 --> 00:32:21,620 clear, if you want. And then it will send the decoded token to the post-processing proxy. And 394 00:32:21,640 --> 00:32:27,140 the post-processing proxy is going to encode the token back to the appropriate format so that 395 00:32:27,140 --> 00:32:35,120 it's going to be sent to the application as it expects to be sent. So that's basically how it 396 00:32:35,120 --> 00:32:42,440 works. So I'm just going to illustrate some results you can obtain using this approach. So 397 00:32:42,440 --> 00:32:49,420 I've chosen two results to illustrate these tools. And I've chosen these two because actually 398 00:32:49,420 --> 00:32:51,620 these results and these results are very similar. So I've chosen two results to illustrate these tools. And I've chosen these two because actually these results and these 399 00:32:51,640 --> 00:32:59,920 vulnerabilities are more standard related to standard and specification, then related to 400 00:32:59,920 --> 00:33:06,460 implementation. So that was more interesting and more fun to discuss these two noilities. So the 401 00:33:06,460 --> 00:33:13,180 first is an open redirection. So an open redirection is just a fact that you can craft a 402 00:33:13,180 --> 00:33:21,220 request, so that the target is going to respond with a redirection to another site which is 403 00:33:21,220 --> 00:33:27,440 controlled by the attacker. So it's not critical. And as you're going to see, it's somehow built 404 00:33:27,440 --> 00:33:34,000 in in the standard. And then I'm going to illustrate how this can lead to a cookie theft. 405 00:33:34,320 --> 00:33:39,840 That means that we are going to be able to make cookies fly between the DNS domain using this 406 00:33:39,840 --> 00:33:46,960 kind of vulnerabilities. So basically if you visit his site, a bad guy can inconspicuously 407 00:33:46,960 --> 00:33:54,080 discover your identity provider. That means what is your originating organization. So that's at 408 00:33:54,080 --> 00:34:04,580 least a privacy issue. So to demonstrate that, I've been leveraging an existing live open to 409 00:34:04,580 --> 00:34:09,920 everyone test environment which is provided by the Norwegian academic federation. It's called 410 00:34:09,920 --> 00:34:15,680 open IDP. And I've been using a dummy account. And the cookie I'm going to steal actually is 411 00:34:15,680 --> 00:34:16,880 HTTPS. 412 00:34:19,860 --> 00:34:29,700 So what you're going to see is a complete four-step authentication. Right? And then you'll 413 00:34:29,700 --> 00:34:37,220 see how a bad guy can just steal this cookie. So it's a three-step process. First, the victim 414 00:34:37,220 --> 00:34:42,980 accesses the bad guy site. And this site contains a craft get request to the service provider 415 00:34:43,560 --> 00:34:46,940 which will actually leverage the open redirection of the cookie. And then you can see how the 416 00:34:46,940 --> 00:34:53,220 user's vulnerability to get back, to send back the cookie to its own control website. So to make 417 00:34:53,220 --> 00:35:01,540 it more visual, this redirection will not go to the bad guy website, but I've crafted Google 418 00:35:01,540 --> 00:35:06,500 search request using as an argument the cookie. So that you can see that indeed the cookie is 419 00:35:06,500 --> 00:35:16,920 appended to the Google search request. So let's see. So at the beginning you're going to see 420 00:35:16,940 --> 00:35:23,200 see that this is the only, just the open redirection vulnerability. So I don't know if you 421 00:35:23,200 --> 00:35:31,220 see anything but basically here you see that it's a get request that goes to open IDP. And when 422 00:35:31,220 --> 00:35:35,800 you click on this link you're going to be automatically redirected either to Google or to 423 00:35:36,680 --> 00:35:46,920 DEF CON website. So that's a Google redirection. Then you have the same thing with the 424 00:35:46,940 --> 00:35:53,460 request. So this request goes to open IDP and gets redirected to DEF CON. So that's just the 425 00:35:53,460 --> 00:35:58,320 open redirection vulnerability. So nothing very critical. But then let's imagine that your 426 00:35:58,320 --> 00:36:04,680 user is connecting to a service provider that uses SAML and open IDP as its identity 427 00:36:04,680 --> 00:36:11,460 provider. So here this is the service, the relying party which is called veryopenid.net. I 428 00:36:11,460 --> 00:36:16,920 choose my identity provider. Then automatically I get redirected to the service provider. So 429 00:36:16,940 --> 00:36:22,500 I get redirected to my identity provider. I need to authenticate. So here by using a login 430 00:36:22,920 --> 00:36:27,380 password. And then you'll see that this identity provider is going to craft a SAML request and 431 00:36:27,380 --> 00:36:33,260 send back to the application so that I get authenticated. So that's the four-step process 432 00:36:33,260 --> 00:36:40,600 you know. You have been describing. And now if you click on the malicious link, you'll see 433 00:36:40,600 --> 00:36:46,920 that the redirection end up with the theft of the cookie. So you can see that the redirection 434 00:36:46,940 --> 00:36:53,940 is not going to be a problem. Right? So that's the demonstration. I hope that's clear. So 435 00:36:53,940 --> 00:37:00,240 that's how you can steal a cookie and make cookie flies between DNSOM using this kind of 436 00:37:00,240 --> 00:37:06,860 vulnerability. So the thing is that actually if you go back to the standards, these 437 00:37:06,860 --> 00:37:12,500 vulnerabilities are not implementation issues but more specification issues. Because it 438 00:37:12,500 --> 00:37:16,920 comes from the identity provider discovery service profile. And actually it's built into the 439 00:37:16,940 --> 00:37:21,960 open redirection. When you look at the standards, it's written like that. The open redirection is 440 00:37:21,960 --> 00:37:28,660 in the specification. And actually when they wrote this specification, they somehow felt that 441 00:37:28,660 --> 00:37:34,880 there was a kind of issue. This is a quotation of the standard. This protocol has the potential 442 00:37:34,880 --> 00:37:38,440 for creating additional opportunities for phishing. So at least they were aware that it was 443 00:37:38,440 --> 00:37:43,680 dangerous. And they proposed a workaround based on the service provider metadata. But it's only 444 00:37:43,680 --> 00:37:46,920 should workaround. And there's no way on ‑‑ they don't want to work around it. So they're 445 00:37:46,940 --> 00:37:50,960 don't explain how we could exchange metadata between the service provider and the discovery 446 00:37:50,960 --> 00:37:55,120 service. So basically the developer have just implemented properly the standard and they get 447 00:37:55,120 --> 00:38:02,260 vulnerable. So that's what I wanted to show you about this part. And the last part is about 448 00:38:03,200 --> 00:38:10,120 consideration regarding the design of ‑‑ consideration about the deployment and trust 449 00:38:10,120 --> 00:38:16,920 apologies. So as you remember, this is the simplest use case of ‑‑ of the service provider 450 00:38:18,480 --> 00:38:23,360 federation scenario. So you have two organizations with a trust relationship. But, of course, 451 00:38:23,480 --> 00:38:32,220 you ‑‑ there are more complex ‑‑ there are more complex deployments. So the question is, does 452 00:38:32,220 --> 00:38:40,240 it really ‑‑ does this kind of deployment really implement new risk? It's a contentious issue. 453 00:38:40,360 --> 00:38:46,400 But basically other solutions are not that more secure. So that's ‑‑ to be simple, that's what 454 00:38:46,400 --> 00:38:46,920 I wanted to say. 455 00:38:46,940 --> 00:38:52,720 We can say about that. So here is a very simple deployment scenario. You have one organization 456 00:38:52,720 --> 00:38:58,340 which tries to access another organization application. And the access control is based, for 457 00:38:58,340 --> 00:39:03,880 instance, on the user's e‑mail address. And typically what happens in real life is you have 458 00:39:03,880 --> 00:39:11,680 several domain ‑‑ organization B has several customers accessing its application. So now the 459 00:39:11,680 --> 00:39:16,180 question is, what if one of the organizations gets either malicious or compromised? 460 00:39:16,180 --> 00:39:23,760 Typically, what if organization C signs a claim for a user of organization B? The thing is, by 461 00:39:23,760 --> 00:39:29,400 default, if you installed everything by default, this is going to work. That means that your 462 00:39:29,400 --> 00:39:34,200 application is going to grant access regarding the attribute which is in the claim. Because from a 463 00:39:34,200 --> 00:39:38,420 signature point of view, everything is fine. So you need to implement yourself all the business 464 00:39:38,420 --> 00:39:46,160 checks at that point that will prevent this kind of attack to be working. So this is the kind of 465 00:39:46,180 --> 00:39:50,560 scenario that we have. But that's ‑‑ you need to do that. That's not implemented by default. But at 466 00:39:50,560 --> 00:39:55,800 least in this simple scenario, you can do it. You still can do it. The thing is there are more complex 467 00:39:55,800 --> 00:40:00,200 scenarios and more realistic scenarios where it's getting more complicated. Typically, when you 468 00:40:00,200 --> 00:40:05,560 have an indirect trust relationship, where you have a central trust broker that can trust 469 00:40:05,560 --> 00:40:09,900 between organizations. So at that point, so here is how it works. You've got one organization 470 00:40:09,900 --> 00:40:16,060 which trusts organization D, which then is trusted by organization B. So then you have this single sign on. 471 00:40:16,180 --> 00:40:21,240 That works perfectly fine the same way, flowing between these three organizations. Now the question 472 00:40:21,240 --> 00:40:27,680 is, how ‑‑ what if organization C signs a claim for a user which is not part of its own 473 00:40:27,680 --> 00:40:35,120 organization? Let's say what if organization C gets either malicious or compromised? The thing is, in 474 00:40:35,120 --> 00:40:40,180 this case, if organization D does not do its job by checking everything that needs to be checked 475 00:40:40,180 --> 00:40:46,160 and which is not done by default, then organization B has no way to do its job. So organization B is 476 00:40:46,180 --> 00:40:53,780 able to see the trick and to see that things got wrong. So if the STSD signs a token, then 477 00:40:53,780 --> 00:41:00,240 STSD has no way, as an organization, organization B has no way to see that something went wrong. 478 00:41:00,640 --> 00:41:05,120 So that means that, in fact, organization B fully relies on organization D to properly check 479 00:41:05,120 --> 00:41:10,960 similar claims. So that means then what is the policy for that? Do we have a way to verify? Is 480 00:41:10,960 --> 00:41:15,500 auditing permitted, et cetera? And how to prove other parties' compliance with relevant 481 00:41:15,500 --> 00:41:15,920 requirements? 482 00:41:16,180 --> 00:41:20,940 So that's typically the questions that are usually unasked and even less answered. So the 483 00:41:20,940 --> 00:41:25,360 bottom line is, what about the malicious or compromised ADP in a federation? And can a 484 00:41:25,360 --> 00:41:30,920 malicious ADP impersonate another domain's users? That's really the main ‑‑ the bottom line 485 00:41:30,920 --> 00:41:36,660 issue. And is there any safeguards in place? That means business sets that prevent that. And 486 00:41:36,660 --> 00:41:43,180 who owns these safeguards? Do you, as an organization, own these safeguards or do you, due 487 00:41:43,680 --> 00:41:46,160 to the fact that it's a trustable ‑‑ an indirect trustable ‑‑ 488 00:41:46,160 --> 00:41:53,800 topology, do you delegate this kind of safeguards? So that's, in fact, because when you look at 489 00:41:53,800 --> 00:41:57,640 implementation, by default these safeguards are not implemented. And if you get back to the 490 00:41:57,640 --> 00:42:03,600 standards themselves, actually this kind of consideration has just been cursorily mentioned in 491 00:42:03,600 --> 00:42:08,860 the bullet I mentioned previously, which is the compromised services. And indeed, they 492 00:42:08,860 --> 00:42:15,740 recognize that this is really a very major issue when you have this third party broker trust relationship. 493 00:42:16,360 --> 00:42:22,820 But on the other hand, in practice, it works by default. And there are no proposed solutions on how 494 00:42:22,820 --> 00:42:29,860 to prevent that. So in the case of a third party broker trust, you need to control the loss of 495 00:42:29,860 --> 00:42:37,840 controls. That means who is involved, et cetera. What are other parties' obligations? And 496 00:42:37,840 --> 00:42:45,660 that's the concern I've called claims laundering. So all relies on checks made at each level. This 497 00:42:46,160 --> 00:42:52,200 is done since default settings are permissive. So typically ways to do that is to have key 498 00:42:52,200 --> 00:42:57,920 attributes which are kept ‑‑ are added to avoid the situation into a blind trust to this 499 00:42:57,920 --> 00:43:04,160 organization D part. And the thing is also on main federations, when you join a 500 00:43:04,160 --> 00:43:09,380 federation, usually you don't have access to this policy. So you don't know exactly what checks are 501 00:43:09,380 --> 00:43:16,140 in place. And that's an issue. So that ends up ‑‑ I'm sorry. I'm sorry. I'm sorry. 502 00:43:16,160 --> 00:43:23,440 This presentation. So the main takeaways of this presentation are first, the knowledge and tools 503 00:43:23,440 --> 00:43:31,120 to keep on properly assessing SAML protective web application. How to adapt the tool sets, 504 00:43:31,780 --> 00:43:38,020 classical web application tester tool set to cope with SAML protective web application. Then 505 00:43:38,020 --> 00:43:45,540 proven assumption that the fact that standards can be read as an attempt to circumvent the same origin policy. 506 00:43:46,160 --> 00:43:51,300 So you've got the tools and process to go there. And also important security design 507 00:43:51,300 --> 00:43:59,700 consideration. The thing is without taking care, insecurity by design is possible. And typically 508 00:43:59,700 --> 00:44:06,240 when you have cross‑domain trust with active directory, for instance, if one domain gets 509 00:44:06,240 --> 00:44:13,320 compromised, this domain cannot impersonate other domain users. Whereas with SAML indirect trust 510 00:44:13,320 --> 00:44:15,020 implementation, it's possible. 511 00:44:16,160 --> 00:44:23,000 By default. So you need to take care of that. With SAML cross‑based cross‑domain SSO, by default, 512 00:44:23,040 --> 00:44:29,820 this kind of situation will occur. Of course, this approach applies to other forms of delegation, 513 00:44:30,160 --> 00:44:39,520 of a federation. Developers and marketers are ahead of security guys. So yet default security 514 00:44:39,520 --> 00:44:45,620 things are not secure. So the make‑it‑working approach might lead to insecure deployment. And 515 00:44:45,620 --> 00:44:52,500 that's why we need to keep up with this kind of protocol to avoid big deployment security failure 516 00:44:52,980 --> 00:45:01,940 and post mortem discover that there has been an issue. So we need to get acquainted with the 517 00:45:01,940 --> 00:45:08,520 involved protocols to properly assess the design and the deployment of such a federation. And also 518 00:45:08,520 --> 00:45:15,600 adapt our tool set because properly, probably bad guys will. And very probably also, with that 519 00:45:15,620 --> 00:45:23,340 would be helpful to have better guidance or improve standards on how to protect, to avoid 520 00:45:23,980 --> 00:45:30,040 this kind of issue. Because today it really relies on diligent administrators and developers 521 00:45:30,040 --> 00:45:35,480 to implement these techs. But if we had a common way to solve this kind of issue, then even 522 00:45:35,480 --> 00:45:43,400 in terms of assessing, it could be far more easier. I guess that's all I have for today. So 523 00:45:43,400 --> 00:45:49,760 I'd like also to thank one of my great colleagues, for his great help and extensive knowledge 524 00:45:49,760 --> 00:45:58,380 on SAML. And if you have any questions, I can try answering them now or I will be in a room to 525 00:45:58,380 --> 00:46:01,060 Q&A. Thanks a lot for your attention.