Get notified of failed Windows login attempts
In tinkering a lot with security and other facets of security and notification lately with Windows workstations and servers, I am a big advocate of notications when it comes to security events that are worth notifying over. ย I had written a post earlier about getting notified when MAC address changes happen on your network to monitor when new machines are connected as well as when IPs change layer 2 addresses. ย When it comes to someone trying to brute force your passwords, you also need to know what is happening and from where those events are coming from. ย Let’s take a look at how to get notified of failed Windows login attempts.
Get notified of failed Windows login attempts
In newer Windows operating systems, Event ID 4625 is the key event to trap for in the Security log of a Windows machine. ย The key here is your audit policy settings to capture Event ID 4625. ย You need to audit at least for failure inย Audit account logon events andย Audit logon events.
Once you have Auditing enabled on your workstation/server, you can start capturing the events as you can see below in the filtered view of the Security log, filtering for Event ID 4625.
Now that we are gathering the events for the failed logins, we now have something we can work with to start notifying.
Notification Methods
One of the easiest ways to get notified of failed login events is to use the Netwrix Event Log Manager which is a free tool from Netwrix. ย What I like is the SMTP configuration is easy to setup, even using the gmail SMTP server to a gmail address. ย The events are also highly configurable to the Event ID and even multiple event ids.
Let’s take a look at how to configure NetWrix Event Log Manager to capture Event ID 4625 and email a gmail address.
Below we have setup:
- SMTP Server: smtp(dot)gmail(dot)com
- Event summary recipient(s): specify your email address, gmail here in this example
- Port: ย For Gmail, we have to use port 587
We need to click theย Advanced Options and thenย Configure to check off theย Use Secure Sockets Layer connection (SSL)ย – this is required for our connection to Gmail to work. ย I also suggest that you use theย Verify button to see if you have any errors sending the test email before pulling your hair out trying to figure out why you aren’t getting alerts in testing.
If we click the Real-time alertsย Configureย we will be able to setup the alerts we want to check for in real-time. ย Clickย Add.
We want toย Enableย the alert and thenย Add a Customize notification template.
On theย Event Filters we name the Alert.
Then in theย Event Fields tab we can specify the Event ID we want to check for, in this caseย 4625.
Final Thoughts
Get notified of failed Windows login attempts is a really simple yet effective way to monitor if someone is trying to brute force a critical system such as a system out in the DMZ that may be exposed to the Internet. ย Checkout my post here about Securing RDP access to Home Lab as a typical example of securing a server that is forward facing.