Microsoft windows security auditing 4625

В этой статье мы покажем, как отслеживать события блокировки учетных записей пользователей на котроллерах домена Active Directory, определять с какого компьютера и из какой конкретно программы постоянно блокируется учетная запись. Для поиска источника блокировки аккаунтов пользователей можно использовать журнал безопасности Windows, скрипты PowerShell или утилиту Account Lockout and Management Tools (Lockoutstatus.exe).

Содержание:

  • Учетная запись пользователя заблокирована и не может быть использована для входа в сеть
  • Как проверить, что аккаунт пользователя AD заблокирован?
  • Политики блокировки учетных записей в домене
  • События блокировки пользователей EventID 4740, 4625
  • Поиск компьютера, с которого блокируется пользователь с помощью PowerShell
  • Утилита Microsoft Account Lockout and Management Tools
  • Как определить программу, из которой блокируется учетная запись пользователя?

Учетная запись пользователя заблокирована и не может быть использована для входа в сеть

Политика безопасности учетных записей в большинстве организаций требует обязательного блокирования учетной записи пользователя в домене Active Directory, если он несколько раз подряд ввел неправильный пароль. Обычно учетная запись блокируется контроллером домена на несколько минут (5-30), в течении которых вход пользователя в домен невозможен. Через определенное время (задается в политике безопасности домена), учетная запись пользователя автоматически разблокируется. Временная блокировка учетной записи позволяет снизить риск подбора пароля (простым брутфорсом) к учетным записям пользователей AD.

Если учётная запись пользователя в домене заблокирована, то при попытке входа в Windows появляется предупреждение:

Учетная запись пользователя заблокирована и не может быть использована для входа в сеть.
The referenced account is currently locked out and may not be logged on to ….

Учетная запись пользователя заблокирована и не может быть использована для входа в сеть

Как проверить, что аккаунт пользователя AD заблокирован?

Вы можете проверить, что аккаунт заблокирован в графический консоли ADUC или с помощью комнадлета Get-ADUser из модуля Active Directory для PowerShell:

Get-ADUser -Identity aaivanov -Properties LockedOut,DisplayName | Select-Object samaccountName, displayName,Lockedout

Или:

Get-ADUser avivanov2 -Properties Name,Lockedout, lastLogonTimestamp,lockoutTime,logonCount,pwdLastSet | Select-Object Name, Lockedout, @{n='LastLogon';e={[DateTime]::FromFileTime($_.lastLogonTimestamp)}}, @{n='lockoutTime';e={[DateTime]::FromFileTime($_.lockoutTime)}}, @{n='pwdLastSet';e={[DateTime]::FromFileTime($_.pwdLastSet)}},logonCount

Учетная запись сейчас заблокирована и не может быть использована для авторизации в домене (Lockedout = True). Также в выводе команды вы видите информацию о времени смены пароля пользователя в домене и времени блокировки аккаунта.

Можно вывести сразу все заблокированные аккаунты в домене с помощью командлета Search-ADAccount:

Search-ADAccount -UsersOnly -lockedout

Вы можете вручную снять блокировку учетной записи с помощью консоли ADUC, не дожидаясь автоматической разблокировки. Для этого в свойствах учетной записи пользователя на вкладке Account, включите опцию Unlock account. This account is currently locked out on this Active Directory Domain Controller (Разблокируйте учетную запись. Учетная запись на этом контроллере домена Active Directory на данный момент заблокирована) и сохраните изменения.

aduc разблокировать пользователя Active Directory

Также можно немедленно разблокировать учетную запись с помощью командлета PowerShell Unlock-ADAccount:

Get-ADUser -Identity aaivanov | Unlock-ADAccount

Информацию о времени блокировки учетной записи, количестве неудачных попыток набора пароля, времени последнего входа пользователя в домен можно получить в свойствах учетной записи в консоли ADUC на вкладке редактора атрибутов или с помощью PowerShell

Get-ADUser aaivanov -Properties Name, lastLogonTimestamp,lockoutTime,logonCount,pwdLastSet | Select-Object Name,@{n='LastLogon'; e={[DateTime]::FromFileTime($_.lastLogonTimestamp)}}, @{n='lockoutTime';e={[DateTime]::FromFileTime($_.lockoutTime)}},  @{n='pwdLastSet';e={[DateTime]::FromFileTime($_.pwdLastSet)}},logonCount

powershell узнать время блокировки пользователя

Политики блокировки учетных записей в домене

Политики блокировки учетных записей и паролей обычно задаются сразу для всего домена политикой Default Domain Policy в консоли gpmc.msc. Интересующие нас политики находятся в разделе Computer Configuration -> Windows Settings -> Security Settings -> Account Policy -> Account Lockout Policy (Конфигурация Windows -> Параметры безопасности -> Политики учетных записей -> Политики блокировки учетных записей). Это политики:

  • Account lockout threshold (Пороговое значение блокировки) – через сколько неудачных попыток набора пароля учетная запись должна быть заблокирована;
  • Account lockout duration (Продолжительность блокировки учетной записи) – на какое время будет заблокирована учетная запись (по истечении этого времени блокировка будет снята автоматически);
  • Reset account lockout counter after (Время до сброса счетчика блокировки) – через какое время будет сброшен счетчик неудачных попыток авторизации.

Политики блокировки учетных записей

Для защиты от перебора паролей рекомендуется использовать стойкие пароли пользователей в AD (использовать длину пароля не менее 8 символов и включить требования сложности. Это настраивается в разделе Password Policy в политиках Password must meet complexity requirements и Minimum password length. Периодически нужно выполнять аудит паролей пользователей.

Ситуации, когда пользователь забыл свой пароль и сам вызвал блокировку своей учетки случаются довольно часто. Но в некоторых случаях блокировка учеток происходит неожиданно, без каких-либо видимых причин. Т.е. пользоваться “клянется”, что ничего особого не делал, ни разу не ошибался при вводе пароля, но его учетная запись почему-то заблокировалась. Администратор по просьбе пользователя может вручную снять блокировку, но через некоторое время ситуация повторяется.

Чтобы решить проблему самопроизвольной блокировки учетной записи пользователя, администратору нужно разобраться с какого компьютера и какой программой была заблокирован аккаунт пользователя Active Directory.

События блокировки пользователей EventID 4740, 4625

В первую очередь администратору нужно разобраться с какого компьютера/сервера домена происходят попытки ввода неверных паролей и идет дальнейшая блокировка учетной записи.
Чтобы в журналах контроллеров домена записывались события блокировки учетных записей, нужно включить следующие подкатегории аудита на контроллерах домена в секции Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Advanced Audit Policy -> Logon/Logoff:

  • Audit Account Lockout
  • Audit Logon
  • Audit Logoff

Затем перейдите в раздел Account Management и включите политику:

  • Audit User Account Management: Success

Проще всего включить эти параметры GPO через консоль
gpmc.msc
, отредактировав политику Default Domain Controller Policy.

политика аудита событий блокировки на контроллерах домена Audit Account Lockout

Если пользователь ввел неверный пароль, то ближайший к пользователю контроллер домена перенаправляет запрос аутентификации на DC с FSMO ролью эмулятора PDC (именно он отвечает за обработку блокировок учетных записей). Если проверка подлинности не выполнилась и на PDC, он отвечает первому DC о невозможности аутентификации. Если количество неуспешных аутентификаций превысило значение, заданное для домена в политике Account lockout threshold, учетная запись пользователя временно блокируется.

При этом в журнале обоих контроллеров домена фиксируются событие с EventID 4740 с указанием DNS имени (IP адреса) компьютера, с которого пришел первоначальный запрос на авторизацию пользователя. Чтобы не анализировать журналы на всех DC, проще всего искать это события в журнале безопасности на PDC контроллере. Найти PDC в домене можно так:

(Get-AdDomain).PDCEmulator

Событие блокировки учетной записи домена можно найти в журнале Security (Event Viewer > Windows Logs) на контролере домена. Отфильтруйте журнал безопасности (Filter Current Log) по событию с Event ID 4740. Должен появиться список последних событий блокировок учетных записей контроллером домена. Переберите все события, начиная с самого верхнего и найдите событие, в котором указано, что учетная запись нужного пользователя (имя учетной записи указано в строке Account Name) заблокирована (A user account was locked out).

Примечание. В большой инфраструктуре AD, в журнале безопасности фиксируется большое количество событий, которые постепенно перезаписываются более новыми. Поэтому желательно увеличить максимальный размер журнала на DC и приступать к поиску источника блокировки как можно раньше.

Событие блокировки учетной записи на контроллере домена AD. eventid 4740

Откройте данное событие. Имя компьютера (или сервера), с которого была произведена блокировка указано в поле Caller Computer Name. В данном случае имя компьютера – WKS-TEST1.

Если в поле Computer Name указано неизвестное имя компьютера/устройства, который не резолвится в вашей сети через DNS (недоменный компьютер, или не Windows устройство с поддержкой Kerberos аутентфикации), вы можете получить IP адрес этого устройства. Для этого нужно включить следующие параметры аудита в Default Domain Controller Policy. Перейдите в раздел Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Advanced Audit Configuration и настройте следующие параметры:

Account Logon

  • Audit Kerberos Authentication Service: Success, Failure
  • Audit Kerberos Service Ticket Operations: Success, Failure

Logon/Logoff

  • Audit Special Logon: Success, Failure

Откройте журнал Event Viewer -> Security и включите фильтр по Event ID 4740 и 4741. Обратите внимание, что теперь перед появлением события блокировки пользователя (4740) появляется событие 4771 (неуспешная kerberos аутентфикация) от Kerberos Authentication Service. В нем указано имя пользователя, который пытался выполнить аутентификацию и IP адрес устройства (поле Network Information -> Client Address), с которого пришел запрос.

4711 ip адрес устройтва-источника блокировки пользователя через kerberos аутентфикацию

Если удаленное устройство использует NTLM для аутентификации в домене, нужно выполнить поиск события EventID 4625 (неуспешная NTLM аутентификация) на контроллерах домена (оно появится только на DC, через который была выполнена попытка аутентифицироваться через NTLM).

Откройте последнее найденное событие с EventID 4625 для вашего пользователя (Account name). Здесь видно, что при попытке выполнить NTLM аутентификацию (Authentication Package: NTLM, Logon Process: NtLmSsp) учетная запись была заблокирована (
Failure Reason: Account locked out, Status: 0xC0000234
). В описании события указаны как имя компьютера (Workstation Name), так и его IP адрес (Source Network Address).

4625 IP адрес устройства, с которого выполняется блокировка пользователя при использовании NTLM аутентфикации

Если вы не можете найти событие блокировки пользователя в журнале Event Viewer, можно включить расширенный лог netlogon на контроллере домена. Выполните команду:

nltest /dbflag:2080ffffff

Перезапустите службу Netlogon

net stop netlogon && net start netlogon

Выполните поиск в файле netlogon.log событий:

  • 0xc000006a – An invalid attempt to login has been made by the following user
  • 0xc0000234 – The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested.

Можно найти события блокировки пользователя a.berg в файле netlogon.log с помощью команды:

type C:\Windows\debug\netlogon.log | findstr a.berg| findstr /i "0xC000006A"

поиск источника блокировки пользователя в логе debug\netlogon.log

В данном примере видно, что пользователь a.berg блокируется с устройства DESKTOP-74G6LB.

Не забудьте отключить расширенный лог на DC:

nltest /dbflag:0x0

Поиск компьютера, с которого блокируется пользователь с помощью PowerShell

Можно воспользоваться следующим PowerShell скриптом для поиска источника блокировки конкретного пользователя на PDC. Данный скрипт вернет дату блокировки и компьютер, с которого она произошла. Скрипт выполняет поиск событий с Event ID в Event Log:

$Username = 'username1'
$Pdce = (Get-AdDomain).PDCEmulator
$GweParams = @{
‘Computername’ = $Pdce
‘LogName’ = ‘Security’
‘FilterXPath’ = "*[System[EventID=4740] and EventData[Data[@Name='TargetUserName']='$Username']]"
}
$Events = Get-WinEvent @GweParams
$Events | foreach {$_.Properties[1].value + ' ' + $_.TimeCreated}

powershell скрипт ждя поиска источника блокировки пользователя по событию 4740

Аналогичным образом можно опросить из PowerShell все контроллеры домена в Active Directory:

$Username = 'username1'
Get-ADDomainController -fi * | select -exp hostname | % {
$GweParams = @{
‘Computername’ = $_
‘LogName’ = ‘Security’
‘FilterXPath’ = "*[System[EventID=4740] and EventData[Data[@Name='TargetUserName']='$Username']]"
}
$Events = Get-WinEvent @GweParams
$Events | foreach {$_.Computer + " " +$_.Properties[1].value + ' ' + $_.TimeCreated}
}

Утилита Microsoft Account Lockout and Management Tools

Для поиска источника блокировки пользователя можно использовать графическую утилиту Microsoft Account Lockout and Management Tools
Lockoutstatus.exe
(скачать ее можно тут). Данная утилита проверяет статус блокировки учетной записи на всех контроллерах домена.

Запустите утилиту Lockoutstatus.exe, укажите имя заблокированной учетной записи (Target User Name) и имя домена (Target Domain Name).

УтилитаMicrosoft Account Lockout and Management Tools

В появившемся списке будет содержаться список DC и состояние учетной записи (Locked или Non Locked). Дополнительно отображается время блокировки и компьютер, с которого заблокирована данная учетная запись (Orig Lock).

статус блокировки пользователя на всех контроллераз домена

Атрибуты badPwdCount и LastBadPasswordAttempt не реплицируются между контролерами домена.

Прямо из утилиты Lockoutstatus можно разблокировать пользователя, или сменить его пароль.

Lockoutstatus разблокировать пользователя

Основной недостаток утилиты LockoutStatus – она довольно долго опрашивает все контроллеры домена (некоторые из них могут быть недоступны).

Как определить программу, из которой блокируется учетная запись пользователя?

Итак, мы определили с какого компьютера или устройства была заблокирована учетная запись. Теперь нужно понять, какая программа или процесс выполняет неудачные попытки входа и является источником блокировки.

Часто пользователи начинают жаловаться на блокировку своей учетной записи в домене после плановой смены пароля. Чаще всего это значит, что старый (неверный) пароль сохранен в некой программе, скрипте или службе, которая периодически пытается авторизоваться в домене с устаревшим паролем. Рассмотрим самые распространенные места, в которых пользователь мог сохранить свой старый пароль:

  • Сетевые диски, подключенные через
    net use
    (Map Drive);
  • Задания планировщика Windows Task Scheduler;
  • Ярлыки с настроенным режимом
    RunAs
    (используется для запуска от имени другого пользователя);
  • В службах Windows, которые настроены на запуск из-под доменной учетной записи;
  • Сохранённые пароли в менеджере паролей в панели управления (Credential Manager). Выполните команду
    rundll32.exe keymgr.dll, KRShowKeyMgr
    и удалите сохраненные пароли;

    Пароли пользователей могут быть сохранены в контексте SYSTEM. Чтобы вывести их, нужно запустить командную строку от имени SYSTEM с помощью
    psexec -i -s -d cmd.exe
    и выполнить команду
    rundll32 keymgr.dll,KRShowKeyMgr
    чтобы открыть список сохраненных паролей для NT AUTHORITY\SYSTEM.

  • Программы, которые хранят и используют закэшировнный пароль пользователя;
  • Браузеры;
  • Мобильные устройства (например, использующееся для доступа к корпоративной почте);
  • Программы с автологином или настроенный автоматический вход в Windows;
  • Незавершенные сессии пользователя на других компьютерах или терминальных RDS фермах или RDP серверах (поэтому желательно настраивать лимиты для RDP сессий);
  • Сохраненные пароли для подключения к Wi-FI сетям (WPA2-Enterprise 802.1x аутентификацию в беспроводной сети);
  • Если пользователь недавно сменил пароль и забыл его, вы можете сбросить его.

Совет. Существует ряд сторонних утилит (в основном коммерческих) позволяющих администратору выполнить проверку удаленной машины и детектировать источник блокировки учетных записей. В качестве довольно популярного решения отметим Account Lockout Examiner от Netwrix.

Для более детального аудита блокировок на найденном компьютере необходимо включить ряд локальных политик аудита Windows. Для этого на компьютере, на котором нужно отследить источник блокировки, откройте редактор локальной групповой политики gpedit.msc и включите следующие параметры в разделе Compute Configurations -> Windows Settings -> Security Settings -> Local Policies -> Audit Policy:

  • Audit process tracking: Success , Failure
  • Audit logon events: Success , Failure

Аудит событий входа/выхода в систему

Затем обновите настройки групповых политик на клиенте:

gpupdate /force

Дождитесь очередной блокировки учетной записи и найдите в журнале безопасности (Security) события с Event ID 4625. В нашем случае это событие выглядит так:

An account failed to log on.
Failure Reason: Account locked out.

Выявлем процесс/программу из которой была залокирована учетная запись

Из описания события видно, что источник блокировки учетной записи (Caller Process Name) – процесс mssdmn.exe (является компонентом Sharepoint). Осталось сообщить пользователю о том, что ему необходимо обновить свой пароль на веб-портале Sharepoint.

После окончания анализа, выявления и наказания виновника не забудьте отключить действие включенных групповых политик аудита.

Если вы так и не смогли найти причину блокировки учетной записи на конкретном компьютере, попробуйте просто переименовать имя учетной записи пользователя в Active Directory (измените SAMaccountName и UPN пользователя в домене AD). Это как правило самый действенный метод защиты от внезапных блокировок определенного пользователя, если вы не смогли установить источник блокировки.

If you’ve ever managed a Windows system, you’ve likely come across Event ID 4625: “An account failed to log on.” It often pops up on Windows Server 2008 and Windows Vista systems, causing both confusion and concern. This event occurs when a logon attempt fails, and it’s logged on the targeted computer. Let’s dive into the nitty-gritty details to understand this better.

Event ID 4625 Microsoft-Windows-Security-Auditing: Understanding Unauthorized Access Attempts

For instance, imagine someone in your network trying to access a shared folder but typing the wrong password. This would trigger Event ID 4625. One of the critical pieces of information in this event is the Security ID (SID), which identifies the user account that attempted the logon. If the SID can’t be resolved, it might show up as a NULL SID, indicating that the username doesn’t correspond to a valid account.

To troubleshoot this, we often use Task Scheduler. We go to the “Task Status” pane and filter for tasks running at specific times, especially around the time this event crops up regularly. By checking these logs, we can pinpoint which tasks might be causing the issue. So next time you see Event ID 4625, don’t panic. It’s a valuable alert that helps keep your network secure!

Contents

  • 1 Event ID 4625 Microsoft-Windows-Security-Auditing
    • 1.1 Category and Subcategory
  • 2 Common Causes of Event ID 4625
  • 3 Troubleshooting Event ID 4625
    • 3.1 Checking User Account Status
    • 3.2 Reviewing Security Policies
    • 3.3 Investigating Failed Logon Attempts
  • 4 Mitigating Security Risks Associated with Event ID 4625
    • 4.1 Strengthening Password Policies
    • 4.2 Implementing Multi-Factor Authentication
    • 4.3 Monitoring and Alerting Systems

Event ID 4625 is a log entry in the Windows Security Log that indicates a failed logon attempt. Let’s break down what this event tells us.

When we see Event ID 4625, it typically means a logon request didn’t succeed. This can be due to various reasons such as wrong passwords or user accounts trying to access a network.

Here are the key details you might find:

Security ID: Shows which account reported the logon failure. Sometimes, it will display as NULL SID if no valid account was identified.

Logon Process: Indicates the specific process attempting the logon, like Winlogon.exe or Services.exe.

Authentication Package: Displays which package was used, such as NTLMSSP.

Transited Services: If the logon attempt used services, they might be listed here.

We can use a table to present more information clearly:

Field Description
Event ID 4625
Logon Type For example, Type 3 indicates a network logon attempt.
Package Name For example, NTLM used for authentication.
Sub-protocol Specifies if any sub-protocols were involved in the attempt (rarely seen).
Session Key Helps with encryption; not always present.
Key Length Shows the length of the encryption key.

Authentication Information: This might show details like the Key Length used during the attempt, which is relevant for security analysis.

Category and Subcategory

These help in classifying the type of security event recorded. Microsoft-Windows-Security-Auditing is the category under which Event ID 4625 falls.

Our experience shows that frequently encountering Event ID 4625 might indicate an ongoing brute force attack. Always ensure your systems are up-to-date and secure. If it appears frequently at the same time each day, as mentioned in the search results, it might be caused by a scheduled task or an automated process.

We hope this breakdown is helpful in understanding and analyzing Event ID 4625. It’s crucial for maintaining security and identifying potential issues early.

Common Causes of Event ID 4625

Event ID 4625 often pops up when a logon attempt fails. It’s like our computer’s way of waving a red flag saying, “Hey, something went wrong here!” Let’s break down some common reasons:

Bad Password: We all forget passwords sometimes. Typing the wrong password is a frequent cause.

Unknown User Name: Sometimes, a user might use a name that doesn’t exist on the system.

Disabled Account: If the account is disabled, any logon attempt will fail.

Account Locked Out: If an account gets too many wrong password attempts, it can be locked out. We’ve all been there, right?

Account Currently Disabled: If administrators disable an account for any reason, it will throw event 4625.

Service Failures: Occasionally, services like Server service or Winlogon.exe on the local system might trigger this event when they attempt to authenticate a user.

Network Issues: Problems with network connectivity can also cause authentication failures.

Reason Description Example
Bad Password Password entered is incorrect. Typing “password1” instead of the correct password.
Unknown User Name User name does not exist. Mistyped “john.doe” as “jonh.doe”.
Account Locked Out Too many failed attempts. Entering the wrong password five times in a row.

These are some of the main culprits behind Event ID 4625. We’ve likely faced some of these ourselves, making it easier to spot when they happen again.

Troubleshooting Event ID 4625

Event ID 4625 in the Microsoft-Windows-Security-Auditing log indicates a failed logon attempt. This can occur due to various reasons, such as incorrect passwords, account lockouts, or policy conflicts. Let’s walk through some key steps.

Checking User Account Status

We start by examining the user account related to the failed logon.

  • Account Lockouts: Is the account locked out? A locked account can’t log in until it’s unlocked by the system or admin.

  • Logon ID: Check the Logon ID to identify the specific session of the attempt.

  • Caller Process ID and Name: These fields help us find which processes attempted the logon. For instance, Winlogon.exe might point to login screen issues.

Reviewing Security Policies

Next, we review relevant security policies to ensure they’re correctly configured.

  • Account Lockout Policy: Define how many failed attempts trigger a lockout and how long the lockout lasts.

  • Audit Policy: Make sure it logs Account Logon and Logon events so we can track failures.

  • Network Security: Evaluate protocols and settings in our network policies that might deny valid logons. The Source Network Address and Source Port fields in the event can reveal where the attempt came from.

Investigating Failed Logon Attempts

Finally, let’s investigate the failed logons.

  • Failure Reason and Sub Status: These codes detail why the logon failed. For example, wrong password or expired account.

  • Workstation Name: This shows which machine the attempt came from, helpful for isolating issues in a network.

  • Source Network Address and Source Port: Useful in tracing attempts from unknown or unauthorized addresses.

  • Active Directory and Domain Controller: In large networks, check AD for replication issues or policy conflicts affecting logons. The local computer might not sync properly with the domain.

Logon ID Failure Reason Caller Process ID
0x1A2B3C4D Wrong Password 0x4D2C
0x5E6F7G8H Account Locked 0x3F4B

Mitigating Security Risks Associated with Event ID 4625

Mitigating security risks related to Event ID 4625 requires a multi-layered approach. By focusing on password policies, implementing multi-factor authentication, and setting up monitoring systems, we can significantly reduce the risks posed by failed logon attempts.

Strengthening Password Policies

We need to make sure our passwords are tough to crack. Simple passwords make it easier for attackers to guess them.

Key steps to strengthen password policies:

  • Require a mix of upper and lower case letters, numbers, and symbols.
  • Regularly update password requirements.
  • Avoid common passwords and phrases.

Make sure to enforce a minimum password length, like 12 characters. Frequent password changes can discourage attackers. Remember, layers of security make our accounts more secure.

Implementing Multi-Factor Authentication

Adding an extra layer of security helps a ton. Multi-Factor Authentication (MFA) is one way to do this.

Advantages of implementing MFA:

  • Reduces the risk of unauthorized access.
  • Adds a second layer like a text message code or an app prompt.
  • Even if a password is guessed, the attack fails without the second factor.

Integrating MFA across our services protects sensitive data, reducing the risk of a successful attack.

Monitoring and Alerting Systems

Monitoring systems help us detect weird activities fast. Real-time alerts allow us to react quickly to potential threats.

Key monitoring actions:
Automate alerting for failed logins.
Track repeated failed logon attempts.

We can use tools like PowerShell to filter specific logs and quickly identify problems. Setting up a robust monitoring system helps us stay on top of our network security processes.

In the realm of IT security and system administration, monitoring and understanding logs play a pivotal role in maintaining the integrity and security of systems. One of the critical logs that system administrators must be aware of is Event ID 4625. This event log indicates a failed logon attempt, which can have various implications, such as unauthorized access attempts or user errors. Understanding the significance of Event ID 4625 is essential for addressing issues related to failed logons effectively.

Understanding Event ID 4625

Event ID 4625 is recorded in the Windows Security log and is part of the Windows Security Auditing feature. It specifically pertains to failed logon attempts, providing detailed information that can help in diagnosing the reason for the failure. Each failed logon can be an indication of compromised security, so it’s essential to understand its causes and implications.

Key Details of Event ID 4625

When Event ID 4625 is triggered, several pieces of information are logged:

  • Account Name: The user account that attempted to log on.
  • Account Domain: The domain in which the account resides.
  • Logon Type: Indicates the type of logon that was attempted, such as interactive, network, batch, etc.
  • Failure Reason: Describes why the logon failed, which can range from incorrect credentials to account lockout.
  • Source Network Address: The IP address from where the logon attempt originated.
  • Source Port: The port used during the logon attempt.
  • Impersonation Level: Indicates the level of access that was attempted during the logon.

These details are crucial for diagnosing the failed logon attempts and determining whether they pose a security risk.

Common Reasons for Event ID 4625

  1. Incorrect Credentials: The most common reason for a failed logon is the input of incorrect username or password.

  2. Account Lockout: Accounts can be locked out after a predefined number of failed logon attempts, causing further logon failures.

  3. Disabled Accounts: If an account is disabled, subsequent logon attempts will trigger Event ID 4625.

  4. Expired Passwords: If a password has expired, the user will be unable to log on.

  5. User Initiated Logoffs: Users may be logged off by the system or administrator, preventing access.

  6. Network Issues: Connectivity problems can lead to failed attempts if the system cannot reach the domain controller.

  7. Configuration Issues: Misconfigurations in security policies or group policies might prevent successful logons.

Security Implications

Event ID 4625 can often indicate security risks, such as:

  • Brute Force Attacks: Multiple failed login attempts can signify a brute-force attack on user accounts.

  • Stolen Credentials: If unauthorized users are attempting to log in using stolen credentials.

  • Internal Security Breaches: Anomalies in logon attempts might also indicate insiders trying to access restricted areas.

Monitoring and analyzing Event ID 4625 logs can help identify suspicious activity and bolster your organization’s security posture.

Troubleshooting Failed Logon Attempts

When faced with Event ID 4625 logs indicating failed logon attempts, the following troubleshooting steps can help identify and fix the underlying issues.

Step 1: Review the Event Details

Start by examining the details of the Event ID 4625 entry in the Windows Event Viewer. Here are key fields that require attention:

  • Account Name: Verify whether the username is entered correctly.
  • Failure Reason: Pay attention to specific failure reasons indicated in the log.
  • Source Network Address: Check if the login attempts are originating from expected IP addresses.

Step 2: Check Credentials

If the failure reason points toward incorrect credentials, verify the details with the user:

  • Confirm that the user is using the correct username.
  • Ensure the password is accurately entered; consider whether Caps Lock or Num Lock may be affecting input.
  • Check whether the user has recently changed their password.

Step 3: Examine Account Status

Investigate the status of the account that triggered Event ID 4625. You can perform the following checks:

  • Account Lockout: Utilize the Active Directory Users and Computers (ADUC) console to check if the account is locked. Reset the account lockout if necessary.

  • Account Expiration: Check the account’s properties to determine if it is expired. If needed, extend the expiry date.

  • Disabled Account: Confirm whether the account has been disabled by an administrator. If so, re-enable it after confirming that it’s safe to do so.

Step 4: Password Policies

If users are frequently encountering failed logons due to expired passwords:

  • Ensure users are educated about password policies in your organization, including complexity requirements and expiration timelines.
  • Use automated alerts to notify users before their passwords expire, enabling them to update their credentials on time.

Step 5: Network Connectivity

If a user cannot log in due to network issues, perform the following diagnostics:

  • Verify the connection of the client machine to the network.

  • Check if the Domain Controller (DC) is accessible from the client machine. This can involve pinging the DC and checking for response times.

  • Review network configurations, such as firewalls or routing issues, which may impede connectivity.

Step 6: Group Policy and Local Security Policy

Misconfigurations in Group Policies can cause logon issues:

  • Open the Group Policy Management Console (GPMC) to verify settings that may affect logon processes, such as user permissions or login rights.

  • Review local security policies for any modifications that could restrict access.

Step 7: Monitoring Security Logs

Continuous monitoring of logs can help identify patterns or recurring issues. Implementing a Security Information and Event Management (SIEM) solution can enhance this process.

  • Set alerts for multiple failed logon attempts from a single source.

  • Consider logging user behavior to detect anomalies that could indicate potential threats.

Step 8: Educate Users

User education is equally important to reduce the occurrence of Event ID 4625:

  • Provide training sessions on proper login procedures and the importance of credential security.

  • Encourage users to report any suspicious behavior, especially if they notice multiple failed logon attempts.

Conclusion

Event ID 4625 serves as a crucial tool in recognizing and addressing failed logon attempts, which can significantly impact system security. By thoroughly understanding the reasons behind these failures, administrators can take proactive measures to mitigate risks, improve user experiences, and enhance overall system security.

While it can be easy to overlook the significance of failed logons, continual vigilance in monitoring security logs, along with the implementation of robust security practices and user education, can help thwart unauthorized access attempts. A well-informed approach to Event ID 4625 will empower organizations to secure their systems more effectively while ensuring compliance with security best practices.

By following the outlined troubleshooting steps and regularly reviewing security logs, organizations can maintain their cyber hygiene, detect potential threats, and provide a secure environment for their users. Through diligent monitoring and proper security measures, IT administrators can minimize incidents of Event ID 4625 and protect their institutions from significant cyber threats.

Operating Systems Windows 2008 R2 and 7

Windows 2012 R2 and 8.1

Windows 2016 and 10

Windows Server 2019 and 2022

Windows Server 2025

Category
 • Subcategory
Logon/Logoff
 • Logon
Type Failure
Corresponding events
in Windows
2003
and before

529

,

530

,

531

,

532

,

533

,

534

,

535

,

536

,

537

,

539

 

4625: An account failed to log on

On this page

  • Description of this event
  • Field level details
  • Examples

This is a useful event because it documents each and every failed attempt to logon to the local computer regardless of logon type, location of the user or type of account.

Free Security Log Resources by Randy

  • Free Security Log Quick Reference Chart
  • Windows Event Collection: Supercharger Free Edtion
  • Free Active Directory Change Auditing Solution
  • Free Course: Security Log Secrets


Description Fields in
4625

Subject:

Identifies the account that requested the logon — NOT the user who just attempted logged on. Subject is usually Null or one of the Service principals and not usually useful information. See New Logon for who just logged on to the system.

  • Security ID
  • Account Name
  • Account Domain
  • Logon ID

Logon Type:

This is a valuable piece of information as it tells you HOW the user just logged on:  See 4624 for a table of logon type codes.

Account For Which Logon Failed:

This identifies the user that attempted to logon and failed.

  • Security ID:  The SID of the account that attempted to logon. This blank or NULL SID if a valid account was not identified — such as where the username specified does not correspond to a valid account logon name.
  • Account Name: The account logon name specified in the logon attempt.
  • Account Domain: The domain or — in the case of local accounts — computer name.

Failure Information:

The section explains why the logon failed.

  • Failure Reason: textual explanation of logon failure.
  • Status and Sub Status: Hexadecimal codes explaining the logon failure reason. Sometimes Sub Status is filled in and sometimes not. Below are the codes we have observed.
Status and Sub Status Codes Description (not checked against «Failure Reason:») 
0xC0000064 user name does not exist
0xC000006A user name is correct but the password is wrong
0xC0000234 user is currently locked out
0xC0000072 account is currently disabled
0xC000006F user tried to logon outside his day of week or time of day restrictions
0xC0000070 workstation restriction, or Authentication Policy Silo violation (look for event ID 4820 on domain controller)
0xC0000193 account expiration
0xC0000071 expired password
0xC0000133 clocks between DC and other computer too far out of sync
0xC0000224 user is required to change password at next logon
0xC0000225 evidently a bug in Windows and not a risk
0xc000015b The user has not been granted the requested logon type (aka logon right) at this machine

Process Information:

  • Caller Process ID: The process ID specified when the executable started as logged in 4688.
  • Caller Process Name: Identifies the program executable that processed the logon. This is one of the trusted logon processes identified by 4611.

Network Information:

This section identifies where the user was when he logged on. Of course if logon is initiated from the same computer this information will either be blank or reflect the same local computers.

  • Workstation Name: The computer name of the computer where the user is physically present in most cases unless this logon was initiated by a server application acting on behalf of the user. Workstation may also not be filled in for some Kerberos logons since the Kerberos protocol doesn’t really care about the computer account in the case of user logons and therefore lacks any field for carrying workstation name in the ticket request message.
  • Source Network Address: The IP address of the computer where the user is physically present in most cases unless this logon was initiated by a server application acting on behalf of the user. If this logon is initiated locally the IP address will sometimes be 127.0.0.1 instead of the local computer’s actual IP address.  This field is also blank sometimes because Microsoft says «Not every code path in Windows Server 2003 is instrumented for IP address, so it’s not always filled out.»
  • Source Port: Identifies the source TCP port of the logon request which seems useless since with most protocols’ source ports are random.

Detailed Authentication Information:

  • Logon Process: (see 4611)
  • Authentication Package: (see 4610 or 4622)
  • Transited Services: This has to do with server applications that need to accept some other type of authentication from the client and then transition to Kerberos for accessing other resources on behalf of the client.  See http://msdn.microsoft.com/msdnmag/issues/03/04/SecurityBriefs/
  • Package name: If this logon was authenticated via the NTLM protocol (instead of Kerberos for instance) this field tells you which version of NTLM was used.  See security option «Network security: LAN Manager authentication level»
  • Key Length: Length of key protecting the «secure channel».  See security option «Domain Member: Require strong (Windows 2000 or later) session key».  If value is 0 this would indicate security option «Domain Member: Digitally encrypt secure channel data (when possible)» failed

Supercharger Enterprise

Examples of 4625

An account failed to log on.

Subject:
   Security ID:  NULL SID
   Account Name:  —
   Account Domain:  —
   Logon ID:  0x0
Logon Type:  3
Account For Which Logon Failed:
   Security ID:  NULL SID
   Account Name:  asdf
   Account Domain: 
Failure Information:
   Failure Reason:  Unknown user name or bad password.
   Status:   0xc000006d
   Sub Status:  0xc0000064
Process Information:
   Caller Process ID: 0x0
   Caller Process Name: —
Network Information:
   Workstation Name: WIN-R9H529RIO4Y
   Source Network Address: 10.42.42.201
   Source Port:  53176
Detailed Authentication Information:
      Logon Process:  NtLmSsp
   Authentication Package: NTLM
   Transited Services: —
   Package Name (NTLM only): —
   Key Length:  0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The authentication information fields provide detailed information about this specific logon request.

  • Transited services indicate which intermediate services have participated in this logon request.
  • Package name indicates which sub-protocol was used among the NTLM protocols
  • Key length indicates the length of the generated session key. This will be 0 if no session key was requested

Top 10 Windows Security Events to Monitor

Free Tool for Windows Event Collection

  • The Changing Landscape of Authentication and Logon Tracking in Hybrid Environments of Entra and AD

  • Shining a Light on the Hidden Risks of Non-Human Identities

Monitoring and analyzing periodically failed logon attempts is one of the essential processes to have a secure environment. Windows Event ID 4625 is a security event log generated by failed logon attempts. By studying and correlating these events, we can gain essential information regarding security threats like brute force attacks, unauthorized access, and more.

What is Event ID 4625?

The Windows security log captures failed logon attempts as event ID 4625. For example, Windows auditing system, which is the main system that generates this type of event, is one of the most important systems to identify and respond to security incidents. The event log provides all the details related to the failed logon attempt, such as the account name, workstation name, and the reason for the failure.

Analyzing Event ID 4625

  • Step 1: Collecting Event Logs: To analyze Event ID 4625, you need to collect the relevant event logs from the Windows Security log. This can be done using the Event Viewer or through PowerShell commands.
  • Step 2: Filtering and Sorting: Once the logs are collected, filter them to display only Event ID 4625. Sorting the logs by time, account name, or workstation name can help identify patterns or repeated failed attempts.
  • Step 3: Identifying Patterns: Look for patterns in the failed logon attempts. Common patterns include:
    • Multiple failed attempts from the same account: This could indicate a brute force attack.

    • Failed attempts from multiple accounts: This might suggest a broader attack targeting multiple users.

    • Failed attempts from unusual locations: Logon attempts from unexpected IP addresses or geographic locations could indicate unauthorized access attempts.

  • Step 4: Investigating the Source: Determine the source of the failed logon attempts. Check the workstation name and network information to identify the origin of the attempts. If the source is external, consider blocking the IP address or implementing additional security measures.

Common Causes

  • Incorrect Username or Password: This is the most frequent reason. The user may have simply mistyped their credentials.
  • Account Disabled or Locked: The user account might be disabled by the administrator or locked due to multiple failed login attempts.
  • Account Expiration: The user’s account may have expired.
  • Account Policy Restrictions: There might be restrictions on the account that prevent login from the specific source or time.
  • Network Connectivity Issues: Problems with the network connection can also cause login failures.
  • Malware or Compromised Credentials: In some cases, malware or compromised credentials could be the cause of failed login attempts.

Best Practices for Managing Event ID 4625

  1. Regular Monitoring: Regularly monitor and review Event ID 4625 logs to detect and respond to potential security threats promptly.

  2. Implement Account Lockout Policies: Configure account lockout policies to automatically lock accounts after a specified number of failed logon attempts.

  3. Use Strong Passwords: Enforce strong password policies to reduce the risk of successful brute force attacks.

  4. Enable Multi-Factor Authentication (MFA): Implement MFA to add an additional layer of security, making it more difficult for attackers to gain access.

  5. Educate Users: Educate users about the importance of strong passwords and recognizing phishing attempts to reduce the likelihood of compromised credentials.

Investigating Failed Login Attempts

When investigating Event ID 4625, it’s important to consider the following:

  • Frequency: A single failed attempt is usually not a concern, but multiple attempts from the same source or for the same account should be investigated.
  • Source: Determine the source of the login attempt (local, network, remote).
  • Account: Identify the account that failed to log in.
  • Time: Note the time of the failed attempt.
  • Logon Type: Determine the type of logon attempt (interactive, network, service).
  • Failure Reason: Examine the specific reason for the failure (incorrect password, account disabled, etc.).

Windows Event ID 4625 is a critical security event that provides valuable information about failed logon attempts. By understanding and analyzing this event, organizations can detect and respond to potential security threats more effectively. Regular monitoring, implementing best practices, and taking proactive measures can significantly enhance the security of Windows environments and protect against unauthorized access attempts.

Event ID 4625 is not just a log entry; it is a vital tool in the arsenal of IT professionals and security teams tasked with safeguarding their systems from malicious actors. By leveraging the insights gained from analyzing these events, organizations can fortify their defenses and maintain a robust security posture.

Relevant Article

  • Windows Event ID 4740: Account Lockout Analysis

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как запустить командную строку без запуска windows
  • Что означает локальная переустановка windows 10
  • Что является средствами управления ос windows кратко
  • Windows 7 загрузка файлов при запуске windows
  • Windows cmd создать пустой файл