WEBVTT

00:00:06.299 --> 00:00:09.359
<v Brad Causey>Insecure design.

00:00:06.299 --> 00:00:15.630
<v Brad Causey>That's what we're talking about today on the cyber threat perspective. Here with Jordan Natter. Apparently, meow meow.

00:00:16.678 --> 00:00:16.978
<v Jordan Natter>Meow meow.

00:00:17.460 --> 00:00:21.120
<v Brad Causey>Yeah, I guess so.

00:00:17.460 --> 00:00:40.359
<v Brad Causey>Very cool. Very cool. Yeah. So, episode 200, right? That's so flippin' cool. Yeah, we made it to episode 200. I think we have more episodes than that, but like for the numbered episode, like we've got more things published. Yeah, but but this is the 200th numbered episode. Once we started

00:00:40.450 --> 00:00:40.719
<v Jordan Natter>counting.

00:00:41.439 --> 00:00:41.829
<v Brad Causey>What's that?

00:00:42.369 --> 00:00:43.929
<v Jordan Natter>I said once we started counting. Once we

00:00:43.990 --> 00:01:02.939
<v Brad Causey>started counting, yeah. I don't think anybody told us we had to start counting at the beginning. We were just like episode go. So with all that said, you know, welcome, welcome, folks. We are going to cover part six of the OWASP Top 10 from 2025. Yes, we're a year behind. No, we're not. Sorry about that.

00:01:06.599 --> 00:01:10.620
<v Jordan Natter>It's fine. By the time we finish this one, we'll have a new one to cover the next.

00:01:11.250 --> 00:01:12.840
<v Brad Causey>I don't think they they don't come out every year.

00:01:12.959 --> 00:01:58.659
<v Brad Causey>It's like every three to five or something. Okay, that makes sense. So it's not. Yeah, we got time. We got time. Um, and so so yeah so so this particular number a 06 fell from number four to number six this last iteration, and not because not because it got better but because everything else got worse right like there's not less in secure design issues there are just now more security misconfigurations and software supply chain issues. By the way, the software supply chain one, man. Like, I want to go back to that one at some point because the world has collapsed in the last like six weeks from a supply chain perspective. Yeah, we

00:01:58.780 --> 00:02:14.129
<v Jordan Natter>made that episode, and then since then, when we've been doing like daily like recon lives, Brad can talk more to that. But we were we started noticing almost every new vulnerability that was coming out or like news story was all just supply chain. It's like, oh, this is not great at all.

00:02:14.610 --> 00:02:40.909
<v Brad Causey>Yeah, everything from like keyloggers in LLMs all the way up to you know libraries with RCE. I'm looking at you PHP. You know all all that stuff. And and for those of you, by the way, we're recording this the October 23rd, so you'll probably see this today or tomorrow. This is the same week that this legendary PHP vulnerability came out that everybody's freaking out about.

00:02:38.689 --> 00:02:55.509
<v Brad Causey>It's like mainstream news. So maybe we should give a nod to that at some point. If you want to hear more about that kind of stuff, though, s3 160 has a morning show called Recon Live, Morning Recon Live, run by Daryl Irby and usually myself. When Daryl falls out, I pull Jordan in or somebody. I'm the

00:02:55.509 --> 00:02:56.199
<v Unknown>backup, but

00:02:56.289 --> 00:03:05.939
<v Brad Causey>yeah, it's just like a 30 minute. I think it's Tuesdays and Thursdays, and and we stream on LinkedIn and stuff like that. So it's kind of just like what's going on in the world. If that's your cup of tea, come check us out.

00:03:07.050 --> 00:03:11.159
<v Brad Causey>Otherwise, let's jump right into it. So, what is insecure design?

00:03:11.460 --> 00:03:12.840
<v Brad Causey>Let's let's dive. What do you got?

00:03:14.639 --> 00:03:53.530
<v Jordan Natter>So overall, I would look at insecure design as pretty much business business logic flaws, right? Yeah. Like in a gist, obviously that's not everything. But that's if you had to put it in layman terms, what I would categorize it as like the biggest thing. So pretty much what it is is I make this application. Here's its intended functionality, but then there's vulnerabilities within its intended functionality, right? Maybe how they're implementing it isn't actually secure, or maybe they're not doing the proper like checks and stuff like that in the way they're implementing it. That's going to prevent things from being like done poorly. Yeah, that makes perfect sense.

00:03:53.860 --> 00:04:23.209
<v Brad Causey>Yeah, that makes perfect sense. So this reminds me of the first time, like, and and we're talking early 2000s when we started like defining what pen testing and hacking really was, and we had to kind of look back at the history of hackers, right? Because it was not always a negative connotation, but the kind of the the concept behind hacking was was getting computer systems or other types of electronics to do things they weren't designed to do. Yes. So this kind of reminds me of that a little bit, right?

00:04:21.439 --> 00:04:31.490
<v Brad Causey>But but in this case, we're doing it to find flaws that we can then leverage to, you know, negatively impact. I guess the CIA triad, right?

00:04:31.550 --> 00:04:48.220
<v Brad Causey>Confidentiality, integrity, availability. So so yeah, this one is fun and interesting because when you find one of these, it's usually really cool, you know, and and it's like, oh, dude, I totally, you know, this is the one you post in in the group chat at work, and you're like, look what I found, guys.

00:04:49.029 --> 00:04:50.769
<v Brad Causey>So, yeah. Also,

00:04:51.189 --> 00:04:59.889
<v Jordan Natter>a neat thing about this one, I also feel like a lot of the times when you find another vulnerability, there's some aspect of this like within it, right? Like you're not.

00:05:00.000 --> 00:05:11.490
<v Jordan Natter>You're not going to find like cross-site scripting or a file upload vulnerability that doesn't also have to do with this because this is kind of like the core of all of the problems, at least in my opinion. Yeah, for the most case. Well, okay,

00:05:11.670 --> 00:05:26.959
<v Brad Causey>so so actually, it's a really good point. I think you could probably argue that almost any flaw on a web app falls into insecure design, and you know you could stretch it a little bit, and but you know, but ultimately, it's a it's a control that doesn't work.

00:05:28.189 --> 00:05:28.550
<v Jordan Natter>Completely, is

00:05:28.550 --> 00:05:39.410
<v Brad Causey>that fair? Yeah, I think you can boil it down to that. And so, so what are some common examples? And then we'll go into war stories, right?

00:05:35.149 --> 00:05:50.980
<v Brad Causey>We'll go into real world examples, but usually, like the the easiest way I can describe this, and I actually use this when I'm talking to clients about secure software development lifecycle, right?

00:05:51.610 --> 00:06:21.170
<v Brad Causey>And so, let's say you're building an app, right? Let's say you're a I don't know an insurance company, right? And you want to be able to take applications for insurance on your site. So I go create an account, and then I want to upload a file. Right? Can be a text file, PDF file, Word file, whatever it is. And so when you create that file upload capability, there are certain things you need to do in order for that to be done securely.

00:06:17.279 --> 00:06:27.079
<v Brad Causey>And and so there are specifically, by the way, there are four things that you must do in order to securely handle file uploads in a web application.

00:06:27.889 --> 00:06:45.939
<v Brad Causey>And not doing any one of those can lead to a problem. And so that's what we mean by insecure design. So you you intentionally put in a file upload functionality, but the design in the way that you did it does not adequately protect the application, the users, and the data. Is that is that fair? Is that like a good example of a way? No,

00:06:45.939 --> 00:06:49.959
<v Jordan Natter>that's perfect. I think that's a great way to to explain it. Just overall,

00:06:50.649 --> 00:06:52.720
<v Brad Causey>yeah. And one of your favorites, rate limiting.

00:06:54.160 --> 00:07:03.480
<v Brad Causey>Yes, you you love to hammer people on this finding. I've seen it in almost every one of your reports. So this is going to become the the the cat finding, I think, going forward.

00:07:04.439 --> 00:07:26.000
<v Jordan Natter>It's the very like it's the first mouse I go after if we're going to stick with the cat theme. Yeah, there you go. It's always there. Well, it's not always there. That's unfair to say, but it's a very common finding because it's something to overlook because most people don't think about the fact that, like, hey, I should probably limit the amount of requests coming from a singular IP in a span of time.

00:07:26.689 --> 00:07:32.449
<v Jordan Natter>Maybe I should limit the amount of requests that are happening on this endpoint from multiple IPs within a span of time.

00:07:32.600 --> 00:07:42.819
<v Jordan Natter>Right. So it's one thing to look at something when you're using an endpoint how you're supposed to, or an API, whatever it may be. It and you're making a request and you're like, cool.

00:07:43.000 --> 00:07:58.720
<v Jordan Natter>I'm going to have normal traffic within this means, right? So this many people are going to go to your website doing this thing this many times. It's easy to not think that you have to limit that because it's hard to think that someone would want to abuse that, and you should be rate limiting.

00:07:59.860 --> 00:08:07.439
<v Brad Causey>Well, and so so I think you you just maybe accidentally into the core of the problem, and that is that they didn't think about

00:08:07.769 --> 00:08:08.040
<v Jordan Natter>it. Yes,

00:08:08.550 --> 00:08:55.330
<v Brad Causey>that's what you guys pay us for, right? As pen testers, we think about ways to do stuff that you didn't think about, right? And and that that is where the design aspect of the insecure design comes into play, is because if you have an application security expert integrated into your pipeline, meaning that hey, I want to add file upload functionality to my website. All right, cool. Here are the ways you need to do that securely. If you don't have someone with knowledge and experience telling you what to do, you're probably not going to design it well, and we will because we like to think outside the box. We like to make things do make things do things they were never intended to do. I did say that right. It just sounds weird, but but that is that is kind of the core of it, right?

00:08:55.389 --> 00:09:30.019
<v Brad Causey>And so rate limiting is a really good example where I'm going to create an API endpoint that lets me log in, right? And I've got all these fancy features to protect all this stuff, and and then at the end of the day, I can send a billion requests to that endpoint from a singular IP, and ultimately bypass a lot of the protections that you might have in place. Like you know, even even if you have complex passwords, give me enough time, and I will find an account. Right? Or like my favorite, and you find this all the time, is user enumeration on forgot password reset pages. Oh, it's

00:09:30.230 --> 00:09:30.679
<v Jordan Natter>everywhere.

00:09:31.070 --> 00:09:32.509
<v Brad Causey>All right, how does it work? Tell us about it.

00:09:32.779 --> 00:09:49.330
<v Jordan Natter>So look at it like this. Right? Normally, when you're typing in a username or a password, especially on forgot password, it's going to give you some kind of error back on if you have a valid account or an invalid account. Ideally, you want the same error for both.

00:09:45.250 --> 00:10:23.480
<v Jordan Natter>However, if, for example, I say that like my account is test 123, this is not a valid account, and it goes, hey, this is not a valid account. Try again. Okay, cool. I know that's not a valid account. What if admin 123 is a valid account? I now type that into the forget password and goes cool. This now has been sent, or a password reset has now been sent to your email. I have now validated the fact that admin 123 is a real like legitimate account. So now I can be like cool. I can do password sprays against this or use this somewhere else because I know that's a valid account.

00:10:23.570 --> 00:10:43.779
<v Jordan Natter>Because the issue is what's happening is it's returning different errors for if it's a valid account or an invalid account. Whether it's 200 errors, 400 errors, or it actually is just saying it on the web application where you can manually see it in your browser. Either way, it's giving me some kind of validation that an account exists or doesn't exist, and then I can use that to my advantage.

00:10:44.559 --> 00:11:07.320
<v Brad Causey>That is a beautiful textbook example of insecure design, right? So hopefully we're we're you know adequately conveying the concept behind this particular this particular item, and so yeah, we we spent about 10 minutes on it. That's actually pretty perfect. So let's get into war stories and talk about because I think that will send the message home.

00:11:07.740 --> 00:11:11.159
<v Brad Causey>Let's get into to some of those.

00:11:07.740 --> 00:11:19.559
<v Brad Causey>And by the way, let me back up for just a second. We will talk about remediation and how to avoid this, detect it, and fix it toward the end. Right. So hang in there for that.

00:11:20.129 --> 00:11:21.980
<v Jordan Natter>Unless we side quest like we did last episode.

00:11:22.039 --> 00:11:25.850
<v Brad Causey>We probably will side quest, which is which is fantastic, right? It's more fun that way,

00:11:26.840 --> 00:11:29.240
<v Jordan Natter>right? You kick it off, and then I'll do the next one.

00:11:29.480 --> 00:11:41.590
<v Brad Causey>All right, so I'm gonna do the one. Okay, so this was the first time I'm in high school, right? And so yeah, I know the story. Yeah, you actually were the one who was like, "Hey, that story. They, yeah, this this is it, right?

00:11:41.860 --> 00:12:23.090
<v Brad Causey>So, for those of you out there that have been on the earth for a few minutes, right? Like I have, in the '90s, AOL and other different ISPs would send out these demo CDs, and the CD would would have like 1000 minutes on it, right? So you pop the CD in, it would install AOL, it would dial up to AOL servers, and then you would put in this GUID or this this random string of numbers and letters, and you would get 1000 free minutes. And then you'd have to put your credit card in and pay by the minute or by blocks of minutes or whatever. And so, you know, me being at that age, right, where I want to tamper with stuff, I started messing around.

00:12:20.370 --> 00:13:03.059
<v Brad Causey>Now I went. I actually went up and down the street and asked my neighbors, like, "Hey, can I have your AOL CD?" Because most of these people are already paying for internet, right? They don't want it. It's trash. And what I started to notice when I started looking at these numbers is patterns within the generation of the numbers. And so I did a little, wrote a little script, and I was able to guess what the next series of numbers would be, and therefore get basically infinite free internet. And it took AOL about 30 seconds to catch on to what I was doing, and and they sent me a cease and desist letter, which I wish I would have framed because that started me on the road. I'm like 15, you know.

00:13:03.419 --> 00:13:17.730
<v Brad Causey>That started me on this road that I'm on now, and so it's been a lot of fun. But that's a really good example of insecure design where they're generating these supposedly random numbers, and it's pseudo random, right?

00:13:13.529 --> 00:13:27.049
<v Brad Causey>It's not really random, and and then some enterprising young teenager is able to figure out the pattern and take advantage of this business logic that AOL has so graciously given

00:13:27.620 --> 00:13:27.740
<v Jordan Natter>us,

00:13:28.159 --> 00:13:45.100
<v Brad Causey>and so that's that's actually the first time I've ever done anything you know that would be considered hacking, and it falls directly into insecure design, and so that's that's my first kind of war story. I've got some more fun ones to talk about, but that that's that's the opener. So

00:13:45.220 --> 00:13:51.610
<v Jordan Natter>yes, which is a fantastic story and kind of hard to beat, to be honest with you.

00:13:47.769 --> 00:14:10.649
<v Jordan Natter>Yeah, I do have one. It's obviously not as cool, and it doesn't has have as awesome of a story and build up. But one super neat thing that we've noticed across many pen tests, especially on staging environments or any environment that allows you to type in a phone number, typically they have test phone numbers, right?

00:14:10.860 --> 00:14:41.649
<v Jordan Natter>Or they aren't necessarily validating your phone number before you sign up for rewards, right? So if you go to let's say I can't I don't I don't it's hard to think of an example that doesn't give things away but okay let's say you go like you go shopping right they ask you for your phone number when you're sitting when you're sitting there right so you type in your phone number or they type it in for you and they are like cool this is going to go towards your reward program.

00:14:41.830 --> 00:15:09.720
<v Jordan Natter>Well, typically they're not going to sit there and ask for you to like validate that that's your phone number, right? And push like an SMS code to your phone to validate that that's actually you, right? Now you have the ability to type whatever phone number you want as your rewards, whether signing up for that account or later on when you buy something else. And you're typing in your phone number to be like, hey, please apply my rewards to this purchase. Well, the issue is they're not validating that that's your phone number, right?

00:15:10.259 --> 00:15:44.799
<v Jordan Natter>So what if I just type in someone else's phone number and use their points? Sure. What if I type in an arbitrary phone number like nine zeros? Now I have access to every person's points who use 0000 or I'm not going to count nine zeros. They like nine zeros as their phone number because they didn't actually want it tied to their phone number in hopes that it doesn't send them like text messages. Right now I'm getting all of those accumulated points because everyone else was too lazy to type in their phone number, but I was smart enough to decide to use that.

00:15:45.309 --> 00:15:51.879
<v Brad Causey>Yep, yeah, and and I've actually seen this in practice in the wild, right?

00:15:47.830 --> 00:16:53.679
<v Brad Causey>Where where you go somewhere? I think I think I was at like a home goods store or something like that, and and what ends up happening is the cashier will type in, you know, if if the person says, "Hey, I don't care, I don't want to use my points," but the system requires them, like you said, they'll just do nine ones or 123456789, or some combination of that, right? Nine zeros, whatever, and and so all these points just get accumulated over time, and if you come in and you actually put in that as your phone number, then you have access to all those points, right? And so, yeah, dude, I've I've seen this in practice. This happened to me like in real time because I think I was buying like a cat bed or something, and and like I I wasn't even trying to do anything nefarious. I was just they were like, oh, put your phone number in for awards, and I was like 11111, and it was like, oh, you have $75,000 worth of points. Do you want to put it towards your cat bed? And I'm like, what? So yeah, dude, yeah, I love that story. I forgot about that one. That's a good one. I was gonna say

00:16:53.889 --> 00:17:04.079
<v Jordan Natter>it's such a great example because it's intended at functionality, but they're doing nothing to validate that it's your actual phone number. But it's a it's a win for anyone who's typing in the default phone number.

00:17:04.559 --> 00:17:11.880
<v Brad Causey>Yeah, yeah, for real, for real. And the reality is, most people don't care about that kind of stuff anyway, right? They're they're just letting their points accumulate on a random number or none at all.

00:17:12.539 --> 00:17:43.269
<v Jordan Natter>Well, and most of the time, even if you do type in that like phone number, either the cashier's like, "That's odd, you have 300,000 points," or they just don't care, and they just apply the minimum because there's normally a well, not a minimum, but a maximum amount of points you're allowed to allocate towards a purchase. So, like some places are like, hey, you can at most use $10 off for like any purchase you make. So it's one of those circumstances where even if you use the like the free accumulation of points, there's a limit to what you're allowed to use anyway.

00:17:43.809 --> 00:18:38.539
<v Brad Causey>Yeah, yeah, I completely agree. And no, I completely agree. All right, so next war story. I stole this from somebody else. Just full transparency. This is not my story, but it is a good one. So this is a a movie theater, all right, and so you can book online, and they basically have the ability to do group bookings. So I want you know I want 20 people; they're coming with me, and you get a discount once you hit a certain number of people, right? However, the deposit is not required to reserve the seats until you reach a certain threshold that is above that discount, and so because of that, I can book a party one seat below the cap.

00:18:39.230 --> 00:19:17.309
<v Brad Causey>Right. So, for example, let's say it's 15 seats, and then you have to put a deposit down. You don't put a deposit down for 14 seats, but you can still reserve them. Then I could literally reserve the entire theater, right, by doing it 14 seats at a time. And because there's no deposit required to be put down, I could effectively lock out an entire theater if I want to, right? And so, what you're going to notice in a lot of these stories that we tell you guys is the functionality. It was never intended to be abused, right?

00:19:14.009 --> 00:19:34.220
<v Brad Causey>And so, they're not thinking outside the box. But you do have to understand the business, right, and that is usually where the disconnect happens. Is when you're designing an application, you have to put forward what are called business business functional functional and business requirements. Sorry, there we go. I'm going to get

00:19:34.940 --> 00:19:35.480
<v Jordan Natter>it out eventually.

00:19:35.839 --> 00:20:13.109
<v Brad Causey>And so, business requirements are obviously things that need to operate within the application for the business to be able to work, functional requirements are features and functionality within the application. The guys writing the software are not always privy to how the business works. Yes, and they don't necessarily. You know, maybe they're not experts in theater booking. Right? Who is? And so, you know, we're going to send these requirements. Over, and it's going to require that I take a deposit at 15 people, but allow them to reserve up to 14 without it. The thought process is not going to occur in the developer's mind.

00:20:13.470 --> 00:20:13.650
<v Jordan Natter>Yes,

00:20:13.950 --> 00:20:42.369
<v Brad Causey>right, because he's following a script. Man, the business said this is how this thing needs to function, and so once we get into things like user acceptance testing and ultimately into penetration testing. That's usually where we're going to find these flaws, unless you are smart enough to involve an offensive security person in the early stages. We actually consider security requirements to be business requirements, right? That's how you defeat this going forward, and we'll talk more about that later, but for now, your turn.

00:20:42.579 --> 00:20:44.710
<v Brad Causey>Yes, I did my my theater one,

00:20:44.769 --> 00:20:46.900
<v Jordan Natter>so you're fine.

00:20:44.769 --> 00:21:46.839
<v Jordan Natter>Pretty much, just look at it like this, guys. It's so easy to not think about how something can be abused because you're thinking of its intended functionality. Like, stop, think outside the box, and think, okay, even if this is intended, is there a way to abuse what like I'm wanting, yeah. So it it's sad you have to think that way, but sadly us hackers or penetration testers. Yeah, it's our job to think how to abuse the thing that you want us to do. All right. So mine, kind of circling back to the rate limiting a little bit. Um. So security questions, right? That is not a valid way, in my opinion, or I think probably across the entire cybersecurity world's opinion, to validate accounts and then to recover an account, right? So it's very similar to the rate limiting and the user enumeration finding we were talking about earlier. If you have, for example, like a valid account, you're asking for them to reset their password.

00:21:47.440 --> 00:21:52.809
<v Jordan Natter>Instead of sending them an email to reset their password, you're saying, "What is your mother's main name?"

00:21:53.470 --> 00:21:53.619
<v Brad Causey>Right.

00:21:53.920 --> 00:21:56.619
<v Jordan Natter>Okay. You can fill out whatever you want.

00:21:56.680 --> 00:22:24.019
<v Jordan Natter>Right. There's only so many names in the world you can put that before you get in to whatever account you're trying again with circling back for the rate limiting, I'm just gonna sit there and like literally fuzz it with 10,000 different common female names, especially from like let's say like the'80s until the until like early 2000, because maybe someone like in their 20s is signing up, whatever it may be, right?

00:22:24.440 --> 00:22:24.619
<v Brad Causey>Yeah, yeah.

00:22:25.339 --> 00:22:32.329
<v Jordan Natter>So like, it's going to be very easy to abuse that because its intended functionality is just to have you fill out a name, right?

00:22:32.869 --> 00:22:32.990
<v Brad Causey>Yep.

00:22:33.140 --> 00:22:52.750
<v Jordan Natter>Well, again, I'm coming from this one IP. I'm trying 10,000 different maiden names until I get into that account, so it just it kind of comes full circle, right? It's it's doing the intended thing, but it's not doing it well where it can prevent me from getting access to it if I don't just sit there long enough trying every possible combination.

00:22:53.799 --> 00:23:03.000
<v Brad Causey>All right, so you reminded me of two things I want to talk about. So first of all, secret questions. Let's just address that thing real quick.

00:22:58.900 --> 00:23:24.680
<v Brad Causey>I've spent most of my professional career in the financial industry and banking, and so back in man, probably 2006 to 2008 timeframe, secret questions were the accepted standard for account recovery, password resets, what have you?

00:23:18.569 --> 00:23:26.089
<v Brad Causey>Now, it was also really common to use those as MFA.

00:23:27.470 --> 00:23:28.039
<v Jordan Natter>Oh, that's even worse.

00:23:28.789 --> 00:23:29.150
<v Brad Causey>What's that?

00:23:29.569 --> 00:23:30.500
<v Jordan Natter>I said, oh, that's even

00:23:31.190 --> 00:23:46.390
<v Brad Causey>worse. Yeah, it was right. And so we were actually ahead of the game at the bank that I worked at because I was doing all their web app stuff, and I was like, hey guys, just out of curiosity, right? When we start talking about multi-factor authentication, those words have a very specific meaning, right?

00:23:46.960 --> 00:24:01.569
<v Brad Causey>And if my email and my password and my secret question are all things that I know, where is the M in the multi-factor authentication? Because that is one factor three times, right?

00:24:02.049 --> 00:24:24.950
<v Brad Causey>So so secret questions have always been a bad idea since the very beginning. We actually like by policy banned them at every bank that I've ever worked at, but dude, we still see them everywhere, right? And not just on password resets. We see them on password registrations or account setup. We see them on all that stuff. So, secret questions? No, no bueno, right?

00:24:25.279 --> 00:24:37.970
<v Brad Causey>Because it's really easy, like you said. Names, right? I've, I've actually, I have a story about this that I'm gonna, I'm gonna fall back to because names are awful for this kind of thing.

00:24:38.180 --> 00:24:38.900
<v Jordan Natter>Oh, it's so bad.

00:24:39.470 --> 00:24:44.319
<v Brad Causey>Um, and so you know now let's talk about others like like what's your favorite food?

00:24:41.920 --> 00:24:55.599
<v Brad Causey>What's your favorite color? Like okay, look, everybody likes chicken nuggets. Okay, so I'm pretty sure if that's the bar that I have to meet is figure out what your favorite food is.

00:24:52.720 --> 00:24:58.569
<v Brad Causey>Like if it's not cheeseburgers or chicken nuggets, like I'll figure it out pretty quick, right? Well,

00:24:58.779 --> 00:25:03.900
<v Jordan Natter>and not to mention most of. Time the questions that they're asking are like one word answers.

00:25:04.200 --> 00:25:11.460
<v Jordan Natter>Right. It is so easy to just like upload an entire list of dictionary words that have something to do with that, and eventually get it.

00:25:11.609 --> 00:25:15.690
<v Brad Causey>Yeah, yeah. Colors are my favorite. I still see that from some time to time.

00:25:13.769 --> 00:25:34.160
<v Brad Causey>It's like, what's your favorite color? I'm like, bro, there's like five colors in the world, right? You know, I realize there's more, but you know, especially if it's a guy's account, he's like red, blue, purple, green. Like, what else is black? Yeah, yeah. So, so moral of the story is the secret questions are just a no go across the board. What's and the funny thing is, we got one this week.

00:25:34.579 --> 00:25:34.759
<v Jordan Natter>Yes,

00:25:35.180 --> 00:25:45.910
<v Brad Causey>we literally are working on. We're finishing an active engagement this week that uses the secret question to recover an account, which is mind-boggling. So

00:25:46.150 --> 00:25:46.569
<v Jordan Natter>it's a shame.

00:25:47.049 --> 00:26:13.349
<v Brad Causey>It's actually specifically banned by like NIST and and hold on, is there? I want to say, hold on, I had that in in notes somewhere. Yeah, explicitly called out as prohibited by NIST 863B ASBS and the OWASP Top 10. So, like, let's just stop with the secret questions. Okay, full stop. Now, talking about names. All right.

00:26:10.500 --> 00:26:38.359
<v Brad Causey>So, I'm going to add one in that was not in the show notes. All right. So, I and I believe I've told this story before at a conference or something like that. But I love telling the story because it is fascinating the way that we went about doing this. So it was a regional insurance provider for like home insurance. I think they might have also done auto insurance like as well. You remember the story? Oh, I remember this one.

00:26:34.220 --> 00:27:28.670
<v Brad Causey>And so I'm not going to tell you who or where they are because it wouldn't be super hard to figure it out, but with that said, they basically operate in certain areas of the country, and so in their site, because of the way that that we do insurance in the U.S., it's like Alaska dot insurance company dot. Like, so you would go to your state, and you would fill out home insurance for that particular state, right? And you would apply for it, but you did not necessarily have to go to the website. So if you called in and had a policy, or you went into a a brick and mortar place and created a policy, your data is in the database, but you don't have a login. And so the way that you would create a login, and if if any of you have ever like had your 401k moved, or had to go like create an account that already had your data? It's like, hey, who are you? How can I verify who you are? Right.

00:27:29.089 --> 00:28:50.589
<v Brad Causey>Well, in this case, the way you would claim the online account would be by putting your first and last name in and your zip code, and then that would take you to the next page where it would be like, hey, we don't have an email address on file for you. Give us your email, we'll send you a login link, and then you're you're logged into the application. So what do we do? Well, we're like, hey, those are three pieces of information: first name, last name, and zip code that are not hard to figure out. So what did we do? We like I literally went to Google and I was like, "What are the most populous zip codes in Massachusetts?" And it was like,"These are your top 10 zip codes." Boom, got it. All right, cool. So, what are the top 10 surnames? Top 100 surnames in Massachusetts. It's all census data. This is publicly available information. So, we literally used Burp to set up an a intruder attack that tried every combination of top 10 first name, last name, and zip code. I think we got like three or four accounts on the first pass, and so it literally like once once you get those three pieces of information right, takes you to the next page, and now you give you can give it any email address. If it did not have an email address registered to that account, which most people who are don't have online accounts would have that, we could just give it a random email account, and it would be like Roger that.

00:28:50.650 --> 00:29:05.279
<v Brad Causey>Here's your link to log in, and then boom, we're literally looking at somebody's policy document. We can make changes to it, payment methods, all this crazy stuff, and so that would be a really good example of an insecure design, I think.

00:29:06.390 --> 00:29:07.019
<v Jordan Natter>Just a little bit.

00:29:07.380 --> 00:29:17.640
<v Brad Causey>Yeah. All right. So so one more from you, and then we'll go into prevention and talk a little bit more about how to kind of close the loop on this.

00:29:18.210 --> 00:29:20.839
<v Jordan Natter>Let me see. I got to pick one. I wasn't prepared.

00:29:24.680 --> 00:29:38.990
<v Jordan Natter>Okay, so this is another short one that's like very in hand with everything else. And as you're noticing a pattern, intended functionality, and not validating it in some capacity to prevent it from being abused.

00:29:35.089 --> 00:29:51.519
<v Jordan Natter>Right. Another great one. So kind of sticking With the coupon, with the coupon category, right? Yeah. You guys sign up for a new account. For your very first purchase, you get a coupon for 20% off, right?

00:29:52.569 --> 00:30:19.079
<v Jordan Natter>So they send you that coupon code to your email. That's really cool. So, but how are they validating that that's your first purchase, right? What if, for example, I actually have two browsers open at the same time with two different things in my carts, where different amounts of of things I'm going to purchase, and I'm going to submit both of those carts at the exact same time with the same coupon, and get 20% off of both orders because they're both technically my first order.

00:30:20.039 --> 00:30:21.619
<v Brad Causey>Oh, okay. Because I'm doing it

00:30:21.619 --> 00:30:22.309
<v Jordan Natter>at the same time.

00:30:23.299 --> 00:30:27.980
<v Brad Causey>Yes. So, so what you're doing is you're you're this is a race condition. I think is what it's called.

00:30:28.130 --> 00:30:41.319
<v Brad Causey>You're racing the ability to use that coupon code up, and you can basically reuse it is the wrong word, but you can get double use out of it if you can beat the window in which it becomes invalid,

00:30:41.890 --> 00:31:01.289
<v Jordan Natter>correct? Well, because like especially because those of you guys who've done this before, you'll notice, especially signing up for websites the first time, they're like this coupon's only valid for 15 minutes. This coupon's only valid for the next 24 hours, whatever it may be, right? Yeah. Well, there has to be some way you're validating that that's the first time that you're using that coupon, right?

00:31:01.619 --> 00:31:16.619
<v Jordan Natter>Yeah. Well, in this case, you're just literally racing the time out for it and doing them at the exact same time, hoping that it has no way to validate that this isn't the first purchase because you're making two consecutive purchases at the exact same time for the first time.

00:31:18.000 --> 00:31:19.920
<v Brad Causey>It makes perfect sense. It makes perfect sense.

00:31:20.130 --> 00:31:45.609
<v Brad Causey>So, all right, you actually probably accidentally lead into a perfect segue on how do we solve this problem, right? How do we address insecure design business logic flaws, which is actually a whole separate OWASP top 10 that we got to talk about at some point. But you know, and and and I think I think you mentioned it earlier when you were like, you guys need to be thinking outside the box, right?

00:31:41.829 --> 00:32:04.470
<v Brad Causey>And so that's that's the first thing I want to convey to the listeners today, and that is right misuse cases. And so what I mean by that is a use case is usually like when when you're it's called a storyboard for those of you who have been in the in the IT world or in the development world, you'll know these phrases that I'm using.

00:32:05.579 --> 00:32:12.750
<v Brad Causey>But it would be like a user experience, right? So I want to I want to buy a car online.

00:32:10.019 --> 00:33:05.759
<v Brad Causey>Okay, what does that process look like? Is it a wizard? Is it a multi-step process? You know, I'm sure Carvana or whatever went through this process, right? Like, how do I want the user experience to be? That's a use case. A use case defines the correct way that a user would operate within the confines of the application. What we're not doing in a lot of cases are the misuse cases. Think about from a business perspective or from a workflow perspective how a user could abuse this mechanic, right? And so, in your coupon example, which is a beautiful example of of insecure design, you know, then then I would serialize the processing of all transactions. All right, what do I mean by that? It means that I don't process a secondary transaction until I've completed the previous transaction that defeats the race condition.

00:33:06.359 --> 00:33:06.509
<v Jordan Natter>Yes,

00:33:06.720 --> 00:33:57.519
<v Brad Causey>right, and so that's an example of like, oh, somebody could abuse this by by by sending, you know, or sending 27 of these things at the exact same time, and maybe only this 15 of them get through, but I just gave 20% off of 15 orders, and so you know if we if we process them in the order by which they come in, we don't have that problem, right? So think about the misuse opportunities anytime you add business logic or different types of workflows into your application. So that's one. The other thing I would say is threat modeling. All right, and I don't love this phrase. It's it's too buzzwordy for me, right? But at the end of the day, think about how a threat.

00:33:52.539 --> 00:34:04.140
<v Brad Causey>What would a threat actor want to do to take advantage of your application, right? If I'm a finance, they want to steal my money. If I'm a bank, right?

00:34:04.440 --> 00:34:06.839
<v Brad Causey>They want to steal identities so they can steal the user's money.

00:34:06.900 --> 00:34:17.760
<v Brad Causey>But like, that's pretty easy to figure out. So, what are the likely scenarios that a threat actor would would use to try to steal money from me? And then we build our controls around that.

00:34:18.210 --> 00:34:48.699
<v Brad Causey>And so, I like the concept of threat modeling. Like I said, I think it's a little overused from a phraseology perspective, but I still think you need to think through that, right? And so, like, if I'm a theater, then maybe stealing tickets or taking advantage of a free popcorn, you know, thing, right? And and so there are lots of different things. Like, how would I abuse this? And then we're going to build models around that and try to protect against it. There are the last one. Take the last one.

00:34:49.480 --> 00:34:54.940
<v Brad Causey>Who should we involve as early as possible? And this is in the prevention section, by the way, of the show notes.

00:34:55.809 --> 00:34:56.769
<v Jordan Natter>Involves security.

00:34:57.400 --> 00:35:05.909
<v Brad Causey>Yes, this is the number one. Thing that we have got to do a better job of, right? What is it? The the wow.

00:35:08.010 --> 00:36:01.090
<v Brad Causey>So yeah, you know what I'm talking about. Yeah, the anime meme. So anyway, get guys like us, right? Guys and gals, I guess, get us involved as early in the process as you possibly can. So, like at s3 160, we sell a service called DevSecOps, right? Which again, another phrase I do not love, but but it's it's development operations and security or development security operations, DevSecOps, and it's involving us at every step of the development process, especially at the design phase, because we think differently, we have different experiences, and so you know, back to that file upload example. When I'm telling people and trying to talk to clients about DevSecOps and and you know security by design, that's the kind of stuff we're talking about, right? Oh, hey, we want to introduce coupon codes or weekly giveaways. Okay, cool. How can I abuse that?

00:36:01.269 --> 00:36:07.800
<v Brad Causey>Let's go ahead and put you know fixes in place preemptively to prevent that abuse before it ever goes

00:36:08.519 --> 00:36:08.760
<v Jordan Natter>live. That

00:36:08.789 --> 00:36:09.119
<v Brad Causey>makes sense.

00:36:09.510 --> 00:36:12.000
<v Jordan Natter>Yes, completely.

00:36:09.510 --> 00:37:21.469
<v Jordan Natter>And if you guys want a good example, like a real life example, and I don't know why, but lately my examples have to do with houses. If you guys have a house, for example, if you as the person who is designing this house, is like, I want this many doors, I want this pattern of doors, I want like doors to be here, okay? Those are all the only things that you're thinking about because you're thinking about, okay, you want the ability to walk into your house, you want the ability to leave your house, you want it to look a certain way, right? Well, now you can add us in, and we're like, what kind of locks do you have? Do you like? Do you have automatic locks set up? Do you have like, for example, maybe you have it where your doors like automatically, like your garage door automatically opens when you're in proximity. Okay, is there a way that I can pretend to be your car when you get near that driveway, right, and open your garage? There's like a lot of things that are easy to not think about when you're only thinking about it from the client perspective, right? It's easy to abuse things if you can step out of the that box we were talking about earlier, and just be like,"Cool." As a even if I'm not a client, how can I abuse the client protocols and make it do what I want it to do.

00:37:22.429 --> 00:38:11.159
<v Brad Causey>Absolutely agree with that, right? And I love that. I love designing a house is a perfect example because it is so much more difficult, by the way, to come back after the fact. You know, locks are are too easy to be an example. But think about like if you wanted to design a secure entryway, like a man trap, right? Which is a common physical security control. It's going to be really hard for you to add that in after the house has been built, right? And and you may even want to orient the house in a certain way depending on you know high speed entries of approach and things like that. I'm getting way off base right now, but the point is this, right? It's really hard to make structural changes to a building after it's built, right? It's more expensive. It's the same for applications, folks. If you can build this stuff in, you are by not creating the flaw in the in the first place. You are there.

00:38:11.250 --> 00:38:33.289
<v Brad Causey>There's actually like a formula for this. I think it's in our marketing material or something where it's like a flaw that you that you find during the design phase costs you about 200 bucks, okay, to fit to to preemptively fix right. That's the cost of a guy like me in your meeting telling you to do a better job of securing your file uploads.

00:38:30.559 --> 00:39:32.900
<v Brad Causey>That's the cost of paying the developer to do it right the first time, and the cost the further away you get from the design phase, it goes up by orders of magnitude, right? So if you find it using static application scanning, right, just scanning the source code, and you're like, "Oh, we found a file upload flaw," it might cost you six or 700 bucks. So easily three or four times what it cost you to build it in in the first place. If you wait until you get to a pen test and Jordan finds it, it could cost you 1000s of dollars because it still has to go back to the design phase, get approved, be tested, be written by the developer, and then Jordan still has to go validate that it actually fixed the thing that it fixed. If you just never introduce the flaw in the first place, it costs you very little money because it was never there. So, you know, that's one of the reasons that I would say the number one remediation for these types of flaws is to have someone who who understands this work be involved in the design phase of the application.

00:39:33.768 --> 00:39:40.219
<v Jordan Natter>And like Brad said, it is so much easier to catch it early on. It's like like you said, it costs less.

00:39:40.429 --> 00:39:59.108
<v Jordan Natter>It's less work. It's just think of it like this, right? You would rather build something once the correct way than build it and then come back and realize, oh goodness, I have to completely scratch that, completely remake it to do exactly what it needs to do to be both secure and have the intended functionality I want.

00:39:56.139 --> 00:39:59.438
<v Jordan Natter>It's just so much more heartache.

00:40:00.539 --> 00:40:05.969
<v Brad Causey>It really is. It also would put us out of a job, so don't do that. Keep writing flaws in your in your software.

00:40:06.000 --> 00:40:18.150
<v Brad Causey>We love you guys. Speaking of which, if you're into web app pen testing or you need web app pen testing, literally what we do. So reach out to us and let us know. Otherwise, have an awesome weekend. Thank you for tuning in, listening, watching.

00:40:18.630 --> 00:40:20.869
<v Brad Causey>Please like, share, subscribe.

00:40:18.630 --> 00:40:22.369
<v Brad Causey>It really helps the channel out, and we'll see you guys next week.
