Device Guard Code Integrity Policy Security Feature Bypass Vulnerability (CVE-2018-8212)
Device Guard's Code Integrity policy could be bypassed because PowerShell exposed functions in a way that let an attacker inject malicious code into a trusted script. An attacker with local access could then run injected code at the same trust level as the trusted script, defeating the policy.
Originally disclosed on Microsoft
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
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 allowed injected code to inherit the trust of a policy-approved script.
Impact
An attacker with local access could run code that the Code Integrity policy would otherwise block, bypassing the security feature.
What the attacker needed
Local access to the machine; a script trusted by the policy
The fix
It was fixed by an update that corrects how PowerShell exposes functions and processes user-supplied code.
How it was found
- Gain access to the local machine.
- Inject malicious code into a script that the Code Integrity policy trusts.
- The injected code runs at the same trust level as the script, 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, trusted programs run. This report says a flaw in how PowerShell handled code let someone sneak their own code into an already-trusted script, so it ran as if it were approved. The attacker still needed to be on the machine already.
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.