When it is written
A domain controller writes 5831 when a client sets up a Netlogon secure channel with a trust account without secure RPC, and accepts it because the trust account is allowed by the Group Policy setting Domain controller: Allow vulnerable Netlogon secure channel connections. A trust account stands for another domain (Microsoft's example: domain-b$ for a trust with domain-b), and the channel is normally set up by a domain controller of that domain.
Domain controllers write it once they have an update released on August 11, 2020 or later. Without the policy entry the same connection is refused and logged as 5828. Microsoft's article explains that an administrator has to add the trust account to the security group used by the policy, and warns that doing so makes the forest vulnerable to attack.
How to turn it on
NETLOGON writes the event to the System log (Event Viewer > Windows Logs > System), which is on by default. Microsoft
Fields
The template of this event is not part of client Windows and Microsoft does not publish its XML field names, so the fields are named by the labels of Microsoft’s documentation.
| Field | What it holds |
|---|---|
| Account Type | Kind of account that set up the channel. The first value of the event data. Microsoft does not list the values. |
| Trust Name | Trust account that was allowed, which stands for the other domain (Microsoft's example: domain-b$). Microsoft's monitoring script treats it as the name of the account. |
| Trust Target | Other side of the trust. Microsoft's monitoring script treats it as the domain name. |
| Client IP Address | Address of the client that set up the channel, normally a domain controller of the other domain. |
Values to know
Client IP Address
| Value | Meaning | Signal |
|---|---|---|
A domain controller of the other domain | The exempted domain controller set up the channelExpected while the exemption stands. Microsoft asks that it be removed once that domain controller is updated. | Worth knowing |
Any other address | Someone else used the exempted trust accountAn accepted vulnerable connection with a trust account from a computer that is not a domain controller of the other domain. Investigate at once. | Attack signal |
Trust Name
| Value | Meaning | Signal |
|---|---|---|
A trust account such as domain-b$ | The account that stands for the other domainMicrosoft's own example. Tells you which trust is exempted. | Worth knowing |
Volume and noise
None in a forest that follows Microsoft's guidance: every trust is expected to use secure RPC. The event appears only after an administrator put a trust account on the allow list, typically for a non-Windows or unpatched domain controller of the other domain, and then for every channel that domain controller sets up.
Keeping it manageable
- Keep every 5831 and alert on it: the volume is low and the rule matches only the event ID and the
NETLOGONprovider. - Compare Client IP Address with the addresses of the other domain's domain controllers. A channel accepted for the trust account from any other address is a direct risk to the forest.
- Review who added the trust account to the policy's group: the change shows in the Security log as a group membership change on the domain controllers.
Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
Why is event 5831 more serious than event 5830?
Both record an accepted vulnerable connection for an account on the allow list. With a trust account the exposed identity is the one that links two domains, and Microsoft warns that allowing trust accounts makes the whole Active Directory forest vulnerable to attack, while a machine account exposes one device.
How do I get rid of event 5831?
Get secure RPC support for the domain controller of the other domain from its vendor, or retire it, and then remove the trust account from the group the allow list policy uses. Microsoft asks that every trust use secure RPC with the Netlogon secure channel.
What do Trust Name and Trust Target hold in event 5831?
Trust Name is the trust account, named after the other domain with a trailing dollar sign in Microsoft's example. Microsoft's monitoring script reads Trust Target as the domain name. Microsoft does not document the two fields further.