This repository contains the sources and documentation for the SWAPGS attack PoC (CVE-2019-1125)# PoC for the SWAPGS attack ([CVE-2019-1125](https://nvd.nist.gov/vuln/detail/CVE-2019-1125))
This repository holds the sources for the SWAPGS attack PoC publicly shown at Black Hat USA, 2019.
## Contents
* leakgsbkva - variant 1 (look for random values in kernel memory; limited to PE kernel image header)
* leakgsbkvat - variant 2 (extract random values from kernel memory; limited to PE kernel image header)
* whitepaper
* Black Hat USA 2019 presentation
## Prerequisites
1. Visual Studio 2015
2. Unpatched Windows x64 (7 or newer)
## Authors
* Andrei Vlad LUȚAȘ
* Dan Horea LUȚAȘ
## Additional resources
[Video Recording of presentation at Black Hat USA, 2019](https://www.youtube.com/watch?v=uBPry7jcfBE)
[4.0K] /data/pocs/a63e2e3339b3d7cc0eb073f498b7ad908dc1a625
├── [4.0K] doc
│ ├── [4.6M] Bitdefender-WhitePaper-SWAPGS.pdf
│ └── [3.4M] Bypassing-KPTI-Using-the-Speculative-Behavior-of-the-SWAPGS-Instruction.pdf
├── [1.4K] LICENSE
├── [ 723] README.md
└── [4.0K] src
├── [4.0K] leakgsbkva
│ ├── [4.0K] leakgsbkva
│ │ ├── [2.1K] asmhelper.asm
│ │ ├── [ 13K] leakgsbkva.c
│ │ ├── [7.5K] leakgsbkva.vcxproj
│ │ └── [1.1K] leakgsbkva.vcxproj.filters
│ └── [1.3K] leakgsbkva.sln
└── [4.0K] leakgsbkvat
├── [4.0K] leakgsbkvat
│ ├── [2.0K] asmhelper.asm
│ ├── [ 14K] leakgsbkvat.c
│ ├── [7.5K] leakgsbkvat.vcxproj
│ └── [1.1K] leakgsbkvat.vcxproj.filters
└── [1.3K] leakgsbkvat.sln
6 directories, 14 files