# OWASP Top Ten and ASP.NET Core with Anders Abel

An episode of [.NET Rocks!](https://invisiblenetwork.ai/podcast/130068596), 19 Nov 2026, 49 min.

Audio: https://dts.podtrac.com/redirect.mp3/api.spreaker.com/download/episode/76356116/dotnetrocks_2029_owasp_top_ten_and_asp_net_core.mp3

How does ASP.NET Core help you make secure web apps? Carl and Richard talk to Anders Abel about the OWASP Top Ten and how ASP.NET Core addresses many of the vulnerability elements - at least where it can. Anders talks about using the powerful libraries built into ASP.NET Core, like authentication/authorization and data protection, to address many of the concerns on the OWASP list. It doesn't keep you from making mistakes or misconfiguring security items, but it's better than doing nothing or rolling your own.

## Transcript

[0:01] Speaker 1: How'd you like to listen to. NET Rocks with no ads? Easy.
[0:05] Speaker 1: Become a patron. For just $ 5 a month, you get
[0:08] Speaker 1: access to a private RSS feed where all the shows
[0:11] Speaker 1: have no ads. $ 20 a month will get you that
[0:15] Speaker 1: and a special. NET Rocks patron mug. Sign up now
[0:18] Speaker 1: at patreon.dotnetrocks.com. Hey, and welcome back to. NET Rocks. This
[0:37] Speaker 1: is episode, what the heck episode is this?
[0:39] Speaker 2: 2029.
[0:39] Speaker 1: 2029. There you go. And we don't know what happened
[0:43] Speaker 1: in 2029 because it hasn't happened yet.
[0:45] Speaker 2: And I like that.
[0:47] Speaker 1: Yeah. I'm Carl Franklin. That's Richard Campbell.
[0:50] Speaker 3: Hey.
[0:51] Speaker 1: Anders Abel is going to be here with us in
[0:54] Speaker 1: a bit. But first, where are you, Richard?
[0:58] Speaker 2: I'm in the Netherlands. I was in... Oradev. Remember Oradev Mamelmo?
[1:03] Speaker 2: I went back to Oradev for the 20th anniversary.
[1:06] Speaker 4: Wow.
[1:07] Speaker 2: And then I had a few days before going on
[1:10] Speaker 2: to update Conf and Prog, so I stopped at friend Remy's.
[1:13] Speaker 1: Remy Caron.
[1:15] Speaker 2: Remy Caron used to do his own conference. He hasn't
[1:17] Speaker 2: done it for many years now.
[1:18] Speaker 1: That's right.
[1:19] Speaker 2: But he owns a whiskey store. So, I mean, what
[1:21] Speaker 2: could go wrong there?
[1:22] Speaker 1: Oh, my goodness.
[1:27] Speaker 4: Oh, boy.
[1:28] Speaker 1: Did you get in trouble?
[1:28] Speaker 2: No.
[1:29] Speaker 1: No, no, we're doing.
[1:30] Speaker 2: With the whiskey store? We're doing pretty well, you know,
[1:32] Speaker 2: as good as we can. I mean, it's a couple
[1:34] Speaker 2: of damaged soldiers, but, you know, what are you going
[1:36] Speaker 2: to do?
[1:36] Speaker 1: What are you going to do? Yeah. All right, let's
[1:38] Speaker 1: kick things off with Better Know a Framework. Hit the music.
[1:41] Speaker 4: Awesome. All right, man.
[1:49] Speaker 2: What do you got?
[1:49] Speaker 1: I think it was Simon that showed me this, although
[1:51] Speaker 1: it's not his.
[1:54] Speaker 2: It's not actually Simon's work.
[1:55] Speaker 1: It's not his work. However, it's stunning.
[1:57] Speaker 2: Because usually Simon's work.
[1:58] Speaker 1: It's stunning. It's called Office IMO. And when you go
[2:02] Speaker 1: to the repo, there's so many folders that the readme
[2:08] Speaker 1: actually starts about three quarters of the way down the page.
[2:13] Speaker 1: Office IMO creates, edits, reads, and converts Word, Excel, PowerPoint, PDF, Markdown,
[2:20] Speaker 1: and and two dozen other document formats in. NET without
[2:25] Speaker 1: Microsoft Office or COM. Think about that. So at the
[2:32] Speaker 1: heart of it is this PowerShell tool called PSWriteOffice. And
[2:37] Speaker 1: so this is a wrapper around that. But anything to anything.
[2:41] Speaker 2: Do you figure this is the LLMs gone wild, right? Probably.
[2:45] Speaker 1: Probably. I mean, you know, if I was sitting around
[2:48] Speaker 1: bored and wanted to do something with an LLM for code,
[2:51] Speaker 1: I'd probably do something like this. Yeah, yeah. Something that
[2:54] Speaker 1: no sane person would attempt in their lifetime. I mean,
[3:00] Speaker 1: come on.
[3:00] Speaker 2: That's awesome.
[3:01] Speaker 1: But it's pretty stunning, isn't it? I mean, did you
[3:03] Speaker 1: see the repo?
[3:04] Speaker 2: But, you know, you always wanted this. Yeah. No, it's huge. Yeah.
[3:09] Speaker 1: So that's what I got. If you got a hankering
[3:10] Speaker 1: for offline conversion and... Actually, I know someone who lives
[3:16] Speaker 1: with me that could really use this. I bet.
[3:20] Speaker 4: Yeah.
[3:21] Speaker 1: This is your tool. Office IMO. All right. Know it,
[3:24] Speaker 1: learn it, love it. Who's talking to us today, Richard?
[3:26] Speaker 2: Grounded comment on the show 2021. The one we did
[3:29] Speaker 2: with Rocky Locke I'm talking about is RockBot and all
[3:32] Speaker 2: the goodness that was happening there. Not that this comment
[3:35] Speaker 2: has much to do with that. This is a comment
[3:36] Speaker 2: from Cliff B who said, why stop the history we
[3:38] Speaker 2: show 2025 or 2026? Would be great to hear the
[3:41] Speaker 2: future from your perspective. And to which I say, No.
[3:46] Speaker 2: Just no. No. Not going to do that. That's what
[3:48] Speaker 2: geek outs are for. We'll do those as geek outs.
[3:50] Speaker 1: Okay.
[3:51] Speaker 2: Don't need to do the top of the show for that.
[3:53] Speaker 1: It's a lot of work.
[3:54] Speaker 2: Although, yeah, just looking at 2029, like, hmm, what's going
[3:56] Speaker 2: to happen in 2029? But Clippy, thank you so much
[3:59] Speaker 2: for tormenting me further. And a copy of Musicobuy, it's
[4:03] Speaker 2: on its way to you. And if you'd like a
[4:04] Speaker 2: copy of Musicobuy, write a comment on the website at. netrocks. com
[4:07] Speaker 2: or on the Facebooks. We publish every show there. And
[4:09] Speaker 2: if you comment there and are reading the show, we'll
[4:10] Speaker 2: send you a copy of Musicobuy.
[4:12] Speaker 1: And if you want to just go get Music to
[4:13] Speaker 1: Code By, it's at musictocodeby.net. And there's 22 tracks of
[4:18] Speaker 1: 25-minute long music that is designed specifically to keep you
[4:24] Speaker 1: in a state of flow and focus while you write
[4:26] Speaker 1: code or do anything else that requires your attention. Let's
[4:31] Speaker 1: bring on our guest, Anders Abel. He is a senior
[4:34] Speaker 1: software development consultant in Stockholm, Sweden. and a former Microsoft
[4:39] Speaker 1: MVP in Visual Studio and Development Technologies. And there's more
[4:43] Speaker 1: to his bio, which you can find at. nerox. com. Welcome, Anders.
[4:46] Speaker 2: Thank you.
[4:47] Speaker 4: I actually am current MVP again. Oh, congratulations. I got
[4:53] Speaker 4: renewed again. Thank you.
[4:55] Speaker 1: Oh, that's great. Yeah, the MVP program has undergone some changes,
[4:59] Speaker 1: but it's still a great program. I'm an MVP as
[5:03] Speaker 1: well for guys like us.
[5:04] Speaker 2: Yeah, and the Summit is coming around again.
[5:07] Speaker 1: Yeah. So what's on your mind, Anders?
[5:10] Speaker 4: Well, security in different flavors is usually what I go
[5:15] Speaker 4: thinking about. And I mostly do, all the people ask
[5:21] Speaker 4: me that are not geeks what I do for a living,
[5:23] Speaker 4: I tell them I put login buttons. That's an easy
[5:26] Speaker 4: way to explain what I do.
[5:27] Speaker 2: That's great. Just log in buttons.
[5:31] Speaker 1: You know, the definition of a genius in this modern time,
[5:35] Speaker 1: the definition of a genius is a person who can
[5:37] Speaker 1: press the right button at the right time. It all
[5:39] Speaker 1: comes down to that.
[5:43] Speaker 4: No, but what that means, I usually do single sign-on
[5:45] Speaker 4: solutions and sample to OpenID Connect, API security with OWASP,
[5:52] Speaker 4: things like that, and try to secure things.
[5:56] Speaker 1: And I know you're going to talk about the OWASP
[5:59] Speaker 1: top 10. And I do a security show with Patrick
[6:03] Speaker 1: Hines and Dwayne LaFlock called Security This Week. And we're
[6:07] Speaker 1: always stunned because isn't it like the number one is
[6:12] Speaker 1: still SQL injection?
[6:14] Speaker 4: It isn't actually.
[6:15] Speaker 2: No, it's down to number five.
[6:17] Speaker 4: Yeah.
[6:17] Speaker 1: It's a run down.
[6:19] Speaker 2: We've made progress. Wow.
[6:24] Speaker 4: And they also bundle SQL injection with other injections. So
[6:28] Speaker 4: number five, it isn't even its own point anymore.
[6:32] Speaker 1: Wow.
[6:33] Speaker 2: So what is the big one these days?
[6:36] Speaker 4: So I would say the big one right now is
[6:40] Speaker 4: software supply chain. It's number three, although it was top 10, 2025.
[6:45] Speaker 4: But I feel that as what has happened this year,
[6:50] Speaker 4: where we've seen larger problems I'd say software supply chain
[6:54] Speaker 4: and especially now with LLMs getting so good at analyzing
[6:59] Speaker 4: things they find.
[7:01] Speaker 2: Things yeah finding vulnerabilities.
[7:04] Speaker 4: Exactly and maintainers are having a hard time keeping up
[7:08] Speaker 4: with the findings yeah You know.
[7:10] Speaker 2: Over on Windows Weekly, we've been talking about the number
[7:13] Speaker 2: of patches to Windows. It's like last month was more
[7:16] Speaker 2: than last year.
[7:17] Speaker 1: Right.
[7:18] Speaker 2: Like it's in the thousands. It's crazy.
[7:20] Speaker 1: But, you know, at least the good guys are keeping
[7:22] Speaker 1: up with the bad guys. But they have to work
[7:25] Speaker 1: extra hard to do that. And, you know, this is
[7:28] Speaker 1: something that we lament on Security This Week as well,
[7:31] Speaker 1: which is that as soon as even, you know, before
[7:35] Speaker 1: there's a zero day, like the AI finds the zero
[7:37] Speaker 1: day and immediately launches an attack. Nobody has time to patch.
[7:42] Speaker 4: And that's what's scary is that the time from finding
[7:45] Speaker 4: vulnerability to building an exploit has become so short.
[7:51] Speaker 1: Seconds sometimes. Yeah.
[7:54] Speaker 2: Although admittedly, like that. php to shell hack i spent
[7:58] Speaker 2: some time looking through that thing no human thought up
[8:01] Speaker 2: that hack like that's an incredibly complicated exploit it's very
[8:06] Speaker 2: powerful but my god you can see software in action.
[8:09] Speaker 1: Did you see the story about the one guy the
[8:12] Speaker 1: volunteer who patched it like across 12 different packages and
[8:16] Speaker 1: he basically is being lauded as the guy who saved
[8:19] Speaker 1: the internet crazy yeah one.
[8:23] Speaker 4: Guy But what I also see is that high quality
[8:27] Speaker 4: code where, so I was listening earlier this year to
[8:29] Speaker 4: a conference talk by Daniel Stenberg, the author of Curl.
[8:35] Speaker 4: And he, they have spent 20 years on code quality
[8:42] Speaker 4: and ensuring the code is secure. And all these LLMs,
[8:46] Speaker 4: they don't find that much in that code base. So
[8:50] Speaker 4: what we see now is that sloppy quality now it
[8:55] Speaker 4: comes back and the LLMs find it. But high quality
[9:00] Speaker 4: code where people have done appropriate defense in depth, it
[9:05] Speaker 4: usually survives.
[9:06] Speaker 1: The chickens have come home to roost.
[9:08] Speaker 2: This is the important part, right? If we're going to
[9:13] Speaker 2: live with LLMs, we've really got to work hard to
[9:15] Speaker 2: make sure that the samples that they're going to learn
[9:18] Speaker 2: from are good quality, that the documentation is correct, that
[9:22] Speaker 2: it's current, like, that's what scares me. It's just so,
[9:25] Speaker 2: you know, PHP, how much bad code are we talking about? Like,
[9:28] Speaker 2: holy man.
[9:30] Speaker 1: Yeah. Yeah.
[9:33] Speaker 2: I mean, I had a good chat with Kathleen Dahl,
[9:36] Speaker 2: and I suspect we'll have her back on again, talking
[9:39] Speaker 2: about the efforts of the C Sharp team to make
[9:41] Speaker 2: sure that the new C Sharp features are well documented.
[9:44] Speaker 2: They've got good, secure examples. They are thinking in terms
[9:48] Speaker 2: of the LLMs are going to read this, and this
[9:51] Speaker 2: will be what they generate code from, you know, if
[9:53] Speaker 2: we're lucky.
[9:54] Speaker 1: So what else is on the list?
[9:58] Speaker 4: So OWASP top 10, the number one now is actually
[10:01] Speaker 4: broken access control. And what they did with this addition
[10:06] Speaker 4: of OWASP top 10 is that they kind of bundled things.
[10:10] Speaker 4: So in the past, we had broken access control, which
[10:14] Speaker 4: contained a well, what you think about as access control.
[10:17] Speaker 4: If you write an API, do you do proper authorization
[10:23] Speaker 4: so that just the right people can, or the right
[10:26] Speaker 4: users and clients can access that data? But also under
[10:30] Speaker 4: broken access control now is cross-site request forgery. Because that
[10:34] Speaker 4: is also a kind of access control. Is it the
[10:36] Speaker 4: right source of the data being posted to your application?
[10:40] Speaker 4: And looking at the list, I'm not entirely fond of
[10:46] Speaker 4: this restructuring. Because OWASP top 10 used to be like
[10:50] Speaker 4: a recipe for a web developer. If you were fairly
[10:53] Speaker 4: new to security, I mean, this was how I learned
[10:56] Speaker 4: about OWASP top 10 some 15 years ago, is that
[11:00] Speaker 4: I was fairly new to the security area. It was
[11:03] Speaker 4: a checklist. Don't do cross-site request forgery. Beware of cross-site scripting.
[11:08] Speaker 4: Don't do SQL injection. Every single point on the list
[11:12] Speaker 4: was a very well-defined... vulnerability, you could go check your
[11:17] Speaker 4: code and have this as the 10 most important things
[11:22] Speaker 4: to keep in mind while coding. But nowadays, it's hard
[11:26] Speaker 4: because broken access control, it contains multiple things. And then
[11:33] Speaker 4: we have issue number two on the list, security misconfiguration. Yeah, okay,
[11:38] Speaker 4: you misconfigured something. Hmm. What does that mean? Don't do
[11:43] Speaker 4: stupid things?
[11:45] Speaker 1: Right.
[11:46] Speaker 2: Well, yes, but also.
[11:47] Speaker 1: Yeah, so it's not as clearly defined was what you're saying,
[11:53] Speaker 1: the prescription.
[11:55] Speaker 4: No, unfortunately not. But what I've also spent some time
[12:00] Speaker 4: on here is to actually cross-check OVA's top 10 versus
[12:05] Speaker 4: what ASP.NET Core offers as built-in features and what you
[12:08] Speaker 4: have to think of yourself. Because that is where I
[12:10] Speaker 4: find it. this being useful for a. NET developer or ASP.NET
[12:14] Speaker 4: developer is that some of these things are things that
[12:19] Speaker 4: the framework really does for us. We don't have to
[12:21] Speaker 4: care about it. Some of these things are things where
[12:24] Speaker 4: we are completely on our own. The broken access control,
[12:28] Speaker 4: for example, if we look at the two major things,
[12:31] Speaker 4: the authorization framework, there is a great authorization framework in ASP.NET
[12:37] Speaker 4: Core that you can use to.
[12:39] Speaker 2: Right.
[12:40] Speaker 4: To express your authorization rules, a policy-based system that is
[12:46] Speaker 4: extensible and works really well. Cross-site request forgery, if you
[12:50] Speaker 4: do server-side rendered stuff like razor pages or classical MVC,
[12:57] Speaker 4: it's built in. You get this anti-forgery token for free
[13:01] Speaker 4: in your forms and For MVC, you have to opt
[13:04] Speaker 4: in to enable the check for razor page. It's enabled
[13:07] Speaker 4: out of the box. You don't have to think about it.
[13:09] Speaker 2: Yeah, as long as you use these tools. But you
[13:12] Speaker 2: really made a great point there, Anders, about that number
[13:15] Speaker 2: one is these two distinctly different things, like requiring authorization,
[13:20] Speaker 2: but also turning on anti-forgery protection and so forth. They're
[13:25] Speaker 2: both important. They don't really have anything to do with
[13:27] Speaker 2: each other, except that normally you can put them under
[13:29] Speaker 2: the same category.
[13:30] Speaker 4: Yeah, there are more things to it. Those are the
[13:33] Speaker 4: two most, I'd say, most important examples there. But there
[13:38] Speaker 4: are more. So should we just go through the list
[13:42] Speaker 4: quickly and maybe deep dive?
[13:45] Speaker 2: Yeah, because the security misconfiguration comes up all the time
[13:48] Speaker 2: on Run as Radio. Like that's how many open ports,
[13:52] Speaker 2: how many things with no significant logins. And this is
[13:56] Speaker 2: what burned Microsoft too, right? It was some demo app.
[14:00] Speaker 2: that was turned on for a demo and never turned
[14:03] Speaker 2: off again. It was never properly secured for the demo.
[14:07] Speaker 2: And then suddenly it was a backdoor into all kinds
[14:09] Speaker 2: of things. And that's what happens.
[14:11] Speaker 4: And if I look at what ASP.NET Core does, I
[14:13] Speaker 4: think that I'm old enough to have written code when
[14:17] Speaker 4: everything was HTTP modules in web forms. And realizing when
[14:21] Speaker 4: you deployed something that, hey, this machine config on this
[14:25] Speaker 4: server has a bunch of extra HTTP modules I've never
[14:28] Speaker 4: heard of that is running in my pipeline. That is
[14:31] Speaker 4: the kind of things you get for security configuration because
[14:35] Speaker 4: there are additional features that you don't know about. And
[14:37] Speaker 4: that's what I really appreciate with ASP.NET Core is that
[14:40] Speaker 4: you have your startup. You add things to your startup.
[14:43] Speaker 4: That's what's running, period. It doesn't even serve static files
[14:47] Speaker 4: unless you tell it to do that. That's really not
[14:50] Speaker 4: the Microsoft way, right? Like Microsoft's always been very prone
[14:53] Speaker 4: to like, I have a Swiss Army knife, and every
[14:56] Speaker 4: knife is out. Everything is on by default.
[15:00] Speaker 2: Go crazy.
[15:00] Speaker 1: Yeah, it's more about convenience.
[15:02] Speaker 2: And they're all attack service, right?
[15:04] Speaker 4: Yeah, they actually went a bit in that direction when they,
[15:08] Speaker 4: for example, now add user authentication. You don't have to
[15:11] Speaker 4: add that to the pipeline. It's added automatically. So there
[15:14] Speaker 4: are a few things now in modern versions of ASP.NET
[15:18] Speaker 4: Core that are added without you having to do that,
[15:22] Speaker 4: but still... I think it's fairly sensible things. It doesn't
[15:28] Speaker 4: serve static files on this utility, which I still think
[15:32] Speaker 4: is a great feature.
[15:33] Speaker 2: Well, it's very hard to hack at static files, right?
[15:36] Speaker 4: Yeah, but it's also, back in the very old days,
[15:41] Speaker 4: having static file access was a common way to attack websites.
[15:45] Speaker 4: For example, you could.
[15:46] Speaker 1: Interesting path traversal.
[15:47] Speaker 4: Treat the service to download the PHP script, the source code,
[15:51] Speaker 4: and then you could analyze it and find out what
[15:53] Speaker 4: was wrong. Right. And if there was any holes in there.
[15:56] Speaker 1: Yeah, there's a path traversal hack where you basically try
[16:00] Speaker 1: to access a file and then append dot, dot, slash, dot, dot, slash,
[16:04] Speaker 1: and go back outside of the sandbox where all your
[16:10] Speaker 1: files are. And that comes up every once in a
[16:13] Speaker 1: while as a vulnerability.
[16:16] Speaker 4: It was good times.
[16:17] Speaker 1: But that's static files.
[16:21] Speaker 4: But also just that you might have files in your
[16:24] Speaker 4: website directory that you did not intend to serve publicly.
[16:29] Speaker 4: And then we have software supply chain things that we covered.
[16:33] Speaker 4: But I think the software supply chain has gotten better.
[16:35] Speaker 4: And you get and Visual Studio and the tooling is
[16:38] Speaker 4: now much better than it used to be. If you
[16:41] Speaker 4: try to compile anything that references, even transiently references a
[16:45] Speaker 4: vulnerable package, it will let you know. As a new
[16:48] Speaker 4: Git maintainer, you can now mark things as deprecated or
[16:53] Speaker 4: vulnerable and be sure that this is flagged in the
[16:57] Speaker 4: build pipeline. It will cause build errors for anyone consuming
[17:01] Speaker 4: these versions.
[17:03] Speaker 2: One of my run-as shows, I had a conversation with
[17:05] Speaker 2: a security guy who said, look, just don't use any
[17:07] Speaker 2: packages that are less than 48 hours old. Like the
[17:11] Speaker 2: good guys will find weaknesses, but they don't find them instantly.
[17:14] Speaker 2: So as long as you let those things marinate for
[17:16] Speaker 2: a little while, your risk level goes way down. I
[17:19] Speaker 2: don't know how you feel about that, Anders.
[17:21] Speaker 4: Well, I'd say being an early adopter is always a risk.
[17:26] Speaker 4: So being an early adopter, anything that is released that
[17:30] Speaker 4: is new, as you said, it might have problems. And
[17:36] Speaker 4: also for security sensitive things, It's always a good idea
[17:41] Speaker 4: to be a bit reluctant, to be a bit old fashioned.
[17:44] Speaker 4: And also, for example, LLMs coding. I've been very late
[17:49] Speaker 4: or I'm still late on adopting it because I think
[17:52] Speaker 4: that for security components, that's not maybe not the right
[17:57] Speaker 4: place to experiment.
[17:59] Speaker 2: I'm not going to ask an LLM to generate a
[18:01] Speaker 2: cryptographic library. That just seems like a bad idea. There
[18:07] Speaker 2: are some deterministic things in this world that non-deterministic software
[18:10] Speaker 2: should not touch.
[18:11] Speaker 1: You only live once, Richard.
[18:16] Speaker 4: I had this conversation with Philippe Derrick, web security specialist.
[18:22] Speaker 4: He recently got his first RFC published on best current
[18:26] Speaker 4: practices for browser-based applications. And he said he used LLMs
[18:32] Speaker 4: to generate But the thing is that he knows the
[18:36] Speaker 4: specs because he was part in writing those, the new specs.
[18:39] Speaker 4: And for him, it is a reasonable tool. But for
[18:44] Speaker 4: other people, I would say use a pre-made component.
[18:48] Speaker 2: You need to understand the code it's generating when it's
[18:51] Speaker 2: this sensitive, especially. I'm pretty loosey-goosey on the forms over
[18:56] Speaker 2: data stuff. I'm not going to worry too much about that.
[18:58] Speaker 2: But anything to do with authentication and stuff, like, holy man,
[19:02] Speaker 2: be very sure. And let's face it, most of this
[19:05] Speaker 2: stuff is solved problems. You do not need to roll
[19:08] Speaker 2: your own. Exactly.
[19:10] Speaker 4: And that brings me to another point that is kind
[19:12] Speaker 4: of my favorite thing here is also the viability of
[19:16] Speaker 4: open source in the long run. A lot of these
[19:20] Speaker 4: security components are open source components. And I maintain a
[19:24] Speaker 4: sample two libraries since over a decade. And what I
[19:27] Speaker 4: can see is that The number of organizations signing up
[19:32] Speaker 4: for commercial support contract or in any way contributing in
[19:36] Speaker 4: a meaningful way financially, it's way too low to be sustainable, unfortunately. Right. Yeah.
[19:43] Speaker 2: Well, certainly. And at the same time, it's like keeping
[19:46] Speaker 2: this stuff secure is so important. You you need that
[19:51] Speaker 2: but uh you do need you need.
[19:52] Speaker 4: Help too exactly That brings us to number four on
[19:56] Speaker 4: the list, cryptographic failures. And this one is interesting because
[20:01] Speaker 4: cryptographic failures is mostly about not that people roll their
[20:05] Speaker 4: own crypto. We are past that. People know that they
[20:08] Speaker 4: should use real crypto things.
[20:10] Speaker 2: Yeah, one would hope.
[20:11] Speaker 4: Yeah. But the problem is that if you use AES,
[20:14] Speaker 4: for example, it's the state of the art symmetric crypto algorithm.
[20:17] Speaker 4: Everything uses it. It's a good algorithm. Nothing wrong with it.
[20:22] Speaker 4: But if you reuse the initialization vector, you're screwed. So
[20:26] Speaker 4: when you use it, you have to know what an
[20:29] Speaker 4: initialization vector is and that you shouldn't reuse it and
[20:32] Speaker 4: how to store it, etc. And that's where I think
[20:36] Speaker 4: a lot of the cryptographic failures come from, is that
[20:38] Speaker 4: people are using the right tool, but in the wrong way.
[20:42] Speaker 2: Wrong way. Yeah, great one. If you're going to use
[20:45] Speaker 2: this thing, learn how to use it. use it properly.
[20:48] Speaker 4: Or, in ASP.NET Core, use data protection. Because data protection
[20:51] Speaker 4: is the cryptography API you've always wanted. There's a method
[20:56] Speaker 4: called protect where you can send in a string. You
[20:58] Speaker 4: get something encrypted, signed, etc., state-of-the-art security thing back that
[21:05] Speaker 4: is not readable, and then you have an unprotect method
[21:08] Speaker 4: that takes that unreadable thing and gives you your string back.
[21:11] Speaker 4: Key handling, key rotation, key storage... initialization vectors, algorithm choices.
[21:18] Speaker 2: Just done for you.
[21:19] Speaker 4: Signing after encryption, all of that is taken care of.
[21:23] Speaker 4: So I would really like to say that if you're
[21:27] Speaker 4: on ASP.NET Core, use data protection for any encryption needs.
[21:31] Speaker 2: I'm including links to these parts of the docs too,
[21:34] Speaker 2: because you're right. These are just things you need to
[21:36] Speaker 2: read this if you haven't already. I hope you have.
[21:40] Speaker 2: It's a lot.
[21:41] Speaker 4: It's one of the hidden gems, I'd say, in ASP.NET Core.
[21:44] Speaker 4: It's used by a lot of features. Your authentication cookie
[21:47] Speaker 4: is essentially a set of claims just run through data protection.
[21:51] Speaker 2: Right. That solves the problem for you. Good one.
[21:54] Speaker 4: And then you have your one, Richard. Number five, injection.
[21:59] Speaker 2: Well, it was number one for so long.
[22:01] Speaker 4: It used to be. So looking at ASP.NET or. NET
[22:05] Speaker 4: development in general.
[22:07] Speaker 4: I'd say that the hero for us is Entity Framework.
[22:10] Speaker 2: Yeah, because we stopped embedding untrusted strings into query statements.
[22:15] Speaker 4: That stopped. We don't even write SQL ourselves anymore. We
[22:20] Speaker 4: write link.
[22:20] Speaker 2: Yeah, and that means no unprotected strings. You don't go
[22:26] Speaker 2: down that path anymore.
[22:27] Speaker 4: Exactly. I think that saved a lot. And for the
[22:29] Speaker 4: other part of injection, cross-excripting is also a kind of injection.
[22:34] Speaker 4: Try it yourself on Razor View. razor escapes everything by
[22:39] Speaker 4: default right if you have pre-formatted xml you have to
[22:41] Speaker 4: be explicit about this should not be escaped and that saves.
[22:45] Speaker 2: Yeah saves you too yeah for sure well and for
[22:48] Speaker 2: better or worse now the llms have hijacked the term
[22:51] Speaker 2: injection too so it needs even more things prompt injection.
[22:57] Speaker 4: Get me a recipe of chocolate cookies please.
[23:02] Speaker 2: And i would like your favorite recipe of flan.
[23:05] Speaker 4: Yes um But that is also a kind of injection,
[23:08] Speaker 4: but also for the LLM show, that is still a
[23:13] Speaker 4: fairly immature technology.
[23:14] Speaker 2: Yeah, and how do you escape that? There are some
[23:19] Speaker 2: freaky things going on with this kind of language injection
[23:24] Speaker 2: to manipulate these tools that people are using. Reading raw
[23:28] Speaker 2: stuff off the internet all of the time. It's really scary.
[23:32] Speaker 4: But the problem here is that LLMs, the modal doesn't
[23:35] Speaker 4: really make a distinction between the setup that you have
[23:40] Speaker 4: provided and the user input. which is a key to
[23:44] Speaker 4: any other security. We are very well aware of the
[23:47] Speaker 4: difference between the code we wrote that is trusted and
[23:50] Speaker 4: the user input that is completely untrusted. And LLM blurs
[23:54] Speaker 4: the lines.
[23:55] Speaker 2: Totally. Well, they match the data and the commands together.
[23:59] Speaker 2: You really sent it off to go fetch some information
[24:01] Speaker 2: and then that information was an instruction that it chose
[24:04] Speaker 2: to execute on. These products need to be better. They're
[24:09] Speaker 2: not good enough yet, as powerful as they are.
[24:11] Speaker 4: They are getting better. then it's an interesting thing. If
[24:15] Speaker 4: this is the path to being as good as people
[24:19] Speaker 4: hope for in the long run, or I guess that's another,
[24:23] Speaker 4: another podcast, another episode.
[24:26] Speaker 2: Well, and I've already done a show over on runouts
[24:29] Speaker 2: about the OWASP top 10 AI security vulnerabilities. Like it's
[24:33] Speaker 2: its own list because there's so many of them, but
[24:38] Speaker 2: it is exactly those kinds of talking points.
[24:40] Speaker 4: Um, So number six on the list then, insecure design.
[24:43] Speaker 4: And this is where I think that it's not as
[24:46] Speaker 4: clear as it used to be. Back when things were like,
[24:49] Speaker 4: don't do cross-exploiting, don't do SQL injection, now the advice
[24:54] Speaker 4: is don't do insecure design. But what should that really mean?
[25:02] Speaker 4: I guess they've included as a reminder that you should
[25:04] Speaker 4: have some kind of design process that includes security, but
[25:12] Speaker 4: I think it's hard to translate that thing into concrete actions.
[25:18] Speaker 4: And when I was looking at things in 8-Minute Core.
[25:21] Speaker 1: This.
[25:21] Speaker 2: Feels like a really poor item on the list because
[25:25] Speaker 2: it's just like, don't be bad.
[25:29] Speaker 4: Yeah.
[25:30] Speaker 1: It's kind of like the general advice. You got to
[25:33] Speaker 1: be careful, right?
[25:35] Speaker 2: Yeah, there you go.
[25:36] Speaker 1: Your kids, when they're online, hey, be careful. What the
[25:39] Speaker 1: hell does that mean? You know?
[25:42] Speaker 4: Exactly.
[25:43] Speaker 1: It just absolves you from guilt or blame.
[25:46] Speaker 4: But then the next one, number seven, is more clear.
[25:48] Speaker 4: Authentication failures. And for ASP.NET Core, I think that is
[25:52] Speaker 4: very much solved. Don't roll your own. I didn't follow
[25:55] Speaker 4: that advice more than 10 years ago when I started
[25:58] Speaker 4: on the smallest SAML 2 open source library.
[26:01] Speaker 2: And.
[26:03] Speaker 4: I've learned so much about authentication since. I've learned so
[26:07] Speaker 4: much about details about XML signature handling, signature wrapping of things.
[26:13] Speaker 4: And I'd say by now.
[26:18] Speaker 4: I'm happy that I created a SAML 2 library, but
[26:21] Speaker 4: it takes so much time to create a high quality
[26:25] Speaker 4: authentication system.
[26:26] Speaker 2: Wow.
[26:26] Speaker 4: So either you are ready to invest in it because
[26:30] Speaker 4: you want to build something that doesn't exist, go ahead
[26:33] Speaker 4: and do it, but be prepared to spend a lot
[26:36] Speaker 4: of time on it. go do something that someone else
[26:40] Speaker 4: spent a lot of time on.
[26:41] Speaker 2: Can we talk about your provider? Why does it need
[26:44] Speaker 2: to exist? Because you've gone through this whole process now.
[26:47] Speaker 2: What's the gap that it's filling? So when it started, it.
[26:53] Speaker 4: Was a project for Swedish Healthcare where they wanted to
[26:57] Speaker 4: use somebody's authentication for an ASP.NET Core application, or not ASP.NET
[27:02] Speaker 4: Core even, ASP.NET application. It was an HTTP module when
[27:06] Speaker 4: it all started. And back then, the general way to
[27:13] Speaker 4: solve SAML 2 authentication for ASP.NET application was to put
[27:16] Speaker 4: a proxy in front of it that would handle the
[27:19] Speaker 4: session and then send HTTP headers with the currently authenticated users.
[27:24] Speaker 4: And I felt that was kind of awkward because then
[27:27] Speaker 4: in the application, we had to create our own session
[27:30] Speaker 4: and we had two sessions. And as soon as you
[27:33] Speaker 4: have two sessions, they might get out of sync.
[27:35] Speaker 2: Yeah.
[27:36] Speaker 4: And that felt awkward.
[27:37] Speaker 1: So.
[27:38] Speaker 4: My first start here was to say that, okay, SAML
[27:41] Speaker 4: is a huge standard and it's complex. So my intention
[27:46] Speaker 4: was to create something that was a decent SAML basic implementation,
[27:50] Speaker 4: but was a good fit with the ASP.NET system. I
[27:53] Speaker 4: wanted to create an HTTP module that worked just like
[27:57] Speaker 4: the WSFET module or something like that. And later on,
[27:59] Speaker 4: it became an OWIN middleware that worked just like the
[28:02] Speaker 4: OpenID Connect module. Middleware, now it's an ASP.NET Core handler
[28:07] Speaker 4: available as well that you call add sample to, just
[28:10] Speaker 4: as you would do add OpenID Connect. And it plugs
[28:14] Speaker 4: into the same authentication system and authentication architecture, which means
[28:19] Speaker 4: it can also be used by other systems that expect
[28:24] Speaker 4: an authentication handler.
[28:25] Speaker 2: That's cool.
[28:26] Speaker 4: So essentially, if your boss says you need to connect
[28:30] Speaker 4: our application to.
[28:32] Speaker 4: A SAML2 IDP, then we have an open source component
[28:36] Speaker 4: for it. If you need to do more advanced things, encryption,
[28:42] Speaker 4: data search, SAML2 federations, we can do that, but let's
[28:48] Speaker 4: drop the news that we are looking into moving the
[28:52] Speaker 4: high-end features to commercial tier. As I said, very few
[28:57] Speaker 4: organizations sign up to commercial support, and somehow we need
[29:04] Speaker 4: to get paid for the time we spend on this.
[29:07] Speaker 2: Sure. And I'm sure you're getting pressure to add some
[29:10] Speaker 2: pretty advanced features as people go down the path too.
[29:13] Speaker 2: So is a good case for making a commercial version.
[29:16] Speaker 4: Especially the more advanced. The library is used by some
[29:22] Speaker 4: fairly large software as a service providers. So I guess
[29:27] Speaker 4: my intention is that if you're at this scale, do
[29:30] Speaker 4: a multi-tenancy thing, You can probably pay a little.
[29:33] Speaker 2: Yeah, you should probably be contributing in some form. Fair enough.
[29:38] Speaker 2: Why don't we take a break?
[29:39] Speaker 1: Okay, yeah. let's do that uh this is a good
[29:41] Speaker 1: time to take a break so we'll be right back
[29:43] Speaker 1: after these very important messages stick around And we're back.
[29:50] Speaker 2: It's On Air Rocks. I'm Richard Campbell. That's Carl Franklin.
[29:52] Speaker 1: Hey.
[29:53] Speaker 2: Here with Anders Abel talking a little bit about, well,
[29:56] Speaker 2: security stuff in general, his SAML 2 service provider, which
[29:59] Speaker 2: he's been doing for many years, and working our way
[30:02] Speaker 2: down the OWASP top 10 lists, especially in the context
[30:05] Speaker 2: of ASP.NET Core. Because there's no authentication failures in ASP.NET Core, right?
[30:12] Speaker 2: That one works perfect.
[30:13] Speaker 1: It never happens.
[30:15] Speaker 4: Well, there are always ways to use things wrong. Even
[30:19] Speaker 4: a good tool can be used wrong. But if you
[30:24] Speaker 4: use the pre-made things, it usually works fairly well.
[30:28] Speaker 1: Yeah.
[30:29] Speaker 2: But like you said, use it correctly.
[30:31] Speaker 1: Yeah.
[30:31] Speaker 4: And that kind of brings us to number eight, software
[30:34] Speaker 4: data integrity failures. It's once more about sensible defaults, et cetera.
[30:40] Speaker 4: And one of my favorites here is that When they
[30:43] Speaker 4: implement a system text JSON, they remove the capability to
[30:48] Speaker 4: deserialize any type. Previously, that was a common vulnerability that
[30:55] Speaker 4: you could, and it's been in various serialization libraries over
[30:59] Speaker 4: the years, that you could send data that serialized a
[31:03] Speaker 4: type that was a system type of some kind, and
[31:07] Speaker 4: that system type would then start Being a statuette is
[31:10] Speaker 4: to start doing things. Right. And that's now disabled by default.
[31:14] Speaker 4: And that's good.
[31:15] Speaker 1: And there have been these attacks that have been deserialization attacks.
[31:19] Speaker 1: And I could never understand them because, you know, when
[31:23] Speaker 1: you serialize an object, it just turns it into a
[31:26] Speaker 1: stream of data. And then when you deserialize it again,
[31:29] Speaker 1: it becomes data. And code is not serialized. But if
[31:33] Speaker 1: you deserialize it to an object that exists already, like
[31:36] Speaker 1: you said, a system object, that does have code. And
[31:39] Speaker 1: if there's an initializer that executes, and if you can
[31:42] Speaker 1: inject into that initializer, boom.
[31:45] Speaker 4: Exactly. So one of my favorite examples is the, in. NET,
[31:48] Speaker 4: there's a temp file collection class, which for some odd
[31:52] Speaker 4: reason is serializable. The temp file collection is a utility
[31:57] Speaker 4: class that allows you to create a bunch of temp files,
[31:59] Speaker 4: and it works really hard to delete those temp files
[32:04] Speaker 4: for you when you're done, which is an excellent property
[32:07] Speaker 4: for a temp file collection. But Carl, imagine if I
[32:10] Speaker 4: serialize my temp file connection and includes a bunch of
[32:14] Speaker 4: important file names in that temp file collection. It's deserialized
[32:17] Speaker 4: on your machine. And once it goes out of scope,
[32:20] Speaker 4: it will go ahead and try very hard to delete
[32:23] Speaker 4: the file names that I selected. So what files do
[32:26] Speaker 4: you have on your machine that you don't want me
[32:28] Speaker 4: to delete?
[32:29] Speaker 1: Oh, HTTP sys for baby. That would be bad. Yeah.
[32:38] Speaker 4: But they've improved it. It makes it harder to use wrong.
[32:41] Speaker 2: Data protection plays a role in there too, right? That's
[32:43] Speaker 2: another great place to have data protection turned on.
[32:46] Speaker 4: It helps if you... Data protection helps a lot. If
[32:49] Speaker 4: you serialize data for temporary storage and then you are
[32:53] Speaker 4: the one reading it back.
[32:54] Speaker 3: Right.
[32:54] Speaker 4: But it doesn't work for the case where I'm going
[32:56] Speaker 4: to send data to someone else.
[32:58] Speaker 1: Right, right.
[32:59] Speaker 4: But data protection is great, for example, for storing temporary
[33:01] Speaker 4: data in a cookie. For storing, if you have a
[33:05] Speaker 4: multi-step wizard, you want to hide previous steps in a
[33:09] Speaker 4: hidden form field.
[33:10] Speaker 2: Excellent use of data protection. And this is just like
[33:12] Speaker 2: signed data. You get packages, represent a security risk if
[33:16] Speaker 2: you don't use signed ones, like that kind of thing
[33:19] Speaker 2: falls into this category. Untrusted code, baby.
[33:22] Speaker 4: Well, I would say that software supply chain, but... I
[33:26] Speaker 4: tend to agree, yeah. The line is somewhat fuzzy here.
[33:29] Speaker 2: Yeah, and looking at the OWASP docs, they're not making
[33:32] Speaker 2: it easy either. No. They do talk about untrusted code
[33:36] Speaker 2: and so forth.
[33:38] Speaker 4: And then we have number nine, security logging and alerting failures,
[33:41] Speaker 4: which essentially is one of those things. hey, set up
[33:45] Speaker 4: your logging.
[33:46] Speaker 2: Yeah, I set up. I turned on everything, man. Now
[33:48] Speaker 2: I have a huge view of stuff I never look at,
[33:50] Speaker 2: so I'm safe.
[33:55] Speaker 1: How big is your log? Oh, yeah, mine's bigger. I'm safer.
[33:58] Speaker 4: Yeah, that's one more thing to consider. What do you
[34:02] Speaker 4: actually log, et cetera? It's hard. But still, I think
[34:07] Speaker 4: we have great tooling support here. OpenTelemetry has been a
[34:12] Speaker 4: tremendous success, and standardized logging and also being able to
[34:21] Speaker 4: follow how a request is handled across a bunch of microservices, etc.
[34:30] Speaker 4: It's really gone through an evolution the last three, four,
[34:34] Speaker 4: five years.
[34:35] Speaker 2: Do you find developers struggle to make good log entries
[34:40] Speaker 2: from within the application? It's one thing to have your
[34:45] Speaker 2: authentication logging and so forth. That's fine because a lot
[34:48] Speaker 2: of that's driven by an external library that knows what
[34:51] Speaker 2: it's doing. It's logging stuff within the app. I think
[34:55] Speaker 2: folks really have a tough time. What do I need
[34:57] Speaker 2: that's important?
[34:58] Speaker 4: Yeah, I was looking at troubleshooting a log today that
[35:05] Speaker 4: for some reason we forgot to enable the cleanup job feature.
[35:11] Speaker 4: when we moved environments. So now the log, this log
[35:15] Speaker 4: was 100 gigabytes, which was not what was expected. And
[35:20] Speaker 4: when we were looking at that, we found out that, yeah,
[35:24] Speaker 4: we might be logging a tad too much details here,
[35:27] Speaker 4: dumping whole objects into the logs. We might have something
[35:30] Speaker 4: to revisit here.
[35:31] Speaker 1: I had that problem early on in. NET Rock's website
[35:36] Speaker 1: in database history. You remember that, Richard? We were logging...
[35:41] Speaker 1: so much stuff that uh that uh it it just
[35:44] Speaker 1: crippled the database and you know finally had to ask
[35:47] Speaker 1: ourselves what are we doing this for you know why
[35:49] Speaker 1: what are we actually looking for here and.
[35:52] Speaker 2: Uh yeah but i guess it's always a question like
[35:54] Speaker 2: what data will help.
[35:55] Speaker 4: You do something useful exactly and right and that's where
[35:59] Speaker 4: i think open telemetry is great because it samples on
[36:03] Speaker 4: successes so If you look at the log that is
[36:06] Speaker 4: handled by an open telemetry-based system, you will have all
[36:10] Speaker 4: the errors, all the transactions that ended up in errors,
[36:14] Speaker 4: but you will just have a sampling, maybe 10% of
[36:17] Speaker 4: the successful events.
[36:18] Speaker 3: Right.
[36:19] Speaker 4: Because you don't need to be able to look at
[36:20] Speaker 4: every successful event.
[36:22] Speaker 1: Right.
[36:22] Speaker 4: You might want to look at a few of them
[36:24] Speaker 4: to compare to the error events. You might want to
[36:27] Speaker 4: look at successful events a bunch of them to check
[36:31] Speaker 4: timings and to analyze performance but you don't need every
[36:35] Speaker 4: single one yeah and that's all built.
[36:37] Speaker 2: In yeah open telemetry just says that for you good.
[36:40] Speaker 4: And then we have number 10 the final one on
[36:42] Speaker 4: the list mishandling of exceptional conditions and the easy answer
[36:47] Speaker 4: here do you remember back in the days now we
[36:49] Speaker 4: are i'm old 20 years back where the The default ASP.NET
[36:55] Speaker 4: error page would show a complete stack trace, all the
[36:58] Speaker 4: internal details.
[36:59] Speaker 2: Yeah, giant yellow bar of doom. Exactly.
[37:04] Speaker 4: And a lot of information for an attacker to get.
[37:07] Speaker 2: Yeah, you scored.
[37:08] Speaker 4: Right.
[37:09] Speaker 1: And if they were smart, they could cause an exception
[37:11] Speaker 1: by sending in some bad data. Well, not just they
[37:14] Speaker 1: were smart, but if the developer was stupid enough to
[37:17] Speaker 1: let that happen.
[37:20] Speaker 4: But this is also an example of security misconfiguration. The
[37:23] Speaker 4: problem back then was that the default was that the
[37:26] Speaker 4: yellow screen was enabled. You had to remember to disable
[37:30] Speaker 4: it before you went to production to create your own screen.
[37:34] Speaker 4: And nowadays, with the default templates in ASP.NET Core, it
[37:39] Speaker 4: adds a similar page, which is restricted to development mode.
[37:44] Speaker 4: And then on the production mode... It shows a very
[37:51] Speaker 4: no-detail error page.
[37:55] Speaker 1: An error has occurred.
[37:56] Speaker 4: Exactly.
[37:57] Speaker 2: Yeah, just a sad dinosaur is all anybody in the
[38:00] Speaker 2: world needs to see, right? That's fine.
[38:04] Speaker 4: But what is important on that error page that is
[38:07] Speaker 4: facing to the users, you have a request ID, which
[38:10] Speaker 4: allows you to go back to your logs in your
[38:12] Speaker 4: OpenTelemetry-based tool to find out exactly what happened. That is
[38:17] Speaker 4: where you want the stack trace. That is where you
[38:19] Speaker 4: want the exception message, etc. To the user, they shouldn't
[38:22] Speaker 4: have those details. Right.
[38:24] Speaker 1: Common sense.
[38:26] Speaker 4: A lot of this feels like common sense, but well, unfortunately,
[38:32] Speaker 4: sometimes when you're pressed, there's a lot of things to do.
[38:37] Speaker 4: Sometimes you don't think of all of this.
[38:39] Speaker 2: Common sense, not that common.
[38:40] Speaker 1: I think we kind of touched on this, but do
[38:43] Speaker 1: you think developers are now, you know, the developers that
[38:46] Speaker 1: are using AI to write code, you think they're using
[38:50] Speaker 1: their AIs to help fortify their code? and find vulnerabilities?
[38:56] Speaker 1: Or is that crazy talk?
[38:57] Speaker 4: I know that there's a lot of people using AI
[39:00] Speaker 4: to find vulnerabilities. I saw a post on LinkedIn recently
[39:05] Speaker 4: by Fredrik Stöck, Swedish security researcher. He said that We
[39:09] Speaker 4: have a lot of LLMs and agents now that can
[39:13] Speaker 4: find vulnerabilities, but where are the agents that can fix
[39:17] Speaker 4: the vulnerabilities? That's the problem right now. We are in
[39:20] Speaker 4: a phase where we find a lot more things than
[39:24] Speaker 4: we can reliably fix automatically.
[39:28] Speaker 2: But yeah, I mean, exploit. and fixing are not that
[39:31] Speaker 2: different from each other, right?
[39:33] Speaker 4: Well, the difference is that to exploit, you need to
[39:36] Speaker 4: find one weakness. Right. To be protected, you need to
[39:40] Speaker 4: find and fix them all.
[39:41] Speaker 1: Right.
[39:42] Speaker 2: At least in that category of problem space, although eventually
[39:45] Speaker 2: you are trying to fix everything. I do feel like
[39:47] Speaker 2: all of our software is getting better right now because
[39:50] Speaker 2: of these tools. The number of fixed flows everywhere is astonishing.
[39:54] Speaker 2: And they were old vulnerabilities. Some of them have been
[39:57] Speaker 2: around for decades. They just never got exploited, never got found,
[40:00] Speaker 2: and now they're being found.
[40:01] Speaker 1: So we're in the uncanny valley of software security right now,
[40:06] Speaker 1: I guess you could say. Somewhere between fixable and fixed.
[40:09] Speaker 2: Well, the one that scares me is what are the
[40:12] Speaker 2: patches that are not being brought forward? Because what it's
[40:15] Speaker 2: going to take to fix it is going to disrupt
[40:17] Speaker 2: workflows enough that a company like Microsoft is just sort
[40:20] Speaker 2: of sitting on this going, all right, how are we
[40:22] Speaker 2: going to do this? You know, this is another UAC
[40:26] Speaker 2: moment or we got to rewrite Entra or something. I just,
[40:29] Speaker 2: I don't know what it is, but I just have
[40:31] Speaker 2: this sense of dread with these hundreds of patches coming through.
[40:35] Speaker 2: It's like, that's all stuff you can fix without having
[40:37] Speaker 2: to tell us, just fix it. There's got to be
[40:40] Speaker 2: fixes sitting out there being needed. It's like, no, this
[40:43] Speaker 2: is a change in the way we do stuff. How
[40:45] Speaker 2: are we going to tell, how are we going to
[40:46] Speaker 2: present this?
[40:47] Speaker 4: I'm not sure anyone would dare to do that or
[40:49] Speaker 4: I hope not. People do not dare to do that. Previously,
[40:53] Speaker 4: you could have a vulnerability and hope that nobody found
[40:56] Speaker 4: about it, and you could sit on it. I think
[41:00] Speaker 4: it is 10 years ago, I found a vulnerability in.
[41:03] Speaker 4: NET Framework and XML signature handling, reported it to MSRC,
[41:08] Speaker 4: heard nothing for three months, and tried to ping people
[41:14] Speaker 4: about it and find out. And it took them more
[41:17] Speaker 4: than six months to deliver a fix. And when they did,
[41:19] Speaker 4: it broke a lot of software.
[41:22] Speaker 3: Oh boy.
[41:23] Speaker 4: And that explained probably why it took so long for
[41:26] Speaker 4: them to fix it. Because the problem was that if
[41:31] Speaker 4: you inserted in an XML document two elements having the
[41:35] Speaker 4: same ID attribute. That is forbidden, but you can still
[41:39] Speaker 4: add it. And the vulnerability is that if you could...
[41:45] Speaker 4: So one of these nodes element was the correct data
[41:49] Speaker 4: payload that was signed, and then you had another element
[41:53] Speaker 4: with the same ID, and you could somehow trick an
[41:56] Speaker 4: application to use that other element. So A classical case
[41:59] Speaker 4: of you check the signature of one piece of data
[42:01] Speaker 4: and then you use another piece of data and incorrectly
[42:04] Speaker 4: assume that you used this assigned data. And there were
[42:09] Speaker 4: obviously so many XML documents out there that had duplicate
[42:13] Speaker 4: IDE attributes and had worked for 15 years in. NET Framework.
[42:18] Speaker 2: Nice.
[42:19] Speaker 4: They had to make a freaking change. Wow.
[42:22] Speaker 1: Unfortunate.
[42:23] Speaker 4: But I think we will see more and more things
[42:27] Speaker 4: coming through... There will be breaking changes.
[42:31] Speaker 2: Yeah, I just have a sense that there's, I don't
[42:33] Speaker 2: mean they're holding it forever, but how you're trying to
[42:37] Speaker 2: get through a code base to collect all the fixes
[42:40] Speaker 2: that need to be there and say, well, how are
[42:42] Speaker 2: we covering all of them if we have to make
[42:43] Speaker 2: this major change? I just can't imagine that every vulnerability
[42:48] Speaker 2: being found by these tools right now is just a
[42:51] Speaker 2: simple patch. It's like, oh, let's just change this code
[42:54] Speaker 2: and we'll be fine. I just feel like sooner or
[42:56] Speaker 2: later we're going to find something architecturally wrong that's going
[43:01] Speaker 2: to mean major changes, major change in behavior.
[43:05] Speaker 4: Or even if it's just a minor change in behavior,
[43:08] Speaker 4: I've learned that the hard way from working with Identity
[43:11] Speaker 4: Server or doing Identity Server is that even a minor
[43:15] Speaker 4: change that is a bug fix, for sure, there's some
[43:19] Speaker 4: reducer somewhere that is dependent on the exact behavior, all
[43:24] Speaker 4: that we think is incorrect. And when you fix it,
[43:27] Speaker 4: you break the functionality for some customers some way.
[43:30] Speaker 2: Yeah.
[43:31] Speaker 1: Fun times.
[43:32] Speaker 2: I don't envy anyone in that situation, but I mean,
[43:35] Speaker 2: I do think it's good news overall that we're making
[43:38] Speaker 2: software higher quality. It's just challenging. Yeah.
[43:42] Speaker 1: I mean, when you, when you sit down to, to
[43:44] Speaker 1: vibe code, you're not thinking, how can I fortify my application? No,
[43:47] Speaker 1: how can I, that's not, that's not the fun part
[43:51] Speaker 1: for developers. It's, you know, seeing, seeing your AI develop
[43:56] Speaker 1: something quickly that would have taken you months. That's the fun.
[44:01] Speaker 1: Just speaking from a pure hedonistic development, that's brainiac here, right?
[44:07] Speaker 4: I mean, Is it only security? Isn't it all the
[44:10] Speaker 4: nifty edge cases that take all the time? I mean,
[44:14] Speaker 4: doing the happy path, sunny day, part of programming has
[44:18] Speaker 4: always been fun and straightforward.
[44:20] Speaker 2: Yeah, the 20% that delivers you 80% of the value.
[44:23] Speaker 2: And now you got to do the 80% for that
[44:25] Speaker 2: last 20. Exactly.
[44:27] Speaker 4: But that's where security lies. That's where the... quality and
[44:32] Speaker 4: handling of exceptional conditions and edge cases lies.
[44:35] Speaker 2: So what is the weak spots in ASP.NET Core? Like
[44:38] Speaker 2: you've kind of run down as, hey, that's built into core.
[44:42] Speaker 2: You don't have to worry about that. But looking at
[44:45] Speaker 2: this 10, I mean, other than like supply chain stuff
[44:48] Speaker 2: comes down to, are you being responsible? There's not something
[44:51] Speaker 2: to be built in for ASP.NET. Is there really a
[44:53] Speaker 2: weakness in. NET Core, ASP.NET Core?
[44:56] Speaker 4: That's a very good question. I would say that Cross-site
[45:01] Speaker 4: request forgery protection for APIs backing from a single-page application.
[45:07] Speaker 4: It's not built in and not easy to do. It
[45:10] Speaker 4: can be easy to do, but it's not a first-class
[45:17] Speaker 4: concept that is built in.
[45:18] Speaker 1: Right.
[45:20] Speaker 4: Actually... For me, this is simple to do. You just
[45:23] Speaker 4: need to add a custom HTTP header that is required
[45:27] Speaker 4: on your API. Because a cross-exquest forgery happens when someone
[45:32] Speaker 4: causes a hidden iframe to post a form somewhere. And
[45:35] Speaker 4: there's no mechanism to make that include a custom header.
[45:39] Speaker 4: So the Duende BFF, for example, has the cross-hatch request
[45:43] Speaker 4: for the custom header called XCSERF with a value of 1.
[45:47] Speaker 4: Fixed value, constant. And it's secure, because there's no way
[45:50] Speaker 4: to set that from the hidden iframe.
[45:52] Speaker 2: So right away you know if a hidden iframe tries
[45:54] Speaker 2: to get up to anything. It's like, that's not us.
[45:56] Speaker 4: Exactly, and then you can block it. But otherwise, I
[46:00] Speaker 4: think one of the problems is that the authentication and
[46:03] Speaker 4: authorization systems are powerful but somewhat hard to use they
[46:07] Speaker 4: are not yeah that each easy to get started with
[46:11] Speaker 4: and use correctly once you use them um i'd say
[46:15] Speaker 4: it's fairly you just kind of tend to use them
[46:18] Speaker 4: correctly because using them incorrectly is even harder but to
[46:23] Speaker 4: use them correctly still take some effort and I've seen
[46:26] Speaker 4: that people tend to do something on their own instead. Hey,
[46:30] Speaker 4: this standard component is a complex to use. Why not
[46:32] Speaker 4: just build something simple ourselves instead?
[46:35] Speaker 2: Yeah, it shouldn't be this hard. Let's just do something simple.
[46:38] Speaker 2: The reason it was hard is because security is hard.
[46:40] Speaker 4: Exactly.
[46:41] Speaker 1: As Patrick Hines likes to say, security is the enemy
[46:45] Speaker 1: of convenience and vice versa.
[46:47] Speaker 4: Absolutely.
[46:48] Speaker 1: If something's really convenient, then it's probably got attack vectors.
[46:53] Speaker 3: Yeah.
[46:54] Speaker 4: And the sweet spot that we try to achieve is,
[46:56] Speaker 4: of course, something that is both convenient to use and
[47:00] Speaker 4: convenient for the developer and secure.
[47:03] Speaker 2: Right. Awesome.
[47:04] Speaker 1: Yeah.
[47:04] Speaker 2: This is a good list, Anders. I appreciate going down
[47:07] Speaker 2: it with you. I feel smarter.
[47:08] Speaker 1: Definitely. And a little more scared. And that's why we laugh. Yeah. Okay. Well, Anders,
[47:16] Speaker 1: is there anything else you want to talk about before
[47:18] Speaker 1: we hang up here?
[47:19] Speaker 4: No, I think it was a great conversation on iOS
[47:22] Speaker 4: top 10. And even though the list has somewhat changed
[47:29] Speaker 4: how it's assembled with these more grouped topics, I still
[47:34] Speaker 4: think it's valuable to keep an eye on. And if
[47:38] Speaker 4: you are new to AppSec or in general, if you
[47:41] Speaker 4: are a web developer, Ovas Top 10 is something that
[47:46] Speaker 4: is the first thing you should learn. These threads to
[47:49] Speaker 4: name them and understand them because it it will save
[47:54] Speaker 4: you in the long run.
[47:55] Speaker 1: Indeed. Anders, thanks very much for joining us today. It's
[47:58] Speaker 1: been a pleasure talking to you.
[47:59] Speaker 4: Thank you for having me.
[48:00] Speaker 2: You bet.
[48:02] Speaker 1: And we'll talk to you next time on. NET Podcasts.
[48:26] Speaker 3: NET Rocks is brought to you by Franklin's Net and
[48:28] Speaker 3: produced by Plop Studios, a full-service audio, video, and post-production
[48:33] Speaker 3: facility located physically in New London, Connecticut, and, of course,
[48:37] Speaker 3: in the cloud, online at pwop.com. Visit our website at dotnetrocks.com
[48:46] Speaker 3: for RSS feeds, downloads, mobile apps, comments, and access to
[48:51] Speaker 3: the full archives going back to show number one, recorded
[48:54] Speaker 3: in September 2002. And make sure you check out our sponsors.
[48:58] Speaker 3: They keep us in business. Now go write some code.
[49:02] Speaker 1: See you next time.
[49:10] Speaker 4: Life is hard.
[49:12] Speaker 1: Pay my taxes with my credit card.

Shows are listed from Apple Podcasts' charts and directory, and Podcast Index where it is used. Every show and episode belongs to its publisher and plays from the publisher's own feed; this site hosts none of them.
