Latest / Blue Security / Windows Defender Firewall
Transcript
- 0:06Welcome to the blue security podcast, a weekly podcast for
- 0:10information security Defenders, where we bring you two sessions
- 0:13on best practices, tools and implementation for Enterprise
- 0:17security. Now here are your hosts for
- 0:19today's show, Andy jaw and Adam Brewer.
- 0:21Welcome to another episode of the blue skirt.
- 0:23A podcast. I'm Andy your host.
- 0:25I'm Adam your co-host this week. We will have a another episode
- 0:29of our Our continuing Windows security Series.
- 0:32Today, we're going to be talking about Windows Firewall.
- 0:35Now, the reason why I wanted to talk about this particular topic
- 0:37is I read a Blog from one of our MVPs and I'll link that in the
- 0:41show notes, and its really good Windows.
- 0:44Firewall is one of those things that is often either
- 0:47misconfigured or forgotten about.
- 0:49And it is a key part of your endpoint and server security.
- 0:52When I read through the blog, I thought to myself this is not
- 0:55something that I've checked often or even maybe ever where I
- 0:59just usually. And on the default firewall
- 1:02that's built in. Maybe you have a third party,
- 1:05maybe you have some archaic gpos that are opening ports on your
- 1:11end points that you may have not looked at or forgotten about.
- 1:14If you join an organization and they have a very, I would say
- 1:17maybe mature or just Legacy active directory instance.
- 1:21So it does behoove you to take a day or so.
- 1:26And take a look at it audit it and make sure now Windows
- 1:29firewall, Wall has been enabled by default for a very long time
- 1:32unless you're using some third-party software that may
- 1:36turn it off and use the third party.
- 1:38But it does help by adding some specific deny rules.
- 1:42I would say of course like you can allow some ports to be open
- 1:46to for specific applications if you needed to.
- 1:49But that's where this audit comes in because maybe you have
- 1:51some application that you used to use long ago.
- 1:54They needed some open port on your endpoints and now you don't
- 1:57and so definitely look through those gpos do.
- 2:00An audit of it. But yeah, I mean, like, you can
- 2:02add specific deny rules. Like, for example, RDP is
- 2:05enabled by default on Windows Firewall.
- 2:08So you can deny our DP or TCP Port, 444, which is used for
- 2:14reverse power shell. You can have a specific deny
- 2:17rule, because when do you actually need a reverse power?
- 2:20She'll probably never on an endpoint maybe on a server.
- 2:24If you're doing some sort of Powershell scripting that you
- 2:27need to do, but you probably don't need to know.
- 2:29Most servers as well. So take a look at those, the
- 2:32blog does have a text file, a Json that you can import to
- 2:38configure a lot of very common firewall rules.
- 2:41If you have gpos, you can import these and at least use that as a
- 2:46security Baseline. We've been doing this Windows
- 2:49security series on and off now, really since the birth of the
- 2:52show. And I think for a lot of these
- 2:53Technologies like credential guard as an example or
- 2:56application guard, they've been technologies.
- 2:59That I'd say a lot. Folks aren't familiar with.
- 3:01In this case, it's kind of the latter in my experience, most
- 3:03orgs do just use Windows Firewall Defender.
- 3:06Firewall built in for their firewall, needs on the end
- 3:08point, but I think now is a good time.
- 3:11Again, New Year Fresh Start kind of looking at things for the
- 3:14very first time to go back and relook at this and give it a
- 3:18fresh viewing. In particular, I have found that
- 3:21so much related to the endpoint is legacy and was implemented a
- 3:25long time ago and nobody even knows why it's implemented that
- 3:28way anymore. And it's It's always a great
- 3:30time to go back and just look at it again.
- 3:33And ask the question of like, if nobody can speak to why we have
- 3:36this firewall rule in place, then throw it out.
- 3:38If you don't know why don't don't be afraid of that change
- 3:41because that's how technical debt builds up.
- 3:44When you don't have anyone to speak to why something in place
- 3:46and you just keep doing it because well, that's the way
- 3:48we've always done it. Like, we all know.
- 3:50That's the worst dancer in the world and yet a lot of it is
- 3:53that way. Well, that's the way we've
- 3:54always done it. So that's why we have that rule
- 3:57in place. Even though nobody can tell me
- 3:58why I think it's Okay, sometimes in in the fight for better
- 4:02security, and you have to have leadership that supportive of
- 4:05this, but to tear stuff like that out, and wait to hear
- 4:07screaming, it's a really effective way of figuring if you
- 4:10need something or not. And if you can have a good roll
- 4:12back plan and you can roll it back really quickly.
- 4:14Then no harm. No foul fix it quick.
- 4:16But that also ensures that you have a good feedback mechanism
- 4:18from your end users, who are, you know, the ones who actually
- 4:21make your company money to your service desk to engineering and
- 4:25that message can flow quickly and efficiently.
- 4:28But this is a great opportunity to do that.
- 4:29That I love that call out because it is definitely one way
- 4:33to get things done quickly. If you remember what happened at
- 4:36Twitter, Elon Musk said they needed to reduce the amount of
- 4:40micro services that they were paying for and they turned off
- 4:4380 percent of them. And one of the microservices
- 4:45happened to be the service that sends out the SMS text, if you
- 4:49had SMS MFA enabled so it didn't disable MFA that people just
- 4:54didn't get the text from the micro service that was supposed
- 4:57to send the text. And so, you know, they had to
- 4:59roll that back. I'm not saying that you do that
- 5:01at your company and I'll turn off 80% of your microservices
- 5:04but it's very effective. If you don't know what something
- 5:07is and just kind of give a heads up, have a good change
- 5:10management process document a rollback plan.
- 5:12So I'm going to turn this off because nobody knows what it
- 5:14does. It's looks archaic, it's unsafe,
- 5:17it is insecure. We're going to take this out and
- 5:20see what happens. And if nothing happens then
- 5:22you're good to go. And then at least have that
- 5:24documented or if somebody yells about it, then you can say, oh
- 5:26this port is for this business critical application.
- 5:29And have that documented going forward, right?
- 5:31Absolutely. And India I know you of all
- 5:33people would not be defending some of the ways things have
- 5:37operated at Twitter since mr. Musk took over.
- 5:39However, I think there are some lessons to learn from their
- 5:42maybe they can be implemented in a more humane way or maybe with
- 5:45a little more thought and consideration put into them.
- 5:48But there are a lot of people sound like a former president,
- 5:51says Leo, A lot of people are saying but to be serious, there
- 5:54were a lot of people on Twitter who were proclaiming that the
- 5:57service was going to fall over dead in.
- 6:00Sore days with some of the massive head count Cuts, they
- 6:02experienced and to be fair, and probably through the heroic
- 6:06efforts of those who are still on staff.
- 6:08The service has not Fallen apart.
- 6:10Now, the moderation can use some work, don't get me wrong but it
- 6:13is a good real-world. Example, of something can be
- 6:16very bloated both from a architectural perspective, as
- 6:19well as maybe from a personal perspective and when you're
- 6:22forced to make really tough decisions, that's when you get
- 6:25to the Crux of the issue, that's when you really determine what's
- 6:29important. Oughtn't.
- 6:30And so not saying like turn off all your firewall rules and wait
- 6:34to hear screaming by again. If like nobody can justify why
- 6:37do we have this port open? Why are why are we doing that?
- 6:40Then it's probably best to close it and then figure out why does
- 6:43it need to be open if it does. And if you determine, oh well,
- 6:46this one business unit with five people in, it uses this Legacy
- 6:50application, guess what? You can deploy a firewall rule,
- 6:52to those five people and document it, and you're good to
- 6:54go. And now you have just secured
- 6:56the organization. And as long as you have
- 6:59leadership support, You have a smooth Communications channel,
- 7:02so that when they start yelling, you hear the yelling that's
- 7:04probably okay in my mind. Now that's easy for me to say no
- 7:07longer working in it, but I did for years and years and
- 7:10sometimes they think we were to risk, averse to change averse,
- 7:14to make meaningful improvements and meaningful changes.
- 7:16And so sometimes just by the nature of not having stuff
- 7:20documented, having people to part with a lot of institutional
- 7:23knowledge, in their brain. There's no way to solve this and
- 7:26carrying it Forward Forever. It's not a great choice.
- 7:29Now, if you You have your firewall rules already and you
- 7:32want to just migrate them from GPO to Modern management because
- 7:36as we've talked about on our show modern management
- 7:39co-management using Azure ad join or in tune to manage your
- 7:44windows devices is the future. There is a Defender, Firewall
- 7:48rule migration tool. So we'll put that link in the
- 7:51show notes for you. You can run the tool on a
- 7:53reference machine and that will pull the current Windows
- 7:56Firewall configuration, and when you run it, it automatically You
- 8:00will have you log into in tune or Azure I should say and you
- 8:04should have an admin who's able to create those rules because
- 8:07the tool will actually create the new in tune policies for you
- 8:11from the collected reference machine.
- 8:13So it's very smooth if you have something.
- 8:15And you've already gone through this exercise, you're like, we
- 8:17have our firewall rules. I did this audit last year?
- 8:20It's good to go. You can run this tool and just
- 8:22migrate all those there. Now, you can also do it through
- 8:24Powershell. If you're a command shell,
- 8:26junkie, you can migrate your existing rules using Netsh or
- 8:31manually deploy them. If you want, if you only have a
- 8:33few and you're like, I don't have time to run anything.
- 8:36You can just add a new firewall rule in the Windows Defender
- 8:39configuration policy in in tune, or the security Center within
- 8:44the Microsoft endpoint manager, firewall, modifications, another
- 8:47thing. So it's great that if you do
- 8:50have rules it's great if you have it enabled.
- 8:52But if as a user I'm able to turn that off then that
- 8:56completely negates the whole reason of why we have a
- 8:58firewall. So You want to make sure that
- 9:01you have a device configuration policy to prevent users from
- 9:06being able to turn off the firewall as well as adding
- 9:10different rules or allow rules, if they somehow download an
- 9:13application and they were like, oh, this needs a firewall
- 9:16modification to work, then adding those at now, with most
- 9:19modern applications, this is probably less of a concern
- 9:23because most applications if they're using network protocol
- 9:27are using 443. So and that usually is Is
- 9:29already open and that's not something that you close off.
- 9:32But if it's some weird application, that is a one-off.
- 9:35Maybe that you might have to. Once you deploy the
- 9:38configuration policy, you can go into the window setting and make
- 9:41sure that little toggle is grayed out so that you can't do
- 9:44it. You should also check the MMC,
- 9:47you know, the old school settings, go in there.
- 9:50Because sometimes, even if the modern settings are grayed out,
- 9:53the old school settings, if you launch the MMC, as an admin,
- 9:57you're still able to turn The firewall from there.
- 10:01So, just doing a double check after your policies deployed,
- 10:04you do also want to make sure that your firewalls turned on
- 10:06for public private and domain Network.
- 10:09I know a lot of organs used to have it turned off for domain
- 10:11networks, but you want to have it turned on for everything
- 10:13because zero trust, right? Even if someone's on your
- 10:17network, you want to make sure that your endpoints are secured
- 10:19and then finally auditing. If you're using In Tune In Tune,
- 10:23has a built-in report to look at any co-managed or in tune
- 10:27managed machine about the firewall status.
- 10:29Yes, of course, you can always pull a report using Powershell,
- 10:33just dump it into a CSV and look at that if that's how you want
- 10:37to do it. But auditing it and making sure
- 10:39that your policies are sticking. Thank you hit.
- 10:41Most of the highlights there. I personally will say one thing
- 10:44I learned today did not know there was a firewall migration
- 10:47tool to In Tune. I knew there was a GPO migration
- 10:50tool. I didn't know there was a
- 10:51firewall one. That's awesome.
- 10:52And I got on my soapbox last show and encourage people to
- 10:56continue to look at co-management and conditional
- 10:58access for their device. Is but also said, you know, he
- 11:02still move forward on that modern management piece as well.
- 11:04Maybe, in a parallel track. This is a way where you can
- 11:08continue to move things into in tune, so that you don't even
- 11:11need configuration manager on some devices.
- 11:13Maybe you have a lighter use case, we're in tune management
- 11:16is all you need. Well, if you want to make sure
- 11:18your firewall rules are there, here you go.
- 11:20And again, I talked about those inflection points that make you
- 11:23sit up and say, hey, let's take another look at this.
- 11:25Let's make sure this still reflects our current needs, this
- 11:29is great. Time to do that as well.
- 11:30We said the same thing about gpos with the GPO migration
- 11:33tool, you're going to have GPS on there and I think it was chin
- 11:35and Fritz when he was on our show.
- 11:36Talked about, you know, it'll come back and be like yeah I
- 11:38couldn't move these 20 gpos and you'll go look in.
- 11:41They'll be like ie5 ie6 gpos that are no longer needed or
- 11:45supported and that's not a big deal.
- 11:47So again you know, great opportunity to look at it and I
- 11:50loved your call out as well, firewall should be turned on in
- 11:52all scenarios to not turn it on just because you're on the
- 11:55corporate Network, it's not trusted, it should not be
- 11:57trusted is no more inherently secure than Their Network.
- 12:00So you know, don't do that trust?
- 12:03No one trust, no network, very good.
- 12:05And that's our show for this week.
- 12:07Thanks for listening and watching.
- 12:09As always, our contact information will be in the show
- 12:11notes. If you have any questions or
- 12:13suggestions for future topics, thanks will talk to you guys
- 12:15next week. Thank you for listening to the
- 12:17blue security podcast. Please check out the show notes.
- 12:20Catch up on episodes, you may have missed and subscribe so you
- 12:23don't miss any future episodes. Find Andy, on Twitter at age 0,
- 12:270, and Adam at AJ Brewer. Our, see you at our next
- 12:31episode.