Код события 4625 windows server 2008 r2

Fixes a Security event issue that occurs when a user enters an incorrect PIN for a smart card on a computer that is running Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2.

Symptoms

Consider the following scenario:

  • You use a smart card to log on to a domain from a computer that is running Windows Server 2008, Windows Vista, Windows Server 2008 R2 or Windows 7.

  • You enter an incorrect personal identification number (PIN) for the smart card.

In this scenario, an instance of the event that has an Event ID 4625 is added to the Security log. However, the event entry does not have the user account name.

The event entry that has an Event ID 4625 resembles the following: 

Cause

This issue occurs because the user name is not logged if an incorrect PIN causes the credential initialization to fail. Therefore, the user name does not appear in the event that has the Event ID 4625.

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a «Hotfix download available» section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=supportNote The «Hotfix download available» form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running one of the following operating systems:

  • Windows Vista Service Pack 2 (SP2)

  • Windows Server 2008 Service Pack 2 (SP2)

  • Windows 7

  • Windows Server 2008 R2

For more information about how to obtain a Windows Vista service pack, click the following article number to view the article in the Microsoft Knowledge Base:

935791 How to obtain the latest Windows Vista service pack

For more information about how to obtain a Windows Server 2008 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

968849 How to obtain the latest service pack for Windows Server 2008

Restart requirement

You may have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English (United States) version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows Vista and Windows Server 2008 file information notes

Important Windows Vista hotfixes and Windows Server 2008 hotfixes are included in the same packages. However, only «Windows Vista» is listed on the Hotfix Request page. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under «Windows Vista» on the page. Always refer to the «Applies To» section in articles to determine the actual operating system that each hotfix applies to.

  • The files that apply to a specific product, SR_Level (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table.

    Version

    Product

    SR_Level

    Service branch

    6.0.600
    2.
    22xxx

    Windows Vista and Windows Server 2008

    SP2

    LDR

  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the «Additional file information for Windows Server 2008 and for Windows Vista» section. MUM files and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows Server 2008 and of Windows Vista

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.0.6002.22445

500,736

14-Jul-2010

05:59

x86

For all supported x64-based versions of Windows Server 2008 and of Windows Vista

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.0.6002.22445

658,944

13-Jul-2010

16:13

x64

Kerberos.dll

6.0.6002.22445

500,736

14-Jul-2010

05:59

x86

For all supported IA-64-based versions of Windows Server 2008

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.0.6002.22445

1,396,224

13-Jul-2010

15:35

IA-64

Kerberos.dll

6.0.6002.22445

500,736

14-Jul-2010

05:59

x86

Windows 7 and Windows Server 2008 R2 file information notes


Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under «Windows 7/Windows Server 2008 R2» on the page. Always refer to the «Applies To» section in articles to determine the actual operating system that each hotfix applies to.

  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the «Additional file information for Windows Server 2008 R2 and for Windows 7» section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows 7

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.1.7600.20762

541,184

23-Jul-2010

04:39

x86

For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.1.7600.20762

714,752

23-Jul-2010

05:03

x64

Kerberos.dll

6.1.7600.20762

541,184

23-Jul-2010

04:39

x86

For all supported IA-64-based versions of Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

Kerberos.dll

6.1.7600.20762

1,498,624

23-Jul-2010

04:15

IA-64

Kerberos.dll

6.1.7600.20762

541,184

23-Jul-2010

04:39

x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows Vista and for Windows Server 2008

Additional files for all supported x86-based versions of Windows Vista and of Windows Server 2008

File name

Update.mum

File version

Not applicable

File size

3,078

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

X86_e9a41a1ec05c3e7f30cfe82cb2be348e_31bf3856ad364e35_6.0.6002.22445_none_aa5c1b46a5b2b95c.manifest

File version

Not applicable

File size

705

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

X86_microsoft-windows-security-kerberos_31bf3856ad364e35_6.0.6002.22445_none_e920b904c72d6247.manifest

File version

Not applicable

File size

38,326

Date (UTC)

14-Jul-2010

Time (UTC)

07:41

Platform

Not applicable

Additional files for all supported x64-based versions of Windows Vista and of Windows Server 2008

File name

Amd64_870735e55b21d5d6e916761a1786d17b_31bf3856ad364e35_6.0.6002.22445_none_eec4f37f5e7064d5.manifest

File version

Not applicable

File size

1,060

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

Amd64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.0.6002.22445_none_453f54887f8ad37d.manifest

File version

Not applicable

File size

38,362

Date (UTC)

13-Jul-2010

Time (UTC)

18:11

Platform

Not applicable

File name

Update.mum

File version

Not applicable

File size

3,102

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

Wow64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.0.6002.22445_none_4f93fedab3eb9578.manifest

File version

Not applicable

File size

38,939

Date (UTC)

14-Jul-2010

Time (UTC)

07:30

Platform

Not applicable

Additional files for all supported IA-64-based versions of Windows Server 2008

File name

Ia64_095ab3b7518d6858d8104c59ef25ecbe_31bf3856ad364e35_6.0.6002.22445_none_ffa507b4512ea1e9.manifest

File version

Not applicable

File size

1,058

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

Ia64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.0.6002.22445_none_e9225cfac72b6b43.manifest

File version

Not applicable

File size

38,344

Date (UTC)

13-Jul-2010

Time (UTC)

15:52

Platform

Not applicable

File name

Update.mum

File version

Not applicable

File size

2,255

Date (UTC)

14-Jul-2010

Time (UTC)

11:25

Platform

Not applicable

File name

Wow64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.0.6002.22445_none_4f93fedab3eb9578.manifest

File version

Not applicable

File size

38,939

Date (UTC)

14-Jul-2010

Time (UTC)

07:30

Platform

Not applicable

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name

Update.mum

File version

Not applicable

File size

1,880

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

X86_b0dca12b62093558306d6c8f08658d79_31bf3856ad364e35_6.1.7600.20762_none_38f9d20e7d5851a6.manifest

File version

Not applicable

File size

705

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

X86_microsoft-windows-security-kerberos_31bf3856ad364e35_6.1.7600.20762_none_e74974c62b3138c1.manifest

File version

Not applicable

File size

33,218

Date (UTC)

23-Jul-2010

Time (UTC)

05:12

Platform

Not applicable

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

Amd64_22478de42b530fa76b4eefefa212ba30_31bf3856ad364e35_6.1.7600.20762_none_4f5772f04f6117ef.manifest

File version

Not applicable

File size

709

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

Amd64_43e6e5f3d63b117f4b3d11ee6f433bd7_31bf3856ad364e35_6.1.7600.20762_none_132cc546711f9ad1.manifest

File version

Not applicable

File size

1,060

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

Amd64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.1.7600.20762_none_43681049e38ea9f7.manifest

File version

Not applicable

File size

33,222

Date (UTC)

23-Jul-2010

Time (UTC)

06:04

Platform

Not applicable

File name

Update.mum

File version

Not applicable

File size

2,114

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

Wow64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.1.7600.20762_none_4dbcba9c17ef6bf2.manifest

File version

Not applicable

File size

22,967

Date (UTC)

23-Jul-2010

Time (UTC)

05:05

Platform

Not applicable

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name

Ia64_f20914d81c41ed8f7959bb6d1b113ec5_31bf3856ad364e35_6.1.7600.20762_none_e9bcc378e22864d3.manifest

File version

Not applicable

File size

1,058

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

Ia64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.1.7600.20762_none_e74b18bc2b2f41bd.manifest

File version

Not applicable

File size

33,220

Date (UTC)

23-Jul-2010

Time (UTC)

06:00

Platform

Not applicable

File name

Update.mum

File version

Not applicable

File size

1,690

Date (UTC)

23-Jul-2010

Time (UTC)

07:35

Platform

Not applicable

File name

Wow64_microsoft-windows-security-kerberos_31bf3856ad364e35_6.1.7600.20762_none_4dbcba9c17ef6bf2.manifest

File version

Not applicable

File size

22,967

Date (UTC)

23-Jul-2010

Time (UTC)

05:05

Platform

Not applicable

RRS feed

  • Remove From My Forums
  • Общие обсуждения

  • В журнале безопасности есть события 4625, но без ip адреса. тут RemoteDesktopServices-RDPCoreTS/Operational» и тут TerminalServices->RemoteConnectionManager
    тоже ничего нет. где взять адрес, или что сделать чтоб он появился в событии 4625?

Все ответы

  • В журнале безопасности есть события 4625, но без ip адреса. тут RemoteDesktopServices-RDPCoreTS/Operational» и тут TerminalServices->RemoteConnectionManager
    тоже ничего нет. где взять адрес, или что сделать чтоб он появился в событии 4625?

    IP адрес есть в событии 4624. Можно сделать анализ входа по RDP с помощью Powershell:

    за всё время:

    $event = Get-WinEvent -FilterHashTable @{LogName="security";id=4624}
    foreach ($event in $event)
    { 
     if ($event.Properties[8].Value -eq 10)
     { 
     $event.TimeCreated
     $event.Properties[5].Value
     $event.Properties[18].Value
     }
    }

    за сегодняшний день:

    $today = get-date -DisplayHint date -UFormat %Y-%m-%d
    $event = Get-WinEvent -FilterHashTable @{LogName="security";starttime="$today";id=4624}
    foreach ($event in $event)
    { 
     if ($event.Properties[8].Value -eq 10)
     { 
     $event.TimeCreated
     $event.Properties[5].Value
     $event.Properties[18].Value
     }
    }

    Вывод: когда, кто, с какого IP:

    Tuesday, 19. December 2017 12:31:01
    User1
    192.168.1.200
    Tuesday, 19. December 2017 12:31:01
    User1
    192.168.1.200
    Tuesday, 19. December 2017 10:22:31
    User1
    10.254.1.82
    Tuesday, 19. December 2017 10:22:31
    User1
    10.254.1.82
    Tuesday, 19. December 2017 10:21:28
    User1
    10.255.9.16
    Tuesday, 19. December 2017 10:21:28
    User1
    10.255.9.16
    Tuesday, 19. December 2017 10:19:46
    User1
    10.255.9.16
    Tuesday, 19. December 2017 10:19:46
    User1
    10.255.9.16
    Tuesday, 19. December 2017 09:35:40
    User2
    10.255.9.103
    Tuesday, 19. December 2017 09:35:40
    User2
    10.255.9.103

    P.s.: вывод содержит по две одинаковые записи. Там надо её один фильтр ставить. Но, я думаю для начало это ведь не критично ? )

    • Изменено
      Anahaym
      19 декабря 2017 г. 11:55

  • а при чем тут 4624, если это относится к успешному входу?

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

    в режиме реального времени:

    Get-Content C:WindowsSystem32LogFilesFirewallpfirewall.log -Tail 50 -wait | select-string "3389"

    все логи:

    Get-Content C:WindowsSystem32LogFilesFirewallpfirewall.log | select-string "3389"

    более того, там будут IP адреса и тех, кто просто подключается по RDP без ввода логинапароля. Но ведь вам это тоже не нужно?

    Антонов
    Антон вы не поняли задачу. менять ничего в скрипте не нужно. ТС надо знать с каких IP вводят неправильные данные входа. Это регистрируется в событии 4625, но IP там нет. Я просто не посмотрел, что это событие «аудит
    неуспеха».

    • Изменено
      Anahaym
      21 декабря 2017 г. 13:01

  • Добрый День.

    Вам написали код PS скрипта для примера, вам трудно в нем заменить
    id=4624 события на id=4625?

    я в курсе как вытащить шелом адреса из журнала. собственно с этого и началась проблема, адресов в журнале нет.

  • а при чем тут 4624, если это относится к успешному входу?

    Добрый День.

    Вам написали код PS скрипта для примера, вам трудно в нем заменить
    id=4624 события на id=4625?

    Хотя Вы знаете, Антон, Вы правы. Но менять надо не только номер события. Поменял скрипт.

    modice лови:

    $event = Get-WinEvent -FilterHashTable @{LogName="security";id=4625}
    foreach ($event in $event)
    { 
     if ($event.Properties[10].Value -eq 7)
     { 
     $event.TimeCreated
     $event.Properties[5].Value
     $event.Properties[19].Value
     }
    }

    вывод:

    Friday, 15. December 2017 12:19:38
    User1
    10.255.9.116
    Friday, 15. December 2017 12:04:45
    User1
    10.255.9.116
    Friday, 15. December 2017 11:37:37
    User1
    10.255.9.116

  • скрипт ничего не вывел. я может чего не понимаю. но в журнале, руками смотришь событие и в месте ip адреса пустота. вопрос где вы надеетесь выцепить адрес?

  • очень странно. у меня теперь тоже ничего не выдаёт. а на некоторых серверах вообще нет аудита неуспешного входа. попробую разобраться.

  • как вы хотите вытащить адрес если информации в журнале нет?

  • как вы хотите вытащить адрес если информации в журнале нет?

    у меня он был.
    или Вы думаете я просто наугад написал вывод скрипта? вот пример, где у события
    4625 IP есть (но это не относится к RDP):

  • адрес появляется, но не устраивает что rdp раскрывается во весь экран, вместо мелкого окна с ошибкой. 

  • адрес появляется, но не устраивает что rdp раскрывается во весь экран, вместо мелкого окна с ошибкой. 

    а это уже в отдельную тему, пожалуйста

  • да нет, не стоит. потому что на другой машине со сток настройками все норм, вопрос остается открытым.

  • да нет, не стоит. потому что на другой машине со сток настройками все норм, вопрос остается открытым.

    вопрос по IP в событии 4625 — да. Другие вопросы — в другую тему.

  • так. всё стало понятно. тип входа 7 — это разблокирование имеющийсся сессии, а не новой, как я думал раньше. Для него IP пишется в лог. К сожалению, для нужного
    типа входа 10 IP не пишется.

  • вариант:
    — собирать логи 4625 и логи фаервола
    — сравнивать по времени эти логи
    — на выходе получить и имя пользователя и его IP

    вот пример чтения лога фаервола:

    Get-Content C:WindowsSystem32LogFilesFirewallpfirewall.log -Tail 50 -wait | select-string "3389"
    2018-01-12 15:52:24 ALLOW TCP 10.255.9.114 10.255.9.16 44467 3389 0 - 0 0 0 - - - RECEIVE
    2018-01-12 15:53:08 ALLOW TCP 10.255.9.114 10.255.9.16 44479 3389 0 - 0 0 0 - - - RECEIVE
    2018-01-12 15:53:40 ALLOW TCP 10.255.9.114 10.255.9.16 44484 3389 0 - 0 0 0 - - - RECEIVE
    2018-01-12 15:54:02 ALLOW TCP 10.255.9.114 10.255.9.16 44487 3389 0 - 0 0 0 - - - RECEIVE
  • это все посредственное, в идеале найти бы причину почему в журнал не пишется…

  • апнем

    Думаете после этого ИП появится?!

  • Просто лень раскладку на телефоне переключать

  • Может появились у кого то еще идеи? 

  • столкнулся с такой же проблемой

    а у вас сервак смотрит в мир напрямую или через проброс портов ?

    у меня проброс портов, IP пустые грешу на проброс

  • столкнулся с такой же проблемой

    а у вас сервак смотрит в мир напрямую или через проброс портов ?

    у меня проброс портов, IP пустые грешу на проброс

    Это точно не из-за проброса портов. Потому, что с кодом 4624 — адреса успешно попадают в лог.

    Тема актуальна. Кто нашел как устранить глюк?!

     

title description ms.pagetype ms.prod ms.mktglfcycl ms.sitesec ms.localizationpriority author ms.date ms.reviewer manager ms.author ms.technology ms.collection ms.topic

4625(F) An account failed to log on. (Windows 10)

Describes security event 4625(F) An account failed to log on. This event is generated if an account logon attempt failed for a locked out account.

security

windows-client

deploy

library

none

vinaypamnani-msft

01/03/2022

aaroncz

vinpa

itpro-security

highpri

reference

4625(F): An account failed to log on.

Event 4625 illustration

Subcategories: Audit Account Lockout and Audit Logon

Event Description:

This event is logged for any logon failure.

It generates on the computer where logon attempt was made, for example, if logon attempt was made on user’s workstation, then event will be logged on this workstation.

This event generates on domain controllers, member servers, and workstations.

[!NOTE]
For recommendations, see Security Monitoring Recommendations for this event.

Event XML:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
 <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" /> 
 <EventID>4625</EventID> 
 <Version>0</Version> 
 <Level>0</Level> 
 <Task>12546</Task> 
 <Opcode>0</Opcode> 
 <Keywords>0x8010000000000000</Keywords> 
 <TimeCreated SystemTime="2015-09-08T22:54:54.962511700Z" /> 
 <EventRecordID>229977</EventRecordID> 
 <Correlation /> 
 <Execution ProcessID="516" ThreadID="3240" /> 
 <Channel>Security</Channel> 
 <Computer>DC01.contoso.local</Computer> 
 <Security /> 
 </System>
- <EventData>
 <Data Name="SubjectUserSid">S-1-5-18</Data> 
 <Data Name="SubjectUserName">DC01$</Data> 
 <Data Name="SubjectDomainName">CONTOSO</Data> 
 <Data Name="SubjectLogonId">0x3e7</Data> 
 <Data Name="TargetUserSid">S-1-0-0</Data> 
 <Data Name="TargetUserName">Auditor</Data> 
 <Data Name="TargetDomainName">CONTOSO</Data> 
 <Data Name="Status">0xc0000234</Data> 
 <Data Name="FailureReason">%%2307</Data> 
 <Data Name="SubStatus">0x0</Data> 
 <Data Name="LogonType">2</Data> 
 <Data Name="LogonProcessName">User32</Data> 
 <Data Name="AuthenticationPackageName">Negotiate</Data> 
 <Data Name="WorkstationName">DC01</Data> 
 <Data Name="TransmittedServices">-</Data> 
 <Data Name="LmPackageName">-</Data> 
 <Data Name="KeyLength">0</Data> 
 <Data Name="ProcessId">0x1bc</Data> 
 <Data Name="ProcessName">C:\Windows\System32\winlogon.exe</Data> 
 <Data Name="IpAddress">127.0.0.1</Data> 
 <Data Name="IpPort">0</Data> 
 </EventData>
 </Event>

Required Server Roles: None.

Minimum OS Version: Windows Server 2008, Windows Vista.

Event Versions: 0.

Field Descriptions:

Subject:

  • Security ID [Type = SID]: SID of account that reported information about logon failure. Event Viewer automatically tries to resolve SIDs and show the account name. If the SID cannot be resolved, you will see the source data in the event.

    [!NOTE]
    A security identifier (SID) is a unique value of variable length used to identify a trustee (security principal). Each account has a unique SID that is issued by an authority, such as an Active Directory domain controller, and stored in a security database. Each time a user logs on, the system retrieves the SID for that user from the database and places it in the access token for that user. The system uses the SID in the access token to identify the user in all subsequent interactions with Windows security. When a SID has been used as the unique identifier for a user or group, it cannot ever be used again to identify another user or group. For more information about SIDs, see Security identifiers.

  • Account Name [Type = UnicodeString]: the name of the account that reported information about logon failure.

  • Account Domain [Type = UnicodeString]: subject’s domain or computer name. Here are some examples of formats:

    • Domain NETBIOS name example: CONTOSO

    • Lowercase full domain name: contoso.local

    • Uppercase full domain name: CONTOSO.LOCAL

    • For some well-known security principals, such as LOCAL SERVICE or ANONYMOUS LOGON, the value of this field is “NT AUTHORITY”.

    • For local user accounts, this field will contain the name of the computer or device that this account belongs to, for example: “Win81”.

  • Logon Type [Type = UInt32]: the type of logon that was performed. “Table 11. Windows Logon Types” contains the list of possible values for this field.

    Table 11: Windows Logon Types

    Logon Type Logon Title Description
    2 Interactive A user logged on to this computer.
    3 Network A user or computer logged on to this computer from the network.
    4 Batch Batch logon type is used by batch servers, where processes may be executing on behalf of a user without their direct intervention.
    5 Service A service was started by the Service Control Manager.
    7 Unlock This workstation was unlocked.
    8 NetworkCleartext A user logged on to this computer from the network. The user’s password was passed to the authentication package in its unhashed form. The built-in authentication packages all hash credentials before sending them across the network. The credentials do not traverse the network in plaintext (also called cleartext).
    9 NewCredentials A caller cloned its current token and specified new credentials for outbound connections. The new logon session has the same local identity, but uses different credentials for other network connections.
    10 RemoteInteractive A user logged on to this computer remotely using Terminal Services or Remote Desktop.
    11 CachedInteractive A user logged on to this computer with network credentials that were stored locally on the computer. The domain controller was not contacted to verify the credentials.

Account For Which Logon Failed:

  • Security ID [Type = SID]: SID of the account that was specified in the logon attempt. Event Viewer automatically tries to resolve SIDs and show the account name. If the SID cannot be resolved, you will see the source data in the event.

    [!NOTE]
    A security identifier (SID) is a unique value of variable length used to identify a trustee (security principal). Each account has a unique SID that is issued by an authority, such as an Active Directory domain controller, and stored in a security database. Each time a user logs on, the system retrieves the SID for that user from the database and places it in the access token for that user. The system uses the SID in the access token to identify the user in all subsequent interactions with Windows security. When a SID has been used as the unique identifier for a user or group, it cannot ever be used again to identify another user or group. For more information about SIDs, see Security identifiers.

  • Account Name [Type = UnicodeString]: the name of the account that was specified in the logon attempt.

  • Account Domain [Type = UnicodeString]: domain or computer name. Here are some examples of formats:

    • Domain NETBIOS name example: CONTOSO

    • Lowercase full domain name: contoso.local

    • Uppercase full domain name: CONTOSO.LOCAL

    • For some well-known security principals, such as LOCAL SERVICE or ANONYMOUS LOGON, the value of this field is “NT AUTHORITY”.

    • For local user accounts, this field will contain the name of the computer or device that this account belongs to, for example: “Win81”.

  • Logon ID [Type = HexInt64]: hexadecimal value that can help you correlate this event with recent events that might contain the same Logon ID, for example, “4624: An account was successfully logged on.”

Failure Information:

  • Failure Reason [Type = UnicodeString]: textual explanation of Status field value. For this event, it typically has “Account locked out” value.

  • Status [Type = HexInt32]: the reason why logon failed. For this event, it typically has “0xC0000234” value. The most common status codes are listed in Table 12. Windows logon status codes.

    Table 12: Windows logon status codes.

    StatusSub-Status Code Description
    0XC000005E There are currently no logon servers available to service the logon request.
    0xC0000064 User logon with misspelled or bad user account
    0xC000006A User logon with misspelled or bad password
    0XC000006D The cause is either a bad username or authentication information
    0XC000006E Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions).
    0xC000006F User logon outside authorized hours
    0xC0000070 User logon from unauthorized workstation
    0xC0000071 User logon with expired password
    0xC0000072 User logon to account disabled by administrator
    0XC00000DC Indicates the Sam Server was in the wrong state to perform the desired operation.
    0XC0000133 Clocks between DC and other computer too far out of sync
    0XC000015B The user has not been granted the requested logon type (also called the logon right) at this machine
    0XC000018C The logon request failed because the trust relationship between the primary domain and the trusted domain failed.
    0XC0000192 An attempt was made to logon, but the Netlogon service was not started.
    0xC0000193 User logon with expired account
    0XC0000224 User is required to change password at next logon
    0XC0000225 Evidently a bug in Windows and not a risk
    0xC0000234 User logon with account locked
    0XC00002EE Failure Reason: An Error occurred during Logon
    0XC0000413 Logon Failure: The machine you are logging on to is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine.
    0x0 Status OK.

[!NOTE]
To see the meaning of other status or substatus codes, you might also check for status code in the Windows header file ntstatus.h in Windows SDK.

More information: https://dev.windows.com/en-us/downloads

  • Sub Status [Type = HexInt32]: additional information about logon failure. The most common substatus codes listed in the “Table 12. Windows logon status codes.”.

Process Information:

  • Caller Process ID [Type = Pointer]: hexadecimal Process ID of the process that attempted the logon. Process ID (PID) is a number used by the operating system to uniquely identify an active process. To see the PID for a specific process you can, for example, use Task Manager (Details tab, PID column):

    Task manager illustration

    If you convert the hexadecimal value to decimal, you can compare it to the values in Task Manager.

    You can also correlate this process ID with a process ID in other events, for example, “4688: A new process has been created” Process InformationNew Process ID.

  • Caller Process Name [Type = UnicodeString]: full path and the name of the executable for the process.

Network Information:

  • Workstation Name [Type = UnicodeString]: machine name from which logon attempt was performed.

  • Source Network Address [Type = UnicodeString]: IP address of machine from which logon attempt was performed.

    • IPv6 address or ::ffff:IPv4 address of a client.

    • ::1 or 127.0.0.1 means localhost.

  • Source Port [Type = UnicodeString]: source port that was used for logon attempt from remote machine.

    • 0 for interactive logons.

Detailed Authentication Information:

  • Logon Process [Type = UnicodeString]: the name of the trusted logon process that was used for the logon attempt. See event “4611: A trusted logon process has been registered with the Local Security Authority” description for more information.

  • Authentication Package [Type = UnicodeString]: The name of the authentication package that was used for the logon authentication process. Default packages loaded on LSA startup are located in “HKLMSYSTEMCurrentControlSetControlLsaOSConfig” registry key. Other packages can be loaded at runtime. When a new package is loaded a “4610: An authentication package has been loaded by the Local Security Authority” (typically for NTLM) or “4622: A security package has been loaded by the Local Security Authority” (typically for Kerberos) event is logged to indicate that a new package has been loaded along with the package name. The most common authentication packages are:

    • NTLM – NTLM-family Authentication

    • Kerberos – Kerberos authentication.

    • Negotiate – the Negotiate security package selects between Kerberos and NTLM protocols. Negotiate selects Kerberos unless it cannot be used by one of the systems involved in the authentication or the calling application did not provide sufficient information to use Kerberos.

  • Transited Services [Type = UnicodeString] [Kerberos-only]: the list of transmitted services. Transmitted services are populated if the logon was a result of a S4U (Service For User) logon process. S4U is a Microsoft extension to the Kerberos Protocol to allow an application service to obtain a Kerberos service ticket on behalf of a user – most commonly done by a front-end website to access an internal resource on behalf of a user. For more information about S4U, see https://msdn.microsoft.com/library/cc246072.aspx

  • Package Name (NTLM only) [Type = UnicodeString]: The name of the LAN Manager subpackage (NTLM-family protocol name) that was used during the logon attempt. Possible values are:

    • “NTLM V1”

    • “NTLM V2”

    • “LM”

      Only populated if “Authentication Package” = “NTLM”.

  • Key Length [Type = UInt32]: the length of NTLM Session Security key. Typically, it has a length of 128 bits or 56 bits. This parameter is always 0 if «Authentication Package» = «Kerberos», because it is not applicable for Kerberos protocol. This field will also have “0” value if Kerberos was negotiated using Negotiate authentication package.

Security Monitoring Recommendations

For 4625(F): An account failed to log on.

[!IMPORTANT]
For this event, also see Appendix A: Security monitoring recommendations for many audit events.

  • If you have a pre-defined “Process Name” for the process reported in this event, monitor all events with “Process Name” not equal to your defined value.

  • You can monitor to see if “Process Name” is not in a standard folder (for example, not in System32 or Program Files) or is in a restricted folder (for example, Temporary Internet Files).

  • If you have a pre-defined list of restricted substrings or words in process names (for example, “mimikatz” or “cain.exe”), check for these substrings in “Process Name.”

  • If SubjectAccount Name is a name of service account or user account, it may be useful to investigate whether that account is allowed (or expected) to request logon for Account For Which Logon FailedSecurity ID.

  • To monitor for a mismatch between the logon type and the account that uses it (for example, if Logon Type 4-Batch or 5-Service is used by a member of a domain administrative group), monitor Logon Type in this event.

  • If you have a high-value domain or local account for which you need to monitor every lockout, monitor all 4625 events with the “SubjectSecurity ID” that corresponds to the account.

  • We recommend monitoring all 4625 events for local accounts, because these accounts typically should not be locked out. Monitoring is especially relevant for critical servers, administrative workstations, and other high-value assets.

  • We recommend monitoring all 4625 events for service accounts, because these accounts should not be locked out or prevented from functioning. Monitoring is especially relevant for critical servers, administrative workstations, and other high value assets.

  • If your organization restricts logons in the following ways, you can use this event to monitor accordingly:

    • If the “Account For Which Logon Failed Security ID” should never be used to log on from the specific Network InformationWorkstation Name.

    • If a specific account, such as a service account, should only be used from your internal IP address list (or some other list of IP addresses). In this case, you can monitor for Network InformationSource Network Address and compare the network address with your list of IP addresses.

    • If a particular version of NTLM is always used in your organization. In this case, you can use this event to monitor Package Name (NTLM only), for example, to find events where Package Name (NTLM only) does not equal NTLM V2.

    • If NTLM is not used in your organization, or should not be used by a specific account (New LogonSecurity ID). In this case, monitor for all events where Authentication Package is NTLM.

    • If the Authentication Package is NTLM. In this case, monitor for Key Length not equal to 128, because all Windows operating systems starting with Windows 2000 support 128-bit Key Length.

    • If Logon Process is not from a trusted logon processes list.

  • Monitor for all events with the fields and values in the following table:

    Field Value to monitor for
    Failure InformationStatus or
    Failure InformationSub Status
    0XC000005E – “There are currently no logon servers available to service the logon request.”
    This issue is typically not a security issue, but it can be an infrastructure or availability issue.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC0000064 – “User logon with misspelled or bad user account”.
    Especially if you get several of these events in a row, it can be a sign of a user enumeration attack.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC000006A – “User logon with misspelled or bad password” for critical accounts or service accounts.
    Especially watch for a number of such events in a row.
    Failure InformationStatus or
    Failure InformationSub Status
    0XC000006D – “This is either due to a bad username or authentication information” for critical accounts or service accounts.
    Especially watch for a number of such events in a row.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC000006F – “User logon outside authorized hours”.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC0000070 – “User logon from unauthorized workstation”.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC0000072 – “User logon to account disabled by administrator”.
    Failure InformationStatus or
    Failure InformationSub Status
    0XC000015B – “The user has not been granted the requested logon type (aka logon right) at this machine”.
    Failure InformationStatus or
    Failure InformationSub Status
    0XC0000192 – “An attempt was made to logon, but the Netlogon service was not started”.
    This issue is typically not a security issue but it can be an infrastructure or availability issue.
    Failure InformationStatus or
    Failure InformationSub Status
    0xC0000193 – “User logon with expired account”.
    Failure InformationStatus or
    Failure InformationSub Status
    0XC0000413 – “Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine”.

В этой статье мы покажем, как отслеживать события блокировки учетных записей пользователей на котроллерах домена 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). Также в выводе команды вы видите информацию о времени смены пароля пользователя в домене и времени блокировки аккаунта.

poweshell: проверить что пользователь ad заблокирован - атрибут lockedout

Можно вывести сразу все заблокированные аккаунты в домене с помощью командлета 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:

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:Windowsdebugnetlogon.log | findstr a.berg| findstr /i "0xC000006A"

поиск источника блокировки пользователя в логе debugnetlogon.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 AUTHORITYSYSTEM.

  • Программы, которые хранят и используют закэшировнный пароль пользователя;
  • Браузеры;
  • Мобильные устройства (например, использующееся для доступа к корпоративной почте);
  • Программы с автологином или настроенный автоматический вход в 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). Это как правило самый действенный метод защиты от внезапных блокировок определенного пользователя, если вы не смогли установить источник блокировки.

Description

    In this article, I am going to explain about the Local Computer Logon Failure Event 4625. This event will get logged whenever an user tries to login with bad or wrong credentials. Here we will discus about how to Enable Event 4625 through local security policy and Auditpol command in local computer and how to enable Event 4625 in Active Directory based domain environment via Group Policy Object. Here, we will also discus about how to Stop or Disable the event 4625 when you don’t want logon failure activity.

This is event controlled by Logon/Logoff (Audit logon events) category in Audit policy settings. Other important events controlled by this audit policy setting are 4624, 4648, 4634 and 4672

Refer this article Tracking User Logon Activity using Logon and Logoff Events to know about how to track user’s logon duration from logon 4624 and logoff 4634 events.

Summary

  • Event ID 4625 Log Source
  • How to Enable event 4625 via Local Security Policy
  • Steps to Enable event 4625 through Group Policy
  • How to Enable event 4625 using Auditpol
  • How to Stop/Disable event 4625

Event ID 4625 Sample Source

Description: An account failed to log on.

Subject:
       Security ID: SYSTEM
       Account Name: MyPC$
       Account Domain: TestDomain
       Logon ID: 0x0
Logon Type: 
Account For Which Logon Failed:
       Security ID: S-1-5-21-822115511-2935354860-794628881-514
       Account Name: Ltest
       Account Domain: TestDomain
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: MyPC
       Source Network Address: 192.178.87.231
       Source Port: 
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.

Enable event 4625 via Local Security Policy

Steps to enable event 4625 through Local Security Policy:

1. Run the command secpol.msc to open Local Security Policy.

Event 4625 - Enable and Stop Logon Failure Event 4625

2. In Local Security Policy console, go to the node Audit Policy (Security Settings -> Local Policies-> Audit Policy).

Event 4625 - Enable and Stop Logon Failure Event

3. In right side pane, double-click the policy Audit logon events.

4. Now check the Failure audit and click Apply to configure logon failure event 4625.

Event 4625 - Enable and Stop Event 4625

Now, you have successfully configured audit setting to log event 4625 in local computer. if you working in Active Directory based domain environment and if you want to configure this settings in all the computers that exists in domain, you need to achieve this by applying audit setting through any of Group Policy Object.

How to enable event 4625 through Group Policy

Steps to enable event 4625 through GPO:

1. Open Group Policy Management Console by running the command gpmc.msc

2. Expand the domain node,  then right-click on the Default Domain Policy, and click Edit option

Enable Event 4625 logon failure via GPO

3. Expand the Computer Configuration node, go to the node Audit Policy (Computer Configuration->Policies->Windows Settings->Security Settings->Local Policies->Audit Policy).

4. Navigate to the right side pane, select the policy Audit logon events, and set the Failure audit value.

Enable Event 4625 via GPO

5. In Windows 7/Server 2008 R2 and later versions, you can also enable Event ID 4625 through Advanced Audit Policy Configuration.  Expand Computer Configuration, and go to the node Advanced Audit Policy Configuration (Computer Configuration->Polices->Windows Settings->Security Settings->Advanced Audit Policy Configuration)

6. Expand this node, go to Logon/Logoff (Audit Polices-> Logon/Logoff ), then select the Setting

Audit Logon, and set its value as Failure

Enable Event 4625 via GPO

8. Run the command GPUpdate /force to apply this setting in all the Computers

Enable Event 4625 via GPO

How to enable event 4625 using Auditpol

     Auditpol.exe is the command line utility tool to change Audit Security settings as category and sub-category level. It is available by default Windows 2008 R2 and later versions/Windows 7 and later versions. By using Auditpol, we can get/set Audit Security settings per user level and computer level.

   Note: You should run Auditpol command with elevated privilege (Run As Administrator);

You can enable audit Event 4625 by using the following command

Auditpol /set /subcategory:"Logon" /failure:enable

How to stop/disable Event 4625

You can disable or stop the logon failure audit Event ID 4625 by using the following command

Auditpol /set /subcategory:"Logon" /failure:disable

You can also stop this event by removing the Failure audit setting from the GPO in the setting path  Computer Configuration->Polices->Windows Settings->Security Settings->Advanced Audit Policy Configuration->Audit Polices->Logon/Logoff->Audit Logon.



 Note: You need to refresh/update GPO for every change by running the command GPUpdate/force.

Note : This article is applies to Windows Server 2008,Windows Server 2008 R2, Windows Server 2012, Windows 7 and Windows 8.

Thanks,
Morgan
Software Developer

We are using a total of 7 Windows Server (2008/2012) R2 Standard Editions for development and production environments. Last month our servers was compromised and we found many failed attempt logs in windows event viewer. We tried cyberarms IDDS but it didn’t prove to be good earlier.

Now we have re-imaged all our servers and renamed Administrator/guest accounts. And after setting up servers again we are using this idds to detect and block unwanted ip addresses.

The IDDS is working good but still we are getting 4625 events in event viewer without any source ip address. How can I block these requests from anonymous ip addresses ?

<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'>
  <System>
    <Provider Name='Microsoft-Windows-Security-Auditing' Guid='{54849625-5478-4994-A5BA-3E3B0328C30D}'/>
    <EventID>4625</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>12544</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8010000000000000</Keywords>
    <TimeCreated SystemTime='2015-04-18T15:18:10.818780700Z'/>
    <EventRecordID>187035</EventRecordID>
    <Correlation/>
    <Execution ProcessID='24876' ThreadID='133888'/>
    <Channel>Security</Channel>
    <Computer>s17751123</Computer>
    <Security/>
  </System>
  <EventData>
    <Data Name='SubjectUserSid'>S-1-0-0</Data>
    <Data Name='SubjectUserName'>-</Data>
    <Data Name='SubjectDomainName'>-</Data>
    <Data Name='SubjectLogonId'>0x0</Data>
    <Data Name='TargetUserSid'>S-1-0-0</Data>
    <Data Name='TargetUserName'>aaron</Data>
    <Data Name='TargetDomainName'>aaron</Data>
    <Data Name='Status'>0xc000006d</Data>
    <Data Name='FailureReason'>%%2313</Data>
    <Data Name='SubStatus'>0xc0000064</Data>
    <Data Name='LogonType'>3</Data>
    <Data Name='LogonProcessName'>NtLmSsp </Data>
    <Data Name='AuthenticationPackageName'>NTLM</Data>
    <Data Name='WorkstationName'>SSAWSTS01</Data>
    <Data Name='TransmittedServices'>-</Data>
    <Data Name='LmPackageName'>-</Data>
    <Data Name='KeyLength'>0</Data>
    <Data Name='ProcessId'>0x0</Data>
    <Data Name='ProcessName'>-</Data>
    <Data Name='IpAddress'>-</Data>
    <Data Name='IpPort'>-</Data>
  </EventData>
</Event>

UPDATE :
After checking my firewall logs I think these 4625 events are not related to Rdp in anyway, but may be SSH or any other attempts which I’m not familiar with

Greg Askew's user avatar

Greg Askew

34.7k4 gold badges52 silver badges82 bronze badges

asked Apr 19, 2015 at 10:01

Alan's user avatar

6

IP address for failed RDP attempts is logged here even with NLA enabled (no tweaks required) (tested on Server 2012 R2, not sure about other versions)

Applications and Services Logs >
Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational
(Event ID 140)

Logged text example:

A connection from the client computer with an IP address of
108.166.xxx.xxx failed because the user name or password is not correct.

XML:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Microsoft-Windows-RemoteDesktopServices-RdpCoreTS" Guid="{1139C61B-B549-4251-8ED3-27250A1EDEC8}" /> 
  <EventID>140</EventID> 
  <Version>0</Version> 
  <Level>3</Level> 
  <Task>4</Task> 
  <Opcode>14</Opcode> 
  <Keywords>0x4000000000000000</Keywords> 
  <TimeCreated SystemTime="2016-11-13T11:52:25.314996400Z" /> 
  <EventRecordID>1683867</EventRecordID> 
  <Correlation ActivityID="{F4204608-FB58-4924-A3D9-B8A1B0870000}" /> 
  <Execution ProcessID="2920" ThreadID="4104" /> 
  <Channel>Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational</Channel> 
  <Computer>SERVER</Computer> 
  <Security UserID="S-1-5-20" /> 
  </System>
- <EventData>
  <Data Name="IPString">108.166.xxx.xxx</Data> 
  </EventData>
  </Event>

answered Nov 13, 2016 at 11:48

sheriff6241's user avatar

2

This is a known limitation with the 4625 event and RDP connections using TLS/SSL. You will need to use RDP encryption for the remote desktop server settings, or get a better IDS product.

answered Apr 19, 2015 at 16:50

Greg Askew's user avatar

Greg AskewGreg Askew

34.7k4 gold badges52 silver badges82 bronze badges

1

You should use the built-in Windows Firewall and its logging settings. The logs will tell you the IP addresses of all incoming connection attempts. Since you mentioned that all your servers are internet-facing, there really is no excuse for not using the Windows Firewall as a part of your defense in depth strategy. I would specifically recommend not turning off NLA (network-level authentication,) since many of the attacks on RDP in the past have historically been mitigated by the use of NLA and only affected RDP session hosts running classic RDP encryption only.

Windows Firewall Logging

answered Apr 19, 2015 at 17:05

Ryan Ries's user avatar

Ryan RiesRyan Ries

55.2k10 gold badges140 silver badges199 bronze badges

7

This Event is usually caused by a stale hidden credential. Try this from the system giving the error:

From a command prompt run: psexec -i -s -d cmd.exe
From the new cmd window run: rundll32 keymgr.dll,KRShowKeyMgr

Remove any items that appear in the list of Stored User Names and Passwords. Restart the computer.

Mark Henderson's user avatar

answered Oct 7, 2015 at 20:41

zea62's user avatar

zea62zea62

991 silver badge2 bronze badges


Рэнди Франклин Смит (CISA, SSCP, Security MVP) имеет в своем арсенале очень полезный документ, рассказывающий о том, какие события (event IDs) обязательно должны отслеживаться в рамках обеспечения информационной безопасности Windows. В этом документе изложена крайне полезная информация, которая позволит Вам “выжать” максимум из штатной системы аудита. Мы подготовили перевод этого материала. Заинтересованных приглашаем под кат.

О том, как настроить аудит, мы уже обстоятельно писали в одном из наших постов. Но из всех event id, которые встречаются в журналах событий, необходимо остановить свое внимание на нескольких критических важных. На каких именно – решать каждому. Однако Рэнди Франклин Смит предлагает сосредоточить внимание на 10 важных событиях безопасности в Windows.

Контроллеры доменов

Event ID — (Категория) — Описание

1) 675 или 4771
(Аудит событий входа в систему)
Событие 675/4771 на контроллере домена указывает на неудачную попытку войти через Kerberos на рабочей станции с доменной учетной записью. Обычно причиной этого является несоответствующий пароль, но код ошибки указывает, почему именно аутентификация была неудачной. Таблица кодов ошибок Kerberos приведена ниже.

2) 676, или Failed 672 или 4768
(Аудит событий входа в систему)
Событие 676/4768 логгируется для других типов неудачной аутентификации. Таблица кодов Kerberos приведена ниже.
ВНИМАНИЕ: В Windows 2003 Server событие отказа записывается как 672 вместо 676.

3) 681 или Failed 680 или 4776
(Аудит событий входа в систему)
Событие 681/4776 на контроллере домена указывает на неудачную попытку входа в систему через
NTLM с доменной учетной записью. Код ошибки указывает, почему именно аутентификация была неудачной.
Коды ошибок NTLM приведены ниже.
ВНИМАНИЕ: В Windows 2003 Server событие отказа записывается как 680 вместо 681.

4) 642 или 4738
(Аудит управления учетными записями)
Событие 642/4738 указывает на изменения в указанной учетной записи, такие как сброс пароля или активация деактивированной до этого учетной записи. Описание события уточняется в соответствие с типом изменения.

5) 632 или 4728; 636 или 4732; 660 или 4756
(Аудит управления учетными записями)
Все три события указывают на то, что указанный пользователь был добавлен в определенную группу. Обозначены Глобальная (Global), Локальная (Local) и Общая (Universal) соответственно для каждого ID.

6) 624 или 4720
(Аудит управления учетными записями)
Была создана новая учетная запись пользователя

7) 644 или 4740
(Аудит управления учетными записями)
Учетная запись указанного пользователя была заблокирована после нескольких попыток входа

8) 517 или 1102
(Аудит системных событий)
Указанный пользователь очистил журнал безопасности

Вход и выход из системы (Logon/Logoff)

Event Id — Описание

528 или 4624 — Успешный вход в систему
529 или 4625 — Отказ входа в систему – Неизвестное имя пользователя или неверный пароль
530 или 4625 Отказ входа в систему – Вход в систему не был осуществлен в течение обозначенного периода времени
531 или 4625 — Отказ входа в систему – Учетная запись временно деактивирована
532 или 4625 — Отказ входа в систему – Срок использования указанной учетной записи истек
533 или 4625 — Отказ входа в систему – Пользователю не разрешается осуществлять вход в систему на данном компьютере
534 или 4625 или 5461 — Отказ входа в систему – Пользователь не был разрешен запрашиваемый тип входа на данном компьютере
535 или 4625 — Отказ входа в систему – Срок действия пароля указанной учетной записи истек
539 или 4625 — Отказ входа в систему – Учетная запись заблокирована
540 или 4624 — Успешный сетевой вход в систему (Только Windows 2000, XP, 2003)

Типы входов в систему (Logon Types)

Тип входа в систему — Описание

2 — Интерактивный (вход с клавиатуры или экрана системы)
3 — Сетевой (например, подключение к общей папке на этом компьютере из любого места в сети или IIS вход — Никогда не заходил 528 на Windows Server 2000 и выше. См. событие 540)
4 — Пакет (batch) (например, запланированная задача)
5 — Служба (Запуск службы)
7 — Разблокировка (например, необслуживаемая рабочая станция с защищенным паролем скринсейвером)
8 — NetworkCleartext (Вход с полномочиями (credentials), отправленными в виде простого текст. Часто обозначает вход в IIS с “базовой аутентификацией”)
9 — NewCredentials
10 — RemoteInteractive (Терминальные службы, Удаленный рабочий стол или удаленный помощник)
11 — CachedInteractive (вход с кешированными доменными полномочиями, например, вход на рабочую станцию, которая находится не в сети)

Коды отказов Kerberos

Код ошибки — Причина

6 — Имя пользователя не существует
12 — Ограничение рабочей машины; ограничение времени входа в систему
18 — Учетная запись деактивирована, заблокирована или истек срок ее действия
23 — Истек срок действия пароля пользователя
24 — Предварительная аутентификация не удалась; обычно причиной является неверный пароль
32 — Истек срок действия заявки. Это нормальное событие, которое логгируется учетными записями компьютеров
37 — Время на рабочей машины давно не синхронизировалось со временем на контроллере домена

Коды ошибок NTLM

Код ошибки (десятичная система) — Код ошибки (16-ричная система) — Описание

3221225572 — C0000064 — Такого имени пользователя не существует
3221225578 — C000006A — Верное имя пользователя, но неверный пароль
3221226036 — C0000234 — Учетная запись пользователя заблокирована
3221225586 — C0000072 — Учетная запись деактивирована
3221225583 — C000006F — Пользователь пытается войти в систему вне обозначенного периода времени (рабочего времени)
3221225584 — C0000070 — Ограничение рабочей станции
3221225875 — C0000193 — Истек срок действия учетной записи
3221225585 — C0000071 — Истек срок действия пароля
3221226020 — C0000224 — Пользователь должен поменять пароль при следующем входе в систему

Еще раз продублируем ссылку на скачивание документа на сайте Рэнди Франклина Смита www.ultimatewindowssecurity.com/securitylog/quickref/Default.aspx. Нужно будет заполнить небольшую форму, чтобы получить к нему доступ.

P.S. Хотите полностью автоматизировать работу с журналами событий? Попробуйте новую версию NetWrix Event Log Manager 4.0, которая осуществляет сбор и архивирование журналов событий, строит отчеты и генерирует оповещения в режиме реального времени. Программа собирает данные с многочисленных компьютеров сети, предупреждает Вас о критических событиях и централизованно хранит данные обо всех событиях в сжатом формате для удобства анализа архивных данных журналов. Доступна бесплатная версия программы для 10 контроллеров доменов и 100 компьютеров.

В этой статье автор осуществил описание централизованной системы мониторинга событий безопасности для Windows Server 2008.

Андрей А. Бирюков

Чтение журналов событий является неотъемлемой частью работы любого администратора безопасности. Сетевое оборудование, операционные системы и практически все бизнес приложения осуществляют журналирование событий безопасности, таких как, удачный/неудачный вход в систему, запуск/остановка системы, обращение к закрытому порту для межсетевых экранов и другие события. Однако при наличии в сети даже десяти серверов, чтение журналов событий на каждом из них становится довольно трудоемкой задачей, требующей затраты большой части рабочего времени. Для того, чтобы автоматизировать процесс обработки журналов событий, например в части поиска попыток неудачного входа в систему, существует множество различных решений. Для Unix систем существует множество бесплатных сценариев на Перл, позволяющих осуществлять автоматический поиск заданного события в журнале и реакцию на данное событие, например отправку почтового сообщения администратору. Для Windows есть множество коммерческих продуктов, таких как ArcSight, Symantec Information Manager или Tivoli Security Operations Manager, которые умеют не только собирать события от различных источников, но и проверять данные события на соответствие различным моделям угроз (например подбор пароля или DDoS атака), реагировать на события, строить отчеты и многое другое. Но эти мощные средства мониторинга стоят очень недешево и в нынешних непростых экономических условиях многим организациям просто не по карману.

Однако, если в вашей сети на серверах используется операционная система Windows Server 2008, то вы можете самостоятельно организовать централизованный мониторинг событий безопасности. Для начала поговорим о том, какие нововведения появились в системе журналирования в Windows Server 2008.

Как и многие другие функции Windows 2008 журналы событий были существенно переделаны и дополнены новыми возможностями. По определению Майкрософт [1] событие это любое значительное проявление в операционной системе или приложении, требующее отслеживания информации. Событие не всегда негативно, поскольку успешный вход в сеть, успешная передача сообщений, или репликация данных также могут генерировать события в Windows. В каждом журнале с его событиями связаны общие свойства.

Level (уровень) – Это свойство определяет важность события.

Date and Time (дата и время) – Это свойство содержит информацию о дате и времени возникновения события.

Source (источник) – Это свойство указывает источник события: приложение, удаленный доступ, служба и так далее.

Event ID (Код события) – Каждому событию назначен идентификатор события ID, число, сгенерированное источником и уникальное для всех типов событий.

Task Category (Категория задачи) – Это свойство определяет категорию события. Например Security или System.   .
Итак, мы разобрались с тем, что представляет из себя событие в журнале Windows Event Log. Теперь нам необходимо сначала настроить аудит событий информационной безопасности. Далее будем предполагать, что у нас используется домен Active Directory и все сервера входят в этот домен.

Для настройки аудита необходимо зайти на контроллер домена и открыть редактор групповых политик Start->Administrative Tools->Group Policy Management. Далее выбираем домен и нажав правую кнопку мыши указываем Create a GPO in this domain… Вообще, для включения аудита можно воспользоваться политиками домена по умолчанию, но лучше создать отдельную политику с соответствующим названием, так как это упрощает администрирование. Далее в новой политике идем в Computer Configuration-> Windows Settings -> Security Settings -> Local Policies -> Audit Policy. Откроется список возможных параметров настройки аудита. Включать все подряд параметры нет особого смысла, так как в таком случае журнал событий наполнится огромным количеством малоинформативных сообщений. Рекомендую следующий набор параметров:

Категория аудита

Тип аудита

Примечание

Audit account logon events

No auditing

Audit account management

success/failure

Audit directory service access

No auditing

Audit logon events

success/failure

Audit object access

No auditing

включить, только если необходимо отслеживать доступ к определенным объектам (например, каталогам на диске).

Audit policy change

success/failure

Audit privilege use

success/failure

Audit process tracking

No auditing

Audit system events

success/failure

Теперь мы настроили аудит в нашем домене. Открыв журнал событий Security можно убедиться в том, какое количество событий сыпется в него ежесекундно. Для того, чтобы не нагружать контроллеры домена и другие сервера задачами по обработке событий мы должны сначала переслать события безопасности на выделенный сервер, на котором и будет осуществляться автоматическая обработка всех полученных событий. Данный выделенный сервер также должен работать под управлением операционной системы Windows Server 2008 и входить в домен Active Directory. Для пересылки событий нам необходимо воспользоваться Subscriptions, подписками на события.

Подписки на события

Эта функция аналогична службе Syslog в Unix. Данная функциональная возможность позволяет удаленным компьютерам пересылать сообщения о событиях, в результате чего их можно просматривать локально из центральной системы.
Настроим пересылку событий с нескольких серверов на выделенный сервер сбора событий. Для этого на каждый из серверов источников событий необходимо зайти под учетной записью, обладающей административными правами. В окне командной строки ввести:

winrm quickconfig

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

winrm quickconfig 

После этого, выполните на нем же следующую команду:

wecutil qc         

При необходимости, вы можете изменять параметры оптимизации доставки событий. Например, вы можете изменить параметр Minimize Bandwidth (минимизация пропускной способности) для удаленных серверов, с ненадежным каналом связи.

Теперь необходимо собственно создать подписку, указав события, которые должны извлекаться из логов серверов источников. Для этого на собирающем сервере запустите утилиту просмотра событий с учетной записью, обладающей административными привилегиями. Затем щелкните на папке Subscriptions в дереве консоли и выберите команду Create Subscription (Создать подписку). В поле Subscription Name нужно указать имя подписки. При необходимости в поле Description можно привести описание. Затем, в поле Destination Log (журнал назначения) выберите файл журнала, в котором будут храниться собранные события. По умолчанию эти события будут храниться в журнале перенаправленных событий в папке Windows Logs дерева консоли. После этого, щелкните на кнопке Select Computers, чтобы выбрать исходные сервера, которые будут перенаправлять события. Как уже упоминалось ранее, данные сервера должны находиться в домене. Затем выберите события, нажав на кнопке Select Events. Сконфигурируйте журналы и типы событий, предназначенные для сбора. Щелкните ОК чтобы сохранить подписку.   

Журналы

Теперь зайдем на выделенный сервер сбора событий и рассмотрим типы журналов, появившиеся в Windows Server 2008. В папке журналов Windows Logs находятся как традиционные журналы безопасности, приложений и системы, так и два новых журнала – Setup (настройка) и Forwarded Events (Пересланные события). Первые три типа событий уже присутствовали в предыдущих версиях системы, поэтому о них рассказывать нет смысла. А о последних двух следует рассказать подробнее. Журнал Setup фиксирует информацию, связанную с установкой приложений, ролями сервера и их характеристиками. Так, например, сообщения о добавлении на сервере роли DHCP будет отражены в этом журнале. В журнале Forwarded Events собираются сообщения, присланные с других машин в сети.

Папка Applications and Services Logs (журналы приложений и служб) представляют собой новый способ логической организации, представления и сохранения событий, связанных с конкретным приложением, компонентом или службой Windows вместо использовавшейся ранее, регистрации событий, которые оказывают влияние на всю систему. Эти журналы включают четыре подтипа: Admin  (события, предназначенные для конечных пользователей и администраторов), Operational (Рабочий журнал событий, также предназначенный для администраторов), Analytic (журнал позволяет отслеживать цепочку возникновения проблемы и часто содержит большое количество записанных событий), Debug (используется для отладки приложений). По умолчанию журналы Analytic и Debug скрыты и отключены. Для того, чтобы их просмотреть, щелкните правой кнопкой мыши на папке Applications and Services Logs, а затем в контекстном меню выберите пункт View, Show Analytic and Debug Logs.    

Рисунок 1.
Настройка Debug

Фильтры

Настраиваемые представления – это специальные фильтры, созданные либо автоматически системой Windows 2008, во время добавления в систему новых ролей сервера или приложений, таких как Directory Certificate Services (Службы сертификатов каталогов), сервер DHCP, либо администраторами вручную. Для администраторов одной из важнейших функций при работе с журналами событий является возможность создавать фильтры, позволяющие просматривать только интересующие события, чтобы можно было быстро диагностировать и устранять проблемы в системе. В качестве примера, рассмотрим папку Custom Views в навигационной панели утилиты просмотра событий. Если в этой папке щелкнуть правой кнопкой мыши по Administrative Events и затем выбрать Properties, то после нажатия Edit Filter, можно увидеть как информация из журнала событий преобразуется в набор отфильтрованных событий. Настраиваемые представления оснастки Administrative Events фиксируют все критические события, а события ошибок и предупреждений фиксируются для всех журналов событий (в отличие от предыдущих версий Windows). Таким образом, с помощью данного фильтра администратор может обращаться к единственному источнику для быстрой проверки потенциальных проблем, присутствующих в системе. Это средство может пригодиться при обработке событий, приходящих с серверов источников событий.

Созданные настраиваемые представления можно экпортировать в XML-файл для последующего распространения на другие машины.

Реагируем на события

Еще одной интересной функцией, о которой хотелось бы упомянуть, является возможность ответной реакции на события. Например, если у вас пользователь указал неверные учетные данные для аккаунта, имеющего административные привилегии, то на появление данного события в журнале необходимо отреагировать, послав уведомление администратору безопасности. Данная функция является долгожданным решением проблем с автоматизацией работы серверов, так как раньше требовалось устанавливать дополнительное программное обеспечение или писать сценарии для того чтобы заставить сервер автоматически реагировать на определенные события.

В качестве примера настроим отправку сообщения администратору в случае неудачного входа пользователя в систему (Обратите внимание на то, что теперь это событие имеет другой ID 4625, отличный от использовавшегося в Windows 2003 ID 529).

Для этого необходимо зайти в журнал событий Event Viewer, открыть раздел Windows Logs, затем Security, выбрать нужное событие, нажать правую кнопку мыши, и указать Attach Task To This Event… (прикрепить задачу к этому событию).

Рисунок 2.
Настройка ответной реакции на событие

В открывшемся окне необходимо выбрать название события и его описание. На следующем шаге указывается используемый журнал, источник  и номер события. Содержимое этого журнала нельзя изменить. Потом выбирается тип ответного действия. Это может быть выполнение какого-либо приложения, отправка электронного письма или вывод сообщения на экран. Выберем отправку письма. На следующем шаге нужно указать, от кого и на чей адрес отправлять письмо, тему письма, его текст. Можно также прикрепить какой-либо файл к данному сообщению. Не забудьте указать IP-адрес SMTP сервера. На следующем шаге поставьте галочку в соответствующем поле, для того, чтобы после создания задачи, открылось окно с ее свойствами.

Рисунок 3.
Свойства задач

Окно свойств задачи аналогично интерфейсу Scheduled Tasks, для заданий, выполняющихся по расписанию. Здесь можно указать учетную запись, под которой выполняется задача, при необходимости ее можно выполнять только когда пользователь работает на машине.

В закладке Triggers, вы можете добавлять или изменять условия выполнения задачи. В Actions вы можете добавлять различные действия. В закладке Conditions прописаны условия, при которых выполняется задача. В Settings можно прописать, какие действия должны быть выполнены при различных условиях. Например, что нужно делать в случае, если такая задача уже выполняется. Наконец, в закладке History вы можете наблюдать все события, которые вызвали выполнение задачи.

Немного о построении отчетов

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

Итак, нам нужно осуществить выборку событий из журнала. Делать мы это будем с помощью средств PowerShell.

Для начала построим отчет о неудачных входах в систему. Для этого нам необходимо выбрать все события с кодом 4625.  

get-eventLog -LogName Security -Newest 100 | Where-Object { $_.EventID —
eq 4625 }

Еще один пример. Узнаем, сколько пользователей осуществляло вход в систему в нерабочее время. Код события Success Logon – 4624.

get-eventlog security | where
 {$_.EventId —eq 4624 -and
 ($_.TimeGenerated.TimeOfDay
 -gt ’20:00:00′ -or
 $_.TimeGenerated.TimeOfDay
 -lt ’08:00:00′ )}

В завершении, узнаем, сколько удачных входов систему было осуществлено пользователем administrator.

get-eventLog -LogName Security | Where-Object { $_.message -match ‘administrator’ -AND $_.EventID -eq 4624 }

Здесь приведены только простейшие сценарии работы с журналом событий в Windows Server 2008. При необходимости на их основе можно построить более сложные запросы для релшения соответствующих задач информационной безопасности.

Заключение

В этой статье мы рассмотрели построение системы мониторинга событий информационной безопасности с помощью штатных средств Windoiws Server 2008. С помощью описанных инструментов можно существенно автоматизировать процесс мониторинга событий безопасности.

Использованная литература

1. Р. Моримото, М. Ноэл, О. Драуби Microsoft Windows Server 2008. Полное руководство.

Operating Systems Windows 2008 R2 and 7

Windows 2012 R2 and 8.1

Windows 2016 and 10

Windows Server 2019 and 2022

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
  • Discuss this event
  • Mini-seminars on this event

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 Free Edition

Supercharger’s built-in Xpath filters leave the noise behind.

Free.

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

  • How to Detect 2 Computers on Your Network Talking to Each Other for the First Time and Why It Matters
  • Top 5 Ways for Analyzing Entitlements and Identifying High-Risk
  • Top 12 Events to Monitor in the Windows Server Security Log
  • How to Analyze Logon Attacks with the Windows Security Logs
  • Anatomy of an Attack: How Password Spraying Exploits Weak Passwords So Effectively
  • Correlating DHCP, DNS and Active Directory data with Network Logs for User Attribution
  • 4 Threat Detections using Active Directory Authentication Events from the Windows Security Log
  • Dabble or Deep Dive: 7 Different Threat Hunts You Can Do With Available Resources
  • Auditing Active Directory Changes with the Windows Security Log
  • Using Honeypot Accounts and Hashes in Active Directory to Detect Pass-the-Hash & Credential Theft
  • Top 10 Event Categories to Monitor in the Windows Server Event Log
  • Security Log Deep Dive: Mapping Active Directory Authentication and Account Management Events to MITRE ATT&CK TTPs
  • Understanding Logon Events in the Windows Server 2022 Security Log
  • Top 6 Security Events You Only Detect by Monitoring Workstation Security Logs

Понравилась статья? Поделить с друзьями:
  • Кодек dolby digital для windows 10
  • Код ошибки video tdr failure windows 10 как исправить
  • Код события 360 windows 10 user device registration
  • Код ошибки video scheduler internal error windows 10 как исправить
  • Код события 264 windows 10 defrag