1 00:00:00,000 --> 00:00:10,320 So, sometimes bug hunters, we find bugs, like we work really hard to find bugs, but sometimes we're lucky and bugs find us. 2 00:00:10,600 --> 00:00:15,280 So my talk is about luck, in a way. 3 00:00:16,300 --> 00:00:18,020 So let's start. 4 00:00:18,840 --> 00:00:22,760 I have to admit, I grew up using PowerPoint. 5 00:00:22,760 --> 00:00:24,700 So I'm still using PowerPoint for my slides. 6 00:00:24,700 --> 00:00:29,180 I'm not using Google Slides or any modern application. 7 00:00:31,160 --> 00:00:38,040 And I'm the kind of guy where black on white is perfect, but I know it's not always visually appealing. 8 00:00:38,040 --> 00:00:53,300 So in PowerPoint, there's a feature called, I think, Design Suggestions, where it's an AI-based feature and it suggests, based on your contents, a slide, a template for you, where it's just a couple of designs. 9 00:00:53,460 --> 00:00:54,660 So I picked one. 10 00:00:54,660 --> 00:01:00,600 This morning, I noticed that Microsoft thinks that Canada, we live in igloos. 11 00:01:00,960 --> 00:01:04,600 So it shows my name, based out of Montreal, Canada. 12 00:01:04,600 --> 00:01:05,820 I don't live in an igloo. 13 00:01:05,900 --> 00:01:08,160 They should just put a house, like, I don't know. 14 00:01:08,240 --> 00:01:11,080 Anyway, so my name is Jasmine Landry. 15 00:01:11,080 --> 00:01:12,160 I'm a French-Canadian. 16 00:01:12,520 --> 00:01:16,080 In English, my name is, I guess, Jasmine, or as my friends call me, Jazz. 17 00:01:16,660 --> 00:01:19,080 I'm currently a full-time bug bounty hunter. 18 00:01:19,600 --> 00:01:21,740 I've been doing it for almost a year now. 19 00:01:22,320 --> 00:01:26,500 I've been in IT and cybersecurity for, I think, 12 years. 20 00:01:27,060 --> 00:01:33,800 Before doing a bounty full-time, I worked at NASDAQ as a senior director, information security. 21 00:01:33,980 --> 00:01:37,780 I used to manage the AppSec team, did some... 22 00:01:37,780 --> 00:01:40,420 My team also did the pentesting and red teaming. 23 00:01:40,480 --> 00:01:46,440 And as a typical Canadian, I'm an avid hockey player and a hockey fan, so go Habs go. 24 00:01:49,200 --> 00:01:53,400 So this is about when bugs show up on your doorstep. 25 00:01:53,830 --> 00:01:56,800 It's not about like recon or crazy exploit chains. 26 00:01:56,800 --> 00:02:02,920 I may have one that's pretty cool, like something crazy like what James Kettle did yesterday. 27 00:02:03,160 --> 00:02:11,080 It's about those weird, funny, or chaotic bugs that are often unexpected, but as a bug hunter, they're always welcome. 28 00:02:11,960 --> 00:02:13,580 So here's what you're in for. 29 00:02:13,680 --> 00:02:16,800 I divided this talk in three sections. 30 00:02:17,080 --> 00:02:21,520 The first one is luck, bugs that got dropped in my lap, pretty much. 31 00:02:22,300 --> 00:02:32,140 WTF, bugs that kind of made no sense to me when I found them, and LOL, so bugs that are so ridiculous, it just like kind of made me laugh. 32 00:02:32,280 --> 00:02:34,380 And then in the end, Q&A if we have time. 33 00:02:35,300 --> 00:02:37,920 So let's start off with luck. 34 00:02:39,480 --> 00:02:52,620 And in bug bounty, when we get lucky, it's often where it's something that is unexpected, like a blind XSS, we just like put a payload and maybe eventually it'll pop and we'll get something cool. 35 00:02:53,100 --> 00:02:59,200 So the first two bugs on the luck side of things are both blind XSS. 36 00:02:59,360 --> 00:03:02,300 So what was I looking at back then? 37 00:03:02,300 --> 00:03:05,040 It was a cloud compliance application. 38 00:03:05,340 --> 00:03:16,200 So like it was an app where we could test if our infrastructure was like SOC 2 compliant or ISO 27001, all of that. 39 00:03:16,400 --> 00:03:17,720 It was quite hard. 40 00:03:17,720 --> 00:03:24,960 I only had like one or two bugs, both or I don't remember if it was one or two, but low or medium, not really impactful. 41 00:03:25,440 --> 00:03:30,400 So I decided to just like spray and pray payloads all over the place. 42 00:03:30,940 --> 00:03:37,740 If you're not familiar with the term spray and pray, it's pretty much just like spraying payloads and praying that one will work, right? 43 00:03:38,240 --> 00:03:39,420 So I did that. 44 00:03:39,420 --> 00:03:43,300 And obviously one of them did work. 45 00:03:43,460 --> 00:03:49,360 Back then I used XSS Hunter as my XSS, my XSS tool. 46 00:03:50,060 --> 00:03:58,080 So with that tool, it captures like the URL, cookies, you can download the DOM. 47 00:03:58,320 --> 00:04:00,380 There's also a screenshot you can get with that. 48 00:04:00,920 --> 00:04:07,960 So the URL was this, X, Apple, QLID, UUID, and then like X, Apple, QL Magic. 49 00:04:07,960 --> 00:04:09,540 It was like, that's pretty odd. 50 00:04:09,540 --> 00:04:10,720 I've never seen that before. 51 00:04:10,980 --> 00:04:17,360 And then I look at the screenshot, it's an actual CSV file, not like a webpage or HTML file. 52 00:04:17,360 --> 00:04:19,200 That's really weird. 53 00:04:19,380 --> 00:04:30,040 In that file, there were like org IDs, AWS account IDs, partial credit card data, and other not as sensitive data. 54 00:04:30,720 --> 00:04:37,500 And inside the DOM that I was about to download, there was this specific string, quick look CSV. 55 00:04:37,500 --> 00:04:49,520 So by putting all of these pieces together, I learned that the QL in the X, Apple, QLID, I guess URI scheme was actually quick look. 56 00:04:49,520 --> 00:04:54,120 So quick look is a feature in Mac where they can preview files. 57 00:04:54,700 --> 00:04:57,400 So what is quick look CSV? 58 00:04:57,740 --> 00:05:02,160 Well, it's a plugin for quick look in Mac. 59 00:05:03,160 --> 00:05:05,660 So it's specifically for CSV files. 60 00:05:05,880 --> 00:05:14,800 Now, I'm not sure if you guys can see well, but the main.c file, the last commit or last modification was 16 years ago. 61 00:05:14,800 --> 00:05:17,720 I was like, interesting. 62 00:05:17,720 --> 00:05:23,040 The last actual change was eight years ago on the license file. 63 00:05:23,380 --> 00:05:25,900 So it was pretty old. 64 00:05:26,600 --> 00:05:35,920 So I tested it out locally and it was actually vulnerable, just like using brew install, whatever it was, and it worked. 65 00:05:36,400 --> 00:05:40,020 So what did I, what was the result of this? 66 00:05:40,240 --> 00:05:47,100 I'll read out what I got as a message from the program on the bug match platform. 67 00:05:47,100 --> 00:05:48,420 That was bug road. 68 00:05:48,640 --> 00:06:01,980 So he said, even though this isn't a vulnerability in our application per se, we are considering this a P1, additionally eligible for the bonus listed in our brief because you managed to get access to some data about our customer accounts in there. 69 00:06:02,560 --> 00:06:14,440 What's happened is some people in our org were running a microservice, which exported data from the production environment and viewed the export on their machine using this quick look CSV vulnerable software. 70 00:06:14,820 --> 00:06:22,280 So we want to reward you for bringing the issue where production data being transmitted outside our production environment to our intention. 71 00:06:22,280 --> 00:06:29,600 So since there was like credit card data in there, PCI was gonna knock on the door, maybe eventually. 72 00:06:30,860 --> 00:06:34,280 I also got a bonus for getting access to customer data. 73 00:06:34,900 --> 00:06:43,920 And I was the only researcher that reported it despite having many other blindness payloads in that file. 74 00:06:44,380 --> 00:06:52,860 And what's funny about that is that I remember getting the alert like on a Friday evening and took me a while to figure out what company it was. 75 00:06:52,980 --> 00:06:56,320 And they eventually reported it two days later on Sunday. 76 00:06:56,800 --> 00:07:03,960 So lesson learned with that on my end is when I spray payloads, make sure I can identify where the input is coming from. 77 00:07:04,080 --> 00:07:07,500 But that was like when I started like 2018 to 19. 78 00:07:07,940 --> 00:07:09,360 I'm not doing that anymore. 79 00:07:09,360 --> 00:07:12,000 Now I'm more, I guess, experienced. 80 00:07:12,000 --> 00:07:14,360 So I do identify my payloads. 81 00:07:15,280 --> 00:07:26,080 Additionally, we previously classed several of the submissions from researchers as low priority based on how difficult it would be to guess a number of customer accounts or org IDs. 82 00:07:26,080 --> 00:07:28,520 And I managed to get a whole dump of it. 83 00:07:28,520 --> 00:07:30,860 It was like a thousand line file. 84 00:07:30,860 --> 00:07:33,620 So it was like a big dump. 85 00:07:34,300 --> 00:07:44,400 And lastly, I want to tell you that internally I received, make sure your reward is finding messages from technical lead, head of security and CTO. 86 00:07:44,560 --> 00:07:45,980 Is that one person? 87 00:07:45,980 --> 00:07:46,580 I don't know. 88 00:07:46,580 --> 00:07:47,040 Is it three? 89 00:07:47,040 --> 00:07:49,700 I'm hoping it's three, you know, it's more cool. 90 00:07:49,960 --> 00:07:55,600 But I found that pretty cool to get that on a message in a bug bounty, I guess on a report. 91 00:07:56,560 --> 00:08:00,580 So bug number two, what are we looking at now? 92 00:08:01,240 --> 00:08:03,720 This is another hardened app. 93 00:08:03,720 --> 00:08:05,580 This time was built on Rails. 94 00:08:05,820 --> 00:08:09,060 And at first sight, it didn't seem vulnerable to XSS. 95 00:08:09,600 --> 00:08:11,420 It was a large company. 96 00:08:11,420 --> 00:08:20,040 So I figured maybe to have like processes in place where they would take my input and, you know, transfer it elsewhere. 97 00:08:20,040 --> 00:08:23,120 So I figured, what do I do? 98 00:08:23,120 --> 00:08:24,920 Sprint for your payloads again. 99 00:08:25,460 --> 00:08:28,200 And obviously it worked out. 100 00:08:28,200 --> 00:08:32,400 I got a second blank XSS payload, a blank XSS pop. 101 00:08:32,820 --> 00:08:39,460 And this time, what was captured in XSS Hunter, the URL was also not something usual. 102 00:08:39,460 --> 00:08:42,720 It was about source doc, which I was like, hmm, that's kind of odd. 103 00:08:43,700 --> 00:08:46,500 And the screenshot showed this. 104 00:08:47,600 --> 00:08:55,820 Let me just, actually, yeah, I can't really change it, but it looks like an email, right? 105 00:08:55,820 --> 00:09:01,100 We can see like this sent from to one subject and the body of the email. 106 00:09:01,100 --> 00:09:04,680 And the subject says, please investigate customer ID. 107 00:09:04,680 --> 00:09:07,060 I was like, that's really weird. 108 00:09:07,420 --> 00:09:13,820 But if you look at the email itself, it says, you and your friends ruined a fine experiment. 109 00:09:13,820 --> 00:09:15,680 You should be ashamed of yourself. 110 00:09:15,740 --> 00:09:17,400 And then my XSS payload. 111 00:09:17,820 --> 00:09:21,400 And then it said like, it didn't apply with instructions. 112 00:09:21,580 --> 00:09:23,060 So what happened? 113 00:09:23,060 --> 00:09:30,120 Because of my spring of payloads, someone filed a complaint on my account. 114 00:09:30,440 --> 00:09:36,760 And the complaint, which contained my XSS payload, popped in like an internal email system. 115 00:09:37,440 --> 00:09:42,180 So because of that guy that filed a complaint, I got a nice four-digit bounty. 116 00:09:42,460 --> 00:09:50,120 And funny story related to that, a couple of days after I reported it, he messaged me on Twitter. 117 00:09:51,040 --> 00:09:54,300 I figured I had my JROC name somewhere in the application. 118 00:09:54,720 --> 00:09:57,160 And he was like, man, you ruined my day. 119 00:09:57,160 --> 00:09:58,440 I wish a lot of time on what you did. 120 00:09:58,440 --> 00:10:00,260 And I was like, what did I do? 121 00:10:00,260 --> 00:10:03,540 He was like, you did a ton of BS stuff. 122 00:10:03,540 --> 00:10:05,940 And anyways, I was like, well, sorry, man. 123 00:10:06,420 --> 00:10:07,660 I'm just doing bug bounty. 124 00:10:07,660 --> 00:10:08,580 Like, here's a platform. 125 00:10:08,580 --> 00:10:10,040 I'm authorized to do this. 126 00:10:10,040 --> 00:10:11,680 Like, this is legit stuff. 127 00:10:11,880 --> 00:10:12,940 I was like, oh, you do bug bounty. 128 00:10:12,940 --> 00:10:13,760 That's pretty cool. 129 00:10:13,860 --> 00:10:14,700 Take a look at this. 130 00:10:14,700 --> 00:10:15,940 I was like, awesome. 131 00:10:15,940 --> 00:10:16,980 Bring it to me, man. 132 00:10:17,400 --> 00:10:21,540 So he was actually like telling me like places where for him it looked weird. 133 00:10:21,540 --> 00:10:24,200 And so in the end, he was a really cool guy. 134 00:10:24,200 --> 00:10:26,880 And I just, I guess he had a bad day and all that stuff. 135 00:10:26,880 --> 00:10:29,060 So it's a funny, funny story. 136 00:10:30,180 --> 00:10:34,220 So now the WTF bugs. 137 00:10:38,870 --> 00:10:40,750 So what are we looking at? 138 00:10:44,030 --> 00:10:47,690 I was participating in an LHE, so a live hacking event. 139 00:10:48,190 --> 00:10:50,950 This was a really huge scope. 140 00:10:50,990 --> 00:10:57,670 So I just picked a random application, but to log in, I had to be an employee. 141 00:10:57,990 --> 00:11:02,850 So obviously I didn't have credentials, so I couldn't log in. 142 00:11:04,070 --> 00:11:15,730 I tried everything that I could think of to bypass authentication, like LDAP injection or, you know, regular like odd bypasses, tricks and stuff, but nothing worked. 143 00:11:16,230 --> 00:11:17,810 So what did I do? 144 00:11:18,090 --> 00:11:21,970 No, I didn't just pray and pray and blindly accept all this time. 145 00:11:22,090 --> 00:11:33,770 I did some fuzzing though, to try to see if, you know, something could happen, you know, injecting Unicode characters and anything that I could think of with fuzzing, but nothing worked. 146 00:11:34,550 --> 00:11:39,570 However, one week later, I got an email. 147 00:11:40,610 --> 00:11:45,250 I don't have a screenshot of the email anymore, but I'll show you what I wrote in the report. 148 00:11:46,030 --> 00:11:58,650 I'm not exactly sure what happened, but it seemed that my research email jrockatwearehacker.com has been added in a group that received new access requests from and then redacted domain. 149 00:11:59,230 --> 00:12:01,730 So what happened here? 150 00:12:02,050 --> 00:12:06,070 I somehow got added in an internal distribution list. 151 00:12:06,550 --> 00:12:16,250 So in the email, we could see like a dozen like employees in the tool field, and then in there, there was my hacker email address. 152 00:12:16,590 --> 00:12:23,530 And in those emails, well, actually I couldn't still, I still couldn't access the application for some reason. 153 00:12:23,670 --> 00:12:33,630 I was like an admin, but I still have a legit login, but I could most likely approve or deny users access requests. 154 00:12:34,070 --> 00:12:35,850 What was in those emails? 155 00:12:35,890 --> 00:12:40,890 Well, can't say much about it, but there was some PII. 156 00:12:40,890 --> 00:12:53,870 The users had to say where they were located, so their address, other PII information, as well as other not as much information. 157 00:12:54,390 --> 00:12:57,750 But in the end, it still had PII. 158 00:12:58,230 --> 00:13:01,310 And this lasted about a month until they fixed it. 159 00:13:01,330 --> 00:13:09,350 I was getting roughly four or five emails per day for roughly a month, so I thought it was pretty funny considering the target. 160 00:13:09,350 --> 00:13:14,350 But if I tell you, you'd probably laugh as well. 161 00:13:14,350 --> 00:13:16,330 So yeah, it was a funny bug. 162 00:13:17,490 --> 00:13:20,070 So bug number four. 163 00:13:21,580 --> 00:13:24,690 This was probably the most interesting one. 164 00:13:25,520 --> 00:13:30,290 I put it in the WTF section because I wasn't expecting it at all. 165 00:13:30,450 --> 00:13:38,250 So it was an application where we could deploy WordPress applications in an automated way. 166 00:13:39,930 --> 00:13:48,210 It provided an API and along with many tools such as phpMyAdmin to, I guess, manage your WordPress instance. 167 00:13:49,730 --> 00:13:52,250 So I was doing my regular hunting on it. 168 00:13:52,730 --> 00:14:02,470 One thing that I often do is add a service type injection payload, so like double curly brackets, seven times seven, in my email address because I've had luck with that in the past. 169 00:14:02,470 --> 00:14:05,910 So I did that for this application as well. 170 00:14:05,910 --> 00:14:11,030 So JROC plus, and then my payload, and then, yeah. 171 00:14:11,610 --> 00:14:22,610 So one day while looking at the tables in phpMyAdmin, I did see that my SSH API payload did render to 49. 172 00:14:22,610 --> 00:14:30,590 That means that something was going on in the backend where it was evaluating the template. 173 00:14:30,590 --> 00:14:32,050 Can you guys see it correctly? 174 00:14:32,310 --> 00:14:34,090 Yeah, the sun is in front, right? 175 00:14:34,450 --> 00:14:36,250 Anyway, so it does show 49. 176 00:14:36,250 --> 00:14:37,850 It didn't evaluate properly. 177 00:14:42,030 --> 00:14:45,470 So I did have a server-side template injection. 178 00:14:47,630 --> 00:14:52,650 I played with it for a long time to try to figure out what engine was actually used. 179 00:14:54,470 --> 00:14:58,430 And after a while I was like, man, I have no clue what's going on. 180 00:14:59,710 --> 00:15:04,610 I know it's not phpMyAdmin, so I looked at the code and all that stuff and that wasn't it. 181 00:15:04,610 --> 00:15:05,790 It's something else. 182 00:15:05,790 --> 00:15:11,050 So I ended up asking the program what was going on. 183 00:15:11,050 --> 00:15:20,570 I submitted a report to them and I knew they would reply with something because we had a relationship with them, and ended up telling me that. 184 00:15:21,510 --> 00:15:34,790 So in the API that powers their application, obviously talks with WordPress and built on PHP, as we all know, and then it passed data in a Python serverless API. 185 00:15:35,070 --> 00:15:43,950 I figured Python has Jinja, which is a template engine, but in this case, it doesn't make sense because it's a serverless API. 186 00:15:44,070 --> 00:15:45,510 It has to be something else. 187 00:15:45,670 --> 00:15:47,810 And then it passed data to Ansible. 188 00:15:48,290 --> 00:15:52,790 So I knew what Ansible was, but never actually played with it. 189 00:15:52,790 --> 00:15:55,010 I knew what it was for, and I was like, hmm, that's probably interesting. 190 00:15:55,010 --> 00:16:01,090 Let me look if there's expressions, something like that, or templates inside of Ansible. 191 00:16:01,090 --> 00:16:06,970 So I did a bit of research and stumbled on the Ansible playbooks. 192 00:16:07,410 --> 00:16:11,930 So if we look at the docs itself, 193 00:16:15,490 --> 00:16:26,230 all good, it actually uses Jinja, which makes sense because my double-created brackets is the same syntax as Jinja, right? 194 00:16:26,230 --> 00:16:29,330 So there's something here, right? 195 00:16:29,670 --> 00:16:38,170 So I just looked a bit at the documentation and saw that there were variables. 196 00:16:38,370 --> 00:16:40,970 So what I did next... 197 00:16:55,870 --> 00:17:02,750 So I found the playbook underscore dir reserve variable, or as I called it, a magic variable. 198 00:17:02,750 --> 00:17:07,630 So this is pretty much just a directory of where the playbooks are stored. 199 00:17:07,990 --> 00:17:17,030 So I put that in my email address and as you guys can maybe not see, or yeah, you guys can see well, cool. 200 00:17:17,090 --> 00:17:17,870 It worked. 201 00:17:17,870 --> 00:17:22,510 So I knew that it was Ansible, so I confirmed it was Ansible, right? 202 00:17:22,990 --> 00:17:26,370 Since I was able to extract the data from the variable. 203 00:17:27,290 --> 00:17:29,590 But what can we do with it? 204 00:17:30,210 --> 00:17:32,610 So I ended up playing a bit with it. 205 00:17:33,290 --> 00:17:35,950 I found a way to extract all environment variables. 206 00:17:36,250 --> 00:17:45,270 As I mentioned in the report, I used like the expandVars function to extract the data in the shell environment variable. 207 00:17:45,270 --> 00:17:48,690 Same thing for the user and it worked. 208 00:17:48,970 --> 00:17:51,670 And then they replied with, thank you. 209 00:17:52,250 --> 00:17:55,530 I think this is enough to show that it's pretty bad. 210 00:17:55,690 --> 00:17:59,150 You could probably extract secrets from an Ansible environment. 211 00:17:59,390 --> 00:18:04,050 But if you look at the time here, it's like 12.45. 212 00:18:04,170 --> 00:18:08,790 Roughly three hours later, they decreased it to P2. 213 00:18:08,790 --> 00:18:12,670 I was like, shit, what can I do now? 214 00:18:12,670 --> 00:18:14,290 So it's Ansible. 215 00:18:14,490 --> 00:18:16,650 I can probably get an RCE here, right? 216 00:18:17,290 --> 00:18:22,930 But since I didn't know what Ansible, I mean, since I had never played with it before, I didn't know how. 217 00:18:22,950 --> 00:18:31,010 Especially since my injection is through like a template injection, which is probably not the same way as like declaring actual Ansible code. 218 00:18:31,870 --> 00:18:34,410 So what do we know so far? 219 00:18:35,570 --> 00:18:40,130 The email address needs to be RcE compliant when registering. 220 00:18:40,970 --> 00:18:50,550 So when you create your account on the app, it'll like send an email to verify that, you know, like as a regular application would do to verify that you own the email address. 221 00:18:51,770 --> 00:19:04,950 And Inti, which I'm not sure if it's here or not, did a talk at the ActivityCon in 2020 called You've Got Pwned Exploding Email Systems, which is a really great talk if you guys want to listen to it. 222 00:19:04,950 --> 00:19:07,530 We saw YouTube and really enjoyed it. 223 00:19:08,070 --> 00:19:14,910 So I kind of, since then, I've been putting like payloads in my email and it's surprising how many times it works. 224 00:19:17,250 --> 00:19:25,490 But when we changed our email address, like when we went to our profile and changed our email, nothing happened. 225 00:19:25,570 --> 00:19:27,550 No emails were sent to verify. 226 00:19:27,550 --> 00:19:29,650 You could just put in like any characters. 227 00:19:29,650 --> 00:19:35,190 It wasn't really checking whether it was RFC complied or not, but there were limitations. 228 00:19:35,190 --> 00:19:38,710 I could put in a parenthesis and a comma. 229 00:19:38,710 --> 00:19:40,890 So these are the only limited characters. 230 00:19:40,890 --> 00:19:41,370 Why? 231 00:19:41,370 --> 00:19:44,910 I don't know, but it is what it was. 232 00:19:45,770 --> 00:19:53,190 So next step, by looking at the docs, I stumbled on the Lookup plugin. 233 00:19:53,910 --> 00:20:00,370 And there's one in particular called Pipe or a part of the Lookup plugin, which is built in. 234 00:20:00,370 --> 00:20:02,290 And it's pretty much what we want. 235 00:20:02,290 --> 00:20:09,830 It reads output from a command and it's installed by default in all Ansible installations. 236 00:20:10,750 --> 00:20:17,590 So here's an example of what it will look like within an Ansible YAML file. 237 00:20:17,590 --> 00:20:23,930 We can see like they're using Pipe with the command date and yeah, another example in the bottom. 238 00:20:24,290 --> 00:20:28,270 So can we do that on the application? 239 00:20:28,270 --> 00:20:29,790 So first I tested it locally. 240 00:20:30,610 --> 00:20:32,590 Here's what it looked like. 241 00:20:35,110 --> 00:20:37,870 I should have put the font bigger. 242 00:20:37,870 --> 00:20:38,750 Sorry, guys. 243 00:20:42,640 --> 00:20:43,480 So it worked. 244 00:20:43,480 --> 00:20:47,920 So I was able to run the ID command, at least locally, right? 245 00:20:50,120 --> 00:20:56,720 And with like a regular payload, which contained the Lookup, Lookup and Pipe and then the command that I wanted to run. 246 00:21:00,830 --> 00:21:09,350 But in my original payload, I had parenthesis and a comma, which are kind of required in the payload itself, right? 247 00:21:09,610 --> 00:21:14,590 But Jinja is Python, it's Python based. 248 00:21:14,590 --> 00:21:22,710 So we can use like backslash and X and then like the hex character, which worked. 249 00:21:23,030 --> 00:21:29,970 So I'll just show an example of extracting its password file just for my, you know, just to make sure that it actually worked. 250 00:21:29,970 --> 00:21:33,530 And then I ran the pipe command. 251 00:21:59,000 --> 00:22:01,960 And by the way, that email, I don't own it. 252 00:22:01,960 --> 00:22:04,700 It was just like to show that it was possible. 253 00:22:04,700 --> 00:22:09,720 So if you want to send emails to jrockatgmail.com, go for it. 254 00:22:12,760 --> 00:22:15,400 So we saw that it works. 255 00:22:15,400 --> 00:22:22,740 So with this payload, it respected their limitations of not having parenthesis or commas. 256 00:22:24,180 --> 00:22:35,600 It is not a Darcy compliant email, but since they weren't verifying that after a change, it was valid for that specific case. 257 00:22:35,600 --> 00:22:44,120 So I ran that on that application, looked at the table in phpMyAdmin and I could see that it was running as root. 258 00:22:44,700 --> 00:22:49,320 So that was a pretty wild bug, I'd say. 259 00:22:49,380 --> 00:22:55,480 I put in a WTF because like I was expecting to inject Ansible in application like ever. 260 00:22:57,560 --> 00:23:01,700 So next up, the LOL section. 261 00:23:02,620 --> 00:23:05,320 So what was I looking at? 262 00:23:05,320 --> 00:23:07,460 A fantasy sports application. 263 00:23:08,720 --> 00:23:11,980 People could create private fantasy leagues. 264 00:23:12,320 --> 00:23:17,380 The admin set up a password and they would invite their friends to join. 265 00:23:18,420 --> 00:23:20,380 The WAF did a self termination. 266 00:23:20,380 --> 00:23:23,220 So you can inspect the body of the post requests. 267 00:23:24,300 --> 00:23:30,100 And it was really serious on blocking XSS payloads, strip the whole payload itself. 268 00:23:30,100 --> 00:23:41,460 So putting like TE and then like straight through tag ST would result in TE and like a regular payload with nothing, it returned nothing. 269 00:23:41,580 --> 00:23:45,860 So what did the password contain this character? 270 00:23:45,860 --> 00:23:47,120 What would happen? 271 00:23:48,000 --> 00:23:53,880 Well, what if users use a password that says, I love dogs? 272 00:23:54,080 --> 00:24:03,300 The password would become I, which is kind of funny and easy to boot for us, right? 273 00:24:04,180 --> 00:24:09,620 And randomly generated passwords such as this, the password would become T. 274 00:24:10,220 --> 00:24:14,980 Or worse, if the password started with that character, there wouldn't be any passwords at all. 275 00:24:15,860 --> 00:24:25,180 And the admin wouldn't even know it because she submitted the password and he doesn't know that the password that she has is not right. 276 00:24:25,700 --> 00:24:29,220 So invites were sent with a password and clear text in the email. 277 00:24:30,080 --> 00:24:37,760 And if the password was empty, considering the password started with that character, there was no passwords for the private leak. 278 00:24:38,740 --> 00:24:41,220 And there weren't any passwords in the email itself. 279 00:24:41,220 --> 00:24:44,860 So stats and results on this bug. 280 00:24:45,180 --> 00:24:50,240 I could join a bit over a thousand leagues by simply reinforcing the first two characters of the password. 281 00:24:50,700 --> 00:24:52,180 That was pretty funny. 282 00:24:52,540 --> 00:24:57,280 56 leagues ended up not having a single password. 283 00:24:59,970 --> 00:25:04,770 I could have won the prize money in the leagues and, you know, have some fun. 284 00:25:05,790 --> 00:25:10,150 Our last bug here, I'm gonna do it really fast, and it's a pretty small bug. 285 00:25:10,910 --> 00:25:12,870 Self-serve password reset application. 286 00:25:13,310 --> 00:25:15,990 It was a new product built in 2019. 287 00:25:16,250 --> 00:25:18,710 A product built on Perl. 288 00:25:18,810 --> 00:25:21,690 Yes, you read that or heard that right, Perl. 289 00:25:21,830 --> 00:25:22,210 Why? 290 00:25:22,210 --> 00:25:23,070 I don't know. 291 00:25:26,110 --> 00:25:28,310 So two screenshots required. 292 00:25:28,870 --> 00:25:37,190 The first one you can see, I put the ID command in backticks and in the response, we could see the output. 293 00:25:38,010 --> 00:25:43,130 So yeah, that was a really LOL bug. 294 00:25:43,130 --> 00:25:44,470 So thank you.