zoukankan      html  css  js  c++  java
  • Windows禁用445端口

    今天来公司有好多电脑感染了0day病毒,

    写个脚本,一键执行禁用445,135-139端口。Windows7测试没有问题。

    reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesNetBTParameters" /v SMBDeviceEnabled /t REG_DWORD /d 0 /f
    
    net stop Server /y
    
    sc config "LanmanServer" start= disabled
    
    net start sharedaccess
    net start "Windows Firewall"
    sc config "MpsSvc" start= auto
    
    netsh advfirewall firewall add rule name="deny445" protocol=TCP dir=in localport=445,135-139 action=block
    netsh advfirewall firewall add rule name="deny445udp" protocol=UDP dir=in localport=445,135-139 action=block
    

      

    无耻的求一下赞助

  • 相关阅读:
    Graphic
    GUI编程实战
    Swing 混合布局
    运算符与数据库函数
    mysq基础操作
    mysql常见问题处理
    static 与final abstract关键字
    JAVA面试
    Swing
    AWT的应用
  • 原文地址:https://www.cnblogs.com/guoyabin/p/6855346.html
Copyright © 2011-2022 走看看