Introduction
Windows Event ID 4625 is generated when a logon attempt fails. For security monitoring systems such as Cyber Threat Analyzer (CTA), this event is particularly useful because repeated failed authentication attempts can indicate password guessing, brute-force activity, or an unauthorized user attempting to access a Windows system.
In this lab, I used a Kali Linux virtual machine and Metasploit Framework to generate failed SMB authentication attempts against a Windows VM. The purpose is not to compromise the machine, but to create realistic security telemetry that can be observed in Windows Event Viewer and detected by CTA.
Lab safety: Perform this test only against a Windows VM or other system you own or are explicitly authorized to test. Use an isolated virtual network whenever possible.
Lab Environment
The test consists of two virtual machines:
Kali Linux VM — used to generate the authentication attempts.
Windows VM — the monitored target.
Metasploit Framework — used to perform the SMB login testing.
Windows Event Viewer — used to verify Event ID 4625.
Windows Threat Analyzer — used to detect and analyze the resulting event.
In this example, the Windows VM has the address:
192.168.254.101
The Windows account being tested is:
Administrator
Why Event ID 4625 Is Generated
Windows records security auditing information whenever authentication attempts occur.
A successful authentication can produce Event ID 4624, while a failed authentication can produce Event ID 4625.
When Metasploit repeatedly attempts SMB authentication using incorrect passwords, Windows receives those authentication requests and rejects the invalid credentials. Assuming the appropriate Windows auditing policies are enabled, the failed attempts are recorded as Event ID 4625.
This makes the test useful for validating a detection pipeline:
Kali Linux
|
| SMB authentication attempts
v
Windows SMB Service
|
| Authentication failure
v
Windows Security Event Log
|
| Event ID 4625
v
Windows Threat Analyzer
|
v
Detection / Alert / Risk Analysis
Starting Metasploit
From the Kali Linux VM, start Metasploit:
msfconsole
Once the Metasploit console loads, select the SMB login scanner:
use auxiliary/scanner/smb/smb_login
Configure the Windows target:
set RHOSTS 192.168.254.101
Specify the Windows username:
set SMBUser Administrator
For the lab, configure a password file containing test passwords:
set PASS_FILE /root/passwords.txt
Enable verbose output so the authentication results can be observed:
set VERBOSE true
Finally, execute the scanner:
run
Metasploit will attempt the configured SMB authentication tests against the Windows VM.
What Happens on the Windows Machine?
For every invalid authentication attempt that reaches the Windows system and is rejected, Windows can generate a failed-logon security event.
The important event is:
Event ID: 4625
Provider: Microsoft-Windows-Security-Auditing
Description: An account failed to log on.
The exact event contents depend on the Windows version, authentication protocol, account configuration, and auditing configuration.
Among the information that may appear in the event are:
Account name
Account domain
Logon type
Source network address
Authentication package
Failure reason
Status/substatus codes
Workstation information
The Source Network Address is especially valuable for detection because it can identify the system generating the failed authentication attempts.
Verifying Event 4625
On the Windows VM, open:
Event Viewer
Navigate to:
Windows Logs
└── Security
Filter the Security log for:
4625
The resulting entries should correspond to failed authentication attempts generated during the lab.
You can also verify the events from PowerShell:
Get-WinEvent -FilterHashtable @{
LogName='Security'
Id=4625
} -MaxEvents 20
This provides a convenient way to confirm that Windows is actually receiving and recording the failed authentication attempts.
How CTA Can Detect the Activity
This is where the test becomes particularly useful for Windows Threat Analyzer.
Instead of simply displaying Event ID 4625, CTA can analyze the event as part of a broader authentication-abuse detection strategy.
For example:
Event 4625
↓
Identify failed authentication
↓
Extract source IP
↓
Identify targeted account
↓
Count repeated failures
↓
Apply detection rule
↓
Calculate risk
↓
Generate WTA alert
A single failed login may be normal. A large number of failures from the same source within a short period is considerably more interesting from a security-monitoring perspective.
Turning Individual Events Into Detection
The real value of a SIEM/EDR-style monitoring system is correlation.
For example, CTA could detect a pattern such as:
Multiple 4625 events
+
Same source IP
+
Same target account
+
Short time interval
=
Possible password-guessing activity
The detection can then be mapped to the appropriate MITRE ATT&CK technique and assigned an appropriate severity.
This is significantly more useful than simply saying:
"Event ID 4625 occurred."
Instead, the system can communicate:
Repeated failed SMB authentication attempts detected from a remote host.
That provides the analyst with context and reduces the amount of manual investigation required.
Why This Is a Useful CTA Test
This simple laboratory exercise validates several components of a Windows security-monitoring platform.
1. Windows Event Collection
WTA must successfully receive the Windows Security events.
2. Event Parsing
The application needs to extract meaningful fields from Event ID 4625.
3. Rule Matching
The detection engine should recognize the event according to its configured rule.
4. Correlation
Multiple failed authentication events can be correlated based on:
Source IP
Username
Target machine
Time window
Number of failures
5. Risk Scoring
Repeated failures can contribute to a higher risk score than an isolated authentication failure.
6. MITRE ATT&CK Mapping
The activity can be associated with relevant credential-access or valid-account/password-guessing techniques depending on the precise behavior being detected.
A More Realistic Detection Scenario
The most interesting experiment is not simply generating one 4625 event.
Instead, generate a sequence of failed authentication events and observe how CTA handles the pattern.
For example:
14:32:01 4625 Administrator Source A
14:32:02 4625 Administrator Source A
14:32:03 4625 Administrator Source A
14:32:04 4625 Administrator Source A
14:32:05 4625 Administrator Source A
A detection engine can recognize that these events are related.
The result can become something like:
Detection: Possible SMB Password Guessing
Source: 192.168.x.x
Target Account: Administrator
Failed Attempts: 5
Time Window: 5 seconds
Severity: High
This demonstrates the difference between event collection and threat detection.
Conclusion
Using a Kali Linux VM and Metasploit provides a controlled way to generate failed SMB authentication activity in a Windows laboratory environment.
The important part of the experiment is not Metasploit itself. The objective is to produce realistic Windows security telemetry and then verify that Cyber Threat Analyzer can collect, recognize, correlate, score, and alert on the resulting Event ID 4625 activity.
A basic test therefore becomes a complete detection-validation workflow:
Kali Linux
↓
Metasploit SMB authentication testing
↓
Failed Windows authentication
↓
Windows Event ID 4625
↓
WTA Event Collector
↓
Detection Rule
↓
Correlation Engine
↓
Risk Engine
↓
Security Alert
This kind of controlled attack simulation is valuable during development because it allows CTA's detection capabilities to be tested against actual Windows security events rather than only synthetic data.