First a disclaimer: I don't intent to hack anyone, I'd just like to see the exploit in action on my own machine.
I've compiled the Spectre example in VS2017 on x64 Windows 10.
The example works when reading from its own process memory, but if I try to read from my test app, I only get at string of zeros or other similar characters.
test app:
#include "stdafx.h"
#include <string>
#include <iostream>
const char *gotroot = "The Magic Words are Squeamish Ossifrage.";
using namespace std;
int main()
{
printf("%p",gotroot);
string endd;
cin >> endd;
printf("%s", gotroot);
return 0;
}
I start the app and copypaste the address to the Spectre commandline, but I don't get the string.
I couldn't figure out if Windows 10 has already been patched?
But I've also tried in Ubuntu 17.04 that hasn't be updated in a while, with the same result.
Is there something wrong with my approach?