- N +

一键封堵NAS永恒之蓝漏洞BAT

原标题:一键封堵NAS永恒之蓝漏洞BAT

导读:

最近这病毒好像非常的嚣张啊.比特币怪不得这么涨得快!!!本BAT屏蔽的端口有:135,137,138,139,445同路由器封是同理.将以下代码复制后保存为*.BAT运行即可,...

最近这病毒好像非常的嚣张啊.比特币怪不得这么涨得快!!!

1.jpg

本BAT屏蔽的端口有:135,137,138,139,445

同路由器封是同理.

将以下代码复制后保存为*.BAT运行即可,WIN10得以管理员身份运行!

@echo off 
color 1f 
title 关闭常见的有害端口  爱免费吧 www.imf8.cn
echo. 
echo. 
echo 本批处理用于启动windows系统的防火墙并关闭常见的危险端口,已在Win7、Win10上测试成功 
echo. 
echo 在进行下一步前请先关闭所有杀毒软件(360、腾讯管家、金山毒霸等)以免设置失败
echo. 
echo 请向朋友们推荐我们的网站 爱免费吧 www.imf8.cn
echo. 
echo. 
pause 
cls 
echo 正在启动防火墙 请稍候… 
sc config MpsSvc start= auto > nul 
net start MpsSvc > nul 
netsh advfirewall set allprofiles state on > nul 
echo 防火墙已经成功启动 
echo. 
echo 正在关闭常见的危险端口 请稍候… 
echo. 
echo 正在关闭135端口 请稍候… 
netsh advfirewall firewall add rule name="band 135" protocol=TCP dir=in localport=135 action=block > nul
netsh advfirewall firewall add rule name="band 135" protocol=TCP dir=out localport=135 action=block > nul
netsh advfirewall firewall add rule name="band 135" protocol=UDP dir=in localport=135 action=block > nul
netsh advfirewall firewall add rule name="band 135" protocol=UDP dir=out localport=135 action=block > nul
echo 正在关闭137端口 请稍候… 
netsh advfirewall firewall add rule name="band 137" protocol=TCP dir=in localport=137 action=block > nul 
netsh advfirewall firewall add rule name="band 137" protocol=TCP dir=out localport=137 action=block > nul
netsh advfirewall firewall add rule name="band 135" protocol=UDP dir=in localport=137 action=block > nul
netsh advfirewall firewall add rule name="band 135" protocol=UDP dir=out localport=137 action=block > nul
echo 正在关闭138端口 请稍候… 
netsh advfirewall firewall add rule name="band 138" protocol=TCP dir=in localport=138 action=block > nul
netsh advfirewall firewall add rule name="band 138" protocol=TCP dir=out localport=138 action=block > nul
netsh advfirewall firewall add rule name="band 138" protocol=UDP dir=in localport=138 action=block > nul
netsh advfirewall firewall add rule name="band 138" protocol=UDP dir=out localport=138 action=block > nul
echo 正在关闭139端口 请稍候… 
netsh advfirewall firewall add rule name="band 139" protocol=TCP dir=in localport=139 action=block > nul
netsh advfirewall firewall add rule name="band 139" protocol=TCP dir=out localport=139 action=block > nul
netsh advfirewall firewall add rule name="band 139" protocol=UDP dir=in localport=139 action=block > nul
netsh advfirewall firewall add rule name="band 139" protocol=UDP dir=out localport=139 action=block > nul
echo 正在关闭445端口 请稍候… 
netsh advfirewall firewall add rule name="band 445" protocol=TCP dir=in localport=445 action=block > nul
netsh advfirewall firewall add rule name="band 445" protocol=TCP dir=out localport=445 action=block > nul
netsh advfirewall firewall add rule name="band 445" protocol=UDP dir=in localport=445 action=block > nul
netsh advfirewall firewall add rule name="band 445" protocol=UDP dir=out localport=445 action=block > nul
cls 
echo. 
echo. 
echo. 
echo 常见的危险端口已经关闭,免疫局域网内其他电脑攻击,请关注我们的网站
echo 爱免费吧 www.imf8.cn
echo. 
echo. 
echo. 
echo 
echo. 
echo. 
echo. 
echo 感谢你的使用,按任意键退出 
pause>nul

不会使用的下载下面的已保存文件也可以达到同样的目的!

有好的文章希望我们帮助分享和推广,猛戳这里我要投稿

返回列表
上一篇:
下一篇:

发表评论中国互联网举报中心

快捷回复:

    评论列表 (暂无评论,共1411人参与)参与讨论

    还没有评论,来说两句吧...