1 00:00:07,930 --> 00:00:09,990 Thank you for joining. 2 00:00:09,990 --> 00:00:12,150 It's a great pleasure to be here today. 3 00:00:12,570 --> 00:00:20,850 I'm not sure how many of you have a driving license, but I kindly ask you to fasten your seat belts because this is going to be a quick one. 4 00:00:21,370 --> 00:00:22,830 My name is Paul Silda. 5 00:00:22,830 --> 00:00:28,450 I'm a security researcher and pen tester at Chart49, but I've started as a software developer. 6 00:00:28,450 --> 00:00:33,610 I did it for more than 15 years, but it was plenty of time to do all sorts of mistakes. 7 00:00:33,750 --> 00:00:43,050 I'm also co-author of something that you may have heard about, like the OWASP API security top 10, but the topic here today is another one. 8 00:00:43,050 --> 00:00:44,890 With us we have David. 9 00:00:45,630 --> 00:00:48,910 Yeah, so my name is David Sopas. 10 00:00:48,910 --> 00:00:54,830 I'm a security researcher for a long time, more than 15 years. 11 00:00:54,830 --> 00:01:02,570 I especially like research and focusing also on high-level pen testing. 12 00:01:02,830 --> 00:01:09,890 I already spoke on events like RSA, DEF CON. 13 00:01:09,890 --> 00:01:18,170 This is my first time here in Vegas because the first time I spoke on DEF CON it was on safe mode, so I was at home. 14 00:01:18,170 --> 00:01:23,930 Not that fun, but still I did the shots with my friends, so shot the knob. 15 00:01:24,550 --> 00:01:32,630 And besides, and props to Lisbon with some guys over here, I did some API security methodology. 16 00:01:32,630 --> 00:01:35,170 I don't know if you guys know it, MindAPI. 17 00:01:35,170 --> 00:01:39,170 It's part of my open source work, and that's it. 18 00:01:39,170 --> 00:01:40,130 Let's start. 19 00:01:41,310 --> 00:01:55,630 Before some of the work that we, research that we are presenting, I would like to say that this is not, we will not teach you how to hack web applications or APIs. 20 00:01:55,630 --> 00:02:03,290 All the target manufacturers you presented have a bug bounty program, responsible disclosure program, or whatever. 21 00:02:03,290 --> 00:02:09,130 So this is, everything was reported to the organizations. 22 00:02:09,130 --> 00:02:14,670 Some of them were like late to respond, but in the end we did it. 23 00:02:17,780 --> 00:02:22,140 We will focus this presentation with nine brands. 24 00:02:22,140 --> 00:02:29,320 I hope that at least one of them is your car manufacturer. 25 00:02:30,120 --> 00:02:33,040 But let's start with this one. 26 00:02:33,360 --> 00:02:37,540 I don't know if you know this brand, but we will not mention it. 27 00:02:37,540 --> 00:02:40,220 It's a vulnerable updated component. 28 00:02:40,220 --> 00:02:53,080 But before that, I would like to tell you a little bit about the API and the API world, which means you have a lot of API architectures. 29 00:02:53,080 --> 00:02:59,740 I'm talking about the most popular ones, like REST, GraphQL, RPC, you name it. 30 00:02:59,740 --> 00:03:08,540 All of them make sense to mention that most of the vulnerabilities that were present was focused on these architectures. 31 00:03:11,540 --> 00:03:15,200 Open API is one of the most common ones. 32 00:03:15,460 --> 00:03:20,580 Usually it's like connected in a way to Swagger. 33 00:03:20,580 --> 00:03:22,780 I hope anyone knows Swagger. 34 00:03:22,780 --> 00:03:24,760 I believe everyone knows Swagger. 35 00:03:24,840 --> 00:03:43,480 The problem is that it helps out developers and even pen testers and researchers because it documents everything and it will help you not to make any mistakes and leave the documentation open. 36 00:03:43,520 --> 00:03:52,480 But one of the things that... because usually individuals like shiny things and web interfaces, Swagger UI is one of them. 37 00:03:52,480 --> 00:03:58,100 It's the most popular one and usually is left publicly available. 38 00:03:58,100 --> 00:04:01,820 This is the example of Swagger pet star. 39 00:04:01,820 --> 00:04:06,180 But like every software, it also has vulnerabilities. 40 00:04:06,180 --> 00:04:29,120 So especially the vulnerability from 3.71, which is the cross-site scripting, which allows you to put a specially crafted JSON file that you can control and put cross-site scripting payload and you can do a lot of stuff with that. 41 00:04:29,700 --> 00:04:37,600 This is the classic example of a Swagger UI, which is presented on the brand that I showed you. 42 00:04:37,700 --> 00:04:55,140 This is coming to a reminder that if you use third party software, please keep it updated because it can be a way that attackers can achieve to get into your organisation. 43 00:04:56,420 --> 00:05:05,140 This brand, which is... I'm guessing nobody here has this brand in their garage. 44 00:05:05,140 --> 00:05:06,920 If so, kudos. 45 00:05:07,020 --> 00:05:10,300 It has a vulnerable outdated component. 46 00:05:10,300 --> 00:05:29,560 This time it's not Swagger, but we found that a subdomain on this company immediately caught our attention because we saw a form and we're like, okay, let's try to approach the security research way. 47 00:05:30,540 --> 00:05:36,840 We immediately went to the inspector, because it's faster than trying to do some proxy stuff. 48 00:05:36,840 --> 00:05:44,120 We noticed that it was a WordPress, because it has a lot of tips like WP content, WP plugins. 49 00:05:44,120 --> 00:05:57,480 You can use, for example, for enumeration tools like WP scan, but in this case we immediately saw that the plugin that we wanted and we could see if any vulnerability could be in place. 50 00:05:57,580 --> 00:05:59,160 And it was. 51 00:05:59,180 --> 00:06:06,520 This subdomain from this manufacturer uses W3 total cache. 52 00:06:06,520 --> 00:06:22,360 It was a vulnerable version and this was very cool for us to test, especially for this manufacturer that I don't know if they could offer a good reward like a car. 53 00:06:23,160 --> 00:06:25,940 This is the CVE from the plugin. 54 00:06:26,420 --> 00:06:27,120 It's very cool. 55 00:06:28,500 --> 00:06:47,600 You could read arbitrary files from the subdomain and the main goal here, okay, let's create the POC and to respect the responsible disclosure program, let's grab WP config and drop the database details and tell them, hey, this is your database, okay, 56 00:06:47,600 --> 00:06:49,740 so at least the credentials. 57 00:06:50,080 --> 00:06:51,640 And that's what we did. 58 00:06:51,640 --> 00:06:54,300 So this is the exploit. 59 00:06:54,300 --> 00:07:02,520 The first thing that we wanted to know and to play around with the file path was to see what was the operating system running. 60 00:07:02,520 --> 00:07:13,820 So we do the curl, put the full URL, the plugin place, the vulnerable parameter which was the subscribed URL. 61 00:07:13,820 --> 00:07:18,980 So we put ETC issue just to see if it's running Linux and it was. 62 00:07:18,980 --> 00:07:21,300 The response is hello. 63 00:07:21,300 --> 00:07:24,460 So it's Ubuntu, not the latest version, but it doesn't matter. 64 00:07:24,460 --> 00:07:33,500 But they give us with this operating system, give us clues to understand the path and the configuration files for other stuff. 65 00:07:33,500 --> 00:07:35,140 So moving forward. 66 00:07:35,140 --> 00:07:41,740 So now we notice that it's running virtual host, so we do the bash call. 67 00:07:41,740 --> 00:07:53,780 It's like going through to see how we can get the full path, internal path for the WordPress installation and get the WP config. 68 00:07:53,780 --> 00:08:00,040 Sites enabled, we needed to know the domain itself, so we tried it. 69 00:08:00,040 --> 00:08:11,620 And in the end, after like experience, because sites enable usually it's the subdomain, we tried that on the subscriber URL and we got the document route which was this one. 70 00:08:11,620 --> 00:08:24,860 And with that, we just tried just WP config and we got the database from this high level manufacturer that in the end decided to tell us good work. 71 00:08:25,200 --> 00:08:26,740 And it fixed it. 72 00:08:27,280 --> 00:08:28,200 Another brand. 73 00:08:28,200 --> 00:08:34,420 This is my favorite because it's a brand that I'm very close to. 74 00:08:34,840 --> 00:08:43,500 And we found out some cool stuff like BOLA, Reflective, cross-site scripting, and again, components that are vulnerable. 75 00:08:43,740 --> 00:08:49,620 But it's very hard sometimes to get VINs from cars, as you can see. 76 00:08:49,940 --> 00:08:58,620 Usually it's placed on the windshield, but you can also try other things like going to Google and search for VINs. 77 00:08:58,840 --> 00:09:00,460 And we did that. 78 00:09:01,480 --> 00:09:15,340 Not only that, we decided, okay, let's see if we can create on this manufacturer account dashboard, add these cars without any confirmation. 79 00:09:15,740 --> 00:09:24,100 So we created a persona, which is G1, and we added a bunch of cars, like you can see on the picture. 80 00:09:24,100 --> 00:09:25,200 Sorry, it's in Portuguese. 81 00:09:25,200 --> 00:09:28,320 We are from Portugal, so it's automatically translated. 82 00:09:28,320 --> 00:09:31,320 But it works in every language. 83 00:09:31,320 --> 00:09:33,120 So we added these cars. 84 00:09:33,400 --> 00:09:53,820 On other brands, and I can tell you that, like, on the nine manufacturers that we tried, at least three, you need to confirm on the infotainment inside the car to have the car added to your dashboard account on the car website. 85 00:09:53,820 --> 00:10:05,920 In this case, like, you can add it and get information from the information you added without any interaction from the user inside the car. 86 00:10:05,920 --> 00:10:07,620 So that's a big issue. 87 00:10:07,620 --> 00:10:10,880 Some brands tell you that, no, it's normal. 88 00:10:10,880 --> 00:10:15,040 But you can see after a while that it's not. 89 00:10:15,080 --> 00:10:25,320 So on this information that we get on the UI dashboard, you know that you have an outdated car, for example. 90 00:10:25,480 --> 00:10:30,440 You can see the versions from the infotainment system. 91 00:10:31,320 --> 00:10:35,700 You can see issues related to guarantees. 92 00:10:35,700 --> 00:10:50,940 If you paid for years to have more guarantee on your vehicle, also more information that what you need to do when you go to an inspection car. 93 00:10:51,820 --> 00:11:01,320 But one thing that we noticed is that we could get more information on the API that was not present on the UI. 94 00:11:01,320 --> 00:11:02,860 And this is cool. 95 00:11:02,860 --> 00:11:03,380 Okay? 96 00:11:03,380 --> 00:11:06,220 So we tried that. 97 00:11:06,220 --> 00:11:15,420 And by the way, with this endpoint, which is already fixed, so disclaimer, you don't need even to be authenticated. 98 00:11:15,420 --> 00:11:17,860 This is, like, public information. 99 00:11:19,260 --> 00:11:31,020 On the API, we can get over meter, fuel, battery status if it's electric, oil life, tire pressure for each wheel, for each tire, and et cetera. 100 00:11:31,020 --> 00:11:32,780 You can see the screenshot on the API. 101 00:11:32,780 --> 00:11:35,620 This information is not present on the UI, by the way. 102 00:11:35,620 --> 00:11:37,620 So we get that. 103 00:11:38,280 --> 00:11:55,660 It will be cool, like, to get, for example, on this manufacturer, for a friend, and you can go check out his VIN and bet with him, okay, if I know the exact number of kilometers that your car has, you buy me a beer. 104 00:11:55,660 --> 00:11:57,360 So this is win-win. 105 00:11:57,360 --> 00:12:13,880 So other information, I think that's another endpoint that we found using our intersection, only using a proxy, was like type of vehicle, which is in the car, not that relevant. 106 00:12:14,660 --> 00:12:19,820 So model, one thing, and I put the smileys on, Wi-Fi hotspot, very cool. 107 00:12:19,820 --> 00:12:22,360 I love cars with Wi-Fi hotspots. 108 00:12:22,380 --> 00:12:25,820 Also, if it's connected to the internet, even better. 109 00:12:26,420 --> 00:12:31,520 And as you can see, we can do a lot of things, especially with Wi-Fi hotspots. 110 00:12:32,620 --> 00:12:34,880 We can wiggle, wiggle. 111 00:12:34,880 --> 00:12:48,860 So I got the hotspot from the broadcast MAC address, I grabbed it, and go to wiggle, and then we get location from the vehicles. 112 00:12:48,860 --> 00:12:57,860 And that's very cool, because I'm talking about millions of these manufacturers, but it works also for other brands. 113 00:12:57,860 --> 00:13:00,740 So this is like crazy. 114 00:13:03,300 --> 00:13:27,320 Firmware update is something that we still like a work in progress, because on this specific request, we get information from firmware, but not only that, we can download it, unpack it, and what we did is just I mounted on my operating system, I noticed what was the system running on the infotainment, 115 00:13:27,320 --> 00:13:31,200 but I didn't check for more information so far. 116 00:13:31,200 --> 00:13:35,680 I was focused on the API stuff, so I moved forward. 117 00:13:36,040 --> 00:13:37,060 Recalls. 118 00:13:37,060 --> 00:13:43,180 This is something that the manufacturer was like telling me that this was an acceptable risk. 119 00:13:43,300 --> 00:13:47,460 Again, I don't understand why, but I will explain that later. 120 00:13:48,140 --> 00:14:02,320 The recalls, it's something that the information that it comes is very juicy, because especially you know if the car had problems with something, and get information about that. 121 00:14:02,320 --> 00:14:11,040 But not only that, we noticed that one of the fields returning on the response of this API request was the description part. 122 00:14:11,040 --> 00:14:17,200 And it was maybe used by an operator, a mechanical part, I don't know. 123 00:14:17,200 --> 00:14:26,860 I don't know who used this field, because most of the PYY information that we got was added to this field. 124 00:14:26,860 --> 00:14:37,840 So I found out something like, please return the car to the owner at address with this phone and everything. 125 00:14:37,840 --> 00:14:52,140 So this is like public information according to this manufacturer, but you can see name, location of the owner of the car, and everything. 126 00:14:52,180 --> 00:14:55,160 I communicated that to the manufacturer. 127 00:14:55,160 --> 00:14:57,060 He told me it's normal. 128 00:14:57,060 --> 00:14:59,040 So maybe. 129 00:14:59,100 --> 00:15:04,140 It's kind of weird to receive sometimes these kind of responses. 130 00:15:04,140 --> 00:15:06,280 Okay, so what? 131 00:15:07,840 --> 00:15:12,400 With all this information together, we can do a lot of stuff. 132 00:15:12,400 --> 00:15:16,200 Okay, with all that, we can track devices to pinpoint locations. 133 00:15:16,200 --> 00:15:24,200 We can place, for example, some antennas on specific spots and try to track vehicles. 134 00:15:24,940 --> 00:15:34,880 Analyzing the meter, for example, you can create, you can know routines from the habits from the victim, for example. 135 00:15:34,980 --> 00:15:44,600 Insights from everything, how much fuel, and you can calculate when the person needs to go refuel or something like that. 136 00:15:44,600 --> 00:15:45,480 A lot of stuff. 137 00:15:45,480 --> 00:15:48,200 Recall information gives you PYY information. 138 00:15:48,200 --> 00:15:52,240 So it's crazy, but yeah. 139 00:15:52,240 --> 00:15:56,440 And by the way, yeah, updated components again. 140 00:15:56,560 --> 00:15:58,240 But not only one. 141 00:15:58,240 --> 00:16:04,160 If it's like loading, it takes a while because it doesn't work. 142 00:16:04,160 --> 00:16:04,620 Okay. 143 00:16:05,020 --> 00:16:09,180 This is all for the same manufacturer. 144 00:16:10,620 --> 00:16:11,980 Halfway. 145 00:16:12,660 --> 00:16:15,640 And deal. 146 00:16:15,640 --> 00:16:16,840 Done. 147 00:16:17,020 --> 00:16:18,660 That's it. 148 00:16:19,040 --> 00:16:24,140 They control the documentation and the third party software very well. 149 00:16:24,740 --> 00:16:26,660 So I think that's it. 150 00:16:26,660 --> 00:16:27,740 Passing to Paolo. 151 00:16:28,560 --> 00:16:31,040 Okay, from now on it's with me, I believe. 152 00:16:31,040 --> 00:16:34,480 The point here, this is not a full assessment on car manufacturers. 153 00:16:34,480 --> 00:16:37,380 We are not trying to assess car safety. 154 00:16:37,700 --> 00:16:43,980 This was like a free time to assess how car manufacturers handle their digital asset security. 155 00:16:43,980 --> 00:16:50,300 So we were looking for a few bugs that we could chain together and prove them the impact. 156 00:16:50,300 --> 00:17:00,540 So this is why you're going to see a lot cross-site scripting that we can chain with something else and prove them the impact and get the system patched. 157 00:17:00,660 --> 00:17:02,260 So another manufacturer. 158 00:17:02,260 --> 00:17:08,220 I'm not sure how many of you are familiar with the return URI, query string perimeter. 159 00:17:08,220 --> 00:17:10,820 But when I see one, I get excited. 160 00:17:10,880 --> 00:17:13,440 Probably I'm going to get an open redirect. 161 00:17:13,460 --> 00:17:16,620 But then I have an additional feeling. 162 00:17:16,620 --> 00:17:19,960 Maybe I can get the cross-site scripting, which is even better. 163 00:17:19,960 --> 00:17:29,620 And all we have to do is change the URI scheme and change from HTTP or HTTPS to JavaScript and we get a cross-site scripting easily. 164 00:17:29,740 --> 00:17:37,540 And chances are that we can access cookies or local storage using our cross-site scripting. 165 00:17:37,540 --> 00:17:42,900 And probably the out token is in there and we can use it to exfiltrate the token. 166 00:17:42,900 --> 00:17:45,800 So this is how we prove the impact here. 167 00:17:45,800 --> 00:17:47,240 It's a quick demo. 168 00:17:47,640 --> 00:17:53,620 So you can use it on a phishing email with the malicious payload. 169 00:17:54,320 --> 00:17:58,500 And as soon as the victim logins, we get the out token. 170 00:17:58,500 --> 00:18:05,600 So this way it's not only a cross -site scripting that probably no one are willing to fix. 171 00:18:06,340 --> 00:18:13,740 There's the impact here to exfiltrate PII and this is a bigger deal for the manufacturer. 172 00:18:15,280 --> 00:18:23,420 But usually you also find let's call it less interesting stuff like click jacking or UI redressing. 173 00:18:24,860 --> 00:18:32,560 If you're familiar with it or not, what we have on the screen are the same. 174 00:18:32,560 --> 00:18:45,640 But there's some red fields and those fields we are loading the login form on attacker.com and the red ones are fields that we put on top of the legit login form. 175 00:18:45,640 --> 00:18:48,660 So this is why redressing is how the attack works. 176 00:18:48,660 --> 00:18:57,360 It's not that fancy and probably no one is going to fix UI redressing as long as you can prove the impact it may have. 177 00:18:57,360 --> 00:19:15,600 And chances are, this is just an hypothesis, that the same company or organization has a subdomain pointing to an AWS CloudFront and when you request some resources from it, you realize it comes from S3. 178 00:19:15,600 --> 00:19:17,840 Not sure whether you're familiar with S3. 179 00:19:17,840 --> 00:19:19,840 It's a cloud storage. 180 00:19:20,020 --> 00:19:22,580 They are called buckets. 181 00:19:22,580 --> 00:19:24,500 You can put there whatever you want. 182 00:19:24,500 --> 00:19:27,380 One of the features is hosting static websites. 183 00:19:29,060 --> 00:19:33,500 But Amazon and S3 permissions are not that easy. 184 00:19:33,880 --> 00:19:37,640 And quite often we choose to go with the star. 185 00:19:37,640 --> 00:19:39,680 We allow everything to everyone. 186 00:19:40,220 --> 00:19:43,180 And S3 has a public API, REST API. 187 00:19:43,180 --> 00:19:45,160 You can read the docs online. 188 00:19:45,440 --> 00:19:48,380 And chances are that we can write to the bucket. 189 00:19:48,440 --> 00:19:54,720 I'm not saying that that was the case, but chances are you can write to the bucket and upload whatever you want. 190 00:19:55,160 --> 00:20:06,700 And if you have a UI redressing issue, maybe you can even deploy the login form, deploy the malicious login form on their own subdomain. 191 00:20:06,860 --> 00:20:13,060 And this is how it would potentially look like to exfiltrate credentials. 192 00:20:13,220 --> 00:20:22,760 So you can upload whatever you want to a public S3 or at least internet facing S3 bucket. 193 00:20:22,940 --> 00:20:28,900 Then you get your UI redressing page deployed on the subdomain. 194 00:20:29,300 --> 00:20:34,740 The victims fill the form and you get the credentials on your own server. 195 00:20:35,360 --> 00:20:37,960 This is exactly what we have in this demo. 196 00:20:37,960 --> 00:20:43,900 So with the impact proof, they fixed it. 197 00:20:44,320 --> 00:20:47,480 Otherwise, probably they would look to it like a UI redressing. 198 00:20:47,480 --> 00:20:48,580 No one cares. 199 00:20:49,180 --> 00:20:51,300 So let's move on to another manufacturer. 200 00:20:51,800 --> 00:20:57,140 And you may be asking yourselves, why didn't you fuzz to find new endpoints? 201 00:20:57,140 --> 00:20:58,180 We did it. 202 00:20:59,480 --> 00:21:04,000 And we found something called SiteMinder. 203 00:21:04,000 --> 00:21:06,640 We were not aware what SiteMinder was. 204 00:21:06,860 --> 00:21:10,060 And we asked ChatGPT, or AI. 205 00:21:10,060 --> 00:21:14,180 You may be missing the AI buzzword. 206 00:21:14,440 --> 00:21:21,760 And ChatGPT told us it's a widely used access management and authentication solution developed by CA Technologies. 207 00:21:21,760 --> 00:21:26,460 Okay, so it's a third party software, but you have a domain pointing to it. 208 00:21:26,460 --> 00:21:30,640 So we did what this company was supposed to do. 209 00:21:30,640 --> 00:21:32,400 We checked for CVs. 210 00:21:32,400 --> 00:21:35,560 One of them was a cross site scripting on SiteMinder. 211 00:21:35,620 --> 00:21:38,420 So you may know where this is going to end up. 212 00:21:38,420 --> 00:21:40,780 Just crafting a simple payload. 213 00:21:40,780 --> 00:21:48,060 It's an image on the username parameter, running some code, some JavaScript code, and you get the cross site scripting. 214 00:21:48,580 --> 00:21:53,540 But instead of a single SiteMinder, they had tons of them. 215 00:21:53,540 --> 00:21:59,200 So tons of chances to exploit cross site scriptings on this car manufacturer. 216 00:21:59,760 --> 00:22:02,660 So moving on to another manufacturer. 217 00:22:03,260 --> 00:22:08,680 This is another time when I get the 404 not found. 218 00:22:08,680 --> 00:22:11,740 My heart starts beating faster. 219 00:22:11,740 --> 00:22:14,800 Because this is again an AWS S3 bucket. 220 00:22:14,800 --> 00:22:18,820 And when you get the 404 means that someone deleted the bucket. 221 00:22:18,820 --> 00:22:24,440 And buckets, the name should be unique across all AWS regions. 222 00:22:24,480 --> 00:22:30,420 So if the bucket was deleted, but there's still a subdomain pointing to it, you can create the bucket. 223 00:22:30,420 --> 00:22:35,980 And you're going to get control over the content that's served on this subdomain. 224 00:22:35,980 --> 00:22:38,460 So this is a subdomain takeover technically. 225 00:22:38,820 --> 00:22:45,600 But we need to figure out in which region the bucket should be created, where it was created before. 226 00:22:45,600 --> 00:22:47,600 But this is not magic. 227 00:22:47,600 --> 00:22:49,680 You can use several tools to do it. 228 00:22:49,680 --> 00:22:51,780 Checking the DNS, you get the region. 229 00:22:51,780 --> 00:22:54,580 It's European, Europe central. 230 00:22:54,760 --> 00:23:03,700 You just create the bucket, upload the content, and from that moment on, you're serving content, whatever you want, on the organization subdomain. 231 00:23:03,700 --> 00:23:07,500 This is, to be honest, this is quite common on S3. 232 00:23:07,960 --> 00:23:16,060 So keep watching your subdomains, monitor whatever subdomains you have, buckets your assets. 233 00:23:16,860 --> 00:23:22,700 But before moving to the next manufacturer, still cross-site scripting on Swagger UI. 234 00:23:22,700 --> 00:23:31,920 So you're going to find them deployed everywhere, and no one cares about non-vulnerabilities on this software. 235 00:23:33,200 --> 00:23:38,960 So let's move on to another manufacturer. 236 00:23:38,960 --> 00:23:40,760 We were looking to Porche. 237 00:23:40,760 --> 00:23:42,580 It's not a secret here. 238 00:23:42,820 --> 00:23:46,520 We found out this website called Porche Experience. 239 00:23:46,520 --> 00:23:49,340 We looked under the wood to understand how it worked. 240 00:23:49,340 --> 00:23:52,820 It's a single-page application backed by a GraphQL API. 241 00:23:52,960 --> 00:23:57,700 So this time it's not REST, but we noticed something quite strange. 242 00:23:57,720 --> 00:24:04,800 The ALT token was included twice on the GraphQL requests, both on the cookies and in the authorization header. 243 00:24:04,860 --> 00:24:16,480 It depends how familiar you are with HTTP, but adding the ALT token on the request header is a game-changer in terms of cross-site scripting. 244 00:24:16,480 --> 00:24:25,520 If the API picks the ALT token from the cookie, cookies are managed by the web browser and they are automatically added to the request. 245 00:24:25,840 --> 00:24:32,080 So we came up with the idea, maybe we can exploit the cross-site request forgery. 246 00:24:32,080 --> 00:24:34,900 Let's see if that happens or not. 247 00:24:35,040 --> 00:24:44,340 To do that, the API should get the ALT token from the cookie instead of the authorization header, and that was what was happening with the GraphQL API. 248 00:24:45,180 --> 00:25:01,840 Then we need the API to be willing to fulfill requests coming from or started from another origin, which the API is also willing to do, so we still have some cross-origin request sharing issue here, misconfiguration on the API. 249 00:25:02,100 --> 00:25:16,020 But then browsers include several security features, namely to protect your cookies, and the browser, they were not willing to include the cookie on requests started from external origins. 250 00:25:16,200 --> 00:25:20,160 So it was like, okay, there's no way here, it's a dead end. 251 00:25:20,160 --> 00:25:25,100 But in fact, cross-site scripting would make this a great issue. 252 00:25:25,180 --> 00:25:34,160 So instead of one, we found three cross-site scriptings in different websites, and we decided to go with the campaigns.porsche.com for a phishing email. 253 00:25:34,160 --> 00:25:39,780 It sounds kind of catchy if you can offer something on a campaigns.porsche.com. 254 00:25:40,040 --> 00:25:50,540 So this is the vulnerable URL, the parameter, you should keep the integer for some reason, but you can then append the HTML. 255 00:25:51,260 --> 00:26:00,020 So this is the loader we're gonna add to the URL that we're gonna send to victims to load a JavaScript file from a remote server. 256 00:26:00,020 --> 00:26:06,930 Then we have to do some encoding because it's not that easy to manage spaces and special characters on the URL. 257 00:26:07,550 --> 00:26:10,530 And this is what's fetched from our remote server. 258 00:26:10,530 --> 00:26:17,390 So we're gonna do a GraphQL query, fetch victims PII and exfiltrate it to the remote server. 259 00:26:17,390 --> 00:26:20,190 Then we just need to trick victims to click the URL. 260 00:26:20,190 --> 00:26:23,710 So offer them something like a Porsche experience, why not? 261 00:26:23,770 --> 00:26:26,350 And this is how it goes. 262 00:26:27,490 --> 00:26:34,470 So we are, oops, we are waiting victims data. 263 00:26:34,470 --> 00:26:40,530 So let's email, mail them, we get the click. 264 00:26:41,130 --> 00:26:51,750 So as you can see, I read the emails, then I click them, the links, and from that moment on, we get the PII on our remote server. 265 00:26:51,750 --> 00:26:57,370 Again, the point here is not, none of the issues here are that fancy. 266 00:26:57,430 --> 00:27:00,630 The point is chaining them together and prove the impact. 267 00:27:00,750 --> 00:27:03,210 And this way we get all of them fixed. 268 00:27:05,610 --> 00:27:09,350 So, yes, I know you. 269 00:27:09,910 --> 00:27:13,290 So we talked about subdomain takeover. 270 00:27:13,290 --> 00:27:19,910 So this is another subdomain takeover on a different manufacturer, but here the issue is a bit different. 271 00:27:20,090 --> 00:27:30,570 In this case, and sometimes if you want to integrate with some third party, they're going to say point a subdomain to our own domain or subdomain. 272 00:27:30,570 --> 00:27:34,810 They create a custom subdomain so that you can point something to them. 273 00:27:34,810 --> 00:27:43,810 But then at some point the company gave up on the product, but your DNS record is still pointing to their own. 274 00:27:43,850 --> 00:27:49,050 And if it was a bucket and they just deleted their bucket, we can create the bucket. 275 00:27:49,050 --> 00:27:50,990 That was the case here. 276 00:27:50,990 --> 00:28:00,590 There was a DNS record pointing to another company and the company gave up on the bucket and we created the bucket and we got our content delivered through their bucket. 277 00:28:02,950 --> 00:28:05,670 So again, Swagger UI. 278 00:28:05,670 --> 00:28:19,570 So if there's a big takeaway today, go home and check whether your company has Swagger UI deployed or any other third party piece of software and check whether there are known vulnerabilities and patch the systems. 279 00:28:20,170 --> 00:28:26,750 So time for another one, nothing fancy again, just a cross-site scripting on Swagger UI. 280 00:28:28,290 --> 00:28:34,370 So we've talked about misconfigured AWS S3 buckets. 281 00:28:34,370 --> 00:28:42,170 So here's another use case, the same issue, public writeable S3 bucket. 282 00:28:42,630 --> 00:28:56,330 So the same thing, you get your own codes running on one of their subdomains and then you can access APIs and other stuff because you're running on their one subdomain. 283 00:28:56,330 --> 00:29:02,390 So most of the policies can be bypassed or will be bypassed this way. 284 00:29:03,750 --> 00:29:08,070 So we just got our content. 285 00:29:08,070 --> 00:29:09,910 Again, we use a phishing email. 286 00:29:10,190 --> 00:29:18,630 I believe we asked ChatGPT to write it, not exactly give me a phishing email because otherwise we won't get it. 287 00:29:20,370 --> 00:29:28,970 But as it happened before with this simple trick, we get the auth token that we can then use. 288 00:29:29,490 --> 00:29:36,990 This case, I believe we've got the, it was PII from the API. 289 00:29:37,330 --> 00:29:40,690 But that was not the only one issue with this manufacturer. 290 00:29:40,690 --> 00:29:45,830 As David said, you have a vehicle identification number, you can get them from your windshield. 291 00:29:45,830 --> 00:29:50,370 So let's call it public because anyone can get it from the car park. 292 00:29:50,370 --> 00:30:00,390 Or if you're lazy enough as we are, you go to Google, you search and you get 1,890,000 vehicle identification numbers. 293 00:30:00,830 --> 00:30:06,050 And then you can add them to your, you can use the API to fetch PII. 294 00:30:06,050 --> 00:30:08,250 Drivers PII, owners PII. 295 00:30:08,250 --> 00:30:10,550 There was something interesting here. 296 00:30:10,550 --> 00:30:21,010 We were not able to use this API endpoint before adding them, okay, just a few seconds, before adding one car. 297 00:30:21,010 --> 00:30:25,210 We need to be a owner, but we can be a owner of anyone's car. 298 00:30:25,210 --> 00:30:34,610 Just pick the VIN, add to your account, you become a owner and from that moment on you can do thousands of requests to just scrape the data from the API. 299 00:30:36,650 --> 00:30:46,150 Maybe you're lucky and you're gonna get again a cross-site scripting from some redirect URI and you can do the same magic we did before. 300 00:30:47,170 --> 00:30:51,910 Okay, I'm not sure we're gonna be, we're gonna have time for all of them, but those are quick. 301 00:30:52,850 --> 00:30:56,650 Let's see if you have SiteMinder, go home and patch it. 302 00:30:56,790 --> 00:31:02,710 We have 91 instances of SiteMinder in the same company, so go home and fix it. 303 00:31:03,410 --> 00:31:16,310 Very fast, just to tell you, you have the table with all the information, organizations, subscribe to vulnerability databases, of course, create a safe harbor for us hackers, so that's very cool. 304 00:31:16,310 --> 00:31:20,350 Reply to our emails, it's for everyone's security. 305 00:31:20,590 --> 00:31:24,930 AI won't make your assets safe, but only safer. 306 00:31:24,930 --> 00:31:29,570 That's the QR code if you want a promo on API security training, so that's it. 307 00:31:29,570 --> 00:31:30,390 Thank you.