@echo off
echo ----------------------------------
echo ----正在備份注冊(cè)表 請(qǐng)稍后....----
echo ----------------------------------
reg export "HKEY_LOCAL_MACHINE" C:/reg_backup.reg
echo ----------------------
echo ----注冊(cè)表備份完成----
echo ----------------------
ping 127.0.0.1 -n 3 >nul
echo -----------------------------------
echo ----安全配置正在改寫 請(qǐng)稍候...----
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 ----禁用空連接設(shè)置完畢----
echo --------------------------
@ping 127.0.0.1 -n 3 >nul
echo ------------------------
echo ----正在刪除默認(rèn)共享----
echo ------------------------
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v AutoShareServer /t reg_dword /d 0 /f
echo ----------------------------
echo ----刪除默認(rèn)共享設(shè)置完畢----
echo ----------------------------
@ping 127.0.0.1 -n 3 >nul
echo ------------------------------
echo ----正在修改TTL值請(qǐng)稍后...----
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洪水攻擊設(shè)置完畢----
echo -------------------------------
@ping 127.0.0.1 -n 3 >nul
echo ------------------------------
echo ------------------------------
echo ---- 系統(tǒng)服務(wù)修改 ----
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 ----正在開啟系統(tǒng)防火墻 請(qǐng)稍后....----
echo -------------------------------------
sc config sharedaccess start= auto & net start sharedaccess
echo ------------------------
echo ----系統(tǒng)防火墻已開啟----
echo ------------------------
@ping 127.0.0.1 -n 3 >nul
echo ----------------------------
echo ----正在關(guān)閉共享打印服務(wù)----
echo ----------------------------
@sc config Spooler start= disabled
sc config LanmanServer start= disabled
sc config LmHosts start= disabled
echo --------------------------
echo ----已關(guān)閉共享打印服務(wù)----
echo --------------------------
@ping 127.0.0.1 -n 3 >nul
echo ----------------------------
echo ----正在關(guān)閉遠(yuǎn)程協(xié)助服務(wù)----
echo ----------------------------
@sc config RDSessMgr start= disabled
echo --------------------------
echo ----已關(guān)閉遠(yuǎn)程協(xié)助服務(wù)----
echo --------------------------
@ping 127.0.0.1 -n 3 >nul
echo ------------------------------
echo ----正在關(guān)閉遠(yuǎn)程注冊(cè)表服務(wù)----
echo ------------------------------
@sc config RemoteRegistry start= disabled
echo ----------------------------
echo ----已關(guān)閉遠(yuǎn)程注冊(cè)表服務(wù)----
echo ----------------------------
@ping 127.0.0.1 -n 3 >nul
echo ----------------------------
echo ----關(guān)閉自動(dòng)硬件播放通知----
echo ----------------------------
sc config ShellHWDetection start= disabled
echo -----------------------
echo ----自動(dòng)播放通知關(guān)閉---
echo -----------------------
@ping 127.0.0.1 -n 3 >nul
echo ----------------------------------------
echo ----正在關(guān)閉替換憑據(jù)下的啟動(dòng)進(jìn)程服務(wù)----
echo ----------------------------------------
sc config seclogon start= disabled
echo --------------------------
echo ----已關(guān)閉啟動(dòng)進(jìn)程服務(wù)----
echo --------------------------
@ping 127.0.0.1 -n 3 >nul
echo ------------------------------------
echo ----IEEE 802.11 適配器的自動(dòng)配置----
echo ------------------------------------
sc config WZCSVC start= disabled
echo ------------------
echo ----已關(guān)閉IEEE----
echo ------------------
@ping 127.0.0.1 -n 3 >nul
echo --------------------------
echo ----客戶端跟蹤服務(wù)關(guān)閉----
echo --------------------------
sc config TrkSvr start= disabled
sc config MSDTC start= disabled
echo ----------------------------
echo ----已關(guān)閉客戶端跟蹤服務(wù)----
echo ----------------------------
@ping 127.0.0.1 -n 3 >nul
echo --------------------
echo ----幫助中心關(guān)閉----
echo --------------------
sc config helpsvc start= disabled
echo --------------------------
echo ----已關(guān)閉幫助中心服務(wù)----
echo --------------------------
@ping 127.0.0.1 -n 3 >nul
echo --------------------------------
echo --------------------------------
echo ---- 系統(tǒng)權(quán)限加固 ----
echo --------------------------------
echo --------------------------------
echo -------------------------------------------------------
echo ----C盤(系統(tǒng)盤) (administrators,system完全控制權(quán)限)----
echo -------------------------------------------------------
cacls C:\ /t /c /g administrators:F system:F
echo -------------------------------------------
echo ----Common Files (everyone用戶只讀權(quán)限)----
echo -------------------------------------------
Cacls "C:\Program Files\Common Files" /t /e /c /g everyone:R
echo -------------------------------------------------------------
echo ----IIS Temporary Compressed Files (everyone用戶更改權(quán)限)----
echo -------------------------------------------------------------
Cacls "C:\WINDOWS\IIS Temporary Compressed Files" /t /e /c /g everyone:C
echo --------------------------------------------
echo ----Microsoft.Net (everyone用戶只讀權(quán)限)----
echo --------------------------------------------
Cacls C:\WINDOWS\Microsoft.Net /t /e /c /g everyone:R
echo ------------------------------------------------------
echo ----Temporary ASP.NET Files (everyone用戶更改權(quán)限)----
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用戶更改權(quán)限)----
echo ------------------------------------------------------
Cacls "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" /t /e /c /g everyone:C
echo -------------------------------------------
echo ----Registration (everyone用戶讀取權(quán)限)----
echo -------------------------------------------
Cacls C:\WINDOWS\Registration /t /e /c /g everyone:R
echo -----------------------------------
echo ----Temp (everyone用戶更改權(quán)限)----
echo -----------------------------------
Cacls C:\WINDOWS\Temp /t /e /c /g everyone:C
echo -------------------
億恩科技地址(ADD):鄭州市黃河路129號(hào)天一大廈608室 郵編(ZIP):450008 傳真(FAX):0371-60123888
聯(lián)系:億恩小凡
QQ:89317007
電話:0371-63322206
本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|