WEBVTT

00:00:06.480 --> 00:00:10.380
<v Brad Causey>And we're back with the OWASP Top 10 from 2025.

00:00:10.830 --> 00:00:24.949
<v Brad Causey>Technically, we're almost 2027 now, but we're not talking about that. That's not important. But this is part seven. This is the seventh of the top 10. We're closing in on the last few, and today we're talking about authentication failures, right?

00:00:25.070 --> 00:00:34.130
<v Brad Causey>Which arguably kind of scary, right? If I can become you, I can log in as you, I can steal your session, your identity, etc. Somebody might say that's suboptimal.

00:00:34.939 --> 00:00:37.609
<v Jordan Natter>Yeah, I would say so. I mean, I don't want someone becoming me.

00:00:38.479 --> 00:00:43.390
<v Brad Causey>Exactly, and so no one would want to become me anyway, so I don't actually don't worry about passwords.

00:00:43.570 --> 00:00:43.750
<v Brad Causey>Come on,

00:00:43.810 --> 00:00:46.179
<v Jordan Natter>there's already one too many of you. Yeah, yeah, yeah. The

00:00:46.509 --> 00:00:48.310
<v Brad Causey>world's not ready.

00:00:46.509 --> 00:00:48.310
<v Brad Causey>It's not ready. I'm not ready.

00:00:48.670 --> 00:01:54.040
<v Brad Causey>So, but yeah. So this is a 07 alpha 07 authentication failures, which the name is a little questionable to me. I would want to ask, you know, like that's an odd way to name that, but I get it right. So we're talking about weak passwords, right? Which would technically be an authentication failure, allowing and I would actually go further, allowing users to set weak weak passwords. If I could use English, credential an application being vulnerable to credential stuffing, absence or insecure MFA, bad session management. Which oh man, do I have some war stories on that one for you? And then you know authentication flows. So so those are those are kind of the high level. I guess I would call them like categories that we're going to talk about. And so you know, quick kind of side mention here: A 07 stayed at number seven for the second. Yeah, yeah. This one didn't go up or down. It's still there.

00:01:50.319 --> 00:01:56.290
<v Brad Causey>Surprisingly enough, are there still apps out there with weak passwords and bad MFA?

00:01:56.950 --> 00:02:00.659
<v Jordan Natter>Yeah, I would say so. It's pretty common actually because we skip them

00:02:01.078 --> 00:02:02.399
<v Brad Causey>every week. I was about to say

00:02:03.388 --> 00:02:23.778
<v Jordan Natter>it's more common than not. In fact, I think it's it's a real shame whether you're seeing someone who's using like security questions to reset passwords or their password set is to only like eight digits or whatever you want to call eight characters, or the lack of MFA.

00:02:18.088 --> 00:02:30.079
<v Jordan Natter>It's always something. I not like yeah. It's just if you're missing one, you tend to be missing at least the other one.

00:02:27.348 --> 00:02:30.079
<v Jordan Natter>At least everything

00:02:30.199 --> 00:02:32.930
<v Brad Causey>else. Yeah. Yeah.

00:02:30.199 --> 00:02:58.930
<v Brad Causey>So all right. So so let's. I do want to start out with it with some technical nomenclature, if you will. All right. So authentication is the process by which a piece of technology proves that you say who you say you are. Okay, so in most cases, this is going to take the form of a password. This is going to take the form of maybe a token that you put in from a from a you know an authentication app.

00:02:59.319 --> 00:03:06.990
<v Brad Causey>Lots of ways to do that. Windows Hello lets you put in your PIN number, you know, and and so like this rabbit hole goes deep.

00:03:07.409 --> 00:03:15.750
<v Brad Causey>But at the end of the day, what we're trying to do is Jordan, you're trying to log into your online banking profile. You're pawing at the keyboard, right?

00:03:12.360 --> 00:03:31.759
<v Brad Causey>Trying to figure that out, and and and you know the bank needs to know that you are who you say you are, and that's what the authentication process is all about. There is a separate but often confused variation of this called authorization, and authorization is more along the

00:03:31.819 --> 00:03:36.289
<v lines of>Should you be able to do the thing you're trying

00:03:37.038 --> 00:03:37.368
<v Unknown>to do?

00:03:37.460 --> 00:03:46.090
<v Brad Causey>Okay, like for example, should I? I may be able to authenticate to the online banking app, but can I transfer money from your account to mine?

00:03:42.849 --> 00:03:57.159
<v Brad Causey>That's probably not ideal, right? So that would be like an authorization barrier. And then there's the concept of multi-factor authentication, which is kind of this this higher level of authentication.

00:03:57.669 --> 00:04:20.750
<v Brad Causey>And by the way, I love that people when and I will have conversations with highly technical human beings that do not understand MFA. So let's talk about the wrong, the right and wrong way to do MFA just really quick before we get into the to the rest of this because I think this is important because it seems to be a point of confusion for people who are otherwise very well versed in technology. So,

00:04:21.410 --> 00:04:44.680
<v Jordan Natter>and one second before you go on that, I would also say, right. So, if you use MFA properly, it's probably going to almost completely remediate the entire risk for this topic we are talking about, right? Pretty much, if you do that, right, all of our other problems are less important because of the fact that you have MFA that's blocking everything else down the road.

00:04:45.548 --> 00:04:59.619
<v Brad Causey>I, you know what? I completely agree with you. You can have the crappiest password in the world, and it can be on the dark web, and the application can be vulnerable to credential stuffing and password spraying, but MFA kills it all dead.

00:05:00.089 --> 00:05:00.269
<v Jordan Natter>Yes.

00:05:00.449 --> 00:05:04.170
<v Brad Causey>So that's actually a brilliant observation. I hadn't even thought about it in that way. I completely agree.

00:05:04.500 --> 00:05:19.050
<v Brad Causey>That also, side note, you actually segued perfectly into what I wanted to talk about, which is what makes MFA good, and it's the M in the FA, right?

00:05:12.629 --> 00:05:37.040
<v Brad Causey>And so what I mean by that is multi-factor means multiple factors. Now that may sound incredibly obvious to every one of us. However, if your second factor is oh I don't know a secret question, you don't have multi-factor authentication.

00:05:33.980 --> 00:05:42.699
<v Brad Causey>What you have are two of the same fact. You have SFA. You have same factor auth. That's not even. I just made that up, by the way. No, but it was cool.

00:05:43.028 --> 00:05:43.928
<v Jordan Natter>I think we're going to steal that.

00:05:44.589 --> 00:05:58.480
<v Brad Causey>We're absolutely putting that in the next pen test report. But so let's talk about the three factors that are commonly used for multi-pactor authentication. Right. So number one, something you know. What's an example of that? A password.

00:05:59.079 --> 00:06:13.050
<v Brad Causey>Right. Password. Super easy. So is a secret question, by the way, is something you know, right? And so, yes, should that be part of it? I would argue something you know probably like in in a perfect world should not even be a factor that we use.

00:06:13.468 --> 00:06:13.528
<v Jordan Natter>Yeah.

00:06:13.889 --> 00:06:19.288
<v Brad Causey>Let's keep going, right? So, something I know that's my password. That's my username, right? Super cool.

00:06:19.649 --> 00:06:34.939
<v Brad Causey>That is a factor. Something you have would be like the the the phone, the code that goes to your phone, right? So that would be that would be your MFA code that goes to your authenticator app. That is something you have.

00:06:31.788 --> 00:07:11.218
<v Brad Causey>It is a physical thing that exists that you must be in possession of. Now, now we have two factor authentication. We have multi-factor authentication. The last one is something that you are. This is biometrics, right? So we're talking about eye scans. We're talking about like I'm going to give a blood sample to log into my bank account. Hopefully not, but something that you have, something that you are, something that you know. Those are three different factors. Two of them must be present in order for us to have real multi-factor authentication. So, having a secret question is like a is like two passwords.

00:07:12.240 --> 00:07:13.379
<v Jordan Natter>No, that completely makes sense.

00:07:14.158 --> 00:07:17.608
<v Brad Causey>And so, it's not a step up in security.

00:07:18.120 --> 00:07:18.540
<v Jordan Natter>No. So,

00:07:19.470 --> 00:08:01.709
<v Brad Causey>that's really important because I think a lot of people kind of lose sight when they think multi. They just mean I need to have as many factors of random. No, dude, like you need one from each category, at least two total, or it's not multi-factor. And so, so the reason I'm bringing this stuff up is because there's a legitimate debate in the in the cyber community about all of this stuff, about which factors are more secure, less secure, whatever. But I just wanted to get the definition on the table, and here we are. We're like eight minutes into the episode, just establishing like common operating knowledge, right? So, so anyway, I say all that. Now, I do want to backtrack for just a second, and by the way, interrupt me at any point because I'm on a tirade here.

00:08:03.029 --> 00:08:10.050
<v Brad Causey>When you successfully authenticate in most web applications, you're going to get something in return for that.

00:08:10.410 --> 00:08:10.560
<v Jordan Natter>Yes.

00:08:11.069 --> 00:08:28.310
<v Brad Causey>All right, and that's going to be like a session cookie. That's going to be like a JWT. That can be any number of different things, right? In many cases, it's multiple of those things, and in a lot of cases, you're going to get like two or three session cookies, and and maybe I mean, who doesn't want cookies, right?

00:08:25.189 --> 00:08:39.500
<v Brad Causey>And so we're going to get some cookies. We're going to get a JWT. We might get some some some like OAuth token, whatever it is, right? But that thing, that is who I am at that point.

00:08:35.750 --> 00:08:58.090
<v Brad Causey>Meaning that if it is stolen, unless there are other protections in place that are they can assume our identity, right? in In the most basic in the most basic implementation of sessions, so that is where the authorization, the authentication. So, so I just wanted to level set with the listeners so that we can all start from a place of okay, I know what all these terms mean.

00:08:58.450 --> 00:09:12.299
<v Brad Causey>Like actually, not that I think I know what they mean, I actually know what these terms mean, and so so now we can move forward. And there's also actually, I say we can move forward. Let me step back again.

00:09:08.730 --> 00:09:42.250
<v Brad Causey>When we start getting into administrative functions, like elevated privilege type functions, all right. And what I mean by that is like, let's talk about that money transfer in your bank account. You there should be a check that might be a new token code to your phone, right? Or it could be that there is a CSERF token, which we're totally not getting into on this episode. But the point is, anytime we do an elevated privilege function, something that's important or risky within an application, we should be revalidating these things, right? We should not just be trusting the session. So no, I

00:09:42.370 --> 00:09:42.580
<v Jordan Natter>agree.

00:09:43.000 --> 00:09:46.509
<v Brad Causey>All right, I have.

00:09:43.000 --> 00:09:49.809
<v Brad Causey>I am done with my soapbox introduction to this, but I kept wanting

00:09:49.839 --> 00:09:51.578
<v Jordan Natter>to say, but wait, there's more. More.

00:09:52.658 --> 00:10:10.379
<v Brad Causey>I wonder if we can interject like that meme in on in the video. We're that would be amazing. All right, so. All right, cool. So let's talk about some like real world examples, i.e., what we call war stories or stories from the trenches. Do you have one you want to start with, or do you want me to go first?

00:10:10.529 --> 00:10:15.330
<v Jordan Natter>I have one that I'm going to start with that's not on the list. That's just one I like. That oh, you're just rolling at this

00:10:15.778 --> 00:10:16.318
<v Brad Causey>point, Roger. I

00:10:16.740 --> 00:10:19.139
<v Jordan Natter>am. I am.

00:10:16.740 --> 00:11:09.779
<v Jordan Natter>Granted, it's really small, but like just a really good example that I would say that kind of ties into all of this is that say for example right you have a password reset link that's going to be sent to your email okay awesome dandy super cool right there's not necessarily a problem with that now what is the issue if that link for example does not expire ever because this has happened to me before. Yes, yes. Physically, I have had a, and this, and honestly, I probably wouldn't have found this if I didn't have an issue with the credentials that the client had gave given me, because I was like, "Hey guys, I'm gonna have to reset the password." So I like I reset it, or I like asked to reset it anyway. So I get the email and I'm like, cool, let me go reset it. And then I happen to come back and I was like, huh, let me just make sure that this link is still like valid or not valid.

00:11:09.809 --> 00:11:14.850
<v Jordan Natter>And I clicked on it like at the end of the pen test. I I think it was like three or four days later, and it was still valid.

00:11:14.850 --> 00:11:22.250
<v Jordan Natter>And it was like, cool, you can reset your password again. And I was like, oh, oh, oh, and I don't even have to type in the old password.

00:11:23.389 --> 00:11:23.600
<v Brad Causey>Love it.

00:11:23.629 --> 00:11:27.049
<v Jordan Natter>This is not okay.

00:11:23.629 --> 00:11:39.409
<v Jordan Natter>So that's like a really great example of like, there's a way you can do something and can also do it wrong when it comes to authentication. Like for example, make sure you're restricting that to maybe your their IP or like yeah or one time

00:11:39.500 --> 00:11:40.269
<v Brad Causey>use. Yeah,

00:11:40.600 --> 00:11:46.629
<v Jordan Natter>exactly. So then that way, only the person using that email can use it because, like, it went to my email box.

00:11:46.720 --> 00:11:54.220
<v Jordan Natter>It only makes sense that that password or that password reset link be used once. So click on it once; it's dead, right? That would be awesome. Or

00:11:54.220 --> 00:11:54.850
<v Brad Causey>expiration.

00:11:55.120 --> 00:11:58.179
<v Jordan Natter>Yes, expiration.

00:11:55.120 --> 00:12:07.500
<v Jordan Natter>Maybe do 1520 minutes. Yeah. As long as you like communicate that and make it consistent across the board, then you're dandy. But don't make it never expiring and use as many times as you want because that's an issue. It

00:12:08.220 --> 00:12:09.899
<v Brad Causey>is. You know what?

00:12:08.220 --> 00:12:20.340
<v Brad Causey>I'm super glad you brought that up because I have also seen this in the wild many times. And and what people there's a couple of very key nuances to password reset, and we're totally side mission right now. I mean, it's

00:12:20.399 --> 00:12:21.019
<v Jordan Natter>within the bubble. It

00:12:21.500 --> 00:12:54.039
<v Brad Causey>is. It's still there, right? But but first thing you need to understand is that password reset links in emails are cached both by the browser and by every proxy that it goes through because it is a GET request and not a POST request. Then what that means is that that entire string is basically visible by any log, any you know, it's it's logged, right? It's in multiple locations, not just in your email, by the way. It's in your browser history, and if you're at Starbucks now, everybody who is you know has access.

00:12:54.190 --> 00:12:54.759
<v Brad Causey>Wireshark,

00:12:55.330 --> 00:12:55.750
<v Jordan Natter>yeah, right,

00:12:56.619 --> 00:14:18.359
<v Brad Causey>right, and and so yeah, you can absolutely do that, right? And so that URL is is is kind of almost like public knowledge at that point to a degree, right? I'm exaggerating a little bit, but it is an insecure way to do that. But if that link doesn't expire and can be reused, that is you. That one link, that one click, is your entire identity because now I can reset the password anytime I want to. And by the way, fun story time. Since we're talking about these stories, right? This has probably been a couple years back, but we were doing we were doing password spraying against an OA environment. We got into somebody's Outlook, and that their password setup links from and this this person had been had been there for like six or seven years. I I googled or googled. I searched through their Outlook inbox and found the links that were sent to them when they first got hired to set their initial password on a bunch of different accounts. And several of those links still hadn't expired, and were never they weren't they weren't a one time use. And so, so literally, I'm going back through it. I'm clicking links, and I'm taking over this person's account from their email inbox. So now I'm like in their HR portal. You know, I'm looking at their insurance information, like whatever, whatever it was. So all of that to kind of circle back and be like, yeah, what she said.

00:14:19.080 --> 00:14:27.019
<v Jordan Natter>I was supposed to say it's kind of scary to think, though, because that's a really good point, right? That working link is still your in your email if it never expires, right?

00:14:27.409 --> 00:14:27.470
<v Brad Causey>Yeah.

00:14:28.159 --> 00:14:37.070
<v Jordan Natter>So no matter who gets like your email account, now they have access to every password reset for other applications because of the fact that link doesn't expire.

00:14:37.639 --> 00:14:49.240
<v Brad Causey>That's exactly right. That's exactly right. All right, I'm going to save number three for you because I think you just recently had to deal with this with a client under the detailed war story section.

00:14:47.139 --> 00:14:55.690
<v Brad Causey>All right, but I'm going to take number two, which is MFA bypass or missing MFA on high value flows. All right, I feel like that one's

00:14:55.840 --> 00:14:56.080
<v Jordan Natter>cheating.

00:14:57.129 --> 00:14:57.789
<v Brad Causey>What the number two

00:14:58.840 --> 00:14:59.529
<v Jordan Natter>is? I was just being funny.

00:14:59.769 --> 00:17:12.778
<v Brad Causey>No, no. It totally is, but I want to I want to tell another story. So I, those of you that are regular listeners, know that I spent I don't know 1514 years in the in bank in the banking world doing web app pen testing specifically for financial institutions, and there there was a mobile banking application that we found where the API endpoints were callable, and we were able to we were basically able to reset the MFA with any valid session for a given user. And so the problem with that is now we're we're back to bypassing MFA through a normal workflow. So let me explain what I mean by that. So under normal circumstances, you would log into an application for the very first time. You'd be prompted to enable MFA, right? All that makes perfect sense. However, when you log in using your username and password, you would get a valid session, and then a failure to proceed through the MFA process would invalidate that session or wouldn't allow you to do certain things, and what we found though is that the API endpoint would the the one that resets MFA to zero, so you could log back in and then and then enroll, did not require you to have successfully authenticated all the way through, and so basically we just took that session. We never completed the MFA, and we sent the you know reset MFA request to the API endpoint, and it turned MFA off so that we could re-enroll. And we were able to get like five or six different accounts using garbage passwords, and then steal the session. Steal is kind of a strong word. Use the session to go reset the MFA, and now the next time we log in, we enroll ourselves, and so we have effectively bypassed MFA. So I say all of that as a cautionary tale that it's not just about it's not just about applying MFA to the login; it's also about applying the protections of MFA to high risk functions, meaning that I shouldn't be able to turn MFA off without having first put in the MFA code. Does that make sense? And then also when we start talking about high risk functions, money transfers, I'm I'm stuck in the banking world.

00:17:12.808 --> 00:17:15.778
<v Brad Causey>But it could be anything, right?

00:17:12.808 --> 00:17:24.318
<v Brad Causey>Could be password reset. It could be that I want to change the delivery email of my home insurance, you know, anything that would fundamentally modify.

00:17:24.469 --> 00:17:40.669
<v Brad Causey>Oh, that's another one that I just remembered. So I know this is crazy, right? But we were doing an app, and you could the MFA code went to your email. It would just email you a six-digit text code, which is perfectly fine. The problem is you could log in and change the email without MFA.

00:17:41.839 --> 00:17:42.460
<v Jordan Natter>Oh, that's horrifying.

00:17:42.970 --> 00:18:01.079
<v Brad Causey>Yeah, so so like I don't even need MFA if I can just go change the email to one that I control, and then have it send the email code, you know, to me. So that's the kind of stuff I want people to kind of get their their their red hat on for red hat, black hat on for, and I don't know, it's Friday.

00:18:01.259 --> 00:18:07.109
<v Brad Causey>This week has been insane, so you guys just have to forgive me. I can't, I can't use the words. I was gonna say the brains

00:18:07.199 --> 00:18:08.098
<v Jordan Natter>are fried. They

00:18:08.309 --> 00:18:10.230
<v Brad Causey>are for all of us.

00:18:08.309 --> 00:18:14.490
<v Brad Causey>I mean, we're recording this at like 3o'clock on Friday afternoon. Normally, we do this on like Wednesday or Thursday.

00:18:12.480 --> 00:18:20.869
<v Brad Causey>It's just been such a crazy week. So yes, this episode is going to come out late. Yes, I apologize. However, it's just one of those things. But yeah.

00:18:21.049 --> 00:18:30.259
<v So, long story short is this>be thinking about how a black hat would bypass that, and that's really what the the crux that we're trying to get across is.

00:18:27.859 --> 00:18:30.680
<v So, long story short is this>So, all right, back to you. Are you ready?

00:18:30.950 --> 00:19:07.230
<v Jordan Natter>I do want to add one thing to what you were talking about. Right, there has been a similar circumstance that I've actually had a working account where I'm logged in, that where you go to the account page, it displays your current password. I would like to think you guys would understand why that is a horrible idea, because like if you get, let's say that somehow you use my session, right? You log in as my account, but you don't actually know what the working password is. Now it's displaying that to you, so you could just be like, "Oh, cool! I see your password is test 123. That is fantastic. Now I can log in as you even when your session expires.

00:19:07.529 --> 00:19:07.920
<v Brad Causey>That's right.

00:19:08.309 --> 00:19:10.140
<v Jordan Natter>That is an absolute horrible idea.

00:19:10.619 --> 00:19:16.079
<v Brad Causey>Or I'm going to take that password and log into everything else because you're probably reusing that password, right? Because you're a normal user,

00:19:16.769 --> 00:19:20.720
<v Jordan Natter>right? Because you're you're a human being, and we like reusing things because yeah, it's

00:19:21.019 --> 00:19:21.769
<v Brad Causey>totally fine. Yeah,

00:19:21.890 --> 00:19:23.240
<v Jordan Natter>bad memory. Yeah,

00:19:23.898 --> 00:19:24.469
<v Brad Causey>bad vibes.

00:19:24.769 --> 00:19:27.230
<v Jordan Natter>Bad vibes. All right, um, on to the next one.

00:19:27.349 --> 00:20:01.410
<v Jordan Natter>So kind of a perfect segue from what I just previously mentioned, but sessions that not invalidate on log out or password change. So I do want to preface this with like explaining how sessions work, just in layman terms. Yeah, sure. So those of you who are familiar, right? Typically, like you get given a session. Now there is something that happens depending on the web application on when you make a new session, right? Let's say I now log in on this device. This was already previously logged in. I now log in to a new device. A couple of different things can happen.

00:19:58.809 --> 00:20:43.450
<v Jordan Natter>Either while creating a new session, it's going to invalidate your old session, so that working session is no longer going to work. Obviously, right? Or it's going to stay valid on both places at the same time until you either log out for both of them, because sometimes it's improper, and you log out on one and it doesn't log out the other one, or you now log out this one, and it will log out both of them, right? So you can either have sessions where you can only have one at a time for a working account, or you can have them where you can have multiple in parallel. So what our preference is, yeah, please preferably have one, but also like those of us who use like Outlook and Teams, for example, it's kind of nice to have a working session on your phone and your computer.

00:20:44.079 --> 00:20:44.500
<v Brad Causey>Yeah, that's fair.

00:20:45.069 --> 00:20:49.480
<v Jordan Natter>As I say, there's there's times and places. So based on your web application, what you use it for,

00:20:49.930 --> 00:20:50.140
<v Brad Causey>I take

00:20:50.319 --> 00:21:00.430
<v Jordan Natter>it back. Ha ha! We're take it back. But based on your web application, what you use it for, of course, there's a time and a place for either one.

00:20:56.529 --> 00:21:13.230
<v Jordan Natter>Obviously, we have a bias towards if you log in one place, you log out of all places because again, there's probably a reason why you're doing that, and that's why I want to bring up the story. So in this case, what happened was that I went throughout this pen test, right?

00:21:13.289 --> 00:21:17.160
<v Jordan Natter>I log into a session, have this other session in another place.

00:21:17.789 --> 00:21:23.089
<v Jordan Natter>Well, I decide to test the forgot password again. This seems to be a commonality of my pen test for whatever reason.

00:21:24.019 --> 00:22:11.549
<v Jordan Natter>Good, good issue to have. But when I reset that password, it's keeping that session active in another browser, right? So now that old session for that old password is still working. So anyone who knows what the old session ID is, even with the new reset password, can still log in as me, and you can see why that's an issue. Because even if you have a new password and the session stays the same, you can still technically bypass that new reset link, or not reset, but that new password change. So if they're not invalidating on log out, now anyone still has access to your old session, even if you've done everything on your side to be like, hey, I see malicious activity. I'm going to log out. Hopefully, that logs out everything. Well, if it doesn't do that, it's still working for the other party that supposedly already has your session, which is why you changed your password.

00:22:12.420 --> 00:22:31.369
<v Brad Causey>Makes perfect sense to me. It does, and and and I I would argue what you're describing is probably one of the most significant problems plaguing current applications would be right. Yes, and and and and I would I would broaden it a little bit to cover just bad session management in general.

00:22:31.369 --> 00:23:06.539
<v Brad Causey>Yeah, even more. Yeah, and and so I say that because you know look at what's happening in the legal space with shiny hunters right now. They're going after sessions. That is what they're doing. That is their that is their playbook, folks. Is they start with social engineering for initial access. They're not stealing creds because they're scared of MFA. They're not installing you know you know software necessarily. Some of them do, but but they're going after sessions, folks, because once they have that session, they have the user from from the context of that application, so what are different ways that we can jack up session management?

00:23:03.960 --> 00:23:07.980
<v Brad Causey>So one of the first thing that comes to mind is session fixation.

00:23:08.430 --> 00:23:08.579
<v Jordan Natter>Yes,

00:23:08.819 --> 00:23:34.009
<v Brad Causey>right. And I know you find that on like probably 5050, 60% of your apps that you look at. What is session fixation? So when you initially land on the login page of a website, in most cases, and and and I'm going to use I'm going to use like a shopping website as a great example because these are very commonly session fixated, almost by design. But when you first log, when you first land on a website, right?

00:23:34.460 --> 00:24:13.019
<v Brad Causey>If you add some stuff to your cart, but then you're like, oh no, I forgot to log in, and then you authenticate, but your cart still has stuff in it, so that means that the session, some some information from the beginning of that session to to where you are now, has been retained. Now that may be that may be intentional, but if you land on the login page and you get session 123, and then you authenticate and you retain session 123, that is session fixation. The session should be invalid. the the the first one, the unauthenticated one, should be invalidated, and then now the new one is the one that's valid and the one that we're using.

00:24:10.079 --> 00:24:33.079
<v Brad Causey>And so that would be session fixation. The reason that that's dangerous is because I could literally embed a pixel on my malicious website that links to that site, right? And your browser is going to go grab this innocent, unauthenticated session that never gets overwritten or invalidated, right? And so now, when I try to fish you or I try to do something, that session becomes.

00:24:33.200 --> 00:25:02.369
<v Brad Causey>Or if you just log in like a week later, and the session hasn't gone away, suddenly I am you, and so there's a lot of risk carried with that, so that's one session fixation. You know, you know the the other thing is really just like you were talking about with expiration of sessions; those need to be handled properly, and and so that's one of the things that we see JWTs and refresh tokens do a better job of in most cases. But you can still.

00:24:58.299 --> 00:25:02.789
<v Brad Causey>JWTs wrong. I was gonna say we've talked

00:25:02.789 --> 00:25:07.589
<v Jordan Natter>about the JWTs ad nauseum. Yeah, there's many ways to do it wrong. We don't have to dive into

00:25:07.710 --> 00:25:19.410
<v Brad Causey>it too far. But but the the last one that I want to mention is number five, and that is the password reset and recovery flow. And I kind of touched on this already with the resetting MFA thing or the changing email addresses.

00:25:20.130 --> 00:26:04.859
<v Brad Causey>Anything, and this is the rule that we had in the banking world, is any function that would allow me to modify a component of authentication should be gated. Now, what does all that really mean, right? It sounds like a really like, what are you talking about, Brad? All right, cool. Let me explain. If I can modify an email address, if I can modify MFA, if I can modify a password, if I can modify a secret question that you're hopefully not using, any of those things, if they are to be changed, must be gated by strong authentication. It must be protected, because if I can start modifying this stuff without successful and complete authentication, then I can take over the account, and I can bypass those strong protection mechanisms. Does that make sense? Am I saying the right words?

00:26:04.858 --> 00:26:07.618
<v Jordan Natter>Completely agree.

00:26:04.858 --> 00:26:10.828
<v Jordan Natter>If you want that as a real life example, because I always circle back to houses, and I don't know why.

00:26:12.269 --> 00:26:13.799
<v Brad Causey>It's a perfect analogy, though. I love it.

00:26:13.799 --> 00:26:13.920
<v Brad Causey>Really

00:26:14.160 --> 00:26:35.809
<v Jordan Natter>is though. It's great in the cybersecurity space, but like, let's say you have a house, right? You have that perfect, awesome, like digital keypad that's on your door. Well, you don't want to have the ability to get into your house and change that keypad without having some way to validate the fact that you are the rightful owner of that keypad to get into that house.

00:26:32.960 --> 00:27:15.630
<v Jordan Natter>So let's say that there is a default password for that. Cool, that's cool. But like anyone can eventually like type in enough buttons into that key, like password, not password, but that like keypad until they eventually get in. Well, let's say to reset it, you have to have the key and the old password to then get into it, right? So you just keep adding layers until you eventually can validate the fact that you are the reason, like you are the owner of the house, and you have the right to change the the security mechanisms to get into that house. And you want to have more mechanisms each step of the way. Because let's say you now add a gate at the end of the driveway, and you have to have like your button presser, like your RFID,

00:27:16.470 --> 00:27:16.529
<v Brad Causey>yeah,

00:27:17.250 --> 00:27:22.549
<v Jordan Natter>and press that so you can get into the driveway to then get to your house. Right?

00:27:19.589 --> 00:27:24.890
<v Jordan Natter>You just keep adding multiple layers of authentication to your house,

00:27:25.250 --> 00:27:28.400
<v Brad Causey>and hopefully different ones, right? So the clicker is not the same thing as the key,

00:27:28.940 --> 00:27:29.059
<v Jordan Natter>yes,

00:27:29.449 --> 00:27:41.499
<v Brad Causey>right? And maybe maybe you have a pin pad, something you know, something you have. So now we're starting to like we're starting to stack those different the multiple factors of of access and authentication. So no, it makes.

00:27:41.528 --> 00:27:43.689
<v Brad Causey>I think it's a perfect analogy.

00:27:41.528 --> 00:27:46.239
<v Brad Causey>I, by the way, I use that when I'm talking to clients all the time. I use the same same kind of analogy.

00:27:46.630 --> 00:27:48.910
<v Jordan Natter>It's a little rough around the edges, but you guys got it. Yeah, we

00:27:49.000 --> 00:28:25.609
<v Brad Causey>get we get the gist. Um. So uh. So yeah. So you know, one other thing that I will mention that we haven't really touched on. I'm kind of going back to sessions for just a second. Sessions need to be properly random, right? They shouldn't be predictable. One of the things that we have seen is where the the sessions increment by some you know predetermined number, which means I can guess what the next session is. I've legitimately used that attack on banking applications before, so you know there there's actually a tool within Burp Suite. I think it's called the synchronizer or something like that. Sequencer, sequencer.

00:28:22.039 --> 00:28:33.380
<v Brad Causey>Thank you. Yeah, sequencer that will actually go look for entropy, which is randomization or randomness within sessions.

00:28:29.509 --> 00:28:39.349
<v Brad Causey>So, so yeah, that's something to keep in mind as well. All right, cool. So I think we hit all the high points. You got anything you want to add before we wrap?

00:28:39.859 --> 00:28:41.119
<v Jordan Natter>No, that was outstanding.

00:28:41.690 --> 00:28:53.650
<v Brad Causey>All right, well, you folks, thank you so much for listening and/or watching. If you need a web app pen test, I know a cat that can handle that for you, right? And so, yeah, so definitely let us know, and we'll see you guys next week.
