Created
April 25, 2018 06:45
-
-
Save fuglede/b98cd37717e07706c956c53629e245da to your computer and use it in GitHub Desktop.
Test for Total Meltdown vulnerability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tests if a Windows 7 or Windows Server 2008 machine is vulnerable | |
// to the privilege escalation bug "Total Meltdown" described in | |
// http://blog.frizk.net/2018/03/total-meltdown.html | |
#include "stdafx.h" | |
int main() { | |
unsigned long long *p = (unsigned long long*)0xfffff6fb7dbedf68; | |
printf("Reading PML4E entry. If this causes a crash, you're safe.\n"); | |
if (*p & 4) | |
printf("Value at address %p is %llx whose third bit is set. You're vulnerable.\n", p, *p); | |
else | |
printf("Value at address %p is %llx whose third bit is not set. You're safe.\n", p, *p); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment