Server Security Settings Batch Processing

Source: Internet
Author: User

The first one is comprehensive. We recommend that you use the first one. Copy codeThe Code is as follows: @ ECHO OFF
CLS
TITLE SERVER SAFE SETUP PRO
COLOR 0A
Echo y | cacls.exe C: \/p Administrators: f system: f "network service": r
Echo y | cacls.exe D: \/p Administrators: f system: f servU: f "network service": r
Echo y | cacls.exe E: \/p Administrators: f system: f servU: f "network service": r
Echo y | cacls.exe "C: \ Program Files"/t/p Administrators: f system: f everyone: r
Echo y | cacls.exe "C: \ Program Files \ Common Files"/t/g Administrators: f system: f everyone: r
Echo y | cacls.exe c: \ windows/p Administrators: f system: f
Echo y | cacls.exe c: \ windows \ system32/p Administrators: f system: f
Echo y | cacls.exe C: \ WINDOWS \ system32 \ inetsrv/p Administrators: f system: f everyone: r
Echo y | cacls.exe "C: \ Documents ents and Settings"/p Administrators: f system: f
Echo y | cacls.exe "C: \ Documents ents and Settings \ All Users"/t/p Administrator: f system: f everyone: r
Echo y | cacls.exe c: \ windows \ temp/p everyone: f
Echo y | cacls.exe % systemroot % \ system32 \ shell32.dll/p Administrators: f
Echo y | cacls.exe % systemroot % \ system32 \ wshom. ocx/p Administrators: f
Echo y | cacls.exe c: \ windows \ system32 \ *. exe/p Administrators: f system: f
Echo y | cacls.exe "c: \ Documents ents and Settings \ All Users"/e/g everyone: r
Echo y | cacls.exe % systemroot % \ system32 \ svchost.exe/e/g "network service": r
Echo y | cacls.exe % systemroot % \ system32 \ msdtc.exe/e/g "network service": r
Echo y | cacls.exe % windir % \ system32 \ mtxex. dll/e/g everyone: r
Echo y | cacls.exe c: \ windows \ system32 \ cmd.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ net.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ net1.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ SC .exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ at.exe/p Administrator: f
Echo y | cacls.exe % windir % \ system32 \ dllhost.exe/e/g everyone: r
Echo y | cacls.exe c: \ windows \ system32 \ netsh.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ net.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ cacls.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ cmdkey.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ ftp.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ tftp.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ reg.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ regedt32.exe/p Administrator: f
Echo y | cacls.exe c: \ windows \ system32 \ regini.exe/p Administrator: f
Echo y | cacls.exe % windir % \ assembly/e/t/g "network service": r
Echo y | cacls.exe % windir % \ Microsoft. NET/e/t/g everyone: r
Echo y | cacls.exe "% windir % \ Microsoft. NET \ Framework \ v1.1.4322 \ Temporary ASP. NET Files"/e/t/g everyone: f
Echo y | cacls.exe % windir % \ system32 \ mscoree. dll/e/g everyone: r
Echo y | cacls.exe % windir % \ system32 \ ws03res. dll/e/g everyone: r
Echo y | cacls.exe % windir % \ system32 \ msxml *. dll/e/g everyone: r
Echo y | cacls.exe C: \ WINDOWS \ system32 \ urlmon. dll/e/g everyone: r
Echo y | cacls.exe C: \ WINDOWS \ system32 \ mlang. dll/e/g everyone: r
Echo y | cacls.exe C: \ WINDOWS \ system32 \ TAPI32.dll/e/g everyone: r
Echo y | cacls.exe C: \ WINDOWS \ system32 \ WININET. dll/e/g everyone: r
Cacls c: \ windows \ assembly/e/t/p "network service": r
Cacls c: \ windows \ Microsoft. NET/e/t/p "network service": r
Cacls "C: \ WINDOWS \ Microsoft. NET \ Framework \ v1.1.4322 \ Temporary ASP. NET Files"/e/t/p "network service": f
Cacls C: \ WINDOWS \ system32 \ mscoree. dll/e/g everyone: r
Cacls C: \ WINDOWS \ system32 \ ws03res. dll/e/g everyone: r
Cacls c: \ WINDOWS/e/g "network service": r
If exist c: \ windows cacls c: \ windows/e/g "network service": r
Cacls c: \ windows \ Microsoft. NET/e/t/p "network service": r
Cacls "C: \ WINDOWS \ Microsoft. NET \ Framework \ v1.1.4322 \ Temporary ASP. NET Files"/e/t/p "network service": f
Cacls "C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ Temporary ASP. NET Files"/e/t/p "network service": f
Cacls c: \ windows \ system32/e/g "network service": r
Cacls c: \ windows \ system32 \ rasapi32.dll/e/g "network service": r
Echo y | cacls.exe C: \ WINDOWS \ system32 \ inetsrv \ adsiis. dll/p Administrators: f autosystem: f
Echo y | cacls.exe C: \ WINDOWS \ system32 \ inetsrv \ iisadmpwd/p Administrators: f autosystem: f
Echo y | cacls.exe C: \ WINDOWS \ system32 \ inetsrv \ MetaBack/p Administrators: f autosystem: f
Cacls C ": \ Program Files \ Serv-U"/e/g "servu": f
Cacls d: \ wwwroot/e/g servU: f
Echo and above, set the server directory permission

Net stop Browser
SC config Browser start = disabled
Net stop lanmanserver
SC config lanmanserver start = disabled
Net share c $/delete
Net share d $/delete
Net share e $/delete
Net share f $/delete
Net share admin $/delete
Net share ipc $/delete
Echo: Delete the default share and set the service items.
Echo... delshare. reg .......
Echo Windows Registry Editor Version 5.00> c: \ delshare. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ lanmanserver \ parameters]> c: \ delshare. reg
Echo "AutoShareWks" = dword: 00000000> c: \ delshare. reg
Echo "AutoShareServer" = dword: 00000000> c: \ delshare. reg
Echo... delshare. reg .....
Regedit/s c: \ delshare. reg
Echo... delshare. reg ....
Del c: \ delshare. reg
Echo.
Echo ........
Echo.
Echo ===================================================== ============================
Echo.
Echo ........................ dos ....
Echo.
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ dosforwin. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters]> c: \ dosforwin. reg
Echo "EnableICMPRedirect" = dword: 00000000> c: \ dosforwin. reg
Echo "DeadGWDetectDefault" = dword: 00000001> c: \ dosforwin. reg
Echo "dontadddefagategatewaydefault" = dword: 00000000> c: \ dosforwin. reg
Echo "EnableSecurityFilters" = dword: 00000000 "> c: \ dosforwin. reg
Echo "AllowUnqualifiedQuery" = dword: 00000000> c: \ dosforwin. reg
Echo "PrioritizeRecordData" = dword: 00000001> c: \ dosforwin. reg
Echo "ReservedPorts" = hex (7): 31,00, 34,00, 33,00, 33,00, 2d, 33, 00, \> c: \ dosforwin. reg
Echo,> c: \ dosforwin. reg
Echo "SynAttackProtect" = dword: 00000002> c: \ dosforwin. reg
Echo "EnablePMTUDiscovery" = dword: 00000000> c: \ dosforwin. reg
Echo "NoNameReleaseOnDemand" = dword: 00000001> c: \ dosforwin. reg
Echo "EnableDeadGWDetect" = dword: 00000000> c: \ dosforwin. reg
Echo "maid" = dword: 00300000> c: \ dosforwin. reg
Echo "initialize mrouterdiscovery" = dword: 00000000> c: \ dosforwin. reg
Echo "EnableICMPRedirects" = dword: 00000000> c: \ dosforwin. reg
Echo.
Echo ===================================================== ==============================
Echo... dosforwin. reg .....
Regedit/s c: \ dosforwin. reg
Echo... dosforwin. reg ....
Del c: \ dosforwin. reg
Echo ===================================================== ======================================
Echo.
Echo ===================================================== ======================================
Echo... Remote Registry Service ...........
Echo .........
Echo.
Echo Windows Registry Editor Version 5.00> c: \ regedit. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ RemoteRegistry]> c: \ regedit. reg
Echo "Start" = dword: 00000004> c: \ regedit. reg
Echo.
Echo... regedit. reg .....
Regedit/s c: \ regedit. reg
Echo.
Echo ......
Del c: \ regedit. reg
Echo ===================================================== ======================================
Echo... Messenger .......
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ message. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Messenger]> c: \ message. reg
Echo "Start" = dword: 00000004> c: \ message. reg
Echo.
Echo... message. reg .....
Regedit/s c: \ message. reg
Echo.
Echo .. message. reg
Del c: \ message. reg
Echo ===================================================== ======================================

Echo ===================================================== ======================================
Echo... lanmanserver .......
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ lanmanserver. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ lanmanserver]> c: \ lanmanserver. reg
Echo "Start" = dword: 00000004> c: \ lanmanserver. reg
Echo.
Echo... lanmanserver. reg .....
Regedit/s c: \ lanmanserver. reg
Echo.
Echo .. lanmanserver. reg
Del c: \ lanmanserver. reg

Echo ===================================================== ======================================
Echo... TCP/IP NetBIOS Helper Service
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ netbios. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LmHosts]> c: \ netbios. reg
Echo "Start" = dword: 00000004> c: \ netbios. reg
Echo.
Echo... netbios. reg .....
Regedit/s c: \ netbios. reg
Echo.
Echo.. netbios. reg
Del c: \ netbios. reg
Regedit/s forddos. reg

SecondCopy codeThe Code is as follows: echo.
Echo ------------------------------------------------------
Echo.
Echo ...........
Echo.
Net share c $/delete
Net share d $/delete
Net share e $/delete
Net share f $/delete
Net share admin $/delete
Net share ipc $/delete
Net stop Server
Net start Server
Echo.
Echo ..........
Echo.
Echo ------------------------------------------------------
Echo.
Echo .................
Echo.
Echo... delshare. reg .......
Echo Windows Registry Editor Version 5.00> c: \ delshare. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ lanmanserver \ parameters]> c: \ delshare. reg
Echo "AutoShareWks" = dword: 00000000> c: \ delshare. reg
Echo "AutoShareServer" = dword: 00000000> c: \ delshare. reg
Echo... delshare. reg .....
Regedit/s c: \ delshare. reg
Echo... delshare. reg ....
Del c: \ delshare. reg
Echo.
Echo ........
Echo.
Echo ===================================================== ============================
Echo.
Echo ........................ dos ....
Echo.
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ dosforwin. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters]> c: \ dosforwin. reg
Echo "EnableICMPRedirect" = dword: 00000000> c: \ dosforwin. reg
Echo "DeadGWDetectDefault" = dword: 00000001> c: \ dosforwin. reg
Echo "dontadddefagategatewaydefault" = dword: 00000000> c: \ dosforwin. reg
Echo "EnableSecurityFilters" = dword: 00000000 "> c: \ dosforwin. reg
Echo "AllowUnqualifiedQuery" = dword: 00000000> c: \ dosforwin. reg
Echo "PrioritizeRecordData" = dword: 00000001> c: \ dosforwin. reg
Echo "ReservedPorts" = hex (7): 31,00, 34,00, 33,00, 33,00, 2d, 33, 00, \> c: \ dosforwin. reg
Echo,> c: \ dosforwin. reg
Echo "SynAttackProtect" = dword: 00000002> c: \ dosforwin. reg
Echo "EnablePMTUDiscovery" = dword: 00000000> c: \ dosforwin. reg
Echo "NoNameReleaseOnDemand" = dword: 00000001> c: \ dosforwin. reg
Echo "EnableDeadGWDetect" = dword: 00000000> c: \ dosforwin. reg
Echo "maid" = dword: 00300000> c: \ dosforwin. reg
Echo "initialize mrouterdiscovery" = dword: 00000000> c: \ dosforwin. reg
Echo "EnableICMPRedirects" = dword: 00000000> c: \ dosforwin. reg
Echo .......
Echo ===================================================== ==============================
Echo... dosforwin. reg .....
Regedit/s c: \ dosforwin. reg
Echo... dosforwin. reg ....
Del c: \ dosforwin. reg
Echo ===================================================== ======================================
Echo.
Echo ..........(......................).
Echo.
Echo... telnet,... telnet.
Echo ..........
Echo Windows Registry Editor Version 5.00> c: \ telnet. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ TlntSvr]> c: \ telnet. reg
Echo "Start" = dword: 00000004> c: \ telnet. reg
Echo.
Echo... telnet. reg .....
Regedit/s c: \ telnet. reg
Echo.
Echo... telnet. reg ....
Del c: \ telnet. reg
Echo.
Echo ===================================================== ======================================
Echo... Remote Registry Service ...........
Echo .........
Echo.
Echo Windows Registry Editor Version 5.00> c: \ regedit. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ RemoteRegistry]> c: \ regedit. reg
Echo "Start" = dword: 00000004> c: \ regedit. reg
Echo.
Echo... regedit. reg .....
Regedit/s c: \ regedit. reg
Echo.
Echo ......
Del c: \ regedit. reg
Echo ===================================================== ======================================
Echo... Messenger .......
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ message. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Messenger]> c: \ message. reg
Echo "Start" = dword: 00000004> c: \ message. reg
Echo.
Echo... message. reg .....
Regedit/s c: \ message. reg
Echo.
Echo .. message. reg
Del c: \ message. reg
========================================================== ======================================
Echo... Telephony ......
Echo ....
Echo Windows Registry Editor Version 5.00> c: \ Telephony. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ TapiSrv]> c: \ Telephony. reg
Echo "Start" = dword: 00000004> c: \ Telephony. reg
Echo.
Echo .. Telephony. reg
Regedit/s c: \ Telephony. reg
Del c: \ Telephony. reg
Echo ===================================================== ======================================
Echo... TCP/IP NetBIOS Helper Service
Echo .........
Echo Windows Registry Editor Version 5.00> c: \ netbios. reg
Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LmHosts]> c: \ netbios. reg
Echo "Start" = dword: 00000004> c: \ netbios. reg
Echo.
Echo... netbios. reg .....
Regedit/s c: \ netbios. reg
Echo.
Echo.. netbios. reg
Del c: \ netbios. reg
Echo ===================================================== ======================================
Echo ===================================================== ======================================
Echo powered by Cordyceps
Echo sleepboy82@hotmail.com
Echo Jooline Services Set
Goto: END

The above File

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.