Skip to content
Access control Advisory Advanced CVE-2018-8211

Device Guard Code Integrity Policy Security Feature Bypass Vulnerability (CVE-2018-8211)

A security feature bypass existed in Device Guard that allowed an attacker to inject malicious code into a trusted PowerShell script, causing it to run with the script's trust level and bypass the Code Integrity policy. An attacker with local access could therefore execute code that the policy was meant to block.

Matt Graeber Follow

Originally disclosed on Microsoft

High 5.3 View original

Description

A security feature bypass vulnerability exists in Device Guard that could allow an attacker to inject malicious code into a Windows PowerShell session. An attacker who successfully exploited this vulnerability could inject code into a trusted PowerShell process to bypass the Device Guard Code Integrity policy on the local machine. To exploit the vulnerability, an attacker would first have to access the local machine, and then inject malicious code into a script that is trusted by the Code Integrity policy. The injected code would then run with the same trust level as the script and bypass the Code Integrity policy. The update addresses the vulnerability by correcting how PowerShell exposes functions and processes user supplied code.

Device Guard

Device Guard

The original report as published on the Microsoft Security Response Center, by Matt Graeber of SpecterOps. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely PowerShell exposed functions and processed user-supplied code in a way that let injected code inherit the trust of the calling script instead of being checked separately.

Impact

An attacker with local access could run code that the Device Guard Code Integrity policy was supposed to block, though the text does not say whether other defences limited this.

What the attacker needed

Local access to the machine; a script trusted by the policy

The fix

The vulnerability was fixed by an update that corrects how PowerShell exposes functions and processes user-supplied code.

How it was found

  1. Gain access to the local machine.
  2. Inject malicious code into a script that the Code Integrity policy trusts.
  3. The injected code runs with the script's trust level, bypassing the policy.

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 report has not been written yet. The Original tab links to the source.

Device Guard is a Windows feature that only lets approved, signed scripts and programs run. This bug meant that if an attacker could already get onto the machine, they could hide bad code inside a script the system already trusted, so the protection would not notice. They still needed local access first; it was not a way in from the internet.

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 Matt Graeber

View all

9 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.