Security

Get notified of failed Windows login attempts

Learn how to get notified of failed Windows login attempts on a forward facing workstation or server for better security awareness of attacks

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.

failed_logins03

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.failed_logins01
failed_logins02

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

elogmgr01

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.
elogmgr01b

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.
elogmgr02

We want toย Enableย the alert and thenย Add a Customize notification template.

elogmgr03

On theย Event Filters we name the Alert.

elogmgr04

Then in theย Event Fields tab we can specify the Event ID we want to check for, in this caseย 4625.

elogmgr05

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.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.