|
| 1 | +--- |
| 2 | +title: "Zerologon Exploiter" |
| 3 | +draft: false |
| 4 | +description: "Exploits the Zerologon vulnerability" |
| 5 | +tags: ["exploiter", "zerologon", "cve-2020-1472"] |
| 6 | +pre: "<i class='fa fa-right-to-bracket'></i> " |
| 7 | +--- |
| 8 | + |
| 9 | +{{% notice warning %}} |
| 10 | +This exploiter is [unsafe for production](#a-note-on-safety)! |
| 11 | +{{% /notice %}} |
| 12 | + |
| 13 | +{{% notice info %}} |
| 14 | +The Zerologon exploiter exploits [CVE-2020-1472]( |
| 15 | +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1472). |
| 16 | +{{% /notice %}} |
| 17 | + |
| 18 | +## Netlogon Remote Protocol |
| 19 | + |
| 20 | +The [Netlogon Remote Protocol (MS-NRPC)]( |
| 21 | +https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrpc) is a |
| 22 | +Windows Server process that authenticates users and other services within a |
| 23 | +domain. If the Netlogon service is interrupted, the functionality of the domain |
| 24 | +controller, whose responsibilities include user authentication, authorization, |
| 25 | +and account management, is severely affected. |
| 26 | + |
| 27 | +## Exploitation |
| 28 | + |
| 29 | +Due to a flaw in the cryptographic authentication scheme of Netlogon, an |
| 30 | +attacker can bypass authentication and gain administrator-level privileges to |
| 31 | +an unpatched machine, including a domain controller, effectively granting the |
| 32 | +attacker control over the entire domain. |
| 33 | + |
| 34 | +Infection Monkey's Zerologon exploiter takes advantage of this vulnerability to |
| 35 | +steal credentials from the domain controller, which are then used to propagate |
| 36 | +to the machine using one of the brute force exploiters (for example, the SMB |
| 37 | +exploiter). |
| 38 | + |
| 39 | + |
| 42 | + |
| 43 | +## Mitigation |
| 44 | + |
| 45 | +To download the relevant security update and read more, click [here]( |
| 46 | +https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-1472). |
| 47 | + |
| 48 | +## A note on safety |
| 49 | + |
| 50 | +This exploiter is not safe for production or other sensitive environments. |
| 51 | +During successful exploitation, the Zerologon exploiter: |
| 52 | + |
| 53 | +* Will temporarily change the target domain controller's password. |
| 54 | +* May break the target domain controller's communication with other systems in |
| 55 | + the network, affecting functionality. |
| 56 | +* May change the administrator's password. |
| 57 | +* Will *attempt* to revert all changes. |
| 58 | + |
| 59 | +While the Zerologon exploiter is usually successful in reverting its changes |
| 60 | +and restoring the original passwords, it sometimes fails. Restoring passwords |
| 61 | +manually after the Zerologon exploiter has run is nontrivial. For information |
| 62 | +on restoring the original passwords, see [manually restoring your password]( |
| 63 | +#manually-restoring-your-password). |
| 64 | + |
| 65 | +To minimize the risk posed by this exploiter, it is recommended that this |
| 66 | +exploiter be run _only_ against VMs with a recent snapshot and _only_ in |
| 67 | +testing or staging environments. |
| 68 | + |
| 69 | +## Manually restoring your password |
| 70 | + |
| 71 | +This exploiter attempts to restore the original passwords after exploitation. |
| 72 | +It is usually successful, but it sometimes fails. If this exploiter has changed |
| 73 | +a password but was unable to restore the original, you can try the following |
| 74 | +methods to restore the original password. |
| 75 | + |
| 76 | +### Restore the VM from a recent snapshot |
| 77 | + |
| 78 | +If the affected system is a virtual machine, the simplest way to restore it to |
| 79 | +a working state is to revert to a recent snapshot. |
| 80 | + |
| 81 | +### Restore the administrator's password |
| 82 | + |
| 83 | +If you are unable to log in as the administrator, you can follow the |
| 84 | +instructions |
| 85 | +[here](https://www.top-password.com/knowledge/reset-windows-server-2019-password.html) |
| 86 | +to regain access to the system. |
| 87 | + |
| 88 | +### Use Reset-ComputerMachinePassword |
| 89 | + |
| 90 | +If you are able to log in as the administrator, you can use the |
| 91 | +[Reset-ComputerMachinePassword](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/reset-computermachinepassword?view=powershell-5.1) |
| 92 | +powershell command to restore the domain controller's password. |
| 93 | + |
| 94 | +### Try a Zerologon password restoration tool |
| 95 | +If all other approaches fail, you can try the tools and steps found |
| 96 | +[here](https://github.com/risksense/zerologon). |
| 97 | + |
| 98 | +## See also |
| 99 | +- [Zerologon exploiter reference |
| 100 | + documentation](/reference/exploiters/zerologon) |
0 commit comments