When either a user manually locks his workstation or the workstation automatically locks its console after a period of inactivity this event is logged.
To find out when the user returned and unlocked the workstation look for event ID 4801.
If a screen saver is used, there is a relationship between this event and 4802/4803 See event ID 4802 for an explanation of the sequence of events.
Description Fields in
4800
Subject:
The user and logon session involved.
- Security ID: The SID of the account.
- Account Name: The account logon name.
- Account Domain: The domain or — in the case of local accounts — computer name.
- Logon ID is a semi-unique (unique between reboots) number that identifies the logon session. Logon ID allows you to correlate backwards to the logon event (4624) as well as with other events logged during the same logon session.
Stay up-to-date on the Latest in Cybersecurity
Sign up for the Ultimate IT Security newsletter
to hear about the latest webinars, patches, CVEs, attacks, and more.
unit UWinWlx;
interface
uses Windows;
/////////////////////////////////////////////////////////////////////////
// WLX == WinLogon eXtension
//
// This file contains definitions, data types, and routine prototypes
// necessary to produce a DLL for Winlogon.
/////////////////////////////////////////////////////////////////////////
//
// Non-GINA notification DLLs
//
type
PWSTR = Windows.LPWSTR;
PFNMSGECALLBACK = function (bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
{$EXTERNALSYM PFNMSGECALLBACK}
TFnMsgeCallback = PFNMSGECALLBACK;
PWLX_NOTIFICATION_INFO = ^WLX_NOTIFICATION_INFO;
{$EXTERNALSYM PWLX_NOTIFICATION_INFO}
_WLX_NOTIFICATION_INFO = record
Size: Windows.ULONG;
Flags: Windows.ULONG;
UserName: Windows.LPWSTR;
Domain: Windows.LPWSTR;
WindowStation: Windows.LPWSTR;
hToken: Windows.THANDLE;
hDesktop: Windows.HDESK;
pStatusCallback: PFNMSGECALLBACK;
end;
{$EXTERNALSYM _WLX_NOTIFICATION_INFO}
WLX_NOTIFICATION_INFO = _WLX_NOTIFICATION_INFO;
{$EXTERNALSYM WLX_NOTIFICATION_INFO}
TWlxNotificationInfo = WLX_NOTIFICATION_INFO;
PWlxNotificationInfo = PWLX_NOTIFICATION_INFO;
// Event Handler Function Prototype
WLEvtHandler_Function = procedure(pInfo: PWLX_NOTIFICATION_INFO); stdcall;
//
// notifications
//
procedure WLN_Lock (pInfo: PWLX_NOTIFICATION_INFO); stdcall; forward;
procedure WLN_Unlock (pInfo: PWLX_NOTIFICATION_INFO); stdcall; forward;
//
// install procedure
//
procedure InstallNotify; stdcall; forward;
implementation
uses SysUtils, Registry;
const
RegRoot = HKEY_LOCAL_MACHINE;
RegPath = ‘\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify’;
RegName = ‘LQS_WLN’;
defName = ‘wl_ntfy.dll’;
procedure InstallNotify;
var xReg: TRegistry;
begin
//
xReg := TRegistry.Create;
try
xReg.RootKey := RegRoot;
xReg.Access := KEY_ALL_ACCESS;
if xReg.OpenKey(RegPath,True) then
if xReg.OpenKey(RegName,True) then
begin
xReg.WriteInteger(‘Asynchronous’,0);
xReg.WriteExpandString(‘DLLName’,defName);
xReg.WriteInteger(‘Impersonate’,0);
xReg.WriteString(‘Lock’,’WLN_Lock’);
xReg.WriteString(‘Unlock’,’WLN_Unlock’);
MessageBox(0, ‘Installed: [OK]’, », MB_OK + MB_ICONINFORMATION + MB_TASKMODAL);
end;
finally
xReg.CloseKey;
xReg.Free;
end;
end;
procedure WLN_Lock;
begin
PostMessage(HWND_BROADCAST,WM_USER + 100,0,0);
end;
procedure WLN_Unlock;
begin
PostMessage(HWND_BROADCAST,WM_USER + 101,0,0);
end;
initialization
finalization
end.
Время на прочтение5 мин
Количество просмотров79K
Пользовательская рабочая станция — самое уязвимое место инфраструктуры по части информационной безопасности. Пользователям может прийти на рабочую почту письмо вроде бы из безопасного источника, но со ссылкой на заражённый сайт. Возможно, кто-то скачает полезную для работы утилиту из неизвестно какого места. Да можно придумать не один десяток кейсов, как через пользователей вредоносное ПО может внедриться на внутрикорпоративные ресурсы. Поэтому рабочие станции требуют повышенного внимания, и в статье мы расскажем, откуда и какие события брать для отслеживания атак.
Для выявления атаки на самой ранней стадии в ОС Windows есть три полезных событийных источника: журнал событий безопасности, журнал системного мониторинга и журналы Power Shell.
Журнал событий безопасности (Security Log)
Это главное место хранения системных логов безопасности. Сюда складываются события входа/выхода пользователей, доступа к объектам, изменения политик и других активностей, связанных с безопасностью. Разумеется, если настроена соответствующая политика.
Перебор пользователей и групп (события 4798 и 4799). Вредоносное ПО в самом начале атаки часто перебирает локальные учетные записи пользователей и локальные группы на рабочей станции, чтобы найти учетные данные для своих тёмных делишек. Эти события помогут обнаружить вредоносный код раньше, чем он двинется дальше и, используя собранные данные, распространится на другие системы.
Создание локальной учётной записи и изменения в локальных группах (события 4720, 4722–4726, 4738, 4740, 4767, 4780, 4781, 4794, 5376 и 5377). Атака может также начинаться, например, с добавления нового пользователя в группу локальных администраторов.
Попытки входа с локальной учётной записью (событие 4624). Добропорядочные пользователи заходят с доменной учётной записью и выявление входа под локальной учётной записью может означать начало атаки. Событие 4624 включает также входы под доменной учетной записью, поэтому при обработке событий нужно зафильтровать события, в которых домен отличается от имени рабочей станции.
Попытка входа с заданной учётной записью (событие 4648). Такое бывает, когда процесс выполняется в режиме “Запуск от имени” (run as). В нормальном режиме работы систем такого не должно быть, поэтому такие события должны находиться под контролем.
Блокировка/разблокировка рабочей станции (события 4800-4803). К категории подозрительных событий можно отнести любые действия, которые происходили на заблокированной рабочей станции.
Изменения конфигурации файрволла (события 4944-4958). Очевидно, что при установке нового ПО настройки конфигурации файрволла могут меняться, что вызовет ложные срабатывания. Контролировать такие изменения в большинстве случаев нет необходимости, но знать о них точно лишним не будет.
Подключение устройств Plug’n’play (событие 6416 и только для WIndows 10). За этим важно следить, если пользователи обычно не подключают новые устройства к рабочей станции, а тут вдруг раз — и подключили.
Windows включает в себя 9 категорий аудита и 50 субкатегорий для тонкой настройки. Минимальный набор субкатегорий, который стоит включить в настройках:
Logon/Logoff
- Logon;
- Logoff;
- Account Lockout;
- Other Logon/Logoff Events.
Account Management
- User Account Management;
- Security Group Management.
Policy Change
- Audit Policy Change;
- Authentication Policy Change;
- Authorization Policy Change.
Системный монитор (Sysmon)
Sysmon — встроенная в Windows утилита, которая умеет записывать события в системный журнал. Обычно требуется его устанавливать отдельно.
Эти же события можно в принципе найти в журнале безопасности (включив нужную политику аудита), но Sysmon даёт больше подробностей. Какие события можно забирать из Sysmon?
Создание процесса (ID события 1). Системный журнал событий безопасности тоже может сказать, когда запустился какой-нибудь *.exe и даже покажет его имя и путь запуска. Но в отличие от Sysmon не сможет показать хэш приложения. Злонамеренное ПО может называться даже безобидным notepad.exe, но именно хэш выведет его на чистую воду.
Сетевые подключения (ID события 3). Очевидно, что сетевых подключений много, и за всеми не уследить. Но важно учитывать, что Sysmon в отличие от того же Security Log умеет привязать сетевое подключение к полям ProcessID и ProcessGUID, показывает порт и IP-адреса источника и приёмника.
Изменения в системном реестре (ID события 12-14). Самый простой способ добавить себя в автозапуск — прописаться в реестре. Security Log это умеет, но Sysmon показывает, кто внёс изменения, когда, откуда, process ID и предыдущее значение ключа.
Создание файла (ID события 11). Sysmon, в отличие от Security Log, покажет не только расположение файла, но и его имя. Понятно, что за всем не уследишь, но можно же проводить аудит определённых директорий.
А теперь то, чего в политиках Security Log нет, но есть в Sysmon:
Изменение времени создания файла (ID события 2). Некоторое вредоносное ПО может подменять дату создания файла для его скрытия из отчётов с недавно созданными файлами.
Загрузка драйверов и динамических библиотек (ID событий 6-7). Отслеживание загрузки в память DLL и драйверов устройств, проверка цифровой подписи и её валидности.
Создание потока в выполняющемся процессе (ID события 8). Один из видов атаки, за которым тоже нужно следить.
События RawAccessRead (ID события 9). Операции чтения с диска при помощи “\\.\”. В абсолютном большинстве случаев такая активность должна считаться ненормальной.
Создание именованного файлового потока (ID события 15). Событие регистрируется, когда создается именованный файловый поток, который генерирует события с хэшем содержимого файла.
Создание named pipe и подключения (ID события 17-18). Отслеживание вредоносного кода, который коммуницирует с другими компонентами через named pipe.
Активность по WMI (ID события 19). Регистрация событий, которые генерируются при обращении к системе по протоколу WMI.
Для защиты самого Sysmon нужно отслеживать события с ID 4 (остановка и запуск Sysmon) и ID 16 (изменение конфигурации Sysmon).
Журналы Power Shell
Power Shell — мощный инструмент управления Windows-инфраструктурой, поэтому велики шансы, что атакующий выберет именно его. Для получения данных о событиях Power Shell можно использовать два источника: Windows PowerShell log и Microsoft-WindowsPowerShell / Operational log.
Windows PowerShell log
Загружен поставщик данных (ID события 600). Поставщики PowerShell — это программы, которые служат источником данных для PowerShell для просмотра и управления ими. Например, встроенными поставщиками могут быть переменные среды Windows или системный реестр. За появлением новых поставщиков нужно следить, чтобы вовремя выявить злонамеренную активность. Например, если видите, что среди поставщиков появился WSMan, значит был начат удаленный сеанс PowerShell.
Microsoft-WindowsPowerShell / Operational log (или MicrosoftWindows-PowerShellCore / Operational в PowerShell 6)
Журналирование модулей (ID события 4103). В событиях хранится информация о каждой выполненной команде и параметрах, с которыми она вызывалась.
Журналирование блокировки скриптов (ID события 4104). Журналирование блокировки скриптов показывает каждый выполненный блок кода PowerShell. Даже если злоумышленник попытается скрыть команду, этот тип события покажет фактически выполненную команду PowerShell. Ещё в этом типе события могут фиксироваться некоторые выполняемые низкоуровневые вызовы API, эти события обычно записывается как Verbose, но если подозрительная команда или сценарий используются в блоке кода, он будет зарегистрирован как c критичностью Warning.
Обратите внимание, что после настройки инструмента сбора и анализа этих событий потребуется дополнительное время на отладку для снижения количества ложных срабатываний.
Расскажите в комментариях, какие собираете логи для аудита информационной безопасности и какие инструменты для этого используете. Одно из наших направлений — решения для аудита событий информационной безопасности. Для решения задачи сбора и анализа логов можем предложить присмотреться к Quest InTrust, который умеет сжимать хранящиеся данные с коэффициентом 20:1, а один его установленный экземпляр способен обрабатывать до 60000 событий в секунду из 10000 источников.
Чем асинхронная логика (схемотехника) лучше тактируемой, как я думаю, что помимо энергоэффективности — ещё и безопасность.
Hrethgir 14.05.2025
Помимо огромного плюса в энергоэффективности, асинхронная логика — тотальный контроль над каждым совершённым тактом, а значит — безусловная безопасность, где безконтрольно не совершится ни одного. . .
Многопоточные приложения на C++
bytestream 14.05.2025
C++ всегда был языком, тесно работающим с железом, и потому особеннно эффективным для многопоточного программирования. Стандарт C++11 произвёл революцию, добавив в язык нативную поддержку потоков,. . .
Stack, Queue и Hashtable в C#
UnmanagedCoder 14.05.2025
Каждый опытный разработчик наверняка сталкивался с ситуацией, когда невинный на первый взгляд List<T> превращался в узкое горлышко всего приложения. Причина проста: универсальность – это прекрасно,. . .
Как использовать OAuth2 со Spring Security в Java
Javaican 14.05.2025
Протокол OAuth2 часто путают с механизмами аутентификации, хотя по сути это протокол авторизации. Представьте, что вместо передачи ключей от всего дома вашему другу, который пришёл полить цветы, вы. . .
Анализ текста на Python с NLTK и Spacy
AI_Generated 14.05.2025
NLTK, старожил в мире обработки естественного языка на Python, содержит богатейшую коллекцию алгоритмов и готовых моделей. Эта библиотека отлично подходит для образовательных целей и. . .
Реализация DI в PHP
Jason-Webb 13.05.2025
Когда я начинал писать свой первый крупный PHP-проект, моя архитектура напоминала запутаный клубок спагетти. Классы создавали другие классы внутри себя, зависимости жостко прописывались в коде, а о. . .
Обработка изображений в реальном времени на C# с OpenCV
stackOverflow 13.05.2025
Объединение библиотеки компьютерного зрения OpenCV с современным языком программирования C# создаёт симбиоз, который открывает доступ к впечатляющему набору возможностей. Ключевое преимущество этого. . .
POCO, ACE, Loki и другие продвинутые C++ библиотеки
NullReferenced 13.05.2025
В C++ разработки существует такое обилие библиотек, что порой кажется, будто ты заблудился в дремучем лесу. И среди этого многообразия POCO (Portable Components) – как маяк для тех, кто ищет. . .
Паттерны проектирования GoF на C#
UnmanagedCoder 13.05.2025
Вы наверняка сталкивались с ситуациями, когда код разрастается до неприличных размеров, а его поддержка становится настоящим испытанием. Именно в такие моменты на помощь приходят паттерны Gang of. . .
Создаем CLI приложение на Python с Prompt Toolkit
py-thonny 13.05.2025
Современные командные интерфейсы давно перестали быть черно-белыми текстовыми программами, которые многие помнят по старым операционным системам. CLI сегодня – это мощные, интуитивные и даже. . .
In today’s digital landscape, security is a paramount concern for organizations. One common security challenge faced by system administrators is dealing with account lockouts. When an Active Directory user account gets locked, an account lockout event ID is generated and recorded in the Windows event logs. These event IDs provide crucial information about the lockout, such as the account name, time of the event, and the source computer responsible for the lockout. Understanding how to identify and analyze these event IDs is essential for troubleshooting and addressing account lockout issues effectively.
Introduction
Account lockouts can occur due to various reasons, including incorrect passwords, brute-force attacks, or misconfigured applications attempting unauthorized access. When an account lockout event occurs, the corresponding event IDs, such as 4740 on domain controllers and 4625 on client computers, are logged in the Windows event logs. By examining these event IDs, administrators can pinpoint the source of the lockout and take appropriate actions to resolve the issue.
Understanding Account Lockout Event IDs
Before diving into the process of finding account lockouts, it’s crucial to understand the two primary event IDs associated with lockout events. Event ID 4740 is logged on domain controllers when an Active Directory account is locked out, while event ID 4625 is logged on servers and workstations for both local and domain user account lockouts.
Enabling Account Lockout Events
To begin tracking account lockout events, it’s important to configure the necessary audit policies and enable the appropriate settings. By following a few simple steps, administrators can ensure that account lockout events are logged in the Windows event logs.
- Open the Group Policy Management Console either on the domain controller or any computer with the Remote Server Administration Tools (RSAT) installed.
- Modify the Default Domain Controllers Policy by browsing to “Computer Configuration” -> “Policies” -> “Windows Settings” -> “Security Settings” -> “Advanced Audit Policy Configuration” -> “Audit Policies” -> “Account Management.” Enable both success and failure auditing for the “Audit User Account Management” policy.
- Next, enable the following settings under “Computer Configuration” -> “Policies” -> “Windows Settings” -> “Security Settings” -> “Advanced Audit Policy Configuration” -> “Logon/Logoff”:
- Audit Account Lockout – Success and Failure
- Audit Logoff – Success and Failure
- Audit Logon – Success and Failure
- Audit Other Logon/Logoff Events – Success and Failure
With these audit policies configured, account lockout events will be recorded in the security event logs, providing valuable information for troubleshooting.
Account Lockout Event ID 4740 on Domain Controllers
Event ID 4740 is specifically logged on domain controllers when a user account lockout occurs. It provides essential information to help administrators identify the source of the lockout within the domain controller environment.
When troubleshooting account lockouts on domain controllers, it’s crucial to understand the various components of Event ID 4740 and how they contribute to the investigation process.
Understanding Event ID 4740 Components
- Account Name: This component specifies the name of the user account that has been locked out.
- Account Domain: It identifies the domain in which the user account resides.
- Caller Computer Name: This component indicates the name of the computer from which the account lockout request was made.
- Caller Logon ID: It provides a unique identifier for the logon session that initiated the account lockout request.
- Caller User Name: This component specifies the name of the user associated with the logon session that initiated the account lockout request.
- Locked Account: It indicates the name of the locked-out user account.
- Lockout Time: This component displays the date and time when the account lockout occurred.
Analyzing each component of Event ID 4740 helps administrators gain insights into the lockout event’s origin and the corresponding user and computer involved.
Step-by-Step Instructions for Analyzing Account Lockout Event ID 4740
To effectively analyze account lockout events using Event ID 4740 on domain controllers, follow these step-by-step instructions:
- Open Event Viewer: Launch the Event Viewer on the domain controller by pressing the Windows key + R, typing “eventvwr.msc” in the Run dialog, and pressing Enter.
- Navigate to Security Logs: In the Event Viewer, navigate to “Windows Logs” -> “Security” to access the security event logs.
- Filter Event ID 4740: Right-click on the “Security” log and select “Filter Current Log.” In the “Filter Current Log” dialog, enter “4740” in the “By source” field and click “OK.” This filters the log to display only Event ID 4740 entries.
- Analyze Event Details: Review each Event ID 4740 entry to gather information about the locked-out user account, the caller computer name, and the time of the lockout. Pay attention to the caller computer name, as it provides a clue about the source of the lockout.
- Investigate Caller Computer: With the caller computer name identified, proceed to investigate the potential causes of the lockout on the specific computer. This may involve checking for any running processes or services that might be using outdated credentials, verifying scheduled tasks, or examining network connection attempts originating from that computer.
By following these steps and analyzing Event ID 4740 entries, administrators can narrow down the source of account lockouts and take appropriate action to resolve the issue.
Account Lockout Event ID 4625 on Servers and Workstations
Event ID 4625 is the primary event ID logged on servers and workstations when a local or domain user account lockout occurs. This event provides crucial information to help identify the source of the lockout and the reasons for the failed logon attempt.
When troubleshooting account lockouts on servers and workstations, understanding the components of Event ID 4625 and their significance is vital.
Understanding Event ID 4625 Components
- Account Name: This component specifies the name of the user account that has been locked out.
- Account Domain: It identifies the domain in which the user account resides.
- Source Network Address: This component indicates the IP address or hostname of the computer from which the lockout request was made.
- Logon Type: Logon types define the type of logon attempt, such as interactive, network, or remote interactive logon.
- Failure Reason: It provides the reason for the failed logon attempt, which can assist in determining the cause of the lockout.
Analyzing each component of Event ID 4625 helps administrators gain insights into the lockout event, including the user account, the source network address, and the logon type and failure reason.
Step-by-Step Instructions for Analyzing Account Lockout Event ID 4625
To effectively analyze account lockout events using Event ID 4625 on servers and workstations, follow these step-by-step instructions:
- Open Event Viewer: Launch the Event Viewer on the server or workstation experiencing the account lockout by pressing the Windows key + R, typing “eventvwr.msc” in the Run dialog, and pressing Enter.
- Navigate to Security Logs: In the Event Viewer, navigate to “Windows Logs” -> “Security” to access the security event logs.
- Filter Event ID 4625: Right-click on the “Security” log and select “Filter Current Log.” In the “Filter Current Log” dialog, enter “4625” in the “By source” field and click “OK.” This filters the log to display only Event ID 4625 entries.
- Analyze Event Details: Review each Event ID 4625 entry to gather information about the locked-out user account, the source network address, logon type, and failure reason. These details can help identify potential causes of the lockout, such as expired passwords, misconfigured applications, or unauthorized access attempts.
- Investigate Source Network Address: With the source network address identified, investigate the corresponding computer or IP address to determine if any suspicious activities or misconfigurations are leading to the account lockout. Check for any running processes, services, or scheduled tasks that may be causing the lockout.
By following these steps and analyzing Event ID 4625 entries, administrators can pinpoint the source of account lockouts on servers and workstations and take appropriate actions to resolve the issue.
Logon Types in Event ID 4625
Event ID 4625 includes different logon types that provide insights into the type of logon attempt that resulted in the account lockout. Understanding these logon types helps administrators in their investigation process to identify the source of the lockout and the potential causes.
Logon Type | Description | Details | Examples |
2 | Interactive Logon | This logon type occurs when a user logs on to a computer | – Console logon: When a user directly logs on to the computer’s console<br>- RUNAS command: When a user runs a program with different credentials<br>- Network KVM access: When a user accesses the computer remotely using a Keyboard, Video, and Mouse (KVM) switch |
3 | Network Logon | This logon type occurs when a user accesses a remote resource | – NET USE command: When a user establishes a network connection to a shared resource<br>- Remote Procedure Call (RPC) calls: When a user makes RPC calls to a remote server<br>- Remote registry access: When a user accesses the registry of a remote computer |
4 | Batch Logon | This logon type occurs when a scheduled task runs | – Scheduled tasks: When a task scheduled in the Windows Task Scheduler runs<br>- Batch scripts: When a batch script is executed |
5 | Service Logon | This logon type occurs when a service starts or runs | – Windows services: When a Windows service starts or runs under a specific account<br>- Background services: When a background service is initialized and requires authentication |
7 | Unlock Workstation | This logon type occurs when a user unlocks a locked workstation | – Unlocking a locked workstation: When a user unlocks a computer that is locked due to inactivity or manual locking |
8 | NetworkCleartext Logon | This logon type occurs when a user logs on using clear-text credentials | – IIS Basic Authentication: When a user authenticates to an IIS web server using basic authentication<br>- Windows PowerShell with CredSSP: When a user uses Windows PowerShell with CredSSP (Credential Security Support Provider) for authentication |
9 | NewCredentials Logon | This logon type occurs when a user logs on with new credentials while already logged on | – RUNAS command with the /NETWORK option: When a user runs a program with different credentials and specifies the /NETWORK option |
10 | Remote Interactive Logon | This logon type occurs when a user logs on remotely | – Remote Desktop connection: When a user establishes a remote desktop session to a computer<br>- Remote administration: When a user remotely manages a server or workstation |
11 | Cached Interactive Logon | This logon type occurs when a user logs on using cached credentials | – User logging in using locally cached credentials: When a user logs on to a computer using credentials that were previously cached locally |
12 | Cached Remote Interactive Logon (Terminal Services) | This logon type occurs when a user logs on to a remote Terminal Services session using cached credentials | – User accessing Terminal Services using cached credentials: When a user logs on to a remote Terminal Services session using credentials that were previously cached locally |
13 | Cached Unlock (Terminal Services) | This logon type occurs when a user unlocks a locked Terminal Services session using cached credentials | – Unlocking a Terminal Services session: When a user unlocks a locked Terminal Services session using credentials that were previously cached locally |
14 | ClearText Password Logon (Credential Manager) | This logon type occurs when a user logs on using saved credentials stored in Credential Manager | – Logon using saved credentials in Credential Manager: When a user logs on to a computer using credentials that were previously saved in the Credential Manager |
15 | Network Logon with ClearText Password (Credential Manager) | This logon type occurs when a user logs on using saved network credentials stored in Credential Manager | – Logon using saved network credentials in Credential Manager: When a user logs on to a network resource using credentials that were previously saved in the Credential Manager |
The following are the common logon types found in Event ID 4625:
- Logon Type 2: Interactive Logon – This logon type occurs when a user logs on to the local computer interactively, either at the physical console or through a Remote Desktop session.
- Logon Type 3: Network Logon – This logon type happens when a user accesses resources on a remote computer over the network, such as accessing shared folders or printers.
- Logon Type 10: Remote Interactive Logon – This logon type occurs when a user connects to a computer remotely using Remote Desktop Services (RDS) or a similar remote access protocol.
Analyzing the logon types in Event ID 4625 can help administrators identify the entry point of the failed logon attempt and narrow down the potential causes, such as a compromised user account, unauthorized access attempts, or misconfigured application services.
By correlating the logon types with other event details, administrators can gain a better understanding of the lockout event and take appropriate actions to resolve the account lockout.
Remember to apply these troubleshooting steps and logon type analysis in conjunction with other security measures and best practices to ensure a comprehensive approach to account lockout prevention and resolution.
How to Quickly Find the Source of Account Lockouts
Finding the source of account lockouts can be a time-consuming process, especially in large and complex environments. However, there are several methods and tools available to streamline this task and expedite the troubleshooting process.
Using Event Viewer to Find Account Lockouts
The Event Viewer is a built-in Windows tool that allows administrators to view and analyze event logs. To find account lockouts using the Event Viewer, follow these steps:
- Open the Event Viewer by pressing the Windows key + R, typing “eventvwr.msc” in the Run dialog, and pressing Enter.
- Navigate to “Windows Logs” -> “Security” and look for event ID 4740 (on domain controllers) or event ID 4625 (on servers and workstations).
- Filter the events by the specific account name experiencing lockouts or by other relevant parameters such as the source IP address or logon type.
- Analyze the event details to identify the source computer responsible for the lockout.
Using the Event Viewer provides a manual approach to finding account lockouts, but it can be time-consuming, especially when dealing with multiple log entries and extensive event logs. For more efficient methods, consider utilizing PowerShell commands or specialized tools.
PowerShell Commands for Finding Account Lockouts
PowerShell offers powerful cmdlets that allow administrators to automate the process of finding account lockouts. The following PowerShell commands can be used to retrieve account lockout events:
# Find account lockouts in event ID 4740 (on domain controllers)
Get-WinEvent -FilterHashtable @{LogName=’Security’; ID=4740} | Select-Object -Property TimeCreated, Message
# Find account lockouts in event ID 4625 (on servers and workstations)
Get-WinEvent -FilterHashtable @{LogName=’Security’; ID=4625} | Select-Object -Property TimeCreated, Message
These commands retrieve the relevant events and display the time of the event along with the event message, which contains detailed information about the lockout.
Troubleshooting Account Lockouts with Event ID 4625
Event ID 4625 contains valuable information that can assist in troubleshooting account lockouts. When analyzing these events, pay attention to the following details:
- Account name: Identify the specific user account experiencing lockouts.
- Source IP address: Determine the IP address of the computer attempting the logon.
- Logon type: Understand the type of logon, whether it’s an interactive logon, network logon, or remote interactive logon.
- Failure reason: Look for error codes or failure reasons that provide insight into the cause of the lockout.
By combining this information with other logs and network monitoring tools, administrators can identify potential causes such as misconfigured applications, expired passwords, or malicious activities.
Summary
Account lockouts can be a frustrating issue for both users and system administrators. However, by understanding the account lockout event IDs, enabling the necessary audit policies, and utilizing tools like the Event Viewer, PowerShell commands, and the AD Pro Toolkit, administrators can efficiently find the source of account lockouts. Timely resolution of account lockouts helps ensure the security and smooth operation of an organization’s digital infrastructure.
FAQ
Q1: Can account lockouts be caused by expired passwords?
A1: Yes, expired passwords are one of the common causes of account lockouts. When a user’s password expires, failed logon attempts can trigger an account lockout event.
Q2: Can malware or unauthorized access attempts cause account lockouts?
A2: Yes, malware or unauthorized access attempts can lead to account lockouts. Brute-force attacks, where automated tools attempt various combinations of usernames and passwords, can trigger account lockouts when the system detects multiple failed logon attempts.
Q3: Is it possible to prevent account lockouts caused by misconfigured applications?
A3: Yes, ensuring that applications and services are configured correctly can help prevent account lockouts. Configurations such as using service accounts with appropriate permissions and properly configuring password settings can minimize the occurrence of lockouts.
Q4: Can I unlock a locked-out account without finding the source of the lockout?
A4: Yes, as an administrator, you can manually unlock a locked-out account without identifying the precise source of the lockout. However, it is generally recommended to investigate and address the underlying cause to prevent future lockouts.
Q5: How often should I check for account lockout events?
A5: It is advisable to regularly monitor account lockout events, especially if your organization frequently experiences lockout issues. Setting up automated scripts or using specialized tools can help streamline the monitoring process and alert you to any lockout events promptly.
Conclusion
Account lockouts can be a frustrating challenge for organizations, but with the right knowledge and tools, administrators can efficiently identify and resolve them. By understanding the account lockout event IDs, enabling the necessary audit policies, and utilizing tools like the Event Viewer, PowerShell commands, and the AD Pro Toolkit, administrators can quickly find the source of account lockouts and take appropriate actions to restore user access and ensure the security of their digital environment. Regular monitoring and proactive measures can help mitigate account lockout issues, promoting a secure and seamless user experience.