POC详情: d674759dbabdfd498dbc7769ed6ace0abe5a568d

来源
关联漏洞
标题: Microsoft Windows Netlogon 安全特征问题漏洞 (CVE-2020-1472)
描述:Microsoft Windows Netlogon是美国微软(Microsoft)公司的Windows的一个重要组件,主要功能是用户和机器在域内网络上的认证,以及复制数据库以进行域控备份,同时还用于维护域成员与域之间、域与域控之间、域DC与跨域DC之间的关系。 Microsoft Windows Netlogon 存在安全漏洞。攻击者可以使用 Netlogon 远程协议 (MS-NRPC) 建立与域控制器的易受攻击的 Netlogon 安全通道连接并进行特权提升。
描述
Lab introduction to ZeroLogon
介绍
# ZeroLogon testing script

A lab setup to test a vulnerability for the ZeroLogon exploit (CVE-2020-1472).
It contains a Python script that uses the Impacket library to test the vulnerability, and a Virtual Machine (VM) with Windows Server 2019 configured as a Domain Controller (DC).

The script attempts to perform the Netlogon authentication bypass.
It will immediately terminate when successfully performing the bypass, and not perform any Netlogon operations.
When the DC is patched, the detection script will give up after sending a number of pairs of RPC calls and conclude the target is not vulnerable (with a false negative chance of 0.04%).

<details open>
    <summary><b>Requirements</b></summary>

- VMWare workstation/fusion
- Vagrant
- Python (^v3.7)

**Optional**

- Docker
  
</details>

Simply type `vagrant up` to load a vulnerable build of Windows Server 2019 as a VM.
Then, configure the VM as a Domain Controller following [this tutorial](https://www.virtualgyanis.com/post/step-by-step-how-to-install-and-configure-domain-controller-on-windows-server-2019).
Lastly, launch the attack on the DC (`zerologon_tester.py`).
It is recommended to use the Dockerised version of this attack or in a `virtual environment`.

- **`Docker` option.** Run:
  
    ```bash
    # NOTE: On Windows, you may need to enable the `Hyper-V` Wiwndows feature.
    # NOTE2: On Windows, you may need to switch to `Linux Containers`.
    $ docker build -f Dockerfile . -t zerologon
    # This command run the zerologon test on the DC with domain VAGRANT in the address 192.168.33.10
    $ docker run zerologon VAGRANT 192.168.33.10
    ```

- **`VirtualEnv` option.** Run:

    ```bash
    $ python3 -m virtualenv zerologon
    $ zerologon/Scripts/Activate.ps1
    # NOTE: This may give you some issues with your firewall!!
    $ pip install git+https://github.com/SecureAuthCorp/impacket
    $ pip install -r requirements.txt
    $ python zerologon_tester.py VAGRANT 192.168.33.10
    ```

---
The output of this attack should look something like this:

![zerologon](assets/attack.png)

This script is only meant to test the viability of the attack, it does not exploit the server in any other way.
The script does not perform any changes to the DC.
If you are curious about how to implement a PoC attack, check [this](https://medium.com/mii-cybersec/zerologon-easy-way-to-take-over-active-directory-exploitation-c4b38c63a915) writeup or a similar one.

---

The script targets can be used to target a DC or backup DC. It likely also works against a read-only DC, but this has not been tested. The DC name should be its NetBIOS computer name. If this name is not correct, the script will likely fail with a `STATUS_INVALID_COMPUTER_NAME` error. A whitepaper on this vulnerability will be published [here](https://www.secura.com/blog/zero-logon).


> **NOTE**:
> If something goes sideways and you receive a `STATUS_INVALID_COMPUTER_NAME` error, run `nbtstat -A 192.168.33.10`, this will give you some insight on what is going on in that address. Otherwise, you can always test wether the machine is reachable from your host by pinging it (`ping 192.168.33.10`).
>
> **NOTE2**:
> If the attack fails, it may be that the machine has been updated with security patches. Check the updates and remove anything that looks like `Security Patches` from 2020 onwards.
文件快照
 [4.0K]  /data/pocs/d674759dbabdfd498dbc7769ed6ace0abe5a568d
├── [4.0K]  assets
│   └── [ 26K]  attack.png
├── [ 417]  Dockerfile
├── [1.0K]  LICENSE
├── [3.3K]  README.md
├── [ 392]  requirements.txt
├── [ 334]  Vagrantfile
└── [3.4K]  zerologon_tester.py

1 directory, 7 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。