Earlier quoted context omitted.
add -no_shared_cr3 to your boot-args. it will have an hefty performance penalty, but if you value security over performance, it'll also protect you against a lot of (even 0day!) exploits.
Could you provide some context for that? What does that flag do? How do you even set boot args for OSX? I have little context to OSX boot process, and would like to understand this better.
OS X 10.10.5 kernel local privilege escalation
41–50 of 143 posts
Re: OS X 10.10.5 kernel local privilege escalation
#42Re: OS X 10.10.5 kernel local privilege escalation
#43Just curious when you disclosed this to apple? I'm impressed by your skill in finding this, but not sure it is a good idea to make it so easy for people to weaponize like this.
Re: OS X 10.10.5 kernel local privilege escalation
#44Earlier quoted context omitted.
add -no_shared_cr3 to your boot-args. it will have an hefty performance penalty, but if you value security over performance, it'll also protect you against a lot of (even 0day!) exploits.
Could you provide some context for that? What does that flag do? How do you even set boot args for OSX? I have little context to OSX boot process, and would like to understand this better.
The flag essentially prevents kernel from accessing userland memory unless special routines are used. Since the bug is a NULL pointer deference (which requires a read to userland memory in order to be exploited), exploitation becomes impossible. Due to this flag, however, your kernel will have to context switch every time a system call is done, which does have a noticeable performance impact. I will be releasing a KEXT to fix the bug soon.
Re: OS X 10.10.5 kernel local privilege escalation
#45Interesting. This prompted me to look at my Mac and it's running 10.10.3, I never got a prompt to update to 10.10.4 or 10.10.5, but when I open App Store it tells me there's an upgrade to 10.10.5. I guess Apple managed to break the automatic update mechanism in 10.10.3. I wonder if this is related to the behavior where my iMac wakes up every minute starting every morning at 2AM. This is so obnoxious that I now turn m…
Re: OS X 10.10.5 kernel local privilege escalation
#46(1) Can I also ask how you found this? Were you fuzzing Iokit? (2) I'm trying to work through your ROP. Can you explain a bit more? Thanks.
2) When IOServiceRelease is called, vtable+0x20 is called. the vtable pointer is controlled, at +0x20 I place a stack pivot, which sets RSP = RAX and pops 3 times. At 0x20 I place a POP RAX;RET gadget to let the chain begin after 0x28. Payload then locates the credentials structure, sets UID to 0 by bzero()ing, cleans up the memory corruption, decreases the task count for current user and increases task count for root. It then unlocks locks held by IOAudioEngine to prevent your audio from freezing up, and then returns to the userland context.
Re: OS X 10.10.5 kernel local privilege escalation
#47Re: OS X 10.10.5 kernel local privilege escalation
#48Earlier quoted context omitted.
I haven't look into this vulnerability, but how could it be a weakness in address randomization? Isn't address randomization supposed to be a mitigation, to make it more difficult to exploit other vulnerabilities.
There is no weakness in address randomization I relied on for exploitation. It relies on two distinct bugs, an info-leak to obtain a pointer to an allocation in the kalloc.1024 zone and a memory corruption primitive (deriving from a NULL pointer dfr. in IOKit) allowing me to OR 0x10 anywhere in kernel memory. To break kASLR I corrupt the size of a vm_map_copy struct, which allows me to read the adjacent allocation to…
Re: OS X 10.10.5 kernel local privilege escalation
#49At least 10.11 isn't vulnerable
Re: OS X 10.10.5 kernel local privilege escalation
#50Earlier quoted context omitted.
There is no weakness in address randomization I relied on for exploitation. It relies on two distinct bugs, an info-leak to obtain a pointer to an allocation in the kalloc.1024 zone and a memory corruption primitive (deriving from a NULL pointer dfr. in IOKit) allowing me to OR 0x10 anywhere in kernel memory. To break kASLR I corrupt the size of a vm_map_copy struct, which allows me to read the adjacent allocation to…
So you can bail out cleanly and go around for another run if the infoleak fails, yeah? Or do bad things happen up in kernelspace?