關閉不安全埠的腳步

技術小胖子發表於2017-11-08

最近發現公司員工都是使用的是360、金山、nod32等防毒軟體,只是執行在電腦上,沒有詳細的除錯,我這樣做除了能解決一下明顯的病毒外,其他的加殼的病毒基本防禦不了,所以我就簡單的弄了個指令碼,參照網路的一下指令碼知識,弄了個關閉不安全埠,希望多大家有用!

    @echo off

    title 關閉常見的危險埠

    echo.

    echo 本批處理用於啟動XP系統的防火牆並關閉常見的危險埠

    echo.

    echo 請確認您正在使用的是XP系統 並且未安裝其他防火牆

    echo.

    echo 以避免與XP系統的防火牆發生衝突

    echo.

     pause



    echo 正在啟動防火牆 請稍候…

    netsh firewall set opmode mode=enable

    echo 防火牆已經成功啟動

    echo.

    echo 正在關閉常見的危險埠 請稍候…

    echo.

    echo 正在關閉135埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 135 name = 135 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉137埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 137 name = 137 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉138埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 138 name = 138 mode = DISABLE scope = ALL profile = ALL

   

    echo 正在關閉139埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 139 name = 139 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉161埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 161 name = 161 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉445埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉593埠 請稍候…

    netsh firewall set portopening protocol = TCP port = 593 name = 593 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉1025埠 請稍候…

    netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉2745埠 請稍候…

    netsh firewall set portopening protocol = TCP port = 2745 name = 2745 mode = DISABLE scope = ALL profile = ALL

    echo 正在關閉3127埠 請稍候…

    netsh firewall set portopening protocol = TCP port = 3127 name = 3127 mode = DISABLE scope = ALL profile = ALL

  

    echo 正在關閉3389埠 請稍候…

    netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL

   

    echo 正在關閉6129埠 請稍候…

    netsh firewall set portopening protocol = TCP port = 6129 name = 6129 mode = DISABLE scope = ALL profile = ALL

    cls

    echo.

    echo          常見的危險埠已經關閉

    echo.

    echo                                By: Alan.deng

    echo.

    echo 按任意鍵退出

    pause>nul

 本文轉自 dl528888 51CTO部落格,原文連結:http://blog.51cto.com/dl528888/545707,如需轉載請自行聯絡原作者


相關文章