仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 389|回复: 8
打印 上一主题 下一主题

[其他Linux] 来看看:Win2003情况下的一键体系平安批处置

[复制链接]
爱飞 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 16:55:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
使用gcc或g++进行编译,使用gdb进行调试;
.代码以下:

@echooff
echo----------------------------------
echo----正在备份注册表请稍后....----
echo----------------------------------
  regexport"HKEY_LOCAL_MACHINE"C:/reg_backup.reg
echo----------------------
echo----注册表备份完成----
echo----------------------
  ping127.0.0.1-n3>nul
echo-----------------------------------
echo----平安设置正在改写请稍候...----
echo-----------------------------------
  @ping127.0.0.1-n3>nul
echo----------------------
echo----正在禁用空毗连----
echo----------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa/vrestrictanonymous/treg_dword/d1/f
echo--------------------------
echo----禁用空毗连设置终了----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------
echo----正在删除默许共享----
echo------------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters/vAutoShareServer/treg_dword/d0/f
echo----------------------------
echo----删除默许共享设置终了----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo----正在修正TTL值请稍后...----
echo------------------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vDefaultTTL/treg_dword/d53/f
echo-------------------
echo----TTL修正终了----
echo-------------------
  @ping127.0.0.1-n3>nul
echo-----------------------
echo----避免syn大水打击----
echo-----------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vSynAttackProtect/treg_dword/d2/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnablePMTUDiscovery/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vNoNameReleaseOnDemand/treg_dword/d1/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnableDeadGWDetect/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vKeepAliveTime/treg_dword/d300000/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vPerformRouterDiscovery/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnableICMPRedirects/treg_dword/d0/f
echo-------------------------------
echo----避免syn大水打击设置终了----
echo-------------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo------------------------------
echo----体系服务修正----
echo------------------------------
echo------------------------------
  @ping127.0.0.1-n3>nul
echo--------------------
echo----修正3389端口----
echo--------------------
  regadd"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminalServerWdsdpwdTds        cp"/vPortNumber/treg_dword/d44454/f
  regadd"HKEY_LOCAL_MACHINESYSTEMCurrentContro1SetControlTenninalServerWinStationsRDPTcp"/vPortNumber/treg_dword/d44454/f
echo--------------------
echo----修正PORT终了----
echo--------------------
  @ping127.0.0.1-n3>nul
echo-------------------------------------
echo----正在开启体系防火墙请稍后....----
echo-------------------------------------
  scconfigsharedaccessstart=auto&netstartsharedaccess
echo------------------------
echo----体系防火墙已开启----
echo------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----正在封闭共享打印服务----
echo----------------------------
  @scconfigSpoolerstart=disabled
  scconfigLanmanServerstart=disabled
  scconfigLmHostsstart=disabled
echo--------------------------
echo----已封闭共享打印服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----正在封闭远程帮忙服务----
echo----------------------------
  @scconfigRDSessMgrstart=disabled
echo--------------------------
echo----已封闭远程帮忙服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo----正在封闭远程注册表服务----
echo------------------------------
  @scconfigRemoteRegistrystart=disabled
echo----------------------------
echo----已封闭远程注册表服务----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----封闭主动硬件播放关照----
echo----------------------------
  scconfigShellHWDetectionstart=disabled
echo-----------------------
echo----主动播放关照封闭---
echo-----------------------
  @ping127.0.0.1-n3>nul
echo----------------------------------------
echo----正在封闭交换凭证下的启动历程服务----
echo----------------------------------------
  scconfigseclogonstart=disabled
echo--------------------------
echo----已封闭启动历程服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------------
echo----IEEE802.11适配器的主动设置----
echo------------------------------------
  scconfigWZCSVCstart=disabled
echo------------------
echo----已封闭IEEE----
echo------------------
  @ping127.0.0.1-n3>nul
echo--------------------------
echo----客户端跟踪服务封闭----
echo--------------------------
  scconfigTrkSvrstart=disabled
  scconfigMSDTCstart=disabled
echo----------------------------
echo----已封闭客户端跟踪服务----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo--------------------
echo----匡助中央封闭----
echo--------------------
  scconfighelpsvcstart=disabled
echo--------------------------
echo----已封闭匡助中央服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo--------------------------------
echo--------------------------------
echo----体系权限加固----
echo--------------------------------
echo--------------------------------
echo-------------------------------------------------------
echo----C盘(体系盘)(administrators,system完整把持权限)----
echo-------------------------------------------------------
  caclsC:/t/c/gadministrators:Fsystem:F
echo-------------------------------------------
echo----CommonFiles(everyone用户只读权限)----
echo-------------------------------------------
  Cacls"C:ProgramFilesCommonFiles"/t/e/c/geveryone:R
echo-------------------------------------------------------------
echo----IISTemporaryCompressedFiles(everyone用户变动权限)----
echo-------------------------------------------------------------
  Cacls"C:WINDOWSIISTemporaryCompressedFiles"/t/e/c/geveryone:C
echo--------------------------------------------
echo----Microsoft.Net(everyone用户只读权限)----
echo--------------------------------------------
  CaclsC:WINDOWSMicrosoft.Net/t/e/c/geveryone:R
echo------------------------------------------------------
echo----TemporaryASP.NETFiles(everyone用户变动权限)----
echo------------------------------------------------------
  Cacls"C:WINDOWSMicrosoft.NETFrameworkv1.1.4322TemporaryASP.NETFiles"/t/e/c/geveryone:C
echo------------------------------------------------------
echo----TemporaryASP.NETFiles(everyone用户变动权限)----
echo------------------------------------------------------
  Cacls"C:WINDOWSMicrosoft.NETFrameworkv2.0.50727TemporaryASP.NETFiles"/t/e/c/geveryone:C
echo-------------------------------------------
echo----Registration(everyone用户读取权限)----
echo-------------------------------------------
  CaclsC:WINDOWSRegistration/t/e/c/geveryone:R
echo-----------------------------------
echo----Temp(everyone用户变动权限)----
echo-----------------------------------
  CaclsC:WINDOWSTemp/t/e/c/geveryone:C
echo-------------------

 @echooff
echo----------------------------------
echo----正在备份注册表请稍后....----
echo----------------------------------
  regexport"HKEY_LOCAL_MACHINE"C:/reg_backup.reg
echo----------------------
echo----注册表备份完成----
echo----------------------
  ping127.0.0.1-n3>nul
echo-----------------------------------
echo----平安设置正在改写请稍候...----
echo-----------------------------------
  @ping127.0.0.1-n3>nul
echo----------------------
echo----正在禁用空毗连----
echo----------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa/vrestrictanonymous/treg_dword/d1/f
echo--------------------------
echo----禁用空毗连设置终了----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------
echo----正在删除默许共享----
echo------------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparameters/vAutoShareServer/treg_dword/d0/f
echo----------------------------
echo----删除默许共享设置终了----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo----正在修正TTL值请稍后...----
echo------------------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vDefaultTTL/treg_dword/d53/f
echo-------------------
echo----TTL修正终了----
echo-------------------
  @ping127.0.0.1-n3>nul
echo-----------------------
echo----避免syn大水打击----
echo-----------------------
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vSynAttackProtect/treg_dword/d2/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnablePMTUDiscovery/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vNoNameReleaseOnDemand/treg_dword/d1/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnableDeadGWDetect/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vKeepAliveTime/treg_dword/d300000/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vPerformRouterDiscovery/treg_dword/d0/f
  regaddHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters/vEnableICMPRedirects/treg_dword/d0/f
echo-------------------------------
echo----避免syn大水打击设置终了----
echo-------------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo------------------------------
echo----体系服务修正----
echo------------------------------
echo------------------------------
  @ping127.0.0.1-n3>nul
echo--------------------
echo----修正3389端口----
echo--------------------
  regadd"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminalServerWdsdpwdTds        cp"/vPortNumber/treg_dword/d44454/f
  regadd"HKEY_LOCAL_MACHINESYSTEMCurrentContro1SetControlTenninalServerWinStationsRDPTcp"/vPortNumber/treg_dword/d44454/f
echo--------------------
echo----修正PORT终了----
echo--------------------
  @ping127.0.0.1-n3>nul
echo-------------------------------------
echo----正在开启体系防火墙请稍后....----
echo-------------------------------------
  scconfigsharedaccessstart=auto&netstartsharedaccess
echo------------------------
echo----体系防火墙已开启----
echo------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----正在封闭共享打印服务----
echo----------------------------
  @scconfigSpoolerstart=disabled
  scconfigLanmanServerstart=disabled
  scconfigLmHostsstart=disabled
echo--------------------------
echo----已封闭共享打印服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----正在封闭远程帮忙服务----
echo----------------------------
  @scconfigRDSessMgrstart=disabled
echo--------------------------
echo----已封闭远程帮忙服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------
echo----正在封闭远程注册表服务----
echo------------------------------
  @scconfigRemoteRegistrystart=disabled
echo----------------------------
echo----已封闭远程注册表服务----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo----------------------------
echo----封闭主动硬件播放关照----
echo----------------------------
  scconfigShellHWDetectionstart=disabled
echo-----------------------
echo----主动播放关照封闭---
echo-----------------------
  @ping127.0.0.1-n3>nul
echo----------------------------------------
echo----正在封闭交换凭证下的启动历程服务----
echo----------------------------------------
  scconfigseclogonstart=disabled
echo--------------------------
echo----已封闭启动历程服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo------------------------------------
echo----IEEE802.11适配器的主动设置----
echo------------------------------------
  scconfigWZCSVCstart=disabled
echo------------------
echo----已封闭IEEE----
echo------------------
  @ping127.0.0.1-n3>nul
echo--------------------------
echo----客户端跟踪服务封闭----
echo--------------------------
  scconfigTrkSvrstart=disabled
  scconfigMSDTCstart=disabled
echo----------------------------
echo----已封闭客户端跟踪服务----
echo----------------------------
  @ping127.0.0.1-n3>nul
echo--------------------
echo----匡助中央封闭----
echo--------------------
  scconfighelpsvcstart=disabled
echo--------------------------
echo----已封闭匡助中央服务----
echo--------------------------
  @ping127.0.0.1-n3>nul
echo--------------------------------
echo--------------------------------
echo----体系权限加固----
echo--------------------------------
echo--------------------------------
echo-------------------------------------------------------
echo----C盘(体系盘)(administrators,system完整把持权限)----
echo-------------------------------------------------------
  caclsC:/t/c/gadministrators:Fsystem:F
echo-------------------------------------------
echo----CommonFiles(everyone用户只读权限)----
echo-------------------------------------------
  Cacls"C:ProgramFilesCommonFiles"/t/e/c/geveryone:R
echo-------------------------------------------------------------
echo----IISTemporaryCompressedFiles(everyone用户变动权限)----
echo-------------------------------------------------------------
  Cacls"C:WINDOWSIISTemporaryCompressedFiles"/t/e/c/geveryone:C
echo--------------------------------------------
echo----Microsoft.Net(everyone用户只读权限)----
echo--------------------------------------------
  CaclsC:WINDOWSMicrosoft.Net/t/e/c/geveryone:R
echo------------------------------------------------------
echo----TemporaryASP.NETFiles(everyone用户变动权限)----
echo------------------------------------------------------
  Cacls"C:WINDOWSMicrosoft.NETFrameworkv1.1.4322TemporaryASP.NETFiles"/t/e/c/geveryone:C
echo------------------------------------------------------
echo----TemporaryASP.NETFiles(everyone用户变动权限)----
echo------------------------------------------------------
  Cacls"C:WINDOWSMicrosoft.NETFrameworkv2.0.50727TemporaryASP.NETFiles"/t/e/c/geveryone:C
echo-------------------------------------------
echo----Registration(everyone用户读取权限)----
echo-------------------------------------------
  CaclsC:WINDOWSRegistration/t/e/c/geveryone:R
echo-----------------------------------
echo----Temp(everyone用户变动权限)----
echo-----------------------------------
  CaclsC:WINDOWSTemp/t/e/c/geveryone:C
echo-------------------
echo----assembly(everyone用户读取权限)----
echo---------------------------------------
  CaclsC:WINDOWSassembly/t/e/c/geveryone:R
echo-------------------------------------
echo----WinSxS(everyone用户读取权限)----
echo-------------------------------------
  CaclsC:WINDOWSWinSxS/t/e/c/geveryone:R
echo------------------------------------
echo----Fonts(everyone用户读取权限)----
echo------------------------------------
  CaclsC:WINDOWSFonts/t/e/c/geveryone:R
echo---------------------------------------
echo----System32(everyone用户读取权限)----
echo---------------------------------------
  CaclsC:WINDOWSSystem32/t/e/c/geveryone:R
echo------------------------------------------
echo----msdtc(networkservice用户变动权限)----
echo------------------------------------------
  CaclsC:windowssystem32msdtc/t/e/c/gnetworkservice:C
echo-----------------------------------------------------
echo----ASPCompiledTemplates(everyone用户变动权限)----
echo-----------------------------------------------------
  Cacls"C:WINDOWSsystem32inetsrvASPCompiledTemplates"/t/e/c/geveryone:C
echo------------------------------------
echo----*.exe(往除everyone用户权限)----
echo------------------------------------
  CaclsC:WINDOWSSystem32*.exe/e/c/reveryone
echo------------------------------------
echo----cmd.exe(往除system用户权限)----
echo------------------------------------
  CaclsC:WINDOWSSystem32cmd.exe/e/c/rsystem
echo------------------------------------
echo----net.exe(往除system用户权限)----
echo------------------------------------
  CaclsC:WINDOWSSystem32et.exe/e/c/rsystem
echo-------------------------------------
echo----net1.exe(往除system用户权限)----
echo-------------------------------------
  CaclsC:WINDOWSSystem32et1.exe/e/c/rsystem
echo----------------------------------------
echo----msdtc.exe(everyone用户读取权限)----
echo----------------------------------------
  CaclsC:WINDOWSSystem32msdtc.exe/e/c/geveryone:R
echo------------------------------------------
echo----dllhost.exe(everyone用户读取权限)----
echo------------------------------------------
  CaclsC:WINDOWSSystem32dllhost.exe/e/c/geveryone:R
echo------------------------------------------
echo----svchost.exe(everyone用户读取权限)----
echo------------------------------------------
  CaclsC:WINDOWSSystem32svchost.exe/e/c/geveryone:R
echo--------------------
echo--------------------
echo----体系加固终了----
echo--------------------
echo--------------------
  @ping127.0.0.1-n3>nul
echo-----------------------------
echo----平安设置终了接待利用----
echo-----------------------------
echo------------------
echo----重启服务器----
echo------------------
  @ping127.0.0.1
  shutdown-r
  @pause


将下面的代码保留为1.cmd或1.bat,双击运转下便可。
如果你只是想应付一下操作系统的课程,劝你最好别学,或者说不要指望能用的怎么样。
乐观 该用户已被删除
沙发
发表于 2015-1-18 17:15:38 | 只看该作者
通过自学老师给的资料和向同学请教,掌握了一些基本的操作,比如挂载优盘,编译程序,在Linux环境下运行,转换目录等等。学了这些基础才能进行下面的模拟OS程序。?
分手快乐 该用户已被删除
板凳
发表于 2015-1-25 11:58:44 | 只看该作者
另外Linux上也有很多的应用软件,安装运行了这些软件后,你就可以在Linux上编辑文档、图?片,玩游戏、上网、播放多媒体文件等。
再现理想 该用户已被删除
地板
发表于 2015-2-2 22:03:16 | 只看该作者
Linux?最大的优点在于其作为服务器的强大功能,同时支持多种应用程序及开发工具,所以Linux操作系统有着广泛的应用空间。
活着的死人 该用户已被删除
5#
发表于 2015-2-8 11:00:09 | 只看该作者
一定要学好命令,shell是命令语言,命令解释程序及程序设计语言的统称,shell也负责用户和操作系统之间的沟通。
第二个灵魂 该用户已被删除
6#
发表于 2015-2-25 10:08:11 | 只看该作者
如果你有庞大而复杂的测试条件,尽量把它剪裁得越小越好。可能你会遇到这种情况,对于一个问题会出现不同内容回答,这时你需要通过实践来验证。
灵魂腐蚀 该用户已被删除
7#
发表于 2015-3-7 19:32:18 | 只看该作者
老实说,第一个程序是在C中编译好的,调试好了才在Linux下运行,感觉用vi比较麻烦,因为有错了不能调试,只是提示错误。
小妖女 该用户已被删除
8#
发表于 2015-3-15 13:11:22 | 只看该作者
未来的学习之路将是以指数增加的方式增长的。从网管员来说,命令行实际上就是规则,它总是有效的,同时也是灵活的。
飘飘悠悠 该用户已被删除
9#
发表于 2015-3-22 01:11:26 | 只看该作者
最好先搜寻一下论坛是否有您需要的文章。这样可以获得事半功倍的效果。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-12-24 11:21

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表