All righty y'all, I think we're going to go ahead and get started a little bit early. Sorry for any of the people that are coming in at the last minute, but we'll go ahead and get rolling. Also, I realized that I got super lucky because this is the last slot of the day. So we can go a little bit long, which is exciting. You guys can hear me all right on this one too, right? I kind of like to walk around a little bit. Okay, so I need to point it right at it. Okay, so for any of you the guys that don't know me, I'm Justin Gardner, a.k.a. Rhino Raider. I'm a professional live hacking event participant, a.k.a. full-time Bug Bounty, a.k.a. no job. And I hack web applications mostly, and IoT devices occasionally, and sometimes mobile devices when Joel is here to help me out. I'm the host of the Critical Thinking Bug Bounty podcast with my boy Joel right here as the co-host. And I'm also advisor for Kaido. So check those out if you're interested. All right, let's go ahead and talk about the roadmap for today's talk. We're going to hit 11 bugs, and I don't have to rush, which is great. I was going to give you a disclaimer that we're going to move pretty quickly. The whole concept behind this talk was to kind of bring to you all the experience that the hackers get at a live hacking event during the show and tell portion, which is at the end of the event when we all sit down and we compare notes. Some of the people go up on stage and present the bugs that they've found. So what I've done is I've compiled 11 vulnerabilities for you over the past two or three years of bug bounty hunting, all criticals. And I'm going to walk you through each one. And I'm going to do so at as much technical depth as I can without revealing the target. We have three easy bugs. We have two mediums, four hards, and two very hards. So we're going to start off easy and then we're going to go go a little bit deeper after that. So let's jump into it. First one is an NGINX 403 bypass to PII leak. So this is on a semi-private program. You'll see actually throughout the whole presentation that most of the targets that I'm hacking on are public programs or are semi-private programs, which is essentially a private program that everyone knows exists and they're very public about the fact that they exist. And you can easily get added to that program and paid for a bug if you have a bug. So when finding this bug, the first indicator that there might be a bug here was that the application or that the company was taking a piece of software that was meant for internal use. And then they've modified it to be publicly used so anybody can sign up and log into this app. Right. So when they do that, of course, the threat model changes for the application. Right. So I thought that was really sketchy. So I decided to look into it a little bit deeper. So what I was thinking is, OK, well, when this app was intended for private use only within an organization, then there was probably a lot of implicit trust between the users in the organization. You know, if I am in an organization with Joel, it's probably not a huge problem if I can go and look and see his last name or whatever. Right. However, in a public application, that information may be more sensitive. So I decided to look for those sort of endpoints, exploiting implicit trust and leak user data. So I identified a couple of those endpoints in the sort of internal use version of the software. And when I hit them on the API, I noticed that I got an NGINX 403. Right. Instead of the application level 403. You can see the differences over there. The NGINX 403 seems to imply that there is this sort of structure. OK. So we're on the network. We send a request over the Internet to the NGINX reverse proxy. That's standing in front of the backend server. And then the backend server processes that request, gives the response back to NGINX, which gives the response back to the user. Pretty standard NGINX structure or reverse proxy structure. However, when we request the API endpoint slash API slash internal slash get all users, that's not the API endpoint. That's obfuscated. It hits the reverse proxy. And then the reverse proxy says not allowed. Right. So I noticed the difference between those two 403 pages and I thought we should try to fuzz that a little bit. So what do we do? We try get all users. We hit the 403. We try get all users with a Z just to see if they had like blocked off that specific endpoint at the NGINX level or whether they are blocking out the path before that. Right. We get a 404 there. So not that whole path is slash API slash internal is not all blocked, just get all users. So then I tried some patch reversal stuff and eventually I started encoding various characters and found out that a WL encoded S would pass through the reverse proxy and not be perceived as a match for the block on get all users route. And it would be parsed on the backend as an S. So it would match that get all users route and dump back a ton of data. So the impact of that one was 4.5 million users PII leaked. The bounty was between 15 and 20K. I'm going to give you ranges because some of the ranges can, the actual numbers can disclose the programs. The severity was critical, critical, critical, which is what we say from the critical thinking podcast. Shout out to YT Cracker. And this program was semi-private as mentioned before. The takeaways for this one were obviously that change to threat model. Identify odd and out of place 403 pages. Those can always tell, can imply to you when a route is getting essentially blocked off by a reverse proxy and might be bypassable via some of these normalization tricks. And yeah, there was an amazing talk by one of the guys at Portswager earlier today on some of the amazing path reversal and path normalization stuff you can do. So I bet that would also be really helpful here. So the last takeaway is know your bypass tricks, URL encoding, double URL encoding, path reversal, et cetera. All right, let's move to the next one. This one's really easy. It's an arbitrary count takeover via docs, essentially. So I open the docs, I look at these endpoints, and I notice that there is an API endpoint for slash OAuth slash token. And there's an authorization header required for that. And the body is really simple. It's just grant type equals password. And then user equals username, password equals password. That's exactly what you would expect. And it dumps back the access token. Very, very reasonable. But wait a second. A password? This application is a OTP login application. There's no password. You just put in your email, they send you a link to your email, you click on it, and you're logged in. So how does that work? So I started building it out. And when I sent the request, I got a 401 unauthorized. Of course, we need to authorize with the credentials mentioned in the doc for the authorization header. So I went and I needed that. So I was like, what do I do? Of course, to the JS files. So I search in the JS files. I'm looking for the part of the UI that uses this request. And I find sitting in the JS files these authorization credentials. And they're obviously Base64 encoded. And the values were kind of odd. I can't show them to you, but they weren't random. They were just a string. So it was a little bit of an odd setup. And so then using those authorization basic credentials, we could literally just submit any password for any user. And it would accept it and dump back the authorization token, giving us access to arbitrary account takeover on this target. This is a public program. This is a very high-paying public program. And this sort of stuff is out there. So this was... thank you, thank you. This was an arbitrary ATO on double-digit million accounts, 40 to 60K bounty, of course, critical. And like I mentioned, public, public program. So takeaways for this will be read the docs, think about the docs, and then check the JS. Because there's a lot of good stuff in there. All right, next, bug number three. This one's very similar to the last one. Essentially, you take the AuthBearer and you log into that API, that godforsaken API. And there's simply a numeric IDOR in that API that literally leaks password hashes and password reset tokens. And I see someone in the audience that is laughing because I think they know the target that I'm talking about. So that's interesting. But yeah, the password reset token is there. You can just password reset the account, hit the IDOR, and then you'll be able to log into the person's account. This was also 40 to 60K. And the takeaway from this one that's different from the other one is just get really deep into these apps. It probably took 40 hours of configuring stuff and getting to know the various parts of the application before I got to this point where I was needing to authenticate into this asset. So that's the behind the scenes. I want to make sure that it's not perceived as looking too easy because there is some work that goes into it. Okay, bug number four, we're moving into the medium difficulty section now. This was a blind XSS via SMS to arbitrary account takeover. So this was on an app that was a place where you could buy a car. And there was a sister app that would allow the dealers to deal with the... it's kind of like a CRM for the dealers, right? So you go ahead and find a car. I was interested in this DeLorean for $42 million. And so I went ahead and filled it out. And somebody named Christina from my local car place reached out to me and said, Hey, Justin, I saw that you filled out the request for this. When can we meet to see the car? I was like, okay, wow. How did they do that? Because I had access to the dealer panel as a part of this scope and I didn't see where they did that. So I said, okay, let me go ahead and log into the dealer software and get that perspective. So this is what I see. You can select the users that you want to view the details for on the left hand side. And there's like an info and a financing tab. And you can kind of inspect that lead that had come through the website. And so I started reading the code on that page. And there's like some super long window object that's kind of difficult to read. But if you scroll through it and do your due diligence, there's a section called feature flags, which is something that I just talked about at my talk earlier in Bug Bounty Village. And there was a messages feature flag. So we turned that from false to true. And you can see, yeah, from false to true with this easy Kaido match and replace rule. And voila, the messages tab appears in the application and we have the ability to use it. So as we go into that application, we can send messages to the various leads. It'll go to the phone number that they submitted. And then you can interact with them. Great. So I sent myself a message. I submitted a lead, sent myself a message. And I thought, okay, wow, wouldn't it be cool if I could SMS myself an XSS payload? So I went ahead and first typoed my XSS payload to something that would never work, proceeded to reaction down it instinctually, and then submitted the actual XSS payload. When the dealer came back to the screen, they would see that the XSS would pop and we were able to get a blind XSS of sorts in this environment. So we've got blind XSS, but what can we do with it to get more impact? Well, the authorization flow for this application happened in an invisible iframe right near this interface. And what it would do is it would go through the OAuth flow on a different domain and then it would call back with just a token. And so what I did using the XSS is I cookie bombed that callback location so that the code wouldn't get consumed. And then I stole the code out of the iframe and exfiltrated that to the attacker server. So whenever the dealer comes, their session token would be exfiltrated, the victim's token would be exfiltrated, and the attacker can simply click the link and they're logged into the victim's dealer account. And you don't have to bypass MFA or anything like that because the session token is there. Great. So now we've got, we can log in as the dealer, we've got ATO. How can we get even more impact? Well, that same request had three vulnerabilities in it, okay? The send SMS message API endpoint had a dealer ID that was vulnerable to IDOR, a client ID that was vulnerable to IDOR, and the message was vulnerable to XSS. So essentially what this means is that we can worm this XSS across all of the dealers. We can send a message to every client from every dealer with an XSS payload and then proceed to hijack their accounts. And when we get access to their accounts, then we get access to all of the PII of all of the customers that have ever used this application. So that was bad. And that was an arbitrary ATO of double-digit million users, PII leak, 20 to 40K. This was on a private program. However, this program will be going public soon, I'm aware. And the takeaway for this is look at all the, look at the application from all perspectives, right? We wouldn't have seen this if we just looked at it from the dealer perspective or just looked at it from the client perspective. Make sure you're turning on all the feature flags with match and replace. That can enable features that are essential. And look for alternative data input paths like SMS. And then lastly, of course, chain, chain, chain to get maximum impact. Okay, bug number five, snoop on other people's meetings. This was a really interesting one. It's going to be a little brief. But there was a target that I came across in a video chat and team collaboration app. And for this specific period, I decided to focus on a specific goal, which was I wanted to be able to do creepy shit in people's meetings, right? So I started investigating how exactly that worked. I read the developer's docs, the JavaScript code, the GitHub issues, everything. And when I was investigating the GitHub issues, this GitHub issue popped up. It says the participant list is wrong when XYZ audio device is used. And I was like, huh, that's weird. So the participant list didn't get updated when the user has a broken audio device. Why would that be happening? So I thought maybe I can make that happen and I would be able to enter meetings without people knowing I was there. So how does this joining meeting work? The user connects first over WebRTC. Then they get all of the information like the call, comms channels, etc. And then the JS code identifies an audio device that the user can use or it creates a fake audio device. And then the client-side JS sends the audio connect signal to join. Wait, what? It sends an audio connect signal to join. That little bloop that you hear when you join a meeting was the thing actually triggering the participant list update. Which I really could not believe. And so since this was happening on the client-side, we could just not send the signal. And that's exactly what we did with this match and replace rule. We just simply said, did a true false switch on whether the audio signal had already been sent or not and it didn't send the signal. And we became Snoop Dogg in that environment. Okay, so let's see how it worked. Here's my Snoop Dogg POC right here. That's what I named it. The triagers loved it. And essentially what you would do is paste in the meeting information. And then you would click Snoop. And it would actually exfiltrate the user's transcripts. And you would not see anything in the meeting participant list. So that one was a 20 to 25k bounty. It was technically high, but it was paid as a critical. Given the various bonuses that were occurring. This was on a public program as well. So takeaways from this one. Reading the GitHub issues can have massive dividends, especially anything related to security or privacy. Set goals for your target, like being able to Snoop on meetings. And then verify in the code base how this works, especially on the client side. Okay, we are 15 minutes in. Dude, we are doing good. I may not keep you here long. We will see though, because now things are getting a little bit trickier. So this one is going to be a long one. This one was a Perforce server to client RCE. And I will explain what that is in just a second. The target for this was a desktop application used for game development. The problem is, I suck at hacking desktop applications. Note that I did not add that in the list of things that I often hack in the intro slide. So I was thinking, how can I attack this? This is kind of a little bit outside of my comfort zone. I can't really do privilege escalation stuff, because this doesn't really run in a privileged environment. So I was thinking, okay, but local attacks are kind of dumb anyway. Let me try to focus on remote attacks. And these are some of the ideas that I came up with. I just want to walk you through the process, so all of this doesn't seem too easy. And you see how often we fail when attacking targets like this. So here are some of the attack factors I came up with. I was thinking, we could open a malicious file in the development thing, and something bad would happen. We could connect to a malicious server with the development environment, and then something bad would happen. We could attack the software development lifecycle, a la Lupin, a la Ronnie Carta right here. And try to inject something into the build of this application itself. We could take advantage of some sort of misconfiguration in the actual code itself. Like maybe it's reaching out to an unclaimed domain, or an unclaimed S3 bucket, and inject sort of there. Or we could take these reusable game component pieces that were being processed, and try to do something with those. So I started going down these paths, and I checked out open a malicious file. So I broke apart some of the file extensions associated with this, and looked at the structure. I was replacing paths with UNC paths to see if I could force it to reach out to a remote server. I found that you could include settings for a project in a file. That was kind of interesting, but couldn't really do anything malicious with it at the time. I noticed that there was lots of XML. So I started spraying around various XXE payloads in there, and seeing if they would trigger. No luck. Symbolic links, I was kind of playing around with those. And nothing's really working. Kind of meh, feeling kind of insufficient at this point to look at this target. So I move along to the next attack factor. So that was connect to a malicious server. So what do I mean by that? This software had the ability to connect to remote version control servers. So that you could store your code that you were developing in a remote version control. And there were multiple types, and Perforce was one of those types. And that was something that I hadn't really heard of before. And I know from a lot of the work of Alex Chapman and some of the other great Git version control hackers out there, that version control can be hella sketchy. And so I kind of went down this route. So I started looking up the Perforce protocol spec. And I found this awesome article that told me about that. Funny side note that I don't have in the slides, the guy I just mentioned, Alex Chapman, he was also working on this target at the same time. And he actually had a public blog on how to exploit this specific protocol that I didn't find until a little bit later. And then I realized, oh shit, he's going to find that same bug. And we did have a bug collision, but it still worked out great. So anyway, I clicked on this article. And it was a really great article describing how this protocol works. It broke down the RPC structure. It's a binary protocol, which I was a little bit uncomfortable with as a web guy. But I decided to try to continue working on it. And as I was reading through the article, I see this very convenient file synchronization flow on the right-hand side there. Now if you read that for a second, you'll see something a little bit odd. The server says, client open file, client write file. And I was like, hmm, that seems odd. That the server can just say, write files. But it is a version control system. I wonder if there's any path traversals or something nasty that I can do with that. So on a hunch, I started developing this malicious Perforce server. And this was, I'm not going to lie to you guys, this was really intimidating to me. Because I'm a web guy, like I said. And I don't really deal a lot with binary protocols. But I thought, now is probably the best chance I'll ever get. Because this article literally breaks everything out as clean as can possibly be. So I decided to go down that path. And in the end, the code was actually really simple. I just created a function that would pass in a JSON blob. And those names and values would then be encoded into the binary format that was described in the article. Which was essentially the parameter name, a null byte, the value length, and then the actual value itself. And then a null byte. And then that would be sort of packed into a bigger sort of call that would pass through the socket. So, man, working with struct.pack was really scary to me. Whenever I saw those exploits where it's like, alright, less than, and B, and I, and H. I was thinking like, wow, this is really complicated. But, one, ChatGPT is really helpful for that nowadays. And two, you just kind of put your head down and keep working at it. I think it comes pretty quickly. So, I was able to build the whole exploit. And essentially, this is a funny part that I wanted to highlight for you guys. When the client connects, of course, it's going to try to auth, right? And my server was just like, yes, yes, you've authed correctly. Let's go. And just ignored the whole auth part. Which was really funny. And then just said, write a file. And essentially what it would do is write a file to anywhere on the file system via path traversal. And so, how do we convert that to RCE? Well, it was really easy. There was an exe file that was getting run every two seconds. So, you just take your malicious exe file, overwrite that file, and then it gets run two seconds later and you pop a shell. And, yeah, how do we actually make this a plausible attack? Well, as I mentioned earlier, there was the ability to include malicious settings for the project. And one of those settings, which was not super present in the documentation, was the ability to provide a version control server to connect to. And when it opened the file, it would automatically connect to that server. So, I could provide a victim with a file. They'd open it, connect to my server. My server would push a file down and shell the device. So, that was an RCE via malicious file. And the bounty for that was 15 to 30k. Critical, critical, critical, of course. And that was, again, on a public program. Takeaways from this. Read the freaking docs. It really helps. And articles. Don't shy away from targets you're scared of. And use your super amazing hacker brain for any struct pack calls or chat GPT, whichever you're more comfortable with. Okay. Joel, I've got some Easter eggs for you in this one, man. You're going to like this, okay? So, the next bug that I wanted to talk about was shelling a public program router. Once again, I wasn't super familiar with IoT devices before this. And so, I leaned heavily on my boy Joel Margolis, my podcast co-host here. And as cute as we are together there in that picture, we are both independently married. Although, that would be great. So, let's get to the details, okay, guys? Essentially, what we did is we took this router that was in a public program. We broke it apart. And we used the FCC website and Google and our brain to identify that this chip was in, this is what it sounded like to me the first time, a BGA EMMC ABC1234G74XYZ. This is coming out of Joel's mouth. And I was like, oh my gosh, what the heck is that? Well, it's a lot easier than you would think. It's a ball grid array. Those are those little pieces of silver pieces there, the little pieces of solder, the connections. And then this is an EMMC, which is essentially a SD card, which is just attached to the firmware device or attached to the board. So, that was really cool. So, we wanted to get that chip off. So, and for some reason, Joel let me do it. So, what we did was we get a hot air. I ordered a bunch of stuff on Amazon. I got the hot air rework station and lots of flux. And I sat down on the device and started blasting it with 500 degrees Fahrenheit air. And Joel was like, don't do that, bro. And then I proceeded to pull the EMMC chip off before the solder was completely liquid. And Joel was like, don't do that. And just give it some time. And then finally, after bricking three of them, we were actually able to get a clean read of the EMMC chip in our BGA reader and pull off the firmware for that device. Here's Joel's super awesome hardware hacking setup, by the way, which I'm jealous of. Yeah, bricked three of them. Not a great feeling. But the company paid for it, so that was great. So, now we've got the firmware so we can start hunting reliably. And it's time to shell that. So, what we did then, we were hoping it was going to be a lot easier than it was. But it was several days of weeding through Python code to find the actual attack vector that we ended up getting RCU with. And so the attack chain that we ended up going with started with us using an HTTP request to the cloud provider for this specific device that sent a certificate up. And that certificate was then pushed to the device and controlled certificate-based access to the Google RPC service listening on a port on the device. So, once we pushed up that certificate, we were able to communicate with gRPC, which we thought was going to be super helpful, but there was still not a lot of vulnerable code in there. So, we spent a couple days continuing to look. Then, finally, we came across this specific piece of functionality, which is write reservations. And as you can see in there, there's a Jinja2 template being referenced, right? So, everyone's probably thinking template injection, but it's not. They're using it correctly. What it is, however, is configuration file injection, which is a much rarer and, I think, totally underrated vulnerability class. And it kind of looks like this. This functionality would... what was this functionality doing? Yeah, it was writing static IP reservations for the router, right? So, what it would do is dynamically generate this DHCPD file, config file, and it would put the IP address that we wanted to static into the fixed address attribute. However, it wasn't escaping the characters that would allow us to write other DHCPD commands. So, we were able to identify a command that would run a shell command when a new DHCP lease was issued. And we were able to code golf it so that it keeps the correct syntax and doesn't break anything. And so, then we, after we got that in place and the exploit went off successfully, we grabbed our phones, connected to the device, and we saw that beautiful shell connection come back. Which is one of my favorite moments I've ever had hacking. Joel knows that I, like, jumped up and screamed, and it was amazing. So, that one was 20 to 32K, once again, on a public program. And I'm pretty proud of this fact. It took us, like, from zero, from knowing nothing about this target, about 10 days to get that shell. And so, I think, and I thought it was going to be a lot harder than that. So, don't shy away from these sort of things if you're intimidated by it like I was. Takeaways from this one is hack with a collaborator, or Joel Margolis, one of those two. Don't be afraid of hacking different types of scope. Get your hands on source code as much as you possibly can. And, obviously, configuration file injection is a pretty underrated vuln class, I think, especially in the IoT world. Okay, we're just going to do it again, real quick. And then we'll move on to the next one. This one was really interesting, though, so I wanted to include it. Another vulnerable endpoint on that same target was doing the same thing for DNS mask. So, we're like, okay, let's see if we can do the same thing there. So, of course, we Google, how to execute code with DNS mask config, and nothing comes up. Unfortunately, there's not a great way to do that. However, what every good DNS caching software needs is a built-in TFTP server. Yeah. Uh, so, essentially, that can be turned on via a DHTPD configuration. Uh, and you are able, then you will just be able to have FTP on the whole file system. And we're able to grab another file that can have a lot of impact. The problem was, is that we had double injection points this time around in the template, okay? And we really got stuck here for a long time. Because the user root directive, which is required to open up this TFTP server, cannot be duplicated twice. Just that one directive. Everything else can be duplicated, but the user root cannot. And so, because of the double injection points, we were having a really hard time with that. So, the solution, of course, is to reach out to Sam Erb, a Googler and double-time black badge guy. And say, hey, we've got this problem. And what does Sam do? Of course, he just opens up the C code for DNS Mask and starts reviewing how lines are getting parsed. Um, which is very Sam Erb of him to do. Uh, and he comes back and he says, hey, there's a maximum character length on a config line for DNS Mask. And that's 1025. So you might be able to essentially align the directive that you need and essentially utilize that maximum length to create a discrepancy between your two injection points. Um, that's the code that's vulnerable. It's not really vulnerable, it's just useful in this scenario. Um, and so what we did is one of those two double injection points was, the line was much longer than the other one. So, uh, on the shorter line, we created a, um, an injection that would not exceed the 1025 byte limit. And, uh, our user root directive would be, uh, placed inside of a comment at the end of that, uh, towards the end of that line, but not at the end. And then on the longer injection, let me see if I can show you. Yeah, at the longer injection, um, the line would overflow, the comments would be longer, and line up user root just on the, on the new line. Uh, that would be read, uh, when parsing the config file. So that was able to get one of our user root directives, um, in a commented out state, and the other one would get bumped to the next line of the DNS Mask config file. Um, so this is what the exploit looked like at the end. You can see the, uh, the top comment, uh, says, has user, uh, colon root at the end, and then all the other directives, which are fine to repeat. And then the IP set line, uh, has a bunch of A's, and then the A's are right up to that, uh, 1025 byte limit. And then user root gets dropped down into the next line, and, uh, gets parsed, uh, and executed. So using that, we were able to open up a TFTP server on port 69, and connect and exfiltrate, uh, data that we needed, uh, to get our C on the target again. That was another one. Uh, same program. Uh, I think maybe this was a little bit after the 10 days. It might have been 11 days or 12 days, but we found it pretty quickly afterwards. Uh, takeaway for this one is if it works, do it again. Uh, that's one of the big principles of bug bounty, is if you find a bug in one particular area, there's very likely to be bugs that are similar to it else, uh, in a similar, in a similar location. So definitely do your due diligence and go down that route. Okay, we're gonna do another one really quick, but I'm gonna get a drink of water first. Okay, bug number 9. We're doing really good. Actually, I'm moving a little fast. I may not use my full, uh, my full time block. Um, okay. So we, this time we've got a version control binary SQL injection. And I'm gonna make this one a little bit shorter because it's, it's kind of complicated. So we get this version control binary and I'm like, all right, let me see if I can do something out of my comfort zone and load it up into Ghidra. And then I get a bunch of errors relating to Microsoft and CLR and dot net. So I loaded up into dot peak and we were able to get the source code out. Uh, which was great because apparently you can, uh, like decompile those binaries and you get some really clean source code. So we were looking at the source code and essentially what was happening is, uh, we would be able to upload a file to a web version control interface. And that file could have a malicious name. Um, and then it would be stored in the version control environment. And the next time the user opened up, uh, and used that version control binary, it would, uh, pull the malicious file down and insert it into a, uh, SQLite database. So if you name a file, uh, an SQL injection payload, it would, uh, fire that and escape the, um, the string in the SQLite query and run arbitrary SQL on the victim's machine. This was found in collaboration with an amazing hacker named Odiotuk. And he reads C sharp code to fall asleep at night. So he was the original one who found this, uh, this sink. So how we exploited this was, uh, we were able to upload the file, sink it down, and then in the end, uh, we weren't able to get code execution. But what we were able to do was, uh, actually run code which would attach the user's, uh, Chrome cookies, which are stored in a SQLite database, uh, into and vacuum it into a B.DB file. And then recheck that file back into version control, which would push it back up to the web app. And then we could download and get ATO on that victim's web version control account. Um, and so that one, that was the end of the vuln. That was where we chained it to. That one was 30, 40K. And once again, wanted to reiterate, definitely hack with other hackers. It really expands your, your knowledge, especially in areas where you're uncomfortable. Um, I have to admit, I, I kind of underestimated SQLite. I kind of thought SQLite was a thing of the past, but they're out there and we see them pretty often in the live hacking events. Um, they're just a little bit deeper. And sometimes they're not even just a little bit deeper. They're, they're out there. Um, .peek is super helpful for those sort of decompilation scenarios when the base language is, I think like .net or C sharp. Um, so definitely check that out. Um, and yeah, I really, I really liked, uh, the exploitation scenario that we came up with there where we were able to vacuum the user's, uh, cookies into the version control and use that to exfiltrate the file as well. Yeah. And maybe don't roll your own version control. That's a nice takeaway as well. That never seems to end well. Okay. Now we are on to, uh, the very hard, uh, exploits. So buckle up. This one's going to take a hot second. I'm going to get water again. Okay. Target for this one was an in-home tabletop IOT device with camera and microphone. There's a couple out there. It's probably not the one you're thinking of, uh, but it is one of the top four or five you would be thinking of. Um, the end goal of this was, once again, I wanted to do creepy shit that people always say, okay, it's possible, but I haven't seen before and now I have. So I wanted to do no user interaction spying on, uh, some, in somebody's house and essentially just teleport myself into their house. Uh, and so I started going after that path and I started ideating on what the possibilities for this were. Here are a couple. We could get a no interaction shell on the device. That would be really challenging. We could gain some sort of, uh, insert company name here, admin functionality on the device and maybe that would allow us to do it. We could bypass auth specifically for the cam and mic related endpoints. We could compromise storage for video and audio feeds and maybe get access that way. Or we could access the built in functionality to access the cam and, uh, and mic stuff via a full authentication bypass on that person's account. So which one are we feeling guys? Raise your hands, put them up. I'm going to give a critical thinking t-shirt to anybody who gets it right. It was number three and the first person I see with number three is this guy right here. So I'll get you a t-shirt right after. Come up and get it. So it was bypass auth specifically for the cam and mic related endpoints. That's how we got it, so let's go ahead and go down that path. Okay, this IoT device has a Android app. And you can use that Android app, um, to video chat with this tabletop device, okay? And when you call yourself from the mobile app, there's an automatic answer on the IoT device just allowing you sort of pop into your house and say like, hey cat, how's it going? So I thought that was really sus and was a prime feature for accomplishing the goal that I mentioned before. So I started, I took the mobile app and I threw it into JADX and decompiled it and got the source code. And then the never ending story began, okay? So this app was kind of locked down. So the first thing was it had root detection and there was some weird stuff with Google Play. So essentially what I had to do was patch the APK to run Frida and I did that with objection. And then I would overwrite all of the root detection on the app so that it would think that I'm not, I wasn't in an environment. And then, and there was some emulator detection as well in there. And so then the next one was bypassing TLS, pinning for HTTP. Of course they had that in place, most apps do nowadays. And so I had to come up and they had, unfortunately, a custom SIRT pinning solution. Most of the time, Joel, my boy here, has a public TLS SIRT pinning script that will just unpin most of the apps, which is super helpful. But this one was not so easy, so I had to break, you know, go into the code and find exactly where the SIRT pinning was occurring. And overwrite those functions with the JavaScript in the Frida code. I'm gonna check my time really quickly. Nope, my phone died, so I'm not. What you got? 536, alright, thanks guys. I was running my hotspot off of it for the last workshop and then I looked down and it was dead. Okay, so at that point, cool, we bypassed SIRT pinning and we've got HTTP introspection. Great. Now let's see how this whole calling thing works, right? Nope, because the calling thing is behind SIP. And more specifically SIPs, which is the secure version of the SIP protocol. Okay, what is SIP? Well, let me tell you. The Session Initiation Protocol, SIP, is a signaling protocol to initiate, maintain, and terminate real-time sessions that involve video, voice, messaging, and other communication applications and services. SIP is widely used for voice and video calls. Great. Now I've got to deal with another protocol. And it is also TLS-wrapped, so a bunch of stuff going on there. So I start working on that and find a custom SIRT pinning solution for SIPs and kind of am able to disable that. But BURP, while it is SIPs-friendly, is not SIPs-compatible and will break the application if you try to proxy it. So what I realized I needed is... and this is kind of how it looks right there. It will issue the register request with the SIP HTTP verb, or the register HTTP verb that is associated with the SIP protocol. But then it will just break the response. So I had to find a transparent proxy. And for this I used PolarProxy. It is a transparent TLS and SSL inspection proxy. So I took that and I took the SIRT for that and I inserted it into the trust store for that specific mobile app. And then I proxied all the stuff through PolarProxy and that would output a PCAP file. And then finally we had access to reading what was going on and I was able to get introspection on SIPs without breaking the whole app. We are probably a week or two into looking at this target at this point. With no leads, no potential loans, no gadgets, nothing. Just setup at this point. Which is amazing to me as a bug hunter because normally I spend a lot of time looking to find gadgets and I feel sort of accomplished going along the way. But this was a big up front investment and I think people that do this sort of thing, mobile hacking or IoT device hacking, have a lot more up front. Which is really tricky. That's something from a bug bounty perspective that the programs really need to help and minimize as much as possible. If you want your mobile apps and your IoT devices and your desktop applications to get as much interest as your web applications do. Okay, so now we finally get to see how all this works. So let's talk through that flow a little bit. So step one is, let's talk about getting a call, receiving a call. So you open up the app and it right away does a call to slash API slash get SIP auth token. With your auth token associated with your account. And then it will return a token that sort of looks like this. It's sort of like a JWT but it's not actually Base64 encoded. And it has these various delimiters in them. The ones that's most interesting to us is the payload delimiter. And in that payload delimiter there is a from field and a to field and a bunch of other fields. But the ones that are most interesting are the from and to fields. So then what would happen then is they would take that auth token that they got from the API request. They would put that as a header in SIP protocol which is very similar to HTTP in a lot of ways. The concepts are very similar. There's headers and stuff like that and they look similar. And then it would put that auth token into the request with its own SIP level from to and contact headers. And that would essentially allow you to register the address of record that is in the to header. And when it does this registration it validates that the from and to fields from the auth token match the from and to fields in the SIP request. And then somehow through black magic when somebody calls your phone will ring. It's kind of nut. I don't know how all that transport stuff happens in the background. But I thought that was interesting so I went ahead and moved along. And so now let's look at making a call. So say we want to call somebody else. So we go ahead and send a request to slash API slash init call auth. And we provide as a post parameter to that a target. And this target will be reflected in the payload in the from field. Or I'm sorry the to field because we're making a call. And that was great. And then you use that in an invite SIP request with the from and to headers matching the values in the auth token. And then somehow through black magic the other person's device starts ringing. And you go through all these networks and you send the TCP data through or the UDP data depending on the flow. Okay. And once again I'm going to reiterate for that to happen the from and to headers in the SIP request have to match the auth token. Right? So let's talk a little bit about how we could fake a call. So in the API slash init call request or call auth request the target that we would specify was actually accepted arbitrary data. And so what that would allow us to do is then inject arbitrary data into that auth token that is used at the SIP level. And so then what we proceeded to do was close the little delimiter there or put the person in for the to header so it doesn't fail. Semi colon out. And then provide another header. Five minutes? Oh wow. Okay I gotta move. Um then provide another from header uh as uh person two. Um so this was this would look like the call was coming from person two the person receiving the call and to person two. Which right we we discussed earlier was how you automatically auth into the device and check on your cat or whatever if you're calling from the mobile device. So we were able to uh smuggle in that from field and uh we would generate the the token with request number one. Put it into the invite uh SIP request. And since the from and to fields matched and the um auth token validated those two things. Uh the call would happen and it would auto answer. However there was no contact field in the auth token so that wasn't validated. And the contact thing is actually where the contact header is where the call gets actually routed to. Um so then you could see it on your device and you would be looking through that person's uh IOT device. Um which was nuts and I cannot believe it worked. Um but wait you might ask what is up with the from header there? Right? Um well the from header uh was an interesting situation. Because uh as much as we thought we had source code there was one more challenge that awaited for us at that point. Um which was we're using polar proxy so how do we do repeater or intercept on these things to modify the requests as they were going through? Well the answer to that is a shit ton of Frida or Frida uh calls. To overwrite and actually use the mobile client as our own you know proxy to send stuff through. Um which was really painful. And unfortunately the section that set that from header was automatically done inside of a dot so file. A binary file within the uh app. So it couldn't be hooked very easily with Frida because of the situation. So I was kind of lost at this point what do I do? And I was talking to another awesome hacker named Space Raccoon. And uh he advised hey man it's a you know why don't you just patch the binary? And I was like that's scary as hell. I don't know how to do that. And then he realized or he told me that it's just a string. So just search the binary for that string and replace the O with an A and it will automatically put in a different header. So I did that in a hex editor and it worked. And then I was able to add another from header via the Java bindings which matched the auth token. And allowed me to bypass auth and peer through anybody's desktop IOT device. Whew okay. And that was a 20 to 50k bug. Um and takeaways for that were set a goal and go after it really hard. Because some of this crazy stuff that they talk about in the horror stories is really possible. Um and I've become a believer in that since this happened. Last bug is really quick. Um and I should be able to go through pretty quickly because it's in the same stack. Um this was a bug where you could hijack calls going to other people. And the way that you did that was using that token the call auth token. Um so let me uh yeah. So you can see here right that the register token as a reminder. Uh the register token where you register your name has a to and from field that match. The call token has a from and to field that are different from each other. Because you're calling somebody else right. Um when we look at the register SIP request that occurs. Um there's this caveat in the from section. Which essentially allows for this feature called third party registration. Where you are registering for somebody else. Now when we use the init call um HDP request to generate the token. Uh we can specify a different from or a different to header in that auth token right. Because that's the person we're calling to. So then we can take that token which has the same signature. And apply it to the register header. And it will have a from header that is different from the to header. And the to header can be any one that we specify. So then we could register. Essentially do a third party register for any other user. And map their address of record right. The thing that routes the call to them. To our contact location. Uh and then when somebody calls that user. Our device would start ringing. And that one was another 20 to 50k. Critical, critical, critical on a public program. And uh takeaways are pretty much the same. Uh but don't be afraid of new protocols. Uh and that is one of the biggest takeaways I've found in my many, many years of bug bounty. Alright, that was the recap. 11 bugs, all paid as critical. The grand total for this was somewhere between 225 and 400k. For all those bugs. And that's it. Thank you guys.