# macOS-Kernel-Exploit
## DISCLAIMERYou need to know the KASLR slide to use the exploit.AlsoSMAP needs to be disabled which means that it's not exploitable on Macs after 2015.These limitations make the exploit pretty much unusable forin-the-wild exploitation but still helpful for
security researchers in a controlled lab environment.This exploit is intended for security research purposes only.
## General
macOS KernelExploitforCVE-????-????(currently a 0day.I'll add the CVE# once it is published ;)).Thanks to @LinusHenzefor this cool bug and his support ;P.
## WriteupProbably coming soon.If you want to try and exploit it yourself, here are a few things to get you started:-VM:Download the macOS installer from the appstore and drag the `.app` file into VMWare's `NEWVM` window
-KernelDebugging setup: http://ddeville.me/2015/08/using-the-vmware-fusion-gdb-stub-for-kernel-debugging-with-lldb
-Have a look at the _kernel_trap function
## BuildI recommend setting the bootargs to: `debug=0x44 kcsuffix=development -v `
:warning:**Note**:SMAP needs to be disabled on macs after 2015(`-pmap_smap_disable`)You will need XCODE<=9.4.1 to build the exploit.(It needs to be 32bit)DownloadingXcode9.4.1CommandlineTools should be enough ;)Download: https://developer.apple.com/download/more/
```
make
```
## Execution
```
./exploit <KASLR slide>
```
Tested on macOS Mojave: `DarwinKernel-Mac.local 18.7.0DarwinKernelVersion18.7.0:ThuJun2018:42:21PDT2019; root:xnu-4903.270.47~4/DEVELOPMENT_X86_64 x86_64`
**Demo**:[](https://asciinema.org/a/UBmByRiRR0y5USBwuHKC5X7GU)---EDBNote:Download~ https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/47400.zip