Static library implementing prefetch side-channel KASLR leaks based on prefetch-tool.
Resources:
- Original write-up
- Explanation of the side-channel and implementation
- Improvements ("strip") for Intel i5/i7
- Add the directory of
prefetch-lib.has an Additional Include Directory (C/C++->General->Include Directories) - Add the directory of
prefetch-lib.libas an Additional Library Directory (Linker->General->Library Directories) - Add
ntdll.libandprefetch-lib.libtoLinker->Input->Additional Dependencies
A sample project is here.
MSVC configuration is a mess, so here are some notes to make this project work:
- You have to enable the MASM build customization under
Build Dependencies->Build Customizations(not present under project Properties!) otherwise the assembly module will be ignored. - The assembly source needs the
includelibdirective so the linker will know which library the resulting object is part of. - If you don't manually specify
/wholearchivethe object file of the assembly will be discarded by the linker.