Тёмный

How to use Windows Firewall to block Hackers and Malware 

The PC Security Channel
Подписаться 514 тыс.
Просмотров 116 тыс.
50% 1

Using intelligent automation in this Windows Firewall tutorial you can block hackers and malware ips using community blocklists.
Live workshop event on Discord: discord.gg/XyM5SJqZ?event=111...
Get Crowdsec Open Source IDS (sponsor): www.crowdsec.net/?mtm_campaig...
Buy the best antivirus: thepcsecuritychannel.com/best...
Join the discussion on Discord: discord.tpsc.tech/
Get your business endpoints tested by us: tpsc.tech/
Contact us for business: thepcsecuritychannel.com/contact

Наука

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 227   
@pcsecuritychannel
@pcsecuritychannel Год назад
We will have a live discord workshop and hangout to discuss some of the concepts in this video, building a malware lab etc. Make sure you sign up in the events section of our discord if you'd like to attend next week: discord.com/invite/XyM5SJqZ?event=1112466823535919194
@fiverZ
@fiverZ Год назад
But why Discord? From a security standpoint, Discord is a big yikes. Any other ways to take part?
@Zach-Hyde
@Zach-Hyde Год назад
@@fiverZ Why is Discord a big yikes?
@fiverZ
@fiverZ Год назад
@@Zach-Hyde Excessive data collection, blatant GDPR violations, proprietary, shady af CEO, very easy to abuse the reporting system... There's a few reasons to avoid it.
@Zach-Hyde
@Zach-Hyde Год назад
@@fiverZ yikes
Год назад
Is there a way to do this on a router level? Or wouldn't that help at all,
@SonicFan535
@SonicFan535 Год назад
Just so you know, the example script you showed could potentially have a huge vulnerability, because if the server hosting that file with the IPs ever gets compromised, an attacker could basically inject whatever Powershell command they want in place of the "ip" that you're appending to the command string, and just like that they can perform arbitrary remote code execution on your PC.
@gamewarrior9107
@gamewarrior9107 Год назад
so should i do this or no
@rosiepone
@rosiepone Год назад
it would be a good idea to just make a weekly reminder to manually download the file from a legitimate site rather than automatically downloading it every day
@sanjaykrishnaob
@sanjaykrishnaob Год назад
If anything like that does happen Your antivirus product will kick in to block those threats or block RCE using its behavioral component. If the antivirus is from reputable company ofc.....
@tiagoferreira086
@tiagoferreira086 Год назад
A simple more or less effective solution, would be accept only numeric values, and maybe apply some kind of pattern detection to check if it is in an ip valid format.
@CesarAugustoRL
@CesarAugustoRL Год назад
Good catch!
@CesarAugustoRL
@CesarAugustoRL Год назад
Great video, just ensure that the list has IP numbers in the correct format, so to avoid code injection.
@-blackcat-4749
@-blackcat-4749 11 месяцев назад
This is 📅 a bland exploit. Nothing to note
@biohuk
@biohuk 5 месяцев назад
​@@-blackcat-4749but where to put it exacly?
@EnejJohhem
@EnejJohhem Год назад
Imagine blocking Microsoft using Windows Firewall
@404_sorry-am-not-found
@404_sorry-am-not-found Год назад
Imagine blocking system using the Firewall :D
@noanyobiseniss7462
@noanyobiseniss7462 Год назад
Thats what the hosts file is for. :)
@404_sorry-am-not-found
@404_sorry-am-not-found Год назад
guess what’s my IP
@ollicron7397
@ollicron7397 Год назад
I would do that 😂
@404_sorry-am-not-found
@404_sorry-am-not-found Год назад
@@ollicron7397 then tell me
@yddkvnxo
@yddkvnxo 10 месяцев назад
awesome vid dude thank you! im getting into cyber security, doing a course so i can get my foot through the door an stuff like this is so helpful on my journey. The reason i decided to get into cyber sec is because I was playing a game one night and some dude got mad an hit me offline, i couldnt play for a whole day almost. With zero knowledge on how to combat that I was like yeah I wanna learn this stuff an so here I am. Thanks again! I look forward to learning more stuff from your vids! cheers!
@Martin-ot7xj
@Martin-ot7xj Год назад
Hi there, it was one of the best tutorial videos you made and shared with us. kindly upload more like this content regarding the block Vulnerable IP to protect more on Windows and router. thnx
@mettbonbon2186
@mettbonbon2186 11 месяцев назад
Thanks for the cool guide! I did the same thing but with powershell and it makes one rule for inbound and one for outbound. It works great and downloads the list for me as well.
@bleakyfinder2692
@bleakyfinder2692 Год назад
Leo, you are talking to normal people here. Unless you show us all step by step from a blank start,this is very good content for tech heads, clear to me and maybe most as Mud.
@rainzerdesu
@rainzerdesu Год назад
I think he makes some assumptions since I think a "normal" person, as it were, wouldn't be actively watching a PC security channel. If it were a safe assumption to believe the average person would, it wouldn't repeatedly show most common passwords being like 123456
@CubensisEnjoyer
@CubensisEnjoyer Год назад
I mean this is pretty much step by step...I would say this is about as beginner-friendly as this topic gets.
@walid6329
@walid6329 Год назад
get friendly without everything he mentioned, pause the videos from time to time you'll get it, it's beginner friendly
@filipskater
@filipskater Год назад
Are you 12?
@googleinc6033
@googleinc6033 Год назад
ask chat gpt
@brianhenry4662
@brianhenry4662 Год назад
Very informative video. I actually started building a small tool to check for blacklisted IPs using the same resource.
@Rareparrot
@Rareparrot Год назад
Thanks for the video - I went down a slightly different path. Firstly - I wasn't sure when you said "delete all the rules every day" you meant the default ones windows already had, so that wasn't clear at all. If you were deleting your firewall rules everyday, a good script would include a command line to backup the firewall rules that are already there before deletion. Not all of us are gurus so a safe backup practise is very healthy :) Also, secondly, I go back a bit :) am over 50 (used the text based early internet) and remember using a program called peerblock. Love it or hate it, it is still to my surprise available to download. It's also portable. I don't recommend anyone use it BUT it does give the option of leaving the firewall (and settings untouched). By me using this program ( a proof of concept too) it was able to suck up the complete block list :) For it to work it needs to run all the time. Back in the day it was popular but then unpopular probably because someone worked out how to bypass it........... Still really appreciate these videos and learned about the abuse list from it, Thanks so much......!
@basroos_snafu
@basroos_snafu Год назад
I would love to have a list of malicious Microsoft IP's that were updated daily and implemented the way you demonstrated... What I have done manually is blocking the Windows Search executable, it works well, although it delays the local search function a bit. Thanks for this interesting video!
@anwarulbashirshuaib5673
@anwarulbashirshuaib5673 Год назад
@TPSC Just to stay safe, when parsing those IP addresses, you can create a regex pattern that would match only IP addresses and nothing else. That would make the process of injecting remote code much more difficult.
@JakubVacek42
@JakubVacek42 Год назад
Exactly what I was thinking. I'd also log rejected entries so I'd know if the source cannot be trusted.
@jibberjabber6919
@jibberjabber6919 Год назад
Added these blocklists on my router. Thanks.
@fr34k09
@fr34k09 Год назад
ended up using openai to fix whatever happened with the text extracted from the screenshot that I tooked and it works, thx 👍
@BeamngPerimeters
@BeamngPerimeters Год назад
when i click on a recent video on your channel my cat jumps onto my lap and watches the whole thing with me
@3isr3g3n
@3isr3g3n Год назад
Network security cat, nice!
@therealhussein
@therealhussein Год назад
well intelligent and informed cat
@NO-END
@NO-END Год назад
Good video Leo I knew about this already i have Bitdefender but if you are on a budget or you love windows Firewall this is a good thing to do. I would set the rules manually though.
@chadolive1
@chadolive1 Месяц назад
Dude awesome video I am a fast learner, love learning new stuff would love to do everything u did in this tutorial foresure just reinstalled windows 11, and realizing how powerful you can make Defender is very cool, save cash too. Would love to learn more alot more on security basic to corporate, and to learn how to see things always from other views. If you have had time to read this or can think of anything I could jump to other links I would appreciate that, as well as becoming part of the community cheers for now.
@Mr420
@Mr420 7 месяцев назад
Thanks took some trys never coded much before
@walid6329
@walid6329 Год назад
awesome one mate✔️😛
@Rekit0
@Rekit0 Год назад
In addition, you can make this more automated by adding a task to task scheduler to run this script every day using pythonw, so you don't get the terminal popup while using your computer.
@pcsecuritychannel
@pcsecuritychannel Год назад
Yes, I forgot to add that part, that is how you automate the process daily.
Год назад
Thanks for pointing this out. I noticed the missing piece of running that script wachting this video. 👍
@ireallyreallyreallylikethisimg
isnt the list going to end up being multiple gb's in size though?
@RetrospillBlogspotNO
@RetrospillBlogspotNO Год назад
@@ireallyreallyreallylikethisimg The list in his example is tiny - ~2kb, so no.. He deletes everything already blocked, and then adds everything from the most recent list.. You could probably find a lot bigger ip lists online - but never multiple gb's.. If that's the case you'd better off whitelisting the IPs you trust :)
@pepeshopping
@pepeshopping Год назад
The proper way to do it is at the firewall/router level! A proper malware that came through phishing would have no problem disabling the windows firewall completely.
@1superheld
@1superheld Год назад
Wouldn't it be better to use 1 rule with multiple ips? But otherwise nice learning!
@pcsecuritychannel
@pcsecuritychannel Год назад
Yes. I thought about that but this was just the simplest way I could find to implement it. If you can make a more efficient version that works I’m happy to pin it.
@1superheld
@1superheld Год назад
@@pcsecuritychannel Left a new comment with a PoC in Powershell :)
@nenume00
@nenume00 Год назад
@@1superheld where is it ?
@tokhyanwaruddin2631
@tokhyanwaruddin2631 Год назад
Hi, Thanks for the to the point video. I do have one comment, in my opinion it would be more clean to have one "BadIP" rule with all the IP address in it instead of having 100+ firewall rules. can you also show how to do that with the python script?
@priyojitdeb1891
@priyojitdeb1891 3 месяца назад
nice and informative, thanks!
@nicolascivitelli3859
@nicolascivitelli3859 Год назад
Muchas gracias por el video, muy buena idea.
@erwinancer6138
@erwinancer6138 Год назад
Fantastic thank you
@csparty11
@csparty11 Год назад
You could do this on every host but i think it would be way smarter to do this on a central router/firewall solution like pfsense/opnsense or a commercial solution.
@daLiraX
@daLiraX Год назад
Not sure how the performance is affacted by the Windows Firewall itself. But if it behaves like the hosts file it... will be pretty much unusable after a certain point, since it will become somewhat unresponsive for minutes. But still an interesting idea, it's still somehow sad that we lack a simple solution to basically have a pihole in your PC itself (since those are hard to get still and became pricey aswell).
@sir.keyboardwarrior5357
@sir.keyboardwarrior5357 Год назад
Great stuff. I used your script but it wasn’t adding in the rules. With help of ChatGpt, I managed to make few changes and it is running perfectly in my Windows 11 22H2 version. Thank you 🙏
@vanessamoises8090
@vanessamoises8090 Год назад
Hi, may i know how did you make it work? I also used the script but i cannot run it.
@sir.keyboardwarrior5357
@sir.keyboardwarrior5357 Год назад
sure, It was just some tweaks here and there. How do I share you the code?
@sir.keyboardwarrior5357
@sir.keyboardwarrior5357 Год назад
@@vanessamoises8090 sure, It was just some tweaks here and there. How do I share you the code?
@empatikokumalar8202
@empatikokumalar8202 Год назад
Can we apply this method to the programs that we use but are constantly controlled? For example, we use program A without a license. to its own company so that it does not hinder its use. Does it prevent you from sending information?
@guilherme5094
@guilherme5094 Год назад
Really nice.
@0x-003
@0x-003 Год назад
do you have a video on how you setup these testing machines? i want to learn how to setup mine so I can test programs etc
@Chewbacca55
@Chewbacca55 Год назад
Can you not just add all IPs to one rule insteald of creating a single rule for each IP? Would be faster, right?
@verynice5258
@verynice5258 Год назад
Thank you
@Wexutar
@Wexutar Год назад
It would be nice to make the script available to download for those who are not into programming and scripting. Please
@Schnitzer325ci
@Schnitzer325ci Год назад
Is 365 referencing this site already? Or do we have to add IOC list and if so, how do we keep that updated without a CSV pull via PS
@ianmusicstein
@ianmusicstein Год назад
When I get pop ups to allow a game to use the firewall I decline it and the game still works. I checked the firewall rules and in some cases windows just allowed it anyway, in other it is not selected as allowed, but still works anyway.
@salafzoon
@salafzoon Год назад
Thank you for your informative video, was wondering where I can get your script please?
@souviksamanta8938
@souviksamanta8938 Год назад
if I wish to add the link from this file then how to do without automation ?
@Zetsua
@Zetsua Год назад
Yo! Can you do a video on the virus that was in Minecraft mods recently? Would like to know more about it and see what all it does. I thankfully wasn't infected but perhaps you can see what all the virus touches and messes with.
@SonOfJoy
@SonOfJoy Год назад
Hey TPSC , What is the way that I can get a copy of that script that you wrote to have all of those Bad IP's blocked by Windows Firewall?
@Scubad1975
@Scubad1975 7 месяцев назад
Hello love videos question what's the best firewall I use Windows Firewall and Antimalware bytes also what would you recommend for security
@gearfriedtheswmas
@gearfriedtheswmas Год назад
I just use Simplewall and block everything I don't need or what I don't understand why it wants to connect.
@saviorvx1883
@saviorvx1883 Год назад
i reinstall windows every other day, and i tend to export my setting and then convert it to a script be it app settings, registry tweaks etc to a .bat or .cmd i wanted to know if the ips can be added onto one entry instead of having 1000s firewall entrys to keep it organised yknow...well ill be trying to configure it thank you
@marksvirsky9103
@marksvirsky9103 Год назад
Great content as always. Next phase: How to block windows spyware using windows defender
@dhuantegg
@dhuantegg Год назад
Nice video dude, but I’m getting in doubt. Recently I decided to replace the Windows Defender to Bitdefender Antivirus Free version + comodo firewall and I’ve noticed gains over performance. Here’s my question should I use my actual combo with this tool? or I’m safe with Bitdefender + comodo? (i know that my pc can be susceptible to attacks or any kind of virus) I hope someone can guide me
@piffdaddy420
@piffdaddy420 Год назад
where can i find this script? and does comodo firewall automatically block the bad ips with their updates?
@FurryNonsense
@FurryNonsense Год назад
Please do another top anti-virus tier list video
@aavvaallooss2
@aavvaallooss2 Год назад
I use Skynet Firewall available for Asus routers with Merlin firmware
@chris122380
@chris122380 Год назад
Why not block these IP addresses using the host file that way they never come in to begin with where is the firewall still a better idea because it can block both directions? Will this slow down the firewall? How can we get a copy of this script? I don't see a link for it in the description.
@CUBEOFSIX
@CUBEOFSIX Год назад
Could you make a video on how you would setup a fresh install of Windows 11?
@jackfishthe6th373
@jackfishthe6th373 Год назад
Keep in mind that if you create a lot of rules in Windows Defender it will unfortunately slow down your internet speeds. (This comment was made in error, read further comments below)
@pcsecuritychannel
@pcsecuritychannel Год назад
I have seen no evidence of that. Have you tested that? How did you measure it.
@jackfishthe6th373
@jackfishthe6th373 Год назад
@@pcsecuritychannel Good thing you asked because I forgot I made this comment. I unfortunately made the confusion of this blocking method that you discussed with a different method of editing the Hosts file on a Windows 10 OS. My previous comment was actually in regards to the method of editing the Windows Hosts file. If you want more explanation on the Hosts file method and how I tested that let me know. Sorry for the mistake. 👍
@alitwiratama3939
@alitwiratama3939 Год назад
This video is great from beginner to protect PC from hacker and malware, but I create program same as you but I really got error in my program, the error code is: IndexError: list index out of range in code: ip = row[1]. How to fix this error? Thank you.
@privatechannel1272
@privatechannel1272 Год назад
Now what about what is the best free firewall? Is Comodo firewall good, I have that along side with my antivirus. (And I also have Crowdsec)
@fbifido2
@fbifido2 Год назад
can your script subnet them to make the list smaller ??
@AhatiMaat
@AhatiMaat Год назад
Is Malwarebytes good compare to what you showed on your video.
@moss8448
@moss8448 Год назад
Does not Malwarebytes Premium do this sort of thing? I have it and it constantly blocks sites.
@lenarnie2973
@lenarnie2973 Год назад
Need some soft to automate process, everyday download file and update list in firewall, but nice thing, i like it
@sam.walker_dc
@sam.walker_dc Год назад
Love your videos! Keep up the awesome work!
@AnthoJoh
@AnthoJoh Год назад
By adding all those rules, will that slow down a pc or internet browsing?
@anwarulbashirshuaib5673
@anwarulbashirshuaib5673 Год назад
yes I was also thinking the same
@grapefruitinstrument1394
@grapefruitinstrument1394 Год назад
Couldn't you use something like peerblock and add this list?
@ngbs75
@ngbs75 Год назад
how can i run the python script by pulling in a admin command prompt screen
@Zachsnotboard
@Zachsnotboard 5 месяцев назад
so do these rules expire ? Or the IP is blocked indefinitely, because that seems like it could cause some issues as those IPs may be used for legitimate services in the future
@prodbyd1972
@prodbyd1972 Год назад
Could you do that with a batch file ?
@walkabout16
@walkabout16 Год назад
How is this different from a Host file?
@acolis89
@acolis89 Год назад
If using a pi-hole, will be this redundant?
@HimanshuSharmazzzz
@HimanshuSharmazzzz Год назад
I believe I can simply use the mentioned blocklist with my Pihole ?
@Carfreak226
@Carfreak226 Год назад
Would like to have this script. Please and thank you. Also, will this script work in PiHole on a network wide basis?
@Henk717
@Henk717 Год назад
I made a very similar script for the Half-Life 2 Deathmatch community since there is a malicious server that spams the server list with fake redirection servers.
@d1m18
@d1m18 11 месяцев назад
Does that Python script clear the old rules and start over?
@timetriad6199
@timetriad6199 Год назад
Is this available for home routers, like ASUS, Netgear, etc?
@666KoXz666
@666KoXz666 Год назад
where to download script?
@mohammedodeh7601
@mohammedodeh7601 Год назад
Would an anti-virus like Bit Defender already have those IPs black listed?
@penultimatename6677
@penultimatename6677 Год назад
I suspect the answer is yes and likely better than Windows virus protection
@synthlord6575
@synthlord6575 Год назад
I'm sure if I tried scripting that in Powershell, I would get errors for every line..
@murphybrown32216
@murphybrown32216 Год назад
where is the file to download
@ospy_edits
@ospy_edits 11 месяцев назад
Hey man can you make a vedio of how to make a constantly swapping or bouncing ip I really need it
@nayeemx11
@nayeemx11 10 месяцев назад
that great, can please give another video for getting all adult websites list, with blocking them. Also automate this on windows startup.
@Harb000
@Harb000 Год назад
Comodo Firewall vs Windows Firewall which is better?
@Abaddis-en2sr
@Abaddis-en2sr Год назад
Very good channel and my question is illegal apps in Play store installing my phone how much dangerous
@study3954
@study3954 10 месяцев назад
Can I set this on inbound as well?
@franciscohorna5542
@franciscohorna5542 Год назад
i dont use that i use norton smart firewall that comes with norton 360 delux plus for up to 5 devices
@aminsec
@aminsec Год назад
where i can copy the python script ?
@mik3lang3lo
@mik3lang3lo Год назад
Newbie question, but can a bad ip become a good ip? You know, a year has passed, the person or malware that used that ip no longer exists and the number is allocated to something else.
@alevolt1596
@alevolt1596 Год назад
Pubblic Ip addresses are assigned by IANA (Internet Assigned Numbers Authority), then National organizations distribute them to Internet Service Providers and they administrate them. The choice to blacklist an ip is made by the ISP, if the ip address isn't use for malicius activity the ip is no long blacklisted
@kingofrandom4060
@kingofrandom4060 Год назад
can you make a video for safing port master program
@nextworks3257
@nextworks3257 Год назад
nice video, i do already a .bat for do the same thing but when i enable the firewall my connection interrupt :/
@nextworks3257
@nextworks3257 Год назад
nothing i fixed, thanks for the proof of concept
@gearfriedtheswmas
@gearfriedtheswmas Год назад
Will it be possible to use the firewall as an ad blocker?
@Leonard_MT
@Leonard_MT Год назад
Yes, that is somewhat possible.
@rocha1001
@rocha1001 Год назад
how i can dowload the script? very useful thx for the work.
@ovarb12
@ovarb12 7 месяцев назад
Where can i get the script and what do i edit it with?
@ChaunceyGardener
@ChaunceyGardener Год назад
I just let Sordum's freeware Firewall App Blocker in whitelist mode and never have to deal with Windows Defender GUI itself. You can just add EXEs, processes and even folders into the window and voilá. Firewall configured in 5 seconds.
@Hex_Tv
@Hex_Tv 3 месяца назад
I can’t put my script in the command prompt
@SametKaratas-jm5zg
@SametKaratas-jm5zg 2 месяца назад
I use router Parental Controls feature to block malware and adult IP
@big_floppa
@big_floppa Год назад
Why not just use Simplewall?
@arsims1
@arsims1 Год назад
I recommend: Loaris Trojan Remover, Malwarebytes, and any Endpoint security.
@fifteen8
@fifteen8 5 месяцев назад
Wait, what? 7:58 "As far as I'm aware I've never really seen Windows firewall block the malware IPs I test with." Can you clarify? I used to manually set a lot of Windows firewall rules, and they did work. I also set rules to deny any application that wasn't whitelisted. It just got too cumbersome.
@vasstselepidis231
@vasstselepidis231 Год назад
i am trying to make this script run and i get an error on line 9 as the following SyntaxError: '(' was never closed i have typed mycsv = csv.reader(filter(lambda x: not x.startswith(#), response.splitlines())) what have i written wrong ? help me out
@biohuk
@biohuk 5 месяцев назад
​@@CoolIcingcake3467how I can add statememt pattern inside the loop against the regex pattern that conforms to IP format? And how I add IP's to the rule if(ip)!=("dst_ip"): print("Added Rule to block",ip) rule="netsh advfirewall firewall add rule name='BadIP' Dir=Out Action=Block RemoteIP="+ip subprocess.run(["Powershell", "-Command", rule])
@biohuk
@biohuk 5 месяцев назад
How to add IP's to the rule but not rules
@XGaMePLaYeR1994x
@XGaMePLaYeR1994x Год назад
Can we use a pihole to block all these ip adressed ?
@jetenk
@jetenk Год назад
i think u can import list but dont remember since i'm using diversion & skynet now ^^
@andreracicot4881
@andreracicot4881 Год назад
Hello if you whant a better defender software go to peer to peer blocker. You make your firewalls. Tanks.
@Vyr-kj1cr
@Vyr-kj1cr Год назад
Portmaster for the win
@JapaneseMonke
@JapaneseMonke Год назад
What is this program in 6:39? how do i do this code?
@jetenk
@jetenk Год назад
Visual Studio
@helderalmeida2790
@helderalmeida2790 Год назад
Won't your PC overheat the CPU?
Далее
The Malware that hacked Linus Tech Tips
10:13
Просмотров 1,5 млн
Use Windows Firewall To Stop Microsoft Spying On You
9:36
"Tech that let me down" Special 3
10:57
Просмотров 281 тыс.
Comodo Firewall vs Malware Stealers
5:54
Просмотров 933
The Anti-Virus Tier List
9:38
Просмотров 1 млн
The Best Free Windows Firewall | Portmaster Guide
12:55
Windows Defender vs Top 100 Malware Sites
10:15
Просмотров 662 тыс.
Is your PC hacked? RAM Forensics with Volatility
14:29
Просмотров 903 тыс.
40 Windows Commands you NEED to know (in 10 Minutes)
10:54
How to not get hacked: real example
13:55
Просмотров 393 тыс.
Hacking Windows TrustedInstaller (GOD MODE)
31:07
Просмотров 398 тыс.
ЗАБЫТЫЙ IPHONE 😳
0:31
Просмотров 20 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 6 млн