Practical SMEP bypass techniques on Linux
RUXCON15-Vitaly RUXCON15-Vitaly
et2usr • Linux - kernel space on behalf of user space model • User space processes cannot access kernel space • Kernel space can access user space • ret2usr - redirect corrupted code or data ptr to code or data in user space
et2usr High mem addr • Memory split • 0 to TASK_SIZE for userspace processes • 47 bits minus one guard page = 0x7FFFFFFFF000 • Corrupted function or data struct pointer • Redirect control flow to escalate_privs() in usespace ((1UL
- Page 1 and 2: Practical
- Page 3: Agenda • Introduction (ret2usr)
- Page 7 and 8: et2usr Privilege escalation • str
- Page 9 and 10: et2usr Option #1 - corrupted functi
- Page 11 and 12: et2usr Option #2 - corrupted data s
- Page 13 and 14: SMEP
- Page 15 and 16: SMEP OOPS
- Page 17 and 18: SMEP • If CR4.<s
- Page 19 and 20: AWS SMEP instance
- Page 21 and 22: ROPing • vmlinux vs vmlinuz? •
- Page 23 and 24: ROPing IA32 language density • Al
- Page 25 and 26: Stack pivot - NX address Exploit at
- Page 27 and 28: SMEP Bypass High m
- Page 29 and 30: SMEP Bypass High m
- Page 31 and 32: SMEP Bypass Option
- Page 33 and 34: Fake stack • xchg %eax, %esp; ret
- Page 35 and 36: Fake stack Spraying 0x10000 ROP INS
- Page 37 and 38: Fake stack Spraying • May land in
- Page 39 and 40: PART 2 - CVE-2013-1763
- Page 41 and 42: CVE-2013-1763 SOCK_DIAG • Affecte
- Page 43 and 44: CVE-2013-1763 SOCK_DIAG
- Page 45 and 46: CVE-2013-1763 SOCK_DIAG High mem ad
- Page 47 and 48: CVE-2013-1763 SOCK_DIAG High mem ad
- Page 49 and 50: CVE-2013-1763 SOCK_DIAG ptr = (unsi
- Page 51: Questions? @vnik5287
et2usr<br />
High mem addr<br />
• Memory split<br />
• 0 to TASK_SIZE for userspace<br />
processes<br />
• 47 bits minus <strong>on</strong>e guard<br />
page = 0x7FFFFFFFF000<br />
• Corrupted functi<strong>on</strong> or data<br />
struct pointer<br />
• Redirect c<strong>on</strong>trol flow to<br />
escalate_privs() in usespace<br />
((1UL