始创于2000年 股票代码:831685
咨询热线:0371-60135900 注册有礼 登录
  • 挂牌上市企业
  • 60秒人工响应
  • 99.99%连通率
  • 7*24h人工
  • 故障100倍补偿
您的位置: 网站首页 > 帮助中心>文章内容

Windows2003环境下的一键系统安全 (1)

发布时间:  2012/9/13 19:23:14

 @echo off
  echo  ----------------------------------
  echo  ----正在备份注册表  请稍后....----
  echo  ----------------------------------
  reg export "HKEY_LOCAL_MACHINE" C:/reg_backup.reg
  echo  ----------------------
  echo  ----注册表备份完成----
  echo  ----------------------
  ping 127.0.0.1 -n 3 >nul
  echo  -----------------------------------
  echo  ----安全配置正在改写  请稍候...----
  echo  -----------------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ----------------------
  echo  ----正在禁用空连接----
  echo  ----------------------
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t reg_dword /d 1  /f
  echo  --------------------------
  echo  ----禁用空连接设置完毕----
  echo  --------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ------------------------
  echo  ----正在删除默认共享----
  echo  ------------------------
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v AutoShareServer /t reg_dword /d 0  /f
  echo  ----------------------------
  echo  ----删除默认共享设置完毕----
  echo  ----------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ------------------------------
  echo  ----正在修改TTL值请稍后...----
  echo  ------------------------------
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v DefaultTTL /t reg_dword /d 53 /f
  echo  -------------------
  echo  ----TTL修改完毕----
  echo  -------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  -----------------------
  echo  ----防止syn洪水攻击----
  echo  -----------------------
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v SynAttackProtect /t reg_dword /d 2 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v EnablePMTUDiscovery /t reg_dword /d 0 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v NoNameReleaseOnDemand /t reg_dword /d 1 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v EnableDeadGWDetect /t reg_dword /d 0 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime  /t reg_dword /d 300000 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v PerformRouterDiscovery /t reg_dword /d 0 /f
  reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v EnableICMPRedirects /t reg_dword /d 0 /f
  echo  -------------------------------
  echo  ----防止syn洪水攻击设置完毕----
  echo  -------------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ------------------------------
  echo  ------------------------------
  echo  ----     系统服务修改     ----
  echo  ------------------------------
  echo  ------------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  --------------------
  echo  ----修改3389端口----
  echo  --------------------
  reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds dpwd\Tds\tcp" /v PortNumber /t reg_dword /d 44454 /f
  reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentContro1Set\Control\Tenninal Server\WinStations\RDP\Tcp" /v PortNumber /t reg_dword /d 44454 /f
  echo  --------------------
  echo  ----修改PORT完毕----
  echo  --------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  -------------------------------------
  echo  ----正在开启系统防火墙 请稍后....----
  echo  -------------------------------------
  sc config sharedaccess start= auto & net start sharedaccess
  echo  ------------------------
  echo  ----系统防火墙已开启----
  echo  ------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ----------------------------
  echo  ----正在关闭共享打印服务----
  echo  ----------------------------
  @sc config Spooler start= disabled
  sc config LanmanServer start= disabled
  sc config LmHosts start= disabled
  echo  --------------------------
  echo  ----已关闭共享打印服务----
  echo  --------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ----------------------------
  echo  ----正在关闭远程协助服务----
  echo  ----------------------------
  @sc config RDSessMgr start= disabled
  echo  --------------------------
  echo  ----已关闭远程协助服务----
  echo  --------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ------------------------------
  echo  ----正在关闭远程注册表服务----
  echo  ------------------------------
  @sc config RemoteRegistry start= disabled
  echo  ----------------------------
  echo  ----已关闭远程注册表服务----
  echo  ----------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ----------------------------
  echo  ----关闭自动硬件播放通知----
  echo  ----------------------------
  sc config ShellHWDetection    start= disabled
  echo  -----------------------
  echo  ----自动播放通知关闭---
  echo  -----------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ----------------------------------------
  echo  ----正在关闭替换凭据下的启动进程服务----
  echo  ----------------------------------------
  sc config seclogon start= disabled
  echo  --------------------------
  echo  ----已关闭启动进程服务----
  echo  --------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  ------------------------------------
  echo  ----IEEE 802.11 适配器的自动配置----
  echo  ------------------------------------
  sc config WZCSVC start= disabled
  echo  ------------------
  echo  ----已关闭IEEE----
  echo  ------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  --------------------------
  echo  ----客户端跟踪服务关闭----
  echo  --------------------------
  sc config TrkSvr start= disabled
  sc config MSDTC start= disabled
  echo  ----------------------------
  echo  ----已关闭客户端跟踪服务----
  echo  ----------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  --------------------
  echo  ----帮助中心关闭----
  echo  --------------------
  sc config helpsvc start= disabled
  echo  --------------------------
  echo  ----已关闭帮助中心服务----
  echo  --------------------------
  @ping 127.0.0.1 -n 3 >nul
  echo  --------------------------------
  echo  --------------------------------
  echo  ----      系统权限加固      ----
  echo  --------------------------------
  echo  --------------------------------
  echo  -------------------------------------------------------
  echo  ----C盘(系统盘) (administrators,system完全控制权限)----
  echo  -------------------------------------------------------
  cacls    C:\ /t /c /g administrators:F system:F
  echo  -------------------------------------------
  echo  ----Common Files (everyone用户只读权限)----
  echo  -------------------------------------------
  Cacls "C:\Program Files\Common Files" /t /e /c /g everyone:R
  echo  -------------------------------------------------------------
  echo  ----IIS Temporary Compressed Files (everyone用户更改权限)----
  echo  -------------------------------------------------------------
  Cacls "C:\WINDOWS\IIS Temporary Compressed Files" /t /e /c /g everyone:C
  echo  --------------------------------------------
  echo  ----Microsoft.Net (everyone用户只读权限)----
  echo  --------------------------------------------
  Cacls    C:\WINDOWS\Microsoft.Net /t /e /c /g everyone:R
  echo  ------------------------------------------------------
  echo  ----Temporary ASP.NET Files (everyone用户更改权限)----
  echo  ------------------------------------------------------
  Cacls "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files" /t /e /c /g everyone:C
  echo  ------------------------------------------------------
  echo  ----Temporary ASP.NET Files (everyone用户更改权限)----
  echo  ------------------------------------------------------
  Cacls "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" /t /e /c /g everyone:C
  echo  -------------------------------------------
  echo  ----Registration (everyone用户读取权限)----
  echo  -------------------------------------------
  Cacls    C:\WINDOWS\Registration /t /e /c /g everyone:R
  echo  -----------------------------------
  echo  ----Temp (everyone用户更改权限)----
  echo  -----------------------------------
  Cacls    C:\WINDOWS\Temp /t /e /c /g everyone:C
  echo  -------------------

亿恩科技地址(ADD):郑州市黄河路129号天一大厦608室 邮编(ZIP):450008 传真(FAX):0371-60123888
   联系:亿恩小凡
   QQ:89317007
   电话:0371-63322206
 


本文出自:亿恩科技【www.enkj.com】

服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[ENKJ.COM]

  • 您可能在找
  • 亿恩北京公司:
  • 经营性ICP/ISP证:京B2-20150015
  • 亿恩郑州公司:
  • 经营性ICP/ISP/IDC证:豫B1.B2-20060070
  • 亿恩南昌公司:
  • 经营性ICP/ISP证:赣B2-20080012
  • 服务器/云主机 24小时售后服务电话:0371-60135900
  • 虚拟主机/智能建站 24小时售后服务电话:0371-60135900
  • 专注服务器托管17年
    扫扫关注-微信公众号
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 亿恩科技 版权所有  地址:郑州市高新区翠竹街1号总部企业基地亿恩大厦  法律顾问:河南亚太人律师事务所郝建锋、杜慧月律师   京公网安备41019702002023号
      0
     
     
     
     

    0371-60135900
    7*24小时客服服务热线