存档

文章标签 ‘Windows’

封堵Windows Server 2008几个明显漏洞

2009年10月7日 Chinadu 没有评论

尽管Windows Server 2008系统的安全性能已经无与伦比,不过这并不意味着该系统自身已经没有任何安全漏洞了。对于Internet或局域网中狡猾的“黑客”来说,Windows Server 2008系统中的安全漏洞仍然比比皆是,只是它们的隐蔽性相对强一点而已;如果我们不能对一些重要的隐私漏洞进行及时封堵,“黑客”照样能够利用这些漏洞来攻击Windows Server 2008系统。为此,我们需要积极行动起来,采取切实可行的措施来封堵隐私漏洞,守卫Windows Server 2008系统更安全!
  1、封堵虚拟内存漏洞

  当我们启用了Windows Server 2008系统的虚拟内存功能后,该功能在默认状态下支持在内存页面未使用时,会自动使用系统页面文件将其交换保存到本地磁盘中,这么一来一些具有访问系统页面文件权限的非法用户,可能就能访问到保存在虚拟内存中的隐私信息。为了封堵虚拟内存漏洞,我们可以强行Windows Server 2008系统在执行关闭系统操作时,自动清除虚拟内存页面文件,那么本次操作过程中出现的一些隐私信息就不会被非法用户偷偷访问了,下面就是封堵系统虚拟内存漏洞的具体操作步骤:

  首先在Windows Server 2008系统桌面中依次单击“开始”/“运行”命令,在弹出的系统运行对话框中,输入字符串命令“gpedit.msc”,单击回车键后,打开对应系统的组策略控制台窗口;

  其次展开该控制台窗口左侧列表区域中的“计算机配置”节点分支,再从该节点分支下面依次点选“Windows设置”、“安全设置”、“本地策略”、“安全选项”,在对应“安全选项”右侧列表区域中,找到目标组策略“关机:清除虚拟内存页面文件”选项。

  接着用鼠标右键单击“关机:清除虚拟内存页面文件”选项,从弹出的快捷菜单中执行“属性”命令,打开如图1所示的目标组策略属性设置窗口,选中其中的 “已启用”选项,同时单击“确定”按钮保存好上述设置操作,这么一来Windows Server 2008系统日后关闭系统之前,会自动将保存在虚拟内存中的隐私信息清除掉,那么其他用户就无法通过访问系统页面文件的方式来窃取本地系统的操作隐私了。

2、封堵系统日志漏洞

  如果Windows Server 2008系统没有用于服务器系统,而仅仅是作为普通计算机使用时,我们需要谨防对应系统的日志漏洞,因为该系统的日志功能会将我们的一举一动自动记忆保存下来,包括系统什么时候启动的、什么时候关闭的,在启动过程中用户运行了哪些应用程序、访问了什么网站等等。比方说,要查看某个用户的上网记录时,我们只要打开Windows Server 2008系统的服务器管理器窗口,从中展开事件查看器节点选项,并从“系统”分支下面找到来源为RemoteAccess的事件记录,再用鼠标双击该事件记录选项,之后我们就能在其后出现的窗口中看到目标用户的具体上网时间了。为了封堵系统日志漏洞,我们可以按照下面的操作来设置Windows Server 2008系统:

  首先依次单击Windows Server 2008系统桌面上的“开始”/“程序”/“管理工具”/“服务器管理器”命令,在弹出的服务器管理器控制台窗口中,依次展开“配置”/“服务”分支选项。

  其次在弹出的服务配置窗口中,用鼠标双击其中的Windows Event Log系统服务,打开如图2所示的目标系统服务属性设置窗口,单击“停止”按钮,将目标系统服务强行停止运行,最后单击“确定”按钮保存好上述设置操作,这么一来我们就能成功封堵Windows Server 2008系统日志漏洞了。
阅读全文...

分类: 技术文章 标签: ,

MSDN Windows XP Professional x64 Edition with SP2 - VL (English)+简体中文语言包

2009年1月5日 Chinadu 没有评论

MSDN Windows XP Professional x64 Edition with SP2 - VL (English)+简体中文语言包

[资源名称]---Windows XP Professional x64 Edition with SP2 - VL (English)
[资源类型]---ISO镜像
[资源语言]---英语+简体中文
[杀毒状况]---NOD32+KAV2009
[共享时间]---时间不定
[安装测试]---刻盘+硬盘安装通过
[版权声明]---软件版权归原作者及原软件公司所有,仅供测试所用,请勿用于商业用途,如果你喜欢,请购买正版软件
[资源介绍]

Windows XP Professional x64 Edition 的设计初衷是:满足机械设计和分析、三维动画、视频编辑和创作以及科学计算和高性能计算应用程序等领域中需要大量内存和浮点性能的客户的需求。

专用技术应用程序的性能优势
64 位计算性能在汽车或飞机设计等领域体现出优势,因为它允许工程师创建更大、更复杂的模型。借助这样的系统,工程师可以使用模拟软件分析气流、压力和受热对汽车或飞机材料产生的影响,然后对结果进行研究以改进产品设计。同样,通过 64 位计算,数字内容创作者(包括三维动画设计人员、数字艺术家和游戏开发人员)可以大大减少以数字方式呈现三维模型所用的时间。在科学计算和高性能计算领域,Windows XP Professional x64 Edition 将有助于石油和天然气勘探、地震分析、计算流体动力学和科学可视化等应用程序。

支持非常大的内存,采用常见的 Windows 桌面
对于达到 32 位系统内存限制的客户,Windows XP Professional x64 Edition 将以 AMD Athlon 64、AMD Opteron、支持 SM64T 的 Intel Xeon 和支持 EM64T 的 Intel Pentium 4 作为运行平台。基于 Windows XP 的 32 位和 64 位计算之间的主要区别在于 64 版本能够使用更多的系统内存。Windows XP Professional x64 Edition 最初将支持多达 128 GB 的内存和多达 16 TB 的虚拟内存。将来,随着硬件功能的扩展,支持的物理内存将相应增加。内存中数据的访问速度是它在磁盘驱动器上时访问速度的数千倍,这样就可以大大提高为使用此更大系统内存而开发的应用程序的性能。

为技术应用程序和业务应用程序提供单一桌面
Windows XP Professional x64 Edition 将为技术应用程序和业务应用程序提供单一桌面,这样技术工作站用户就不需要为业务应用程序维护 PC,同时为高端技术应用程序维护单独的工作站。大多数 Windows 兼容的 32 位应用程序将在 Windows XP Professional x64 Edition 的子系统(其性能与 32 位 Windows 相当)中“按原样”运行。工作站用户可以利用 Windows 平台上丰富的集成功能和高效工具。设计人员可以构建一个模型,并与公司中的其他人员轻松实现共享:对于财务组,将它复制到 Word 文档,或者对于市场组,将它添加到的 PowerPoint 幻灯片面板。如果您仅使用 32 位应用程序且处理的数据集不超过 2 GB,则将发现 32 位 Windows XP Professional 是最适合您应用程序的桌面系统。

Windows XP Professional x64 Edition 系统可以添加到现有的基于 Windows 的网络,并通过相同的管理工具与 32 位系统一起进行管理,从而使 IT 部门的工作更为轻松。维护和管理两个系统的间接成本得到了降低。

新一代应用程序的最佳平台
具备 32 位 Windows 技能的开发人员将能够舒适而高效地创建适用于 Windows XP Professional x64 Edition 的下一代应用程序。开发人员将发现该开发环境与 32 位 Windows 开发环境几乎完全相同;Microsoft Win64™ 应用程序编程接口 (API) 与 Microsoft Win32 API 相同。现有的 API 已经在必要处进行了修改,使它们可以反映其运行平台的精度。结果是简化了编程并缩短了开发人员编写 64 位 Windows 代码的学习曲线,使之就像编写 32 位 Windows 代码一样。

64 位 Windows 开发环境支持与 32 位 Windows 相同的功能集,包括 UI 和编程模型、网络、安全性、图形、多媒体、目录服务、即插即用以及工具功能。许多功能都已经过修改,以反映应用程序运行平台的计算精度。

PRODUCT KEY:
B66VY-4D94T-TPPD4-43F72-8X4FY
VCFQD-V9FX9-46WVH-K3CD4-4J3JM

Hash效验信息:
MD5: 33A35E7544201EA47FEE6CAC6A52153B
SHA1: CD9479E1DBAD7F26B8BDCF97E4AA71CBB8DE932B
CRC32: FFFFFFFF
MSDN网站上的信息:http://msdn.microsoft.com/zh-cn/subscriptions/downloads/details/default.aspx?pm=p%3A140
http://www.91files.com/?OR1NIFX8NXMUWXIQ9E6H
http://www.namipan.com/d/78573957f4bc8d9f3c19fa2fed4f1ad2f67d6cdbeb2f1800
http://software.ncu.edu.tw/96/EN/iso/XP_64bit.iso
http://218.108.29.28:2080/OS/WindowsXP_X64_EN/CHS.MSI

另附:
Windows XP Professional x64 Edition 多国语言包 微软官方http下载地址
共4张CD,多国语言,简体繁体中文在第三个CD中。
CD 1: German, Japanese (448 MB ISO image)
http://download.microsoft.com/download/4/a/c/4acd4568-e929-44cd-96ef-54f24ad0565b/ARMMUIx1.iso
CD 2: French, Spanish, Italian, Portugues (554 MB ISO image)
http://download.microsoft.com/download/1/9/0/19079c17-80cd-401c-986d-24f6bd9bb43e/ARMMUIx2.iso
CD 3: Korean, Chinese Simplified, Chinese Traditional (561 MB ISO image)
http://download.microsoft.com/download/f/d/a/fdac56ee-928a-4d51-9d6d-c7c64e9f5bae/ARMMUIx3.iso
CD 4: Swedish (161 MB ISO image)
http://download.microsoft.com/download/0/7/6/0769ef3b-1378-4f69-8bab-c3514ed74cdd/ARMMUIx4.iso

IE7 For Windows XP Professional x64 Edition
http://download.microsoft.com/download/1/1/4/114d5b07-4dbc-42f3-96fa-2097e207d0af/IE7-WindowsServer2003-x64-enu.exe
IE7 多国语言包 For Windows XP Professional x64 Edition
http://download.microsoft.com/download/1/c/d/1cd4c7f4-2f36-4c78-aa31-7aa395da5391/IE7MUI-x64-enu.exe

硬盘安装方法:
一、准备工具及安装光盘镜像
    1.UltraISO或WINISO,WinRAR也行
    2.Avlgomgr 2006
 
  3.WINDOWSXP x64安装光盘ISO镜像
    4.WINDOWS2003中文版安装光盘ISO镜像
二、实现步骤(每一步都必需)
1.用UltraISO或WinRAR将WINXP64光盘解压到一个文件夹下,如XP64。
2.将XP64\AMD64文件夹下的PIDGEN.DLL改名为PIDGEN.X64。(难找就用搜索功能,记住上级目录的位置,以免弄错)
3.用UltraISO打开WINDOWS 2OO3光盘镜像,提取I386文件夹下的WINNT32.EXE、WINNT32.MSI、WINNT32U.DLL、PIDGEN.DLL等四个文件,覆盖XP64\AMD64文件夹下的同名文件。
4.这个时候,可以双击WINNT32.EXE来运行安装程序了,安装类型选全新安装单击下一步
5.程序要求输入产品密钥,这里输入WINDOWS2003的产品密钥(输入入XP64的产品密钥是不能通过的,因为PIDGEN.DLL已经改了,密钥在第8步更改),
单击下一步。安装选项设置就不说了,和XP安装一样。
6.点下一步直到出现“正在复制安装文件”界面,复制完后会出现一个错误对话框,内容是“安装程序无法创建、找到或修改启动Windows所需要的关键文件(C:\$LDR$)。
系统找到不到指定文件”先别点确定,点了前面所做的就白费了。
7.新建名为XP64SETUP的文件夹,打开C盘把txtsetup.sif、$WIN_NT$.~BT文件夹和$WIN_NT$.~LS文件夹复制到XP64SETUP文件夹中。
8.删除XP64SETUP\$WIN_NT$.~LS\amd64文件夹下的PIDGEN.DLL,将XP64\amd64文件夹下的PIDGEN.X64复制到XP64SETUP\$WIN_NT$.~LS\amd64文件夹下并改名为PIDGEN.DLL,
打开winnt.sif,将productid后面的密钥改成XP64的密钥,productkey后面的密钥也改成XP64的密钥。
9.将XP64文件夹中的I386文件夹复制到XP64SETUP\$WIN_NT$.~LS文件夹下。
10.这时可以点刚才第6步错误提示的确定按钮了,这时C盘的安装临时文件都被删除,点击完成退出安装程序。
11.复制XP64SETUP文件夹下的所有文件夹和文件到C:\,并将C:\$WIN_NT$.~LS\I386\SETUPLDR.BIN复制到C:\,打开Avlgomgr 2006对C:\SETUPLDR.BIN进行装配。
12.现在已经完成设置了,接下来就是重启安装64位XP系统了,重启后在启动菜单选择“Avlgo - SETUPLDR.BIN”这一项,就可以进入启动XP64安装程序了。

分类: 资源共享 标签:

windows系统目录环境变量大全(目录简写)

2008年11月23日 Chinadu 没有评论

编程用的到:

%ALLUSERSPROFILE%  C:\Documents and Settings\All Users

%USERPROFILE%            C:\Documents and Settings\当前用户名

%HOMEPATH%                  C:\Documents and Settings\当前用户名

%SYSTEMROOT%             C:\WINDOWS

%WINDIR%                         C:\WINDOWS

%ComSpec%                     C:\WINDOWS\System32\cmd.exe

%APPDATA%                      C:\Documents and Settings\当前用户名\Application Data

%ALLAPPDATA%               C:\Documents and Settings\All Users\Application Data

%SYSTEMDRIVE%            C:

%HOMEDRIVE%                C:

%TEMP% 和 %TMP%       C:\Documents and Settings\当前用户名\Local Settings\Temp

%ProgramFiles%               C:\Program Files

%CommonProgramFiles%    C:\Program Files\Common Files

Docum~1                            Documents and Settings

progra~1                            Program Files

分类: 技术文章 标签: ,

用U盘就可进入有密码的Windows系统

2008年11月19日 Chinadu 没有评论

U盘 如今可以说非常普及了,不过,如果只是把它用来存储数据的话,也许有点可惜了。其实,我们还可以让U盘发挥更大的能量!今天小编教你一招,能让你的U盘代 替登录系统的密码,只有当你插上U盘才能正常进入系统操作,否则任何操作都无法进入系统。怎么样,是不是很有兴趣一试?
要想成功实现上述功能,我们需要借助名为Disklogon的小工具,它是一个功能强大的安全设置工具,可让我们使用优盘、软盘等移动设备来登录系统,可在登录时免于输入用户名和登录密码;而一旦移走了这些设备,系统便可以设置为自动锁定或关机。下面就来看看如何设置让优盘变成控制登录系统的“密钥盘”。
点击进入Disklogon下载页面

完成软件安装之后按要求重新启动,之后在进入系统的画面中单击“Password”按钮,然后使用键盘输入密码登录(如果之前设置了使用密码登录的话)。但我们是不希望每次都这样繁琐的,下面就来设置一下让优盘发挥更强大的功能,让它直接来控制系统登录。

直接开始菜单中单击“Disklogon Options”进入设置界面,随后依次执行如下步骤设定:

Step1:依次执行“Options/Disklogon/Disks”操作,窗口右侧中默认将所有的盘符都勾选了,但我们只希望用优盘来作为密钥盘,所以只勾选优盘的盘符(例如笔者的为L:)。

Step2:单击窗口左侧的“Options/DiskLogon/General”分支,接下来,我们要在右侧设置有优盘和无优盘时的不同操作:

1.在“Disk removal behavior”下拉列表框中选择“Lock computer when the disk is removed”(当磁盘被取出后将电脑锁定),这样当优盘被拔除后系统就自动锁定了;如果想在拔除优盘后自动注销,则可选择“Log off when the disk is removed”。

2.在“Log on to Windows”下拉列表框中选择“Log on when disk is connected”(当链接有优盘时自动登录系统),这样,如果在开机后没有连接优盘,则不能进入系统。

3.在“Unlock computer”下拉列表框中选择“Unlock computer when the disk is connected”(当连上优盘时自动解除对系统的锁定)。

小贴士:默认情况下,系统登录时,如果没有没有连接优盘,用户可点击 “Cancel”然后手工输入用户名和密码来进入系统。但为了增强安全性,去掉“Allow users to type their usename and password to log on or unlock computer”(允许用户输入用户名和密码来登录或解锁系统)选项!如此一来没有优盘插入就无法登陆系统了。

控制系统登录之 创建登录信息

Step3:完成上述设置后,我们就可以进行最后一步设置了,即登录系统解锁时所用的用户名和密码。点击进入“User Accounts”标签,随后点击“Change Logon information”区域处的“Change”按钮,进入用户名、密码创建界面(图2)。具体步骤:在“Step1”区域选择当前系统中正在使用的U 盘,接着点击“Step2”区域选择某ID号(如01),此时“Create New”将呈现可用状态,点击该按钮,并在随后的弹出窗口中输入用户名及密码即可。

如果希望用加密算法对登录信息进行加密,可勾选对话框中的“Encrypt this logon information with strong encryption algorithm”选项。添加完成后单击“close”按钮返回主窗口。

小贴士:设置了登录用户名和密码后,优盘根目录下会生成一个名为logon.dln的文件,这个文件不能删除!否则,下次重新启动时即使你插上了优盘,也会因为系统不能读取“指纹”而导致进不了系统!

至此,所有相关设置已经完成,现在你的U盘就已经是密钥盘了。在没有连接优盘的情况下根本是无法进入系统的;而在系统使用中途,如果将优盘拔除,系统便会自动锁定—单击对话框中的“Unlock”也是无效的,除非再次将优盘连接到电脑中。目前软件只支持Windows 2000/XP/2003系统。

分类: 技术文章 标签: ,

Windows更换网卡后IP地址占用的解决方法

2008年11月18日 Chinadu 没有评论

适用范围: Windows 2000 各版 Windows XP 各版

  问题:因为网卡坏了,所以我换了一片新的网卡,但是我要设定 IP的时候,却出现一个错误讯息,说是我所输入的IP已经指定给我旧的的网卡使用,要我设定另一个IP给我新的网卡,可是旧的网卡明明已经从计算机上拆掉了,要怎样才能彻底移除这个旧的网卡呢?我的操作系统是 Windows 2000。

  回答:在 Windows 2000 下,要利用「添加/删除硬件」的功能,来删除没有用、已经不存在的网卡。

  方法

  一: 到「控制面板」,选择「添加/删除硬件」,进入添加/删除硬件之后,照画面指示按「下一步」,选择「删除安装」 按下一步,选择「删除安装装置」,按「下一步」接着会出现装置清单,在清单中找看看有没有你的旧的网卡(记得要勾起显示隐藏的装置那个选项),有的话,选了之后按下一步照画面指示动作进行。 如果在这里仍然看不到你已经拆掉的那张网卡,请继续方法二。

  二: 按开始,到执行,输入 cmd 按确定(以便快速进入命令模式,注二) 输入以下指令后,按 ENTER 键,这是让装置管理员显示已安装但是目前不在机器上的装置。。 set devmgr_show_nonpresent_devices=1 这个设定,是设定一个环境变量,有了这个环境变量(devmgr_show_nonpresent_devices),装置管理员就可以去显示已经安装的设备,而这个设备是目前并不在机器上的东西。因为这是在 command 模式下利用 SET 建立的环境变量,只是暂时的,所以只对此次有效,下次开机就会从内存消失,因此你不用担心如此的设定会无法恢复原状的问题。输入 start devmgmt.msc,这是启动装置管理员的意思。 到「检视」,选「显示隐藏装置」 展开「网络适配卡」这一项,去找你之前移除的网卡,找到之后,在其上按鼠标右键选「删除安装」。

  注一: 这个错误讯息的详细内容大致如下: 您输入的网络适配卡 IP 地址 xxx.xxx.xxx.xxx 已经指派给另一个适配卡 ABCD,ABCD 在 [ 网络和拨号联机 ] 中被隐藏起来,因为他在计算机中不是实体适配卡,或者他是旧版而未运作的适配卡,而且这两个适配卡同时都在使用中,只有其中一个可以使用这个地址。这样可能会造成不正确的系统设定。您想要在进阶的对话方 IP 地址清单中输入另一个 IP 地址给这个适配卡使用吗? 「是」「否」   注二: 所以在这里,我们又可以学到一样技巧,就是进入 Command Mode 最省事的方法,就是在「执行」中输入「cmd」,你不用再去「开始」>>「程序」>>「附件」>>「命令提示字符」那么麻烦的去执行了。 cmd 这命令在 Windows NT、2000、XP 都适用,Windows 95、98、Me 请改为 command。 Trotter的方法: 在“设备管理器”中,点“查看”,点“显示隐藏的设备”,在网络适配器中删除掉隐藏的网络适配器即可。

分类: 技术文章 标签:

Windows Server 2003 R2 Standard or Enterprise Edition with SP2 迅雷下载

2008年11月5日 Chinadu 没有评论

Installing Windows Server 2003 R2 Standard or Enterprise Edition with SP2 (32-bit x86)

Published: May 6, 2005 | Updated: April 6, 2007
 

Thank you for registering to download the Windows Server 2003 R2 Standard or Enterprise Edition with SP2 trial software.

Installation Prerequisites

To install this trial software, please follow the installation instructions on this page.

Note: The Windows Server 2003 R2 Enterprise Edition with SP2 trial software Downloads 1 and 2 are approximately 599 megabytes (MB) and 121 MB, respectively. Estimated download times:
CD 1: 56K Modem – 24 hours 55 minutes, CDSL – 1 hour 22 minutes, T1 – 54 minutes
CD 2: 56K Modem – 5 hours 2 minutes, CDSL – 16 minutes, T1 – 11 minutes

The Windows Server 2003 R2 Standard Edition with SP2 trial software Downloads 1 and 2 are approximately 598 MB and 121 MB, respectively. Estimated download times:
CD 1: 56K Modem – 24 hours 53 minutes, CDSL – 1 hour 22 minutes, T1 – 55 minutes
CD 2: 56K Modem – 5 hours 2 minutes, CDSL – 16 minutes, T1 – 11 minutes

The files that you will download are in ISO image format and should be burned to a CD-ROM before installation. To burn the ISO file to a CD, you must have a CD-RW drive (CD burner) with appropriate supporting software.

Installation Instructions for Windows Server 2003 R2 Standard or Enterprise Edition with SP2 (32-bit x86)

To install the trial software for Windows Server 2003 R2 Standard or Enterprise Edition with SP2 (32-bit x86):

1.

Choose the language you want to install from either the Windows Server 2003 R2 Enterprise Edition with SP2 table or Windows Server 2003 R2 Standard Edition with SP2 table below. Download the first ISO image file that corresponds with that language from the table and save the file to your hard disk.

2.

Using a CD-RW drive and software, burn the ISO image of Windows Server 2003 R2 Standard or Enterprise Edition with SP2 trial software to a blank CD and label it Disk 1. If your computer's software does not recognize the ISO format, burn the image to the CD-ROM as a raw data file.

3.

From the table below, download the second ISO image file that corresponds with the language you want to install and save the file to your hard disk.

4.

Using a CD-RW drive and software, burn the ISO image to another blank CD and label it Disk 2. If your computer's software does not recognize the ISO format, burn the CD as a raw data file.

5.

Insert Disk 1, which you burned, into the CD-ROM drive of the computer on which you want to install the Windows Server 2003 R2 Standard or Enterprise Edition with SP2 trial software. When the Setup dialog box appears, follow the instructions it provides.

6.

Once setup for Disk 1 completes, remove Disk 1 and insert Disk 2. When the Setup dialog box appears, follow the instructions it provides.

 

下载地址:http://www.microsoft.com/windowsserver2003/R2/trial/installinstruct.mspx

分类: 资源共享 标签:

MS Windows Token Kidnapping本地提权的解决方案

2008年11月4日 Chinadu 没有评论

作者:

昨天放出来的exp让大家狠狠的爽了一把吧,听说有人连续提权了十多台webshell的。

今天MS更新了安全公告

这个漏洞是由于在NetworkService 或者 LocalService 下运行的代码,可以访问同样是在 NetworkService 或者 LocalService 下运行的进程,某些进程允许提升权限为LocalSystem
阅读全文...

分类: 技术文章 标签: ,

关于Windows的权限和一些安全问题

2008年10月13日 Chinadu 没有评论

作者:

让我们来复习一篇我在6、7年前写的文章,真实时间已经不可考了,因为我也忘记了。

当时写这篇文章的目的是为了学习和研究NT下权限带来的一些安全问题,不过我当时没有深入进行下去。

最近出的exploit: Windows 2003 Server Token Kidnapping 问题,又是这方面的问题,与SeImpersonatePrivilegetoken关系紧密。

其实NT核心里的 权限---令牌---ACL 这一体系还会有很多其他的问题,以往深究的人很少,如果想研究下去的话,可以参考下我下面这篇文章。研究方法应该类似。

由于写文章的时候还比较年轻,大概也就10多岁,笔法还很稚嫩,请勿见笑。在文章中也提到了一些老朋友的名字,真是怀念他们啊。图片已经丢失了,不过并不影响阅读。

浅谈NT的ACL,令牌,权限与安全性问题
-----另一种克隆帐号的途径

作者:刺(aXis)

来源:www.ph4nt0m.net(当时还在用这个域名,也有网上流传的文章里用的是www.3389.net的域名,曾经也是幻影最初的域名之一。)

摘要:关于nt的acl,token,and privilege的,以及通过privilege绕过acl,达到访问文件的目的。可以说是另一种克隆administrator的方法,不过更隐蔽, 利用起来难度较大,需要绕过检测才行,目前取的的突破是利用权限绕过acl。

关键字:ACL,ACE,DACL,TOKEN,SID,PRIVILEGE

一.基本概念(这部分介绍的是令牌,ACL等基本概念,是为第二部分做准备,如果你已经了解其内容,请跳过这一部分)

1.什么是令牌(TOKEN)

当用户登录到Windows NT/2000/XP,同时通过了身份认证,此时将会由系统为该用户分配一个令牌。令牌是一个数据结构,用于由所有该用户激活的进程和线程。令牌的结构如下图:

Token source

Impersonation Type

Token ID

Authentication ID

Modified ID

Expiration Time

Default Primary Group

Default DACL

User Account SID

Group 1 SID

……

Group n SID

Restricted SID 1

……

Restricted SID n

Privilege 1

……

Prililege n

这样看不太容易理解。我们来看一个实例,使用win2000 resource kit中的whoami.exe来查看当前用户的访问令牌(Access Token)中的详细信息

C:\>whoami /all
[User] = "DARKDEAMON\Administrator" S-1-5-21-1409082233-1957994488-47230797
1-500
[Group 1] = "DARKDEAMON\None" S-1-5-21-1409082233-1957994488-472307971-513
[Group 2] = "Everyone" S-1-1-0
[Group 3] = "BUILTIN\Administrators" S-1-5-32-544
[Group 4] = "BUILTIN\Users" S-1-5-32-545
[Group 5] = "NT AUTHORITY\INTERACTIVE" S-1-5-4
[Group 6] = "NT AUTHORITY\Authenticated Users" S-1-5-11
[Group 7] = "LOCAL" S-1-2-0

(X) SeChangeNotifyPrivilege =

(O) SeSecurityPrivilege =

(O) SeBackupPrivilege =

(O) SeRestorePrivilege =

(O) SeSystemtimePrivilege =

(O) SeShutdownPrivilege =

(O) SeRemoteShutdownPrivilege =

(O) SeTakeOwnershipPrivilege =

(O) SeDebugPrivilege =

(O) SeSystemEnvironmentPrivilege =

(O) SeSystemProfilePrivilege =

(O) SeProfileSingleProcessPrivilege =

(O) SeIncreaseBasePriorityPrivilege =

(X) SeLoadDriverPrivilege =

(O) SeCreatePagefilePrivilege =

(O) SeIncreaseQuotaPrivilege =

(X) SeUndockPrivilege =

(O) SeTcbPrivilege =

C:\>

这就是我的令牌中的信息,它包括我的SID,属于的组,具有的权限的详细列表等信息。所以可见,令牌决定了一个用户在一台计算机上所具有的能力。

2.安全性标志符(SID)

SID是在创建一个用户或组的时候由系统分配的,是唯一的。当一个本地用户登录时,SID将由系统从SAM中的用户数据库中取出。

关于SID的结构可以参照《INSIDE WINDOWS2000》里的一段:

A SID is a variable-length numeric value that consists of a SID structure revision number, a 48-bit identifier authority value, and a variable number of 32-bit subauthority or relative identifier (RID) values.

下面是一些系统内置的SID

Well-Known SIDs

SID
Group
Use

S-1-1-0
Everyone
A group that includes all users.

S-1-2-0
Local
Users who log on to terminals locally (physically) connected to the system.

S-1-3-0
Creator Owner ID
A security identifier to be replaced by the security identifier of the user who created a new object. This SID is used in inheritable access-control entries (ACEs).

S-1-3-1
Creator Group ID
Identifies a security identifier to be replaced by the primary-group SID of the user who created a new object. Use this SID in inheritable ACEs.

SID结尾的数字是RID(relative identifier)。500表示是管理员组,GUEST组的是501

ADAM提出的克隆管理员帐号就是在SID上做手脚,把一个帐号的SID的RID克隆成500,这样系统就会认为是管理员了。

一个完整的SID的结构可以参看上面令牌中的SID。

S-1-5-21-1409082233-1957994488-472307971-500

3.什么是访问控制列表(ACL)

ACL(access control list)从字面的意思很好理解。一个系统通过ACL来判断用户对资源的何种程度的访问。由两种类型的ACL:DACL(Discretionary Access Control List)和SACL(System Access Control List)。DACL包括户和组的列表,以及相应的权限,允许或是拒绝,用来确定对资源的访问权限。SACL则用来确定安全资源的审核策略。ACL由零个 或多个ACE(Access Control Entries)组成,一个ACE包括一个SID和该SID可访问资源的描述,比如允许和拒绝,拒绝优先于允许。

在win2000 resource kit中有几个工具是关于acl的,较为典型的是xcacls。下面是一个用xcacls查看acl的例子

C:\Program Files\Resource Kit>xcacls whoami.exe

C:\Program Files\Resource Kit\whoami.exe BUILTIN\Users:R

BUILTIN\Power Users:C

BUILTIN\Administrators:F

NT AUTHORITY\SYSTEM:F

NT AUTHORITY\TERMINAL SERVER USER:C

C:\Program Files\Resource Kit>

其他的关于acl的工具还有svcacls.exe,showacls以及subinacl.exe等。这里不再一一赘述。

4.权限(privilege)

简单来说,权限是系统赋予用户的一定的权力,它们允许或者不允许某些影响整个计算机系统而非某一对象的特权操作。下面的表格列出了系统的一些权限和功能。

Privilege
Windows Privilege
Description

SeTcbPrivilege
Act as part of the operating system
Allows a process to authenticate like a user and thus gain access to the same resources as a user. Only low-level authentication services should require this privilege.

SeMachineAccountPrivilege
Add computers to a domain
Allows the user to add a computer to a specific domain. For the privilege to be effective, it must be assigned to the user as part of local security policy for domain controllers in the domain.

SeBackupPrivilege
Back up files and directories
Allows the user to circumvent file and directory permissions to back up the system. The privilege is checked only when an application attempts access through the NTFS backup application programming interface (API). Oth
erwise, normal file and directory permissions apply.

By default, this privilege is assigned to Administrators and Backup Operators. See also Restore files and directories in this table.

SeChangeNotifyPrivilege
Bypass traverse checking
Allows the user to pass through folders to which the user otherwise has no access while navigating an object path in any Windows file system or in the registry. This privilege does not allow the user to list the contents of a folder; it allows the user only to traverse its directories.

By default, this privilege is assigned to Administrators, Backup Operators, Power Users, Users, and Everyone.

SeSystemTimePrivilege
Change the system time
Allows the user to set the time for the internal clock of the computer.

By default, this privilege is assigned to Administrators and Power Users.

SeCreatePagefilePrivilege
Create a page filepagefile
Allows the user to create and change the size of a page file.

By default, this privilege is assigned to Administrators.

SeCreateTokenPrivilege
Create a token object
Allows a process to create an access token by calling NtCreateToken() or other token-creating APIs.

SeCreatePermanentPrivilege
Create permanent shared objects
Allows a process to create a directory object in the Windows 2000 object manager.

SeDebugPrivilege
Debug programs
Allows the user to attach a debugger to any process.

By default, this privilege is assigned to Administrators.

SeEnableDelegationPrivilege
Enable computer and user accounts to be trusted for delegation
Allows the user to change the Trusted for Delegation setting on a User or Computer object in Active Directory. The user or computer that is granted this privilege must also have write access to the account control flags on the object.

SeRemoteShutdownPrivilege
Force shutdown from a remote system
Allows a user to shut down a computer from a remote location on the network. See also Shut down the system in this table.

By default, this privilege is assigned to Administrators.

SeAuditPrivilege
Generate security audits
Allows a process to create, generate, and add entries in the security log. The security log is used to trace unauthorized system access. See also Manage auditing and security log in this table.

SeIncreaseQuotaPrivilege
Increase quotas
Allows a process that has Write Property access to another process to increase the processor quota that is assigned to the other process. This privilege is useful for system tuning, but it can be abused, as in a denial of service attack.

By default, this privilege is assigned to Administrators.

SeIncreaseBasePriorityPrivilege
Increase scheduling priority
Allows a process that has Write Property access to another process to increase the execution priority of the other process. A user with this privilege can change the scheduling priority of a process in the Task Manager dialog box.

By default, this privilege is assigned to Administrators.

SeLoadDriverPrivilege
Load and unload device drivers
Allows a user to install and uninstall Plug and Play device drivers. Device drivers that are not Plug and Play are not affected by this privilege and can be installed only by Administrators. Because device drivers run as trusted (highly privileged) programs, this privilege can be misused to install hostile programs and give them destructive access to resources.

By default, this privilege is assigned to Administrators.

SeLockMemoryPrivilege
Lock pages in memory
Allows a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk. Exercising this privilege can significantly degrade system performance. This privilege is obsolete and is therefore never selected.

SeSecurityPrivilege
Manage auditing and security log
Allows a user to specify object access auditing options for individual resources such as files, Active Directory objects, and registry keys. Object access auditing is not actually performed unless you have enabled it in Audit Policy (under Security Settings, Local Policies). A user who has this privilege can also view and clear the security log from Event Viewer.

By default, this privilege is assigned to Administrators.

SeSystemEnvironmentPrivilege
Modify firmware environment values
Allows modification of system environment variables either by a process through an API or by a user through System Properties.

By default, this privilege is assigned to Administrators.

SeProfileSingleProcessPrivilege
Profile a single process
Allows a user to run Microsoft® Windows NT® and Microsoft® Windows® 2000 performance-monitoring tools to monitor the performance of nonsystem processes.

By default, this privilege is assigned to Administrators and Power Users.

SeSystemProfilePrivilege
Profile system performance
Allows a user to run Windows NT and Windows 2000 performance-monitoring tools to monitor the performance of system processes.

By default, this privilege is assigned to Administrators.

SeUndockPrivilege
Remove computer from docking station
Allows the user of a portable computer to undock the computer by clicking Eject PC on the Start menu.

By default, this privilege is assigned to Administrators, Power Users, and Users.

SeAssignPrimaryTokenPrivilege
Replace a process-level token
Allows a parent process to replace the access token associated with a child process.

SeRestorePrivilege
Restore files and directories
Allows a user to circumvent file and directory permissions when restoring backed-up files and directories and to set any valid security principal as the owner of an object. See also Back up files and directories in this table.

By default, this privilege is assigned to Administrators and Backup Operators.

SeShutdownPrivilege
Shut down the system
Allows a user to shut down the local computer. See also Force shutdown from a remote system in this table. In Windows 2000 Professional:

By default, this privilege is assigned to Administrators, Backup Operators, Power Users, and Users. In Windows 2000 Server:

By default, this privilege is not assigned to Users, only to Administrators, Backup Operators, and Power Users.

SeSynchAgentPrivilege
Synchronize directory service data
Allows a process to provide directory synchronization services. This privilege is relevant only on domain controllers.

By default, this privilege is assigned to Administrators and LocalSystem accounts on domain controllers.

SeTakeOwnershipPrivilege
Take ownership of files or other objects
Allows a user to take ownership of any securable object in the system, including Active Directory objects, files and folders, printers, registry keys, processes, and threads.

By default, this privilege is assigned to Administrators.

二.一些安全问题

1.利用备份权限绕过访问控制

系统备份员(Backup Operators)和管理员(Administrator)具有一项权限:SeBackupPrivilege

利用该权限可以访问正常情况下被拒绝访问的文件。当在ACL中设置拒绝某帐号读取文件时,一个备份程序可以在调用Createprocess时,通过设置FILE_FLAG_BACKUP_SEMANTICS的标志来对文件进行读取。

按照《writng secure code》一书给出的代码如下

1. 假设你具有SeBackupPrivilege权限。

2. 创建一个txt文件,内容为:writings this for cj

3. 添加一个全部拒绝该用户访问的ACE。

现在,试着打开该文件,将会出现拒绝访问的提示。现在,编译下面这段代码(来自《writng secure code》)

/*

WOWAccess.cpp

*/

#include <stdio.h>

#include <windows.h>

int EnablePriv (char *szPriv) {

HANDLE hToken = 0;

if (!OpenProcessToken
(GetCurrentProcess(),

TOKEN_ADJUST_PRIVILEGES,

&hToken)) {

printf("OpenProcessToken() failed -> %d", GetLastError());

return -1;

}

TOKEN_PRIVILEGES newPrivs;

if (!LookupPrivilegeValue (NULL, szPriv,

&newPrivs.Privileges[0].Luid)) {

printf("LookupPrivilegeValue() failed -> %d", GetLastError());

CloseHandle (hToken);

return -1;

}

newPrivs.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

newPrivs.PrivilegeCount = 1;

if (!AdjustTokenPrivileges(hToken, FALSE, &newPrivs, 0, NULL, NULL)) {

printf("AdjustTokenPrivileges() failed -> %d", GetLastError());

CloseHandle (hToken);

return -1;

}

CloseHandle (hToken);

return 0;

}

void DoIt(char *szFileName, DWORD dwFlags) {

printf("\n\nAttempting to read %s, with 0x%x flags\n",

szFileName, dwFlags);

HANDLE hFile = CreateFile(szFileName,

GENERIC_READ, FILE_SHARE_READ,

NULL, OPEN_EXISTING,

dwFlags,

NULL);

if (hFile == INVALID_HANDLE_VALUE) {

printf("CreateFile() failed -> %d", GetLastError());

return;

}

char buff[128];

DWORD cbRead=0, cbBuff = sizeof buff;

ZeroMemory(buff, sizeof buff);

if (ReadFile(hFile, buff, cbBuff, &cbRead, NULL)) {

printf("Success, read %d bytes\n\nText is: %s",

cbRead, buff);

} else {

printf("ReadFile() failed -> %d", GetLastError());

}

CloseHandle(hFile);

}

void main(int argc, char* argv[]) {

if (argc < 2) {

printf("Usage: %s <filename>", argv[0]);

return;

}

// Need to enable backup priv first.

if (EnablePriv(SE_BACKUP_NAME) == -1)

return;

// Try with no backup flag - should get access denied.

DoIt(argv[1], FILE_ATTRIBUTE_NORMAL);

// Try with backup flag - should work!

DoIt(argv[1], FILE_ATTRIBUTE_NORMAL │ FILE_FLAG_BACKUP_SEMANTICS);

}

运行情况如下

C:\>bkp

Usage: bkp <filename>

C:\>bkp test.txt

Attempting to read test.txt, with 0x80 flags

CreateFile() failed -> 5

Attempting to read test.txt, with 0x2000080 flags

Success, read 20 bytes

Text is: writings this for cj

C:\>

如上,使用了备份的标志后(with 0x2000080 flags)就可以访问开始拒绝访问的文件了。

2.利用SeTakeOwnershipPrivilege权限绕过访问控制

在我的计算机上,tt是一个普通的user帐号,当给他添加上SeTakeOwnershipPrivilege后,就可以绕过原来的访问控制,比如,对 system32目录下就可以添加完全控制的ACE,从而可以任意复制文件。对Document and Settings目录下也可以如法炮制,那么,给管理员下个套就是很简单的事情了。下面是实现过程

首先看下tt所具有的权限

C:\>whoami /all

[User] = "DARKDEAMON\tt" S-1-5-21-1409082233-1957994488-472307971-1013

[Group 1] = "DARKDEAMON\None" S-1-5-21-1409082233-1957994488-472307971-513

[Group 2] = "Everyone" S-1-1-0

[Group 3] = "BUILTIN\Users" S-1-5-32-545

[Group 4] = "NT AUTHORITY\INTERACTIVE" S-1-5-4

[Group 5] = "NT AUTHORITY\Authenticated Users" S-1-5-11

[Group 6] = "LOCAL" S-1-2-0

(O) SeCreatePagefilePrivilege =

(O) SeAssignPrimaryTokenPrivilege =

(O) SeCreateTokenPrivilege =

(O) SeAuditPrivilege =

(X) SeUndockPrivilege =

(O) SeTakeOwnershipPrivilege =

(X) SeChangeNotifyPrivilege =

C:\>

如图,可以看到已经添加了SeTakeOwnershipPrivilege权限,下面,将演示如何取得对system32目录的完全控制

如图,这是修改前的结果.

下面我们来更改目录的所有者以得到完全控制.

现在可以看到更改所有者已经激活,所以我们只需要更改所有者就可以取得完全控制了。而在这个权限添加以前是无法进行这项操作的。

3.利用SeDebugPrivilege权限来做坏事

这个权限是极为危险的。它允许用户通过调试进程来访问秘密数据。典型的例子就是findpass。利用SeDebugPrivilege调试winlogon进程来获得明文存储在里面的域名和密码。

另一个典型的例子就是LSADUMP2,通过使用CreateRemoteThread函数来在LSASS.EXE进程中读取已经经过LSA解密的私有数据代码,从而查看LSA中存储的秘密信息。

4.更进一步

管理员(Administrator)默认具有16个权限

SeChangeNotifyPrivilege
SeSecurityPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeSystemtimePrivilege
SeShutdownPrivilege
SeRemoteShutdownPrivilege
SeTakeOwnershipPrivilege
SeDebugPrivilege
SeSystemEnvironmentPrivilege
SeSystemProfilePrivilege
SeProfileSingleProcessPrivilege
SeIncreaseBasePriorityPrivilege

然而,SeTcbPrivilege和SeCreateTokenPrivilege两个权限管理员缺省是没有的. SeTcbPrivilege是具有操作系统的一部分来工作的权限,,SeCreateTokenPrivilege更为任意令牌创建权限!拥有了这两个 权限,用Lu0的话来说,就是可以超越administrator!

从而提出另一种克隆管理员帐号的途径:克隆管理员的权限,甚至包括SeTcbPrivilege和SeCreateTokenPrivilege两个权限!

在这里使用到RESOURCE KIT中的一个工具:ntrights.exe

通过这个工具可以给指定帐号和组添加权限。

下面是ntrights.exe的说明

ntrights {-r Right │ +r Right} -u UserOrGroup [-m \\Computer] [-e Entry] [-?]

Where:

-r Right

revokes Right from specified user or group. For a full list, see Windows 2000 Rights.

+r Right

grants Right to specified user or group. For a full list, see Windows 2000 Rights.

-u UserOrGroup

specifies the user or group for whom rights are to be granted or revoked.

-m \\Computer

specifies the computer (machine) on which to perform the operation. The default is the local computer.

-e Entry

adds a text string Entry to the computer's event log.

-?

displays a syntax screen at the command prompt.

下面是使用实例,

C:\>ntrights +r SeDebugPrivilege -u tt
Granting SeDebugPrivilege to tt ... successful
C:\>

这样就成功给tt添加了SeDebugPrivilege的权限,其他权限也可以照样添加。如果是去除权限,则只需把+r变成-r就可以了。

这样就实现了另一种意义上的克隆帐号,不过这样得到权限后仍然不能启动服务或添加帐号,比如net user ttt /add时发生拒绝错误,不知道这条命令是否会检查当前用户的SID,所以产生失败,还请高手指示。

三.后记
罗嗦写了这么多,是出于学习的目的,用wawa的话来说就是在写的过程中获益不少。由于水平有限,内容不免有错误之处,还请高手指正。

相关工具下载:
whoami: http://www.3389.net/download/whoami.exe
xcacls: http://www.3389.net/download/xcacl.exe
bkp: http://www.3389.net/download/bkp.exe
ntrights: http://www.3389.net/download/ntrights.exe
findpass: http://www.3389.net/download/findpass.zip
lsadump2: http://www.3389.net/download/lsadump2.zip

参考资料:
1.《INSIDE WINDOWS2000》
2.《WRITING SECURE CODE》
3.《Windows NT 4的安全结构》
4.《最小权限的挑战》
5.《超越ADMINISTRATOR》
6.《如何克隆管理员帐号》
7.Windows2000 Resource Kit Document

分类: 技术文章 标签: ,

取回Windows密码的绝妙方法

2006年10月24日 Chinadu 1 条评论

根据高人指导,我已经将密码改回来了。其方法十分简单,而且具有通用性。
其具体方法为:
1。先进入别的nt系统(嘻嘻,我有几个nt系统,在此就不用w2ntkey之类的需要软盘启动的了。)
2。在原来nt的系统目录下,修改文件spoolss.exe为spoolss2.exe
3。编写spoolss.c like this:

#include <stdlib.h> 
int main(int argc, char* argv[]) 

    system("net user administrator 123"; 
    system("spoolss2.exe"; 
    return 0; 

4。编译后,将spoolss.exe放到原来nt的系统目录下。
5。重新启动机器,密码为123。一切OK!
6。回原来的别NT系统下,将spoolss2.exe改回来。

WIN2000下的spoolss.exe的文件名为spoolsv.exe。如此方法也是行得通的

分类: 技术文章 标签:

卡巴斯基不能在Windows2003 sever系统上安装的解决办法

2006年10月15日 Chinadu 没有评论

首先你的操作系统是2003sever的,我们要用到个工具ORCA,点此进入下载页面,此工具是一个msi编辑器,下载好了就安装一下,此乃准备工作……

  准备好了就先安装一下卡巴斯基6.0,(????不是说不能安装吗?),嘿嘿,这个你就不用管了,山人自有妙计,像正常安装一样,直到出现一个错误对话框,就是那个提示不能安装在NT和2003系统上的那个,看到了就别点,叫你别点你还点,重来!然后打开ORCA,点击打开,找到你的卡巴6.0的安装文件后按以下路径打开:[卡巴斯基.6.0简体中文正式光盘版].KIS6.0\AutoPlay\Docs,看到那个kis6.sch.msi文件了没?打开它!!打开后按Ctrl+F弹出查找对话框,然后把安装时弹出的那个对话框中的提示语一个不漏的输进去,包括标点,然后点查找,找到的那一行会以黄色显示,在那一行上面点右键,选择删除行删除它,然后再查找,再删除,全部删除完后点保存,我记得删除两次就行了。

  OK!!!是不是很简单?再在你的2003sever上装一下看看,是不是可以了,是不是有点激动?呵呵!!

注:此方法可以解决其它一些不能在2003sever上运行的软件,有一些是EXE文件,此类文件大家可以先把该EXE文件解压,然后在解压的文件夹中就会有一个MSI文件了,同理。

分类: 资源共享 标签: ,