勒索木馬又火了一波,安全問題提上日程,分享乙個一鍵關閉危險埠的預處理檔案,希望對看到的人有些幫助!!
複製下面**,新建乙個txt檔案,將**拷貝進去,將檔案另存為.bat檔案,執行即可
@echo off
color 1f
title 關閉常見的危險埠
echo.
echo.
echo 本批處理用於啟動windows系統的防火牆並關閉常見的危險埠,已在win7、win10上測試成功
echo.
echo.
echo.
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.
echo.
echo.
echo.
echo
echo.
echo.
echo.
echo 感謝你的使用,按任意鍵退出
pause>nul
關閉137,138,139危險埠最簡單的辦法是
137埠 137埠主要用於 netbios name service netbios名稱服務 138埠 都屬於udp埠,它們在區域網中相互傳輸檔案資訊時,就會發生作用。而138埠的主要作用就是提供netbios環境下的計算機名瀏覽功能。138埠它是為共享而開放的,應該禁止別人共享你的機器,所以要把這...
如何關閉危險函式
phpinfo 功能描述 輸出 php 環境資訊以及相關的模組 web 環境等資訊。危險等級 中 passthru 功能描述 允許執行乙個外部程式並回顯輸出,類似於 exec 危險等級 高 exec 功能描述 允許執行乙個外部程式 如 unix shell 或 cmd 命令等 危險等級 高 syst...
windows檢視埠,關閉埠
在windows命令列視窗下 win r 執行 netstat aon findstr 8080 執行結果 tcp 127.0.0.1 80 0.0.0.0 0 listening 2448 埠 8080 被pid 程序號 為2448的程序占用。檢視埠 8080 被哪個應用占用,用埠號查詢,執行下面...