Skip to main content
4670SecurityObject AccessSecurity tier 1

Event ID 4670: Permissions on an object were changed

Event ID 4670 records that the permissions on a file, registry key or token were changed, with the old and new security descriptors in SDDL form. It appears only when the object's SACL audits permission changes. Diff OldSd against NewSd to find the access control entry that was added or removed.

What Triggers Event 4670 and How to Read the SDDL Diff

Event 4670 is written when the permissions of an object change. The object can be a file system object, a registry key or a security token, and the event is produced under four subcategories: File System, Registry, Authentication Policy Change and Authorization Policy Change. Two preconditions make it quiet. First, the object's SACL has to ask for it: for a file system object the SACL needs Change Permissions or Take Ownership entries, and for a registry key it needs Write DAC or Write Owner. Second, Microsoft states that the event does not generate when the SACL itself is changed, so an attacker who edits auditing leaves no 4670 behind. For token objects the event is informational and Microsoft offers no monitoring advice, so filter ObjectType Token out of your rules.

The fields tell you who, where and with what. The Subject block names the account and its SubjectLogonId. ObjectServer is Security. ObjectType says File, Key or Token, and ObjectName holds the path, or a hyphen for tokens. HandleId lets you tie the event to a 4663 or 4656 on the same handle. ProcessId is hexadecimal, comparable with the new process ID in a 4688, and ProcessName is the executable that made the change, which is often the most telling field. The core of the event is the pair OldSd and NewSd, the security descriptor before and after in Security Descriptor Definition Language.

SDDL looks hostile until you read one entry. Take (A;OICI;FA;;;WD). A means allow, OICI means the entry inherits to files and subfolders, FA is file all access and WD is Everyone. The account part uses short codes: BA built-in administrators, SY local system, AU authenticated users, BU built-in users, AN anonymous logon, DA domain administrators. Rights can be aliases like FA, FR and FX for files or KA and KR for registry keys, or a hexadecimal mask. In Microsoft's own sample the new descriptor differs from the old by one leading entry, (A;OICI;FA;;;WD), which is Everyone with full access to a folder and everything below it. That is the whole analysis: list the entries in NewSd that are not in OldSd, and the entries in OldSd that are gone. When a descriptor holds more than a handful of entries, do it in code: split each string on the parentheses and compare the two sets, rather than reading them by eye.

Look at the flags as well as the principals. In Microsoft's sample, every entry in the old descriptor carries ID, meaning it is inherited from a parent, while the new Everyone entry does not. An explicit entry sitting on a folder whose other entries are all inherited is what a manual grant looks like, because nobody inherited it. The header moved too, from D:AI to D:ARAI, which marks the descriptor as one that now asks children to inherit from it. Neither flag proves intent, but together they separate a hand-made change from permissions flowing down from a parent.

The sample on this page repeats the pattern. j.smith runs icacls.exe against D:\Finance\Q3-payroll and the new descriptor gains the same Everyone entry. The logon ID, 0x4a91c3, is the session from the 4663 sample, where an archiver read a file inside this folder. A permission opened at 4670 and used at 4663 is a story you can assemble from HandleId, ObjectName and SubjectLogonId. MITRE describes the intent as modifying file or directory permissions to evade access control lists and reach protected files (T1222).

ProcessName is the second diff. A change made through explorer.exe or an installer is a different animal from one made by icacls.exe, takeown.exe or PowerShell run by a user who has no reason to administer that tree. Microsoft's advice for this event is to compare ProcessName with the process you expect, to flag executables outside standard folders, to match restricted substrings such as mimikatz or cain.exe, to monitor specific critical registry keys, and, for high-value computers, to watch every 4670. Its example for domain controllers is the ntds.dit file.

One more practical use: OldSd is an exact rollback. The string is the previous descriptor, so after an unauthorized change you can reapply it to the object instead of guessing what the ACL used to be.

Event 4670 Fields

FieldWhat it tells youSimulated value
SubjectUserSidSID of the account that changed the permissions.S-1-5-21-424242-1104
SubjectUserNameName of the account that changed the permissions.j.smith
SubjectDomainNameDomain or computer name of the account.CORP
SubjectLogonIdLogon session ID; correlates to the 4624 that opened the session.0x4a91c3
ObjectServerAlways Security for this event.Security
ObjectTypeKind of object: File, Key or Token.File
ObjectNamePath or name of the object; a hyphen for tokens.D:\Finance\Q3-payroll
HandleIdHandle to the object; correlates with 4656 and 4663.0x7d0
OldSdSecurity descriptor before the change, in SDDL.D:PAI(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;S-1-5-21-424242-1133)
NewSdSecurity descriptor after the change, in SDDL.D:PAI(A;OICI;FA;;;WD)(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;S-1-5-21-424242-1133)
ProcessIdHexadecimal ID of the process that changed the permissions.0x1ee4
ProcessNameFull path of the executable that changed the permissions.C:\Windows\System32\icacls.exe

Inspect Event 4670 Values

Click a field to inspect the full simulated value, the way you would expand it in a SIEM event view.

Example Event 4670 Log

A representative Security entry for Event 4670, generated deterministically by our telemetry engine so every field holds a realistic, internally consistent value.

Simulated example generated by SOCSimulator Research
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" />
    <EventID>4670</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2025-03-05T15:38:47.000Z" />
    <EventRecordID>866367</EventRecordID>
    <Channel>Security</Channel>
    <Computer>WS-SIM-001.corp.socsimulator.example</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-21-424242-1104</Data>
    <Data Name="SubjectUserName">j.smith</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x4a91c3</Data>
    <Data Name="ObjectServer">Security</Data>
    <Data Name="ObjectType">File</Data>
    <Data Name="ObjectName">D:\Finance\Q3-payroll</Data>
    <Data Name="HandleId">0x7d0</Data>
    <Data Name="OldSd">D:PAI(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;S-1-5-21-424242-1133)</Data>
    <Data Name="NewSd">D:PAI(A;OICI;FA;;;WD)(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;S-1-5-21-424242-1133)</Data>
    <Data Name="ProcessId">0x1ee4</Data>
    <Data Name="ProcessName">C:\Windows\System32\icacls.exe</Data>
  </EventData>
</Event>

Detecting Event 4670

A broad principal gains full control (Everyone, Anonymous, Authenticated Users or Users)

Compares NewSd with OldSd so only the newly added entry fires. SPL assumes sourcetype XmlWinEventLog:Security. OldSd and NewSd are not SecurityEvent columns, so the KQL reads them from EventData.

index=wineventlog sourcetype=XmlWinEventLog:Security EventCode=4670 ObjectType!=Token
| where match(NewSd, "\\(A;[^)]*;(FA|GA|0x1f01ff|0x1fffff);;;(WD|AN|AU|BU)\\)") AND NOT match(OldSd, "\\(A;[^)]*;(FA|GA|0x1f01ff|0x1fffff);;;(WD|AN|AU|BU)\\)")
| table _time, host, SubjectUserName, SubjectLogonId, ProcessName, ObjectName

Permissions changed on ntds.dit

Microsoft's example for domain controllers. Add other high-value paths to the pattern. This only fires if the SACL on the file asks for permission changes.

index=wineventlog sourcetype=XmlWinEventLog:Security EventCode=4670 ObjectType=File
| where like(lower(ObjectName), "%\\ntds.dit")
| table _time, host, SubjectUserName, SubjectLogonId, ProcessName, ObjectName, NewSd

Permissions changed by a process outside the Windows and Program Files folders

Microsoft's advice is to flag executables outside standard folders. Expect a few hits from per-user installers; exclude them by ProcessName once you have reviewed them.

index=wineventlog sourcetype=XmlWinEventLog:Security EventCode=4670 ObjectType!=Token
| where NOT match(ProcessName, "(?i)^c:\\\\(windows|program files)")
| table _time, host, SubjectUserName, ProcessName, ObjectName

Permissions changed on a registry key used for persistence (Run or Services)

Registry ObjectName values use the \REGISTRY\MACHINE form. The SACL on the key must request Write DAC or Write Owner.

index=wineventlog sourcetype=XmlWinEventLog:Security EventCode=4670 ObjectType=Key
| where match(ObjectName, "(?i)\\\\CurrentVersion\\\\Run|\\\\CurrentControlSet\\\\Services\\\\")
| table _time, host, SubjectUserName, ProcessName, ObjectName

True Positive vs False Positive

Legitimate permission changes are frequent but patterned. Installers adjust the ACLs of their own folders and registry keys. Administrators fix share permissions during a migration. Servicing components rewrite keys when features are added. These come from known processes, in business hours, often under SYSTEM or a deployment account. Baseline by ObjectName prefix and ProcessName, and treat a new combination as the thing to read.

The true positives are defined by the diff. A broad principal (Everyone, Authenticated Users, Users or Anonymous) appears in NewSd with full control or modify rights on a sensitive tree. A deny entry shows up for administrators or SYSTEM, which locks people out of their own data. Permissions change on ntds.dit, or on a registry key used for persistence such as a Run key or a service key, by a process that is not a trusted installer. The tool is a script interpreter, or an executable from a user-writable folder.

Scope the SACLs before the rules. Start with the objects whose permissions you would call an incident if they changed: ntds.dit on domain controllers, backup folders, the finance and HR shares, and the Run and Services registry keys. Add the Change Permissions or Write DAC entry only there, check one week of volume, and widen from that evidence. Registry noise is the usual surprise: installers and servicing stacks touch keys constantly, so a SACL on a broad hive buries the signal you wanted.

Work the case in order. Rebuild the diff and write down exactly what changed. Compare the account and process with the change calendar. Look for 4663 events on the same ObjectName in the following minutes, from this account or others, because a permission opened and then used is the path to data theft or tampering. Take SubjectLogonId to the 4624 for the session type. If the change is unauthorized, restore OldSd, then review who touched the object while it was open.

Know where the event stops. Without the right SACL entry it never appears, and SACL edits are invisible. Treat 4670 as the permission-change record for objects you have deliberately prepared, which is why the crown-jewel list comes first.

Practice Investigating Event 4670

No published room targets Event 4670 directly yet. The detection skills transfer, though: practice alert triage on realistic consoles across 73 free rooms in SOCSimulator Operations.

Browse free operations

Frequently Asked Questions

What is event ID 4670?
It records that the permissions of an object were changed. The object can be a file system object, a registry key or a token. The event shows the account, the object, the process that made the change, and the old and new security descriptors in SDDL form.
How do I read OldSd and NewSd in event 4670?
They are SDDL strings. Split each into its parenthesized entries, which read type;flags;rights;;;account, then compare the lists. An entry only in NewSd was added and one only in OldSd was removed. For example (A;OICI;FA;;;WD) means allow, inherit to children, file all access, to Everyone.
Why does nothing appear in the log when I change permissions?
Because the object's SACL has to request it. For a file system object it needs Change Permissions or Take Ownership auditing, and for a registry key Write DAC or Write Owner. The event also does not fire when the SACL itself is edited, so confirm the SACL is in place with a test change.
Which permission changes should I alert on?
A broad principal gaining full control, a deny entry added for administrators or SYSTEM, any change to ntds.dit on a domain controller, changes to persistence registry keys, and changes made by processes outside the standard folders or by script interpreters. Microsoft recommends monitoring every 4670 on high-value computers.

Sources

“4670 fields, SACL preconditions, no event on SACL changes, SDDL value tables, token objects informational, and Microsoft's monitoring recommendations including ntds.dit”

“4663 shares HandleId with 4670 and shows the access that follows a permission change”

“File and Directory Permissions Modification (T1222): modifying permissions to evade ACLs and access protected files”

Event ID

Event ID 4656: Handle Requested, AccessMask & Failures

Event ID 4656 logs a request for a handle to a file or key. Decode the requested AccessMask, read Failure events and Pri…

Read more
Event ID

Event ID 4663: File Access, AccessMask and Detection Queries

Event ID 4663 shows an access right being used on a file or key. Decode AccessMask, fix 'not logging', and detect stagin…

Read more
Event ID

Event ID 5140: Share Access per Session & Admin Share Alerts

Event ID 5140 is logged once per SMB session. Learn what ShareName, IpAddress and AccessMask tell you, and detect C$ and…

Read more
Glossary

What is Data Exfiltration? SOC Glossary

Data exfiltration in cyber security is the unauthorized transfer of data from an organization's systems to infrastructur…

Read more
Glossary

What is Persistence? SOC Glossary

Persistence is the set of techniques an adversary uses to keep access to a compromised system after whatever gave them t…

Read more
Glossary

What is Threat Hunting? SOC Glossary

Threat hunting is the proactive search through security telemetry for attackers that existing controls missed. The hunte…

Read more
Career Path

SOC Analyst (Tier 2) Career Guide: Salary & Skills

Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…

Read more
Career Path

Threat Hunter Career Guide: Salary & Skills

Threat Hunters do not wait for alerts. You develop hypotheses based on threat intelligence and adversary behavior models…

Read more
Comparison

SOCSimulator vs. LetsDefend: Platform Comparison

SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…

Read more
Event ID

Windows Event ID Library: SOC Reference

Windows Security and Sysmon event IDs with simulated log samples, field tables, and tested detection queries.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more