Do not trust this Group Policy!
Group Policy file and folder preferences that copy or delete files through a UNC share can be redirected with symlinks or junctions created by a low-privileged user, because the Redirection Trust mitigation does not apply to shares. An attacker who controls a low-privileged account could then get a file written to or a folder deleted in a SYSTEM-protected location, leading to privilege escalation.
Sometimes I think that starting with a hypothetical scenario can be better than immediately diving into the details of a vulnerability. This approach, in my opinion, provides crucial context for a clearer understanding, especially when the vulnerability is easy to understand but the scenario where it could apply is…
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
Impact
A low-privileged user could write a malicious DLL into a SYSTEM-protected path or delete a protected folder and replace its contents, leading to privilege escalation; the text notes the redirection must be a subfolder of the share or a 'device not ready' error occurs.
What the attacker needed
A low-privileged domain account; an existing Group Policy file or folder preference; destination configured as a UNC share; ability to create symlinks or junctions
The fix
Microsoft declined to service the report, so the author recommends carefully evaluating permissions on source and destination files and folders and avoiding share destinations in Group Policy file operations where possible.
How it was found
- Delete the existing agentstartup.log file in the local ProgramData Agent Logs folder
- Place a malicious DLL in that folder named agentstartup.log
- Clear the contents of the destination folder on the share
- Create a symlink for the destination log file pointing to a protected system DLL path
- Run gpupdate /force to trigger the policy and copy the file with SYSTEM rights
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.
Windows Group Policy can be set up to copy or delete files automatically, and it does this with high system rights. A normal user can plant a special shortcut called a symlink or junction that makes the copy or delete land somewhere else, such as a protected system folder. Because the safety check Microsoft added does not cover network shares, the high-privileged operation follows the shortcut and the user gains control of a protected file or folder.
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.