日期:2009-05-10  浏览次数:20928 次

为了使我们这些程序员的日子比较好过,为了使我们高玄的心可以放下,希望对大家有所帮助。
安装WindowsNT
要想有效的建立一个安全的WindowsNT服务器,必须从安装是开始做起。如果已经安装了带文件分配表(FAT)的
WindowsNT,建议重新安装。
1. 安装一台干净的系统;系统在安装和配置时应该与公网断开,如果需要连接到网络,则需要保证网络是一个隔离的可
信任的网段;
2. 建议安装Windows NT4.00 US-ENGLISH;(原因:1.USA对PRC出口加密产品的限制,例如只允许出口IE (40bitRAS SSL)
到PRC 。2.MicroSoft对PRC用户的歧视。3.Microsft 产品一般只对English版本进行严格测试。4.双字节字符编码的特殊

(在NT4.0+SP4+IIS4.0版本中使用asp时,使用 http://www.xxx.org/test/ok.asp%
81 就可看到ok.asp的原码,其原因就是IIS不能正确处理%81这个半汉字字符)。不要
安装其他的操作系统,以免他人从别的系统上修改你的NT系统。只用NTFS文件系统;
3. 安装NT Server时选择独立成员服务器(Stand-Alone);服务器不能加入到域环境中;不安装IIS2.0,如果你想安装
IIS,可从选件包安装(NT Option pack)。
4. 在网络协议与服务中,只安装TCP/IP,不安装其它附加的网络服务。
安装其它软件
服务器就是专门做服务的,不要什么软件都装,因为由第三方软件产生的漏洞也很多,选几个必须的装上就可以了!
1. 安装第三方软件(如IIS4.0)
2. 安装最后的服务包。(目前是SP6)
3. 安装可以使用的热修补包(Hotfixes)ftp://ftp.microsoft.com/bussys/winnt/winntpublic/fixes/usa/nt40
删除不用的网络服务
多余的网络服务有时候也能产生安全问题。
打开控制板中的网络控制,删除所有网络服务,只保留RPC Configuration (RPCSS:for Port Mapper),IIS需要这种服
务。
删除工作站服务后(Workstation service),每次启动网络应用时,系统会弹出一个Message Box: “Windows NT
Networking is not Installed.Do you want to
install it now?” ,选择“No”.另一个问题是usrmgr.exe不能工作,可用工作站版的musrmgr.exe 代替。
Disable NETBIOS
不监听NETBIOS 端口,所有网卡上不绑定WINS Client
Network->Bindings->All protocola->WINS Client->Disable.
Disable WINS Client Driver
Control Panel->Devices->WINS Client->Disable
配置TCP/IP过滤
这样做你可能有很多服务被禁止,但可以减少许多许多不必要的麻烦,具体配置的方法是:控制面板->网络->协议-
.TCP/IP协议->属性->高级->启用安全机制->配置,你可以这样配置:TCP Ports 80和443(SSL的端口);不允许UDP端
口;IP协议6,这是一个典型的安全配置,推荐使用,但是,一定要知道你必须的其他服务的端口号并开启它,不然你的服
务也就被禁止了。NT系统重要的服务所使用的端口号见附录
使不用的服务Disable
除了以下服务外,关闭其它服务
EventLog
NT LM Security Support Privider
Plug and Play
Protected Storage
Remote Procedure All(RPC) Service
应运行的进程
smss.exe Session Manager
csrss.exe Client Server Subsystem
winlogon.exe The login Process
services.exe The Main service handler Process
pstores.exe Protected Storage
lsass.exe Local Security Authority
rpcss.exe The PRC end-point mapper
explorer.exe The Explorer GUI
loadwc.exe Explorer related
nddeagnt.exe Explorer related
加密系统帐号数据库
运行syskey.exe实用程序,它对帐号数据库提供附加保护,防止Crack工具直接提取用户信息
应用策略与访问控制列表
在命令行中运行微软安全配置编辑器(SCE),这一工具是NT SP4 CD中的一部分,在本文档的附件中有一配置Baston主机
的文件baston.inf。ASCII文本文件。
C:> secedit /configure /cfg baston.inf /db %TEMP%\secedit.sdb /verbose /log %TEMP%\scelog.txt
这一过程将改变很多系统配置,下面是其中主要变量:
Account Policies
Password Policy
Enhance password uniqueness by Remembering last passwords 6
Minimum password age 2
Maximum password age 42
Minimum password length 10
Complex Passwords(passfilt.dll) Enabled
User must logon to change password Enabled
Account lockout policy
Account lockout count 5
Reset lockout count after 720mins
Local Policies
Audit Policy
Audit object
Audit Process tracking
事件记录设置(EventLog)
应用、系统、安全记录文件大小设为100MB以上,匿名访问记录文件不允许。
[System Log]
MaximumLogSize = 100032
AuditLogRetentionPeriod = 1
RetentionDays = 30
RestrictGuestAccess = 1
[Security Log]
MaximumLogSize = 100032
AuditLogRetentionPeriod = 1
RetentionDays = 30
RestrictGuestAccess = 1
[Application Log]
MaximumLogSize = 100032
AuditLogRetentionPeriod = 1
RetentionDays = 30
RestrictGuestAccess = 1
注册表值
MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\ShutdownWithoutLogon=1,0
MACHINE\System\CurrentControlSet\Control\Lsa\
FullPrivilegeAuditing=3,31
MACHINE\System\CurrentControlSet\Control\Lsa\SubmitControl=4,0
MACHINE\System\CurrentControlSet\Control\Lsa\AuditBaseObjects=4,1
MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\AllocateCDRoms=1,1
MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\AllocateFloppies=1,1
MACHINE\Software\Microsoft