Meltdown CVE-2017-5754 谷歌浏览器读取密码POC

Meltdown CVE-2017-5754 漏洞 PoC从谷歌浏览器读取密码。
仅供教育和信息之用。
我不以任何方式对使用这些内容造成的任何损失或损害负责。
作者:RealJTG
添加MacOS支持,所以你可以破解苹果系统
/ * -----------------------

*

*免责声明

*

* -----------------------

*

*作者对所提供的任何行为不承担任何责任

*信息或代码。版权由任何材料创建的

*作者保留。这里提供的任何代码或文本的重复

*电子或印刷出版物是不允许的

*作者的同意。仅限个人和非商业用途。

*

* -----------------------

*

*推测优化以不安全的方式执行代码

*微体系结构中的数据跟踪,如缓存。

*

*请参阅Lipp等人的论文。al 2017详情:

* https://meltdownattack.com/meltdown.pdf。

*

* -----------------------

*

*由BuddasLittleFinger开发

*

*测试:

*

* Ubuntu 16.04

* CentOS 7.2

*

*荣誉:

Vasyan,Mews,Laurent Pootie(猫)和我认识的所有伴侣

*特别感谢扎布卡测试。

*

* /
#define _GNU_SOURCE

#define _XOPEN_SOURCE



#include <stdio.h>

#include <string.h>

#include <setjmp.h>

#include <signal.h>

#include <ucontext.h>

#include <unistd.h>

#include <fcntl.h>



#include <x86intrin.h>



// #define DEBUG 1



/* comment out if getting illegal insctructions error */



#ifndef HAVE_RDTSCP

#define HAVE_RDTSCP 1

#endif





#define TARGET_OFFSET 9

#define TARGET_SIZE (1 << TARGET_OFFSET)

#define BITS_BY_READ 2





static char target_array[BITS_BY_READ * TARGET_SIZE];





void clflush_target(void)

{

int i;



for (i = 0; i < BITS_BY_READ; i++)

_mm_clflush(&target_array[i * TARGET_SIZE]);

}





const char * array[] = {

"We're no strangers to love",

"You know the rules and so do I",

"A full commitment's what I'm thinking of",

"You wouldn't get this from any other guy",

"",

"I just wanna tell you how I'm feeling",

"Gotta make you understand",

"",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

"Never gonna say goodbye",

"Never gonna tell a lie and hurt you",

"",

"We've known each other for so long",

"Your heart's been aching but you're too shy to say it",

"Inside we both know what's been going on",

"We know the game and we're gonna play it",

"",

"And if you ask me how I'm feeling",

"Don't tell me you're too blind to see",

"",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

"Never gonna say goodbye",

"Never gonna tell a lie and hurt you",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

"Never gonna say goodbye",

"Never gonna tell a lie and hurt you",

"",

"Never gonna give, never gonna give",

"(Give you up)",

"(Ooh) Never gonna give, never gonna give",

"(Give you up)",

"",

"We've known each other for so long",

"Your heart's been aching but you're too shy to say it",

"Inside we both know what's been going on",

"We know the game and we're gonna play it",

"",

"I just wanna tell you how I'm feeling",

"Gotta make you understand",

"",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

"Never gonna say goodbye",

"Never gonna tell a lie and hurt you",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

"Never gonna say goodbye",

"Never gonna tell a lie and hurt you",

"Never gonna give you up",

"Never gonna let you down",

"Never gonna run around and desert you",

"Never gonna make you cry",

};



#define n_array (sizeof (array) / sizeof (const char *))



int main(int argc, char *argv[])

{

int i;



for (i = 0; i < n_array; i++) {

printf ("%s\n", array[i]);

}

return 0;

}

Leave a Reply