Event ID 4670: Permissions on an object were changed
Event 4670 is generated when permissions on an object (file, registry key, service) are modified, logging security descriptor changes. This event is crucial for detecting privilege escalation, defense evasion through permission modifications, and persistence mechanisms where attackers grant themselves access to system resources or weaken security controls.
- Channel
- Security
- Logged by default
- No
- Written on
- Any host
- Volume
- Low
- Audit subcategory
- File System
- Needs a SACL
- Yes
To have this event
- Enable File System:
auditpol /set /subcategory:"File System" /success:enable /failure:enable
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| SubjectUserName | Account that changed permissions |
| SubjectDomainName | Domain of the account |
| SubjectLogonId | Logon ID for correlation |
| ObjectServer | Subsystem (e.g., Security) |
| ObjectType | Type of object |
| ObjectName | Name or path of the object |
| HandleId | Handle ID for correlation |
| ProcessName | Process that changed permissions |
| ProcessId | Process ID |
| OldSd | Previous security descriptor (SDDL format) |
| NewSd | New security descriptor (SDDL format) |
In an investigation
Event 4670 provides visibility into permission and ownership changes on critical system objects, which attackers frequently modify during privilege escalation and persistence establishment. When an attacker gains initial access with limited privileges, modifying permissions on system files, registry keys, or services enables them to execute code with elevated privileges or maintain persistent access. This event captures the object being modified, the account making the change, and the old and new security descriptors (DACLs/SACLs). Common attack patterns include granting full control to user accounts on system binaries, weakening permissions on registry autorun keys, or modifying service ACLs to allow non-administrative accounts to modify service configurations. Security teams should monitor permission changes on critical system paths, startup folders, and security-sensitive registry keys.
What it can reveal
- Privilege escalation through permission modifications on system files allowing malware execution with SYSTEM privileges
- Defense evasion by weakening SACL audit settings to prevent logging of malicious activity
- Persistence establishment through permission changes on autorun registry keys or startup folders
- Tampering with security software by modifying permissions on antivirus installation directories
- APT groups frequently modify permissions on legitimate system utilities to enable Living off the Land (LotL) techniques
How to detect with it
Enable Event 4670 auditing for critical system paths including Windows\System32, Program Files directories, and all registry Run/RunOnce keys. Alert on permission modifications to any files in system directories by non-SYSTEM accounts. Monitor changes to SACL audit settings which may indicate attackers attempting to disable logging. Track permission modifications during off-hours or from unexpected user accounts. Correlate Event 4670 with Event 4688 (process creation) to identify which processes are modifying permissions. Alert on permission changes to security software installation paths, Windows Defender directories, or SIEM agent folders. Monitor registry permission modifications on security-critical keys like HKLM\SYSTEM\CurrentControlSet\Services.
Attack patterns
- APT privilege escalation: Attackers modified permissions on legitimate Windows utility (certutil.exe) to allow modification, replaced it with malicious version, restored permissions to evade detection
- Ransomware defense evasion: Before encryption, ransomware modified SACL permissions on all target directories to disable audit logging and prevent forensic analysis
- Persistence establishment: Attackers granted user account full control over HKLM\Software\Microsoft\Windows\CurrentVersion\Run registry key, allowing persistence without administrative rights
- Security software tampering: Malware modified permissions on antivirus service executable directory, enabling replacement with dummy executable to disable protection
Compared withEvent 4670 tracks permission/ownership changes, while Event 4663 monitors object access and Event 4657 tracks registry value modifications. Enable all three for comprehensive object auditing and modification detection.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Security' -FilterXPath "*[System[(EventID=4670)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Also relevant, depending on field values
Related events
Common questions
- What does Windows event ID 4670 mean?
- Event 4670 is generated when permissions on an object (file, registry key, service) are modified, logging security descriptor changes. This event is crucial for detecting privilege escalation, defense evasion through permission modifications, and persistence mechanisms where attackers grant themselves access to system resources or weaken security controls.
- Is event 4670 logged by default?
- No. It must be enabled before it is recorded. It is controlled by the "File System" Advanced Audit Policy subcategory (Object Access). It also requires a SACL on the audited object.
- Where is event 4670 recorded?
- In the Security channel on the any host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderEvent 4670 is generated when permissions on an object (file, registry key, service) are modified, logging security descriptor changes.