Abusing Group Policy Caching
The Group Policy caching service ran as SYSTEM and granted full control of files to the current user during a first security-setting call before a second call reduced access. A standard domain user could abuse this to overwrite a SYSTEM-protected file and escalate to SYSTEM privileges.
decoder.cloud
Published on decoder.cloud
In this post I will show you how I discovered a severe vulnerability in the so-called “Group Policy Caching” which was fixed (among other GP vulnerabilities) inCVE-2020-1317
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the caching service performed a first security-setting call that granted full control to the current user before a second call restricted access, and it followed user-controlled junctions in a user-writable directory.
Impact
A standard domain user could gain full control over a SYSTEM-protected file and, for example, overwrite a print component to obtain a SYSTEM shell.
What the attacker needed
A standard domain user account; default Group Policy configuration; ability to run gpupdate /force
The fix
Microsoft fixed it by moving the Group Policy folders to a location that is read-only for standard users.
How it was found
- Rename the Datastore folder and create a new Datastore folder with a 0 subfolder.
- Create a file in the 0 folder and run gpupdate /force while watching with procmon.
- Create a junction under the 0 folder pointing to a protected directory such as the administrator documents folder.
- Run gpupdate /force again and observe the first security-setting call on desktop.ini before processing stops.
- Use an opportunistic lock and move the junction to the RPC Control path to stop the second security-setting call.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Group Policy is a Windows feature that pushes settings to computers in a company network. The service that applies these settings runs with the highest system rights, and it was giving a normal logged-in user full control over files it touched. By pointing a folder link at a protected file, the user could take over that file and then get the same high rights as the system itself.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.