Время на прочтение10 мин
Количество просмотров18K
Одна из самых часто используемых техник при атаках — получение учетных данных из операционной системы. В этом можно убедиться, читая аналитические отчеты различных компаний: техника T1003 OS Credential Dumping в подавляющем большинстве случаев входит в ТОП-5. После проникновения в систему злоумышленникам необходимы учетки для перемещения по сети и доступа к конфиденциальной информации, а данная техника направлена на извлечение локальных и доменных учетных записей из системных файлов, реестра и памяти процессов.
В этой статье мы акцентируем внимание на своевременном выявлении подозрительной активности с помощью мониторинга ИБ и расскажем, как на основе событий штатной подсистемы аудита ОС обнаружить, что пытаются сдампить учетные данные в Windows. Логика детектирования будет представлена в общем виде по полям событий, а также в виде псевдокода, который можно адаптировать под синтаксис любой системы мониторинга. Ну и для возможности тестирования правил корреляции будут приведены краткая справка по атакам и способы их реализации.
Рассмотрим покрытие таких подтехник, как:
· дамп процесса lsass.exe;
· кража данных из базы SAM;
· дамп базы NTDS;
· извлечение секретов LSA;
· получение кэшированных данных;
· атака DCSync.
LSASS Memory (T1003.001)
LSASS — это процесс Windows, отвечающий за аутентификацию пользователей при входе в систему и соблюдение политик безопасности. В памяти процесса хранятся имена пользователей, NT-хеши паролей, Kerberos-билеты. Могут храниться и пароли в открытом виде, если включен WDigest.
Как злоумышленники дампят память LSASS
Если кратко — можно сделать «снимок» памяти процесса или прочитать данные сразу из памяти. Методов много, и в один раздел их не вместить. Эта тема раскрыта в классной статье.
Как обнаружить
Существуют два способа, как детектировать дамп памяти LSASS.
Для регистрации нужных событий необходимо включить политики аудита Object Access – Audit Kernel Object и Object Access – Audit Handle Manipulation.
1. По событию запроса дескриптора объекта (4656 – журнал Security)
Event ID = 4656
-
Object Type = Process
-
Object Name = *lsass.exe
-
Access List = *%%4484*
Событие 4656 при дампе lsass.exe с помощью mimikatz.exe
-
По событию попытки доступа к объекту (4663 – журнал Security)
Event ID = 4663
-
Object Type = Process
-
Object Name = *lsass.exe
-
Access List = *%%4484*
Псевдокод
(event.id = “4656” AND object.type = “process” AND object.name contains “lsass.exe” AND access.list contains “%%4484”)
OR
(event.id = “4663” AND object.type = “process” AND object.name contains “lsass.exe” AND access.list contains “%%4484”)
Код доступа *%%4484 означает «Чтение из памяти процесса».
Основные отличия событий с id 4663 от 4656:
— 4663 показывает, что право доступа было использовано, а не просто запрошено;
— 4663 фиксирует только успешно выполненные операции.
SAM (T1003.002)
Из базы данных SAM (Security Account Manager) злоумышленник может получить NT-хеши паролей локальных пользователей.
Как злоумышленники дампят SAM
Самый простой способ — сохранить ветки реестра HKLM\SAM и HKLM\SYSTEM, а затем извлечь из них учетные данные на своем хосте. Команды нужно выполнять от имени администратора или системы:
reg save HKLM\sam path_to_sam_file
reg save HKLM\system path_to_system_file
Далее уже на своей машине злоумышленник может извлечь хеши с помощью secretsdump.py из impacket или другой утилиты:
secretsdump.py LOCAL -sam sam -system system
Второй способ — получить данные удаленно. Часто используются secretsdump.py или crackmapexec. Нужно также использовать учетную запись, которая имеет привилегии локального администратора на хосте:
secretsdump.py domain.local/username:’password’@hostname_or_IP
crackmapexec smb hostname_or_IP —local-auth -u username -p ‘password’ —sam
Как обнаружить
Сохранение ветки реестра с помощью утилиты reg можно увидеть в событии создания нового процесса (4688 – журнал Security).
Для логирования командной строки процесса необходимо дополнительно включить политики аудита:
Process Tracking – Process Creation
System – Audit Process Creation – Include command line in process creation events
Event ID = 4688
-
New Process Name = *reg.exe
-
Process Command Line = “*save*” и (“*HKLM\SAM*” или “*HKEY_LOCAL_MACHINE\SAM*” или “*HKLM\System*» или “*HKEY_LOCAL_MACHINE\System*”)
Также сохранение ветки реестра можно обнаружить в событии запроса дескриптора объекта (4656 – журнал Security): для этого предварительно необходимо включить политику аудита Object Access – Registry и настроить SACL для веток реестра Sam и System (настройки аналогичные).
Event ID = 4656
-
Process Name = *reg.exe
-
Object Name = “\REGISTRY\MACHINE\SAM” или “\REGISTRY\MACHINE\SYSTEM”
События 4688 и 4656 следует рассматривать в связке, связующими будут целевой узел и одна учетная запись.
Псевдокод
(event.id = “4688” AND new.process.name contains “reg.exe” AND process.command.line contains “save” AND (process.command.line contains “HKLM\SAM” OR process.command.line contains “HKEY_LOCAL_MACHINE\SAM” OR process.command.line contains “HKLM\System” OR process.command.line contains “HKEY_LOCAL_MACHINE\System”))
AND
(event.id = “4656” AND process.name contains “reg.exe” AND (object.name = “\REGISTRY\MACHINE\SAM” OR object.name = “\REGISTRY\MACHINE\ SYSTEM”))
WITH IDENTICAL destination.hostname, source.username TIMER 30s
В случае получения данных SAM удаленно (secretsdump/crackmapexec) детектирование осуществляется по цепочке событий:
1. Вход в учетную запись был успешно выполнен (4624 – журнал Security).
Нужна политика аудита Logon/Logoff – Logon
2. Объект общей сетевой папки был проверен на предмет возможности предоставления клиенту желаемого доступа (5145 – журнал Security).
Нужна политика аудита Object Access – Detailed File Share
3. Запрошен дескриптор объекта (4656 – журнал Security).
Нужна политика аудита Object Access – Registry и SACL для веток реестра HKLM\SAM (аналогично указанному раннее) и HKLM\SYSTEM\CurrentControlSet\Control\Lsa
Event ID = 4624
-
Source Network Address != “localhost” и “127.0.0.1” и “–”
-
Logon Type = 3
Event ID = 5145
-
Share Name = \\*\IPC$
-
Share Path = winreg
Event ID = 4656
-
Process Name = *svchost.exe
-
Object Name = “\REGISTRY\MACHINE\SAM”
Event ID = 4656
-
Process Name = *svchost.exe
-
Object Name = “*\Control\Lsa\*”
В данной цепочке события будут зарегистрированы на одном целевом узле и с одной учетной записью.
Псевдокод
(event.id = “4624” AND source.network.address != “localhost” AND source.network.address != “127.0.0.1” AND source.network.address != “–” AND logon.type = “3”)
AND
(event.id = “5145” AND share.name = “\\*\IPC$” AND share.path = “winreg”)
AND
(event.id = “4656” AND process.name contains “svchost.exe” AND object.name = “\REGISTRY\MACHINE\SAM”)
AND
(event.id = “4656” AND process.name contains “svchost.exe” AND object.name contains “\Control\Lsa\”)
WITH IDENTICAL destination.hostname, source.username TIMER 30s
NTDS (T1003.003)
NTDS.dit — это файл базы данных на контроллерах домена, содержащий все данные Active Directory. Из него можно получить NT-хеши паролей всех пользователей и компьютеров в домене. Если для учетной записи в Active Directory установлен параметр «Хранить пароль с использованием обратимого шифрования», то можно извлечь пароль в открытом виде.
Как злоумышленники дампят NTDS
Первый способ — Shadow Copy. Создать «теневую копию» на контроллере домена можно с помощью vssadmin:
vssadmin create shadow /for=C:
copy $ShadowCopyName\Windows\NTDS\NTDS.dit C:\ntds.dit.save
copy $ShadowCopyName\Windows\System32\config\SYSTEM C:\system.save
Затем файлы ntds.dit.save и system.save необходимо скопировать на свой хост и с помощью secretsdump.py извлечь из них учетные данные:
secretsdump.py LOCAL -ntds ntds.dit.save -system system.save
Второй способ — использование NTDSUtil на контроллере домена:
ntdsutil «activate instance ntds» «ifm» «create full C:\NTDS» quit quit
В результате будут созданы файлы C:\NTDS\Active Directory\ntds.dit, C:\NTDS\registry\SECURITY и C:\NTDS\registry\SYSTEM, которые необходимо скопировать на свой хост и с помощью secretsdump.py извлечь из них учетные данные:
secretsdump.py LOCAL -ntds ntds.dit -system SYSTEM
Как обнаружить
Создание «теневой копии» с помощью утилиты vssadmin можно увидеть в событии создания нового процесса (4688 – журнал Security).
Для логирования командной строки процесса необходимо дополнительно включить политики аудита:
Process Tracking – Process Creation
System – Audit Process Creation – Include command line in process creation events
Event ID = 4688
-
New Process Name = *vssadmin.exe
-
Process Command Line = “*vssadmin*” и “*create*” и “*shadow*”
Дамп ntds.dit с помощью утилиты ntdsutil можно увидеть в событии создания нового процесса (4688 – журнал Security).
Event ID = 4688
-
New Process Name = *ntdsutil.exe
-
Process Command Line = “*ac*” и “*i*” и “*ntds*” и “*ifm*” и “*create*” и “*full*”
Псевдокод
(event.id = “4688” AND new.process.name contains “vssadmin.exe” AND process.command.line contains “vssadmin” AND process.command.line contains “create” AND process.command.line contains “shadow”) OR (event.id = “4688” AND new.process.name contains “ntdsutil.exe” AND process.command.line contains “ac” AND process.command.line contains “i” AND process.command.line contains “ntds” AND process.command.line contains “ifm” AND process.command.line contains “create” AND process.command.line contains “full”)
LSA (T1003.004)
Из LSA злоумышленники могут получить пароль учетной записи, от имени которой запускается какой-то сервис, и учетные данные компьютерной учетной записи.
Как злоумышленники дампят LSA
Самый простой вариант — сохранить ветки реестра HKLM\SECURITY и HKLM\SYSTEM, а затем извлечь из них учетные данные на своем хосте. Команды нужно выполнять с правами локального администратора или системы:
reg save HKLM\security path_to_security_file
reg save HKLM\system path_to_system_file
Далее уже на своей машине злоумышленник может извлечь хеши с помощью secretsdump.py из impacket или другой утилиты:
secretsdump.py LOCAL — security security -system system
Получить данные удаленно можно также с помощью secretsdump.py или crackmapexec:
secretsdump.py domain.local/username:’password’@hostname_or_IP
crackmapexec smb hostname_or_IP —local-auth -u username -p ‘password’ –lsa
Как обнаружить
Детектирование производится аналогично сценарию с SAM, только вместо ветви SAM в событиях будет SECURITY (не забудьте настроить на нее такой же SACL).
Cached Domain Credential (T1003.005)
Когда пользователь проходит аутентификацию на хосте, который входит в домен, его учетные данные кэшируются. Это используется для того, чтобы пользователи могли проходить аутентификацию в ОС на хосте в случае, если будет нарушена сетевая связность между хостом и контроллером домена.
Как злоумышленники дампят Cached Domain Credential
Кэшированные учетные данные (DCC2-хеши) могут быть получены из ветки реестра HKLM\Security таким же образом, как и секреты LSA. Поэтому действия злоумышленник производит такие же, как и при дампе LSA.
Как обнаружить
Детектирование производится аналогично сценарию с SAM, только вместо ветви SAM в событиях будет SECURITY (не забудьте настроить на нее такой же SACL).
DCSync (T1003.006)
Атака DCSync заключается в том, что атакующий притворяется контроллером домена и проводит репликацию учетных данных доменных пользователей (учетные данные в NTDS.dit).
Как злоумышленники проводят атаку DCSync
Самый популярный вариант — использование mimikatz:
lsadump::dcsync /all
Получить данные удаленно можно с помощью secretsdump.py. Для этого нужно указать флаг -just-dc и в качестве целевого хоста указать контроллер домена:
secretsdump.py -just-dc domain.local/username:’password’@dc_hostname_or_IP
Как обнаружить
В момент репликации базы данных Active Directory (ntds.dit) на контроллере домена регистрируется событие выполнения операции с объектом доменных служб AD DS (4662 – журнал Security).
Данное событие не настроено по умолчанию, поэтому предварительно необходимо включить политику аудита DS Access – Audit Directory Service Access и настроить SACL для всех пользователей.
Event ID = 4662
-
Access Mask = 0x100
-
Properties = “*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*” или “*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*” или “*89e95b76-444d-4c62-991a-0facbeda640c*” или “*9923a32a-3607-11d2-b9be-0000f87a36b2*”
Псевдокод
event.id = “4662” AND access.mask = “0x100” AND (properties contains “1131f6aa-9c07-11d1-f79f-00c04fc2dcd2” OR properties contains “1131f6ad-9c07-11d1-f79f-00c04fc2dcd2” OR properties contains “89e95b76-444d-4c62-991a-0facbeda640c” OR properties contains “9923a32a-3607-11d2-b9be-0000f87a36b2”)
Поле Properties содержит идентификаторы GUID свойств, для которых была выполнена операция:
1. 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 (Ds-Replication-Get-Changes – Репликация изменений каталога)
2. 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 (Ds-Replication-Get-Changes-All – Репликация изменений каталога)
3. 89e95b76-444d-4c62-991a-0facbeda640c (DS-Replication-Get-Changes-In-Filtered-Set – Репликация изменений каталога в отфильтрованном наборе)
4. 9923a32a-3607-11d2-b9be-0000f87a36b2 (Ds-Install-Replica – Добавление или удаление реплики в домене)
Access Mask 0x100 говорит о том, что доступ разрешен только после выполнения расширенных проверок прав, поддерживаемых объектом.
В заключение
В статье мы рассмотрели шесть способов получения злоумышленниками учетных данных из реестра, памяти ОС Windows и из базы NTDS контроллеров домена Active Directory. На практике при проведении проектов по пентестам и Purple Team в большинстве случаев мы фиксируем, что у заказчиков подлежит мониторингу только дамп памяти процесса LSASS. Практически никто не мониторит получение учетных данных из реестра.
Также неоднократно фиксировали, что даже если написаны правила детектирования, то в них бывают ошибки. Например, в одном из проектов на атаку DCSync сработал алерт на PetitPotam. При реальной атаке это может привести к тому, что сработку посчитают ложноположительной, тем самым пропустив инцидент.
Атакующий может вообще не использовать вредоносное ПО, а применять только стандартные утилиты. В любом случае при должных настройках аудита в журнале событий Security останутся следы. Так как от большинства подтехник защититься не получится (встроенные функции нужны для работы Active Directory), то важно своевременно выявлять подозрительную активность и реагировать на нее. Данная статья может стать для вас инструкцией по настройке мониторинга техники T1003 OS Credential Dumping (Windows). При этом стоит учитывать, что в вашей инфраструктуре дополнительно может потребоваться профилирование легитимной активности и ложноположительных срабатываний.
Авторы:
Валерия Шотт, аналитик центра мониторинга и реагирования на инциденты Jet CSIRT компании «Инфосистемы Джет»
Ирина Беляева, старший консультант по информационной безопасности компании «Инфосистемы Джет»
4656: A handle to an object was requested
On this page
- Description of this event
- Field level details
- Examples
This event is logged by multiple subcategories as indicated above.
When you enable auditing on an object (e.g. file or folder), this is the first event recorded when an application attempts to access the object in such a way that matches the audit policy defined for that object in terms of who is requesting the access and what type of access is being requested. (it appears that two subcategories must be enabled, Handle Manipulation and one other such as File System or Registry depending on what type of object you are auditing.)
This event will be Audit Success or Audit Failure depending on whether the user account under which the account is running has the requested permissions or not.
This event’s sub category will vary depending on type of object. In the example above notepad.exe running as Administrator successfully opened «New Text Document.txt» for Read access.
This event does not always mean any access successfully requested was actually exercised — just that it was successfully obtained (if the event is Audit Success of course). To determine if any of the permissions requested were actually exercised look forward in the log for 4663 with the same Handle ID.
Win2012 adds 2 new fields: Resource Attributes and Access Reasons.
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
4656
Subject:
The user and logon session that performed the action.
- Security ID: The SID of the account.
- Account Name: The account logon name.
- Account Domain: The domain or — in the case of local accounts — computer name.
- Logon ID: is a semi-unique (unique between reboots) number that identifies the logon session. Logon ID allows you to correlate backwards to the logon event (4624) as well as with other events logged during the same logon session.
Object:
This is the object upon whom the action was attempted.
- Object Server: always «Security»
- Object Type: «File» for file or folder but can be other types of objects such as Key, SAM, SERVICE OBJECT, etc.
- Object Name: The name of the object being accessed
- Handle ID: is a semi-unique (unique between reboots) number that identifies all subsequent audited events while the object is open. Handle ID allows you to correlate to other events logged (Open 4656, Access 4663, Close 4658)
- Resource Attributes: (Win2012) Resource attributes a new feature that allows you to classify objects according to any number of things like project, compliance, security level. It’s part of dynamic access control new to Win2012. See this webinar http://www.ultimatewindowssecurity.com/webinars/register.aspx?id=209 See the Win2012 example below. Also more information in this blog http://www.ultimatewindowssecurity.com/blog/default.aspx?p=5aea7883-80c4-40cb-b182-01240cc86070
Process Information:
- Process Name: identifies the program executable that accessed the object.
- Process ID: is the process ID specified when the executable started as logged in 4688.
Access Request Information:
- Transaction ID: unknown.
- Accesses: These are permissions requested. The correspond to the permissions available in the Permission Entry dialog for any access control entry on the object.
- Access Reasons: (Win2012) This lists each permission granted and the reason behind — usually the relevant access control entry (in SDDL format).
- Access Mask: this is the bitwise equivalent of Accesses:
- Privileges Used For Access Check: Lists any privileges requested. The only time I’m aware of this field being filled in is when you take ownership of an object in which case you’ll see SeTakeOwnershipPrivilege.
- Restricted SID Count: unknown. Start a discussion below if you have information on this field!
Supercharger Free Edition
Your browser does not support video
Examples of 4656
Win2008 examples
File example:
A handle to an object was requested.
Subject:
Security ID: WIN-R9H529RIO4Y\Administrator
Account Name: Administrator
Account Domain: WIN-R9H529RIO4Y
Logon ID: 0x1fd23
Object:
Object Server: Security
Object Type: File
Object Name: C:\Users\Administrator\testfolder\New Text Document.txt
Handle ID: 0xb8
Process Information:
Process ID: 0xed0
Process Name: C:\Windows\System32\notepad.exe
Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: READ_CONTROL
SYNCHRONIZE
ReadData (or ListDirectory)
ReadEA
ReadAttributes Access Mask: 0x120089
Privileges Used for Access Check: —
Restricted SID Count: 0
Registry Key Example:
A handle to an object was requested.
Subject:
Security ID: ACME\administrator
Account Name: administrator
Account Domain: ACME
Logon ID: 0x176293
Object:
Object Server: Security
Object Type: Key
Object Name: \REGISTRY\MACHINE\SOFTWARE\MTG
Handle ID: 0x124
Process Information:
Process ID: 0x8d4
Process Name: C:\Windows\regedit.exe
Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: DELETE
READ_CONTROL
WRITE_DAC
WRITE_OWNER
Query key value
Set key value
Create sub-key
Enumerate sub-keys
Notify about changes to keys
Create Link
Access Mask: 0xf003f
Privileges Used for Access Check: —
Restricted SID Count: 0
Win2012 example
A handle to an object was requested.
Subject:
Security ID: LB\administrator
Account Name: administrator
Account Domain: LB
Logon ID: 0x3DE02
Object:
Object Server: Security
Object Type: File
Object Name: C:\asdf\New Text Document.txt
Handle ID: 0x178
Resource Attributes: S:AI(RA;ID;;;;WD;(«Project_MS»,TS,0x10020,»Transmogrifier»))
Process ID: 0x113c
Process Name: C:\Windows\System32\notepad.exe
Access Request Information:
Transaction ID: {00000000-0000-0000-0000-000000000000}
Accesses: READ_CONTROL
SYNCHRONIZE
ReadData (or ListDirectory)
WriteData (or AddFile)
AppendData (or AddSubdirectory or CreatePipeInstance)
ReadEA
WriteEA
ReadAttributes
WriteAttributes
Access Reasons:
READ_CONTROL: Granted by Ownership
SYNCHRONIZE: Granted by D:(A;ID;FA;;;BA)
ReadData (or ListDirectory): Granted by D:(A;ID;FA;;;BA)
WriteData (or AddFile): Granted by D:(A;ID;FA;;;BA)
AppendData (or AddSubdirectory or CreatePipeInstance): Granted by D: (A;ID;FA;;;BA)
ReadEA: Granted by D:(A;ID;FA;;;BA)
WriteEA: Granted by D:(A;ID;FA;;;BA)
ReadAttributes: Granted by D:(A;ID;FA;;;BA)
WriteAttributes: Granted by D:(A;ID;FA;;;BA)
Access Mask: 0x12019F
Privileges Used for Access Check: —
Restricted SID Count: 0
Top 10 Windows Security Events to Monitor
Free Tool for Windows Event Collection
|
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Event id 4656 is a Windows event that occurs when the user accesses a file, folder, or system registry through the Microsoft-Windows-Security-Auditing service.
In this comprehensive guide, we will delve into essential details of the event id 4656, why it occurs, and the actions you should undertake when the event id is logged.
What is Event ID 4656?
Event id 4656 is an informational event that indicates that specific access was requested for an object. The object could vary from a file system, kernel, or registry object to a file system object located on external storage or a removable device.
In case, the request to access the request object is declined, a failure event is generated.
The event id 4656 is generated only if the System Access Control List (SACL) of the requested object has the necessary Access Control Entries (ACE) to manage the use of specific access rights.
This event informs that access to an object was requested and the results of the request were logged. However, the event does not give details of the operation that was performed.
Some of the essential field descriptions of the event id 4656 are as follows:
- Account Name – The name of the account that requested a handle for an object.
- Object Type – The type of object accessed during the operation.
- Object Name – The name or an identifier for an object for which access was requested. Example – file, path
- Process Name – The address path and name of the executable file requesting the object.
- Accesses – The list of the access rights requested by the object.
What causes the event id 4656?
The event id 4656 helps monitor several events that execute on your Windows PC. Some of them are:
- Verify if the unauthorized or restricted processes are requesting objects.
- Access attempts for sensitive or essential objects.
- Actions of a particular high-priority account.
- Ascertain the anomalies and malicious actions of the suspicious accounts.
- Verify that non-active, external, and restricted accounts are not in use.
- Assure that only the authorized accounts can execute some actions or request access.
- You can also configure the event id to enforce conventions and compliances.
Now that you have a fair idea of the event id 4656, let’s see what should be your course of action when the event id is repeatedly logged into the event viewer.
What to do if I encounter Event Id 4656?
1. Verify the event details
- Press the Windows key, type event viewer in the search bar on top, and click the Open option on the right result section.
- Click Windows Logs on the left pane to view the related settings and click Security.
- The list of all the events logs will appear in the right section, scroll down and locate event id 4656 in the list and select it.
- Navigate to the General tab on the bottom and review the security change and the request handles for the file or folder.
If the request is legitimate, you do not have to take any action. However, if the request seems to originate from a suspicious source, proceed to the next solution.
- iTunesMobileDevice.dll is Missing From Your Computer [Solved]
- SYNSOACC.DLL Could Not Be Located: How to Fix in Cubase
2. Modify the Local Security Policy
- Use the Windows + R shortcut to launch the Run dialog box, type the following command in the text box, and press the Enter key.
secpol.msc
- Click Security Settings on the left sidebar to expand the console tree and select the Advanced Audit Policy Configuration.
- Next, expand the System Audit Policies node and select the Object Access option.
- Double-click Audit Handle Manipulation on the right section and review the audit settings.
- If the audit settings are set as Configured, change it to Not Configured.
- Press the Apply button to save the changes.
Reconfiguring the Advanced Audit Policy using the local security policy editor should help fix the event id 4656 if these are logged in unnecessarily.
3. Use the group policy editor
- Use the Windows + R shortcut to launch the dialog box and type the following command and click the OK button to execute it.
rsop.msc
- Expand the Computer Configuration console in the left panel and click the Windows Settings node.
- Next, click to expand Security Settings followed by Local Policies and then Audio Policy from the left sidebar.
- Note down the Source Group Policy Object of Audit Object Access, the root setting for Audit Handle Manipulation.
- Execute the following command in the Run window by pressing the Enter key.
Gpmc.msc
- Navigate to the Source Group Policy Object you noted previously and then look for Audit Handle Manipulation.
- Right-click Audit Handle Manipulation and choose Edit from the context menu.
- Set the setting to Disabled and press the OK button to save the changes.
You will have to modify the specific group policy object if the setting is inherited from any other GPO to Local Security Policy.
That’s all about this guide to resolve the event id 4656 if you encounter it frequently. However, you should know that the solution may change depending on the specific scenario when the event id 4656 appears on the event viewer.
Refer to this guide, for a detailed understanding of the event viewer and how can you leverage it to monitor all the events.
Reach out to us in the comment section if you want to share valuable information and feedback.
Taiba Hasan
A postgraduate in Computer Applications, she is an avid technical writer who loves to craft content revolving around Windows, Android, and emerging technologies like SaaS. With How-To and troubleshooting guides, she aims to provide the best solutions for the problem and make technology less complicated for novice users.
Besides writing, she also loves to cook delicacies and spent time in her garden. In her free time, you will find her binge-watching web series or gazing the night sky.
This event indicates that specific access was requested for an object. The object could be a file system, kernel, or registry object, or a file system object on removable storage or a device.
If access was declined, a Failure event is generated.
This event generates only if the object’s SACL has the required ACE to handle the use of specific access rights.
This event shows that access was requested, and the results of the request, but it doesn’t show that the operation was performed. To see that the operation was performed, check event 4663 (An attempt was made to access an object).
Object Types: (ObjectType)
Directory | Event | Timer | Device |
---|---|---|---|
Mutant | Type | File | Token |
Thread | Section | WindowStation | DebugObject |
FilterCommunicationPort | EventPair | Driver | IoCompletion |
Controller | SymbolicLink | WmiGuid | Process |
Profile | Desktop | KeyedEvent | Adapter |
Key | WaitablePort | Callback | Semaphore |
Job | Port Filter | ConnectionPort | ALPC Port |
Most common access rights for file system objects: (AccessList)
Access | Hexadecimal Value, Schema Value | Description |
---|---|---|
ReadData (or ListDirectory) | 0x1, %%4416 | ReadData — For a file object, the right to read the corresponding file data. For a directory object, the right to read the corresponding directory data. ListDirectory — For a directory, the right to list the contents of the directory. |
WriteData (or AddFile) | 0x2, %%4417 | WriteData — For a file object, the right to write data to the file. For a directory object, the right to create a file in the directory (FILE_ADD_FILE). AddFile — For a directory, the right to create a file in the directory. |
AppendData (or AddSubdirectory or CreatePipeInstance) | 0x4, %%4418 | AppendData — For a file object, the right to append data to the file. (For local files, write operations will not overwrite existing data if this flag is specified without FILE_WRITE_DATA.) For a directory object, the right to create a subdirectory (FILE_ADD_SUBDIRECTORY). AddSubdirectory — For a directory, the right to create a subdirectory. CreatePipeInstance — For a named pipe, the right to create a pipe. |
ReadEA | 0x8, %%4419 | The right to read extended file attributes. |
WriteEA | 0x10, %%4420 | The right to write extended file attributes. |
Execute/Traverse | 0x20, %%4421 | Execute — For a native code file, the right to execute the file. This access right given to scripts may cause the script to be executable, depending on the script interpreter. Traverse — For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. See the remarks in File Security and Access Rights for more information. |
DeleteChild | 0x40, %%4422 | For a directory, the right to delete a directory and all the files it contains, including read-only files. |
ReadAttributes | 0x80, %%4423 | The right to read file attributes. |
WriteAttributes | 0x100, %%4424 | The right to write file attributes. |
DELETE | 0x10000, %%1537 | The right to delete the object. |
READ_CONTROL | 0x20000, %%1538 | The right to read the information in the object’s security descriptor, not including the information in the system access control list (SACL). |
WRITE_DAC | 0x40000, %%1539 | The right to modify the discretionary access control list (DACL) in the object’s security descriptor. |
WRITE_OWNER | 0x80000, %%1540 | The right to change the owner in the object’s security descriptor |
SYNCHRONIZE | 0x100000, %%1541 | The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right. |
ACCESS_SYS_SEC | 0x1000000, %%1542 | The ACCESS_SYS_SEC access right controls the ability to get or set the SACL in an object’s security descriptor. |
I have got an issue while working with File System Auditing where the event ID is being repeatedly logged on my server 2008 R2 machine. Since I was in need of analyzing every events by manually, I have really stuck with huge amount of 4656 events for the object PlugPlayManager. So that I have decided to analyze reason for generating these events.
See the event in this picture
Possible Solution: 1
Event 4656 should occur if the Success or Failure audit was enabled for Handle Manipulation using command line tool Auditpol.
Subcategory: Handle Manipulation
You will get following three Event IDs if Handle Manipulation enabled
4656 A handle to an object was requested.
4658 The handle to an object was closed.
4690 An attempt was made to duplicate a handle to an object.
If you would like to get rid of these Object Access event 4656 then you need to run the following command:
Auditpol /set /subcategory:”Handle Manipulation” /Success:disable
Possible Solution: 2
You can also check the Advanced Audit Policy Configuration in Local Security Policy.
medianet_width=’728′; medianet_height= ’20’; medianet_crid=’812152226′;
Related Articles:
– Event ID 5156 Filtering Platform Connection – Repeated security log
– Event ID 1046 – DHCP Server
– Event ID 1000 -The remote procedure call failed in Sql Server Configuration manager
– Event 4624 null sid – Repeated security log
– Event ID 1014 Name resolution for the name cyber-mind.info timed out after none of the configured DNS servers responded
– Event ID 7036 service entered the stopped state – Service Control Manager
– Event ID 1059 – The DHCP service failed to see a directory server for authorization
Thanks,
Morgan
Software Developer