Skip to content
Access control Write-up Intermediate

Product description

A local low-privileged user could create a directory structure and a malicious PowerShell module that a scheduled script would import, allowing arbitrary PowerShell execution as SYSTEM. The vulnerability was due to improper file permission assignment on the Tasks directory.

Jacob Baines Follow

Published on rapid7.com

On April 12, 2022, Microsoft published CVE-2022-24527, a local privilege escalation vulnerability in Microsoft Connected Cache. The vulnerability allowed a local low-privileged user to execute arbitrary Powershell as SYSTEM due to improper file permission assignment (CWE-732).

Rapid7, on rapid7.com

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 Tasks directory allowed low-privileged users to create subdirectories and files, and the scheduled PowerShell script imported a module from a user-writable location before the standard module path.

Impact

A local low-privileged user could execute arbitrary PowerShell as SYSTEM, leading to full compromise of the affected system.

What the attacker needed

Local low-privileged access to the system; Connected Cache installed on a Distribution Point

The fix

The vulnerability was fixed by Microsoft; users should follow Microsoft guidance on updating the Distribution Point software, or disable the caching feature if updating is not possible.

How it was found

  1. Create the directory structure WindowsPowerShell\Modules\webAdministration under C:\Doinc\Product\Install\Tasks.
  2. Place a malicious webAdministration.psm1 file in that directory.
  3. Wait for the scheduled task to run SetDrivesToHealthy.ps1, which imports the malicious module as SYSTEM.
  4. The malicious module executes arbitrary PowerShell, such as creating a file, demonstrating privilege escalation.

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.

A scheduled task runs a PowerShell script as the powerful SYSTEM account every minute. The script tries to load a module from a folder that normal users can create. By placing their own module there, a normal user can make the script run their code as SYSTEM, gaining full control of the machine.

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.

More by Jacob Baines

View all

5 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.