值得一看
正规流量卡

Windows下的渗透测试之提权的基本套路(上)

Windows下的渗透测试之提权的基本套路(上)-使者云
Windows下的渗透测试之提权的基本套路(上)
此内容为付费资源,请付费后查看
2000积分
付费资源
已售 1
------正文内容展示,开始汲取新知识啦------

从t5到t6 – 快速攻陷


在继续之前,你需要先看一下你已经搜集到的信息,下一步就是要寻找一下能被利用的系统缺陷来提升我们的权限。

首先我们要看的是是补丁修正情况,我的WMIC脚本可以列出已安装的补丁,但是你也可以通过下面这条命令来查看:

C:\Windows\system32> wmic qfe get Caption,Description,HotFixID,InstalledOn
Caption                                     Description      HotFixID   InstalledOn
http://support.microsoft.com/?kbid=2727528  Security Update  KB2727528  11/23/2013
http://support.microsoft.com/?kbid=2729462  Security Update  KB2729462  11/26/2013
http://support.microsoft.com/?kbid=2736693  Security Update  KB2736693  11/26/2013
http://support.microsoft.com/?kbid=2737084  Security Update  KB2737084  11/23/2013
http://support.microsoft.com/?kbid=2742614  Security Update  KB2742614  11/23/2013
http://support.microsoft.com/?kbid=2742616  Security Update  KB2742616  11/26/2013
http://support.microsoft.com/?kbid=2750149  Update           KB2750149  11/23/2013
http://support.microsoft.com/?kbid=2756872  Update           KB2756872  11/24/2013
http://support.microsoft.com/?kbid=2756923  Security Update  KB2756923  11/26/2013
http://support.microsoft.com/?kbid=2757638  Security Update  KB2757638  11/23/2013
http://support.microsoft.com/?kbid=2758246  Update           KB2758246  11/24/2013
http://support.microsoft.com/?kbid=2761094  Update           KB2761094  11/24/2013
http://support.microsoft.com/?kbid=2764870  Update           KB2764870  11/24/2013
http://support.microsoft.com/?kbid=2768703  Update           KB2768703  11/23/2013
http://support.microsoft.com/?kbid=2769034  Update           KB2769034  11/23/2013
http://support.microsoft.com/?kbid=2769165  Update           KB2769165  11/23/2013
http://support.microsoft.com/?kbid=2769166  Update           KB2769166  11/26/2013
http://support.microsoft.com/?kbid=2770660  Security Update  KB2770660  11/23/2013
http://support.microsoft.com/?kbid=2770917  Update           KB2770917  11/24/2013
http://support.microsoft.com/?kbid=2771821  Update           KB2771821  11/24/2013
[..Snip..]

这些输出的结果是不能直接被利用的,最好的方式是去找权限提升的EXP并且将这些编号与EXP编号进行对比。这些EXP包括,但不限于:KiTrap0D (KB979682), MS11-011 (KB2393802), MS10-059 (KB982799), MS10-021 (KB979683), MS11-080 (KB2592799)。

如果有许多机器需要被安装,通常,一个技术员不会挨个机器手动装机。有一些自动安装的解决方案。这些方案是什么以及它们是如何工作的对我们的目的不重要,重要的是他们留下的用于安装过程的配置文件,这些安装文件包含大量的敏感信息,例如操作系统的产品密钥和管理员的密码。我们最感兴趣的就是管理员密码,因为我们可以用它来提升我们的权限。

通常的,这些目录包含这些配置文件(检查整个系统的所有文件也是不错想法):

c:\sysprep.inf
c:\sysprep\sysprep.xml
%WINDIR%\Panther\Unattend\Unattended.xml
%WINDIR%\Panther\Unattended.xml

这些文件要么包含着明文密码,要么就是Base64加密后的密码。下面是一个例子:

sysprep.inf 文件中的明文密码:

credentials.
[GuiUnattended]
OEMSkipRegional=1
OemSkipWelcome=1
AdminPassword=s3cr3tp4ssw0rd
TimeZone=20

sysprep.xml 文件中的Base64加密后的密文:

credentials. Please people Base64 is not
encryption, I take more precautions to protect my coffee. The password here is "SuperSecurePassword".
<LocalAccounts>
    <LocalAccount wcm:action="add">
        <Password>
            <Value>U3VwZXJTZWN1cmVQYXNzd29yZA==</Value>
            <PlainText>false</PlainText>
        </Password>
        <Description>Local Administrator</Description>
        <DisplayName>Administrator</DisplayName>
        <Group>Administrators</Group>
        <Name>Administrator</Name>
    </LocalAccount>
</LocalAccounts>

Unattended.xml 中同样是Base64加密后的密文:

<AutoLogon>
    <Password>
        <Value>U3VwZXJTZWN1cmVQYXNzd29yZA==</Value>
        <PlainText>false</PlainText>
    </Password>
    <Enabled>true</Enabled>
    <Username>Administrator</Username>
</AutoLogon>

在我们的好基友Ben Campbell的推荐下,我将获取组策略首选项(Group Policy Preferences)保存的密码也作为快速攻陷目标机器的方式之一。GPP允许域管理员在域控制端远程向域内主机添加本地账户以方便管理。当你要攻击的计算机连接到了一个域,那么去寻找储存在SYSVOL中的Groups.xml文件是非常值得做的事。任何经过授权的用户都对该文件有读的权限。在这个xml文件中,密码是用AES加密的,但令人费解的是,在MSDN上,密码的密钥和加密方式都被公布了,这样我么就可以轻松的解密这个密码。

1 2 3 4 5

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞943赞赏 分享
抢沙发

请登录后发表评论

    暂无评论内容