SlideShare a Scribd company logo
1 of 3
Theo de Raadt: Mitigations and Other Real Security
Features
Largely invisible security improvements
Slides
This talk explain the why instead of what, behind security mitigation mechanisms
Software will never be perfect
● logic bug cascades, often externally controllable
● attackers can do illegal access + control of code in program & libs, toy with kernel surface
● attacker knowledge and methods are improving fast
● current tools and practices are insufficient
● thus mitigations
Mitigations
● inexpensive tweaks, increase difficulty of performing attacks
● pressures software to be robust
Robust (adj.)
● (def) does not break down, recovers quickly, not wholly affected
● Theo strongly disagree with that definition
○ error-recovery is an unsound practice, detection mechanisms don’t exist
● if memory has been overwritten, how does one continue?
● fail-closed
Justifying Fail-Closed
● user becomes aware of bug (painful but preferable to only attacker knowing)
● “detects-and-terminates” execution before control-flow creates further mess and less useful bug report
● user files bug reports
● programmer fixes bug
=> best current practice for building software
We fix bugs only after we learn of them
17 years of mitigation work
(word cloud of mitigation techniques, completed and not)
● cause “weird” operations to fail-closed (i.e. crash immediately)
Features of mitigations
● reduce effectiveness of some attack method
● low overhead
● easy to understand
● easy to apply to old and new code
● one mitigation doesn’t need to fix all problems
● expose bugs earlier - improve triage
Components attackers use
● knowledge
○ bugs
○ location of objects (absolute and relative locations)
○ gadgets, constants, pointers, register values
● mechanisms
○ ROP
○ code reuse
○ syscalls
● act upon objects
○ filesystem
○ fd
○ leftovers on stack
Knowledge: API, ABI and beneath
● Details of ABI and implementation sneak upwards, providing attackers with data to use during attack
● details left on stack and in registers, long enough for attackers to use
ABI + implementation leakage
● { int i; void *p = &i;}
If this code crashes, can find return address based upon the register p is stored in.
details well-known, de-facto standardized and exposed.
Knowledge: stack, register leaks
● attackers run same binaries as you, in same environment
○ ROP operates on these
● with a crash, attacker know regs and stack values
● just need a way to pivot to control
Attacker Tooling: ROP
● hijack instruction sequences using false return frames
● gadget: small seq of reg memory transfers above a true function ret instruction
● attackers needs to know location of gadgets, addr of stack
● other methods: JOP, SROP etc
Even Scarier: BROP (Blind ROP)
● addr space oracle
● repeated probes against reused addr-space learns enough to perform minimum ROP operations
● can discover (and bypass) some mitigations
● see paper for details
Stack protector example
● attacker needs to know:
○ location of stack
○ ordering of stack objs
○ call frame ordering (in-args, savepc, savefp, locals)
● stack protector only disrupts the simplest attack methods
ASLR effect?
● attacker needs to know:
○ abs integer values
○ rel addr (offsets)
○ abs addr (pointers)
○ to 3 places: code, data, stack
● ASLR increases difficulty of attack
Costs - time for discussion
● Not all mitigations will be cost free
● Processors have gotten faster
○ e.g. Intel improving instruction scheduling before function return
● What percentage of performance would you willingly spend on security?
● Most mitigations are reimplementing of an existing mechanism, just more strictly
Shared library improvements
● progressive improvements - old GOT & PLTs were writable!
● secure PLT
● no more relocs
● RELRO
● kbind()
○ only kernel can modify PLT
● DT_BIND_NOW
○ can even unmap ld.so if no more dynamic bindings are required
(Took 30 years to add layers of strictness to basic dynamic linking idea)
Malloc hardening
● OpenBSD malloc hardened in 20+ ways
● randomness, object rotation, metadata protection, double free & use-after-free detection, heap overflow
detection
● half of hardening features enabled by default
Pledge: POSIX subsets
● No subtle behavior changes
● No error returns
● fails-closed
● illegal operations crash
● easy to learn
How does pledge help?
● 2nd spec by programmers, directly in the program
● no behavior changes, only used to detect violations
● 2nd spec also useful to programmers as debug tool
Privilege Separation + Pledge
● Pledge enforces the separation
Common ideas behind mitigation
● reduce discoverable knowledge
● improve historical weakness of permission models
● disrupt non standard control flows
● education of privilege separation during program design
● reduce syscall availability during execution
Mitigations change details not specified in standards
● harm current attack methods and help us debug code
Resistance against mitigations
● some await language/compiler advances to save us
○ e.g. control flow integrity in hardware and software
● some prefer long-term binary compatibility over security
● some business models require ignoring security
● “X-will-save -us” -> “X-fail-to-compile perl”- > ...
● NIH syndrome
Limiting choice is related to safety
(photo of traffic jam at intersection in Vietnam)
(slowing down is a way to achieve safety)
Safety systems innovations are crucial
● old solutions may not match modern needs
● don’t get tied down by back compat
● innovation crucial
● don’t sleep on shoulders of giants
Q&A
● Could hardware manufacturers help? (e.g. CFI) A: would be great but haven’t seen anything that’d
really work.
○ Always wanted an instruction that stores random values in registers or memory really cheaply.
For stopping info leaks.
○ Mark cache as “may not be read unless written to before”
○ ROP gadgets create reads and writes to memory as artifacts, could detect these and stop them
Postel’s maxim is dangerous
● IETF: draft-thomson-postel-was-wrong-02.txt
● similar problem with ABI + below, which benefits attackers
● POSIX standard is too liberal
● POSIX implementations are full of historical standard behaviours which attackers rely upon

More Related Content

Similar to Bsdtw17: theo de raadt: mitigations and other real security features

Talking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionTalking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionDocker, Inc.
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersDevOps.com
 
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...Ontico
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...CODE BLUE
 
CISSP Week 14
CISSP Week 14CISSP Week 14
CISSP Week 14jemtallon
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Demi Ben-Ari
 
Stack-Based Buffer Overflows
Stack-Based Buffer OverflowsStack-Based Buffer Overflows
Stack-Based Buffer OverflowsDaniel Tumser
 
Software cracking and patching
Software cracking and patchingSoftware cracking and patching
Software cracking and patchingMayank Gavri
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projectsIBACZ
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityLinaro
 
Meetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCDamienCarpy
 
CISSP Week 22
CISSP Week 22CISSP Week 22
CISSP Week 22jemtallon
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsXiaozhe Wang
 
Sistemas Distribuidos
Sistemas DistribuidosSistemas Distribuidos
Sistemas DistribuidosLocaweb
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
 
Higher Level Malware
Higher Level MalwareHigher Level Malware
Higher Level MalwareCTruncer
 
CodeMotion tel aviv 2015 - burning marshmallows
CodeMotion tel aviv 2015 - burning marshmallowsCodeMotion tel aviv 2015 - burning marshmallows
CodeMotion tel aviv 2015 - burning marshmallowsRon Munitz
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012DefCamp
 

Similar to Bsdtw17: theo de raadt: mitigations and other real security features (20)

Talking TUF: Securing Software Distribution
Talking TUF: Securing Software DistributionTalking TUF: Securing Software Distribution
Talking TUF: Securing Software Distribution
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
 
DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019
 
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...
Making Sites Reliable (как сделать систему надежной) (Павел Уваров, Андрей Та...
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
 
CISSP Week 14
CISSP Week 14CISSP Week 14
CISSP Week 14
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"
 
Stack-Based Buffer Overflows
Stack-Based Buffer OverflowsStack-Based Buffer Overflows
Stack-Based Buffer Overflows
 
Software cracking and patching
Software cracking and patchingSoftware cracking and patching
Software cracking and patching
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projects
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source security
 
Meetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaC
 
Realtime
RealtimeRealtime
Realtime
 
CISSP Week 22
CISSP Week 22CISSP Week 22
CISSP Week 22
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
 
Sistemas Distribuidos
Sistemas DistribuidosSistemas Distribuidos
Sistemas Distribuidos
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Higher Level Malware
Higher Level MalwareHigher Level Malware
Higher Level Malware
 
CodeMotion tel aviv 2015 - burning marshmallows
CodeMotion tel aviv 2015 - burning marshmallowsCodeMotion tel aviv 2015 - burning marshmallows
CodeMotion tel aviv 2015 - burning marshmallows
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 

More from Scott Tsai

Bsdtw17: brooks davis: is it time to replace mmap?
Bsdtw17: brooks davis: is it time to replace mmap?Bsdtw17: brooks davis: is it time to replace mmap?
Bsdtw17: brooks davis: is it time to replace mmap?Scott Tsai
 
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...Scott Tsai
 
Bsdtw17: george neville neil: realities of dtrace on free-bsd
Bsdtw17: george neville neil: realities of dtrace on free-bsdBsdtw17: george neville neil: realities of dtrace on free-bsd
Bsdtw17: george neville neil: realities of dtrace on free-bsdScott Tsai
 
Bsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integrationBsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integrationScott Tsai
 
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device driversBsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device driversScott Tsai
 
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumBsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumScott Tsai
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsScott Tsai
 
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...Scott Tsai
 

More from Scott Tsai (8)

Bsdtw17: brooks davis: is it time to replace mmap?
Bsdtw17: brooks davis: is it time to replace mmap?Bsdtw17: brooks davis: is it time to replace mmap?
Bsdtw17: brooks davis: is it time to replace mmap?
 
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...
Bsdtw17: arun thomas: risc v berkeley hardware for your berkeley software dis...
 
Bsdtw17: george neville neil: realities of dtrace on free-bsd
Bsdtw17: george neville neil: realities of dtrace on free-bsdBsdtw17: george neville neil: realities of dtrace on free-bsd
Bsdtw17: george neville neil: realities of dtrace on free-bsd
 
Bsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integrationBsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integration
 
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device driversBsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
 
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumBsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessions
 
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...
Bsdtw17: johannes m dieterich: high performance computing and gpu acceleratio...
 

Recently uploaded

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

Bsdtw17: theo de raadt: mitigations and other real security features

  • 1. Theo de Raadt: Mitigations and Other Real Security Features Largely invisible security improvements Slides This talk explain the why instead of what, behind security mitigation mechanisms Software will never be perfect ● logic bug cascades, often externally controllable ● attackers can do illegal access + control of code in program & libs, toy with kernel surface ● attacker knowledge and methods are improving fast ● current tools and practices are insufficient ● thus mitigations Mitigations ● inexpensive tweaks, increase difficulty of performing attacks ● pressures software to be robust Robust (adj.) ● (def) does not break down, recovers quickly, not wholly affected ● Theo strongly disagree with that definition ○ error-recovery is an unsound practice, detection mechanisms don’t exist ● if memory has been overwritten, how does one continue? ● fail-closed Justifying Fail-Closed ● user becomes aware of bug (painful but preferable to only attacker knowing) ● “detects-and-terminates” execution before control-flow creates further mess and less useful bug report ● user files bug reports ● programmer fixes bug => best current practice for building software We fix bugs only after we learn of them 17 years of mitigation work (word cloud of mitigation techniques, completed and not) ● cause “weird” operations to fail-closed (i.e. crash immediately) Features of mitigations ● reduce effectiveness of some attack method ● low overhead ● easy to understand ● easy to apply to old and new code ● one mitigation doesn’t need to fix all problems ● expose bugs earlier - improve triage Components attackers use ● knowledge ○ bugs ○ location of objects (absolute and relative locations) ○ gadgets, constants, pointers, register values ● mechanisms ○ ROP ○ code reuse ○ syscalls ● act upon objects ○ filesystem ○ fd
  • 2. ○ leftovers on stack Knowledge: API, ABI and beneath ● Details of ABI and implementation sneak upwards, providing attackers with data to use during attack ● details left on stack and in registers, long enough for attackers to use ABI + implementation leakage ● { int i; void *p = &i;} If this code crashes, can find return address based upon the register p is stored in. details well-known, de-facto standardized and exposed. Knowledge: stack, register leaks ● attackers run same binaries as you, in same environment ○ ROP operates on these ● with a crash, attacker know regs and stack values ● just need a way to pivot to control Attacker Tooling: ROP ● hijack instruction sequences using false return frames ● gadget: small seq of reg memory transfers above a true function ret instruction ● attackers needs to know location of gadgets, addr of stack ● other methods: JOP, SROP etc Even Scarier: BROP (Blind ROP) ● addr space oracle ● repeated probes against reused addr-space learns enough to perform minimum ROP operations ● can discover (and bypass) some mitigations ● see paper for details Stack protector example ● attacker needs to know: ○ location of stack ○ ordering of stack objs ○ call frame ordering (in-args, savepc, savefp, locals) ● stack protector only disrupts the simplest attack methods ASLR effect? ● attacker needs to know: ○ abs integer values ○ rel addr (offsets) ○ abs addr (pointers) ○ to 3 places: code, data, stack ● ASLR increases difficulty of attack Costs - time for discussion ● Not all mitigations will be cost free ● Processors have gotten faster ○ e.g. Intel improving instruction scheduling before function return ● What percentage of performance would you willingly spend on security? ● Most mitigations are reimplementing of an existing mechanism, just more strictly Shared library improvements ● progressive improvements - old GOT & PLTs were writable! ● secure PLT ● no more relocs ● RELRO ● kbind() ○ only kernel can modify PLT ● DT_BIND_NOW ○ can even unmap ld.so if no more dynamic bindings are required (Took 30 years to add layers of strictness to basic dynamic linking idea) Malloc hardening ● OpenBSD malloc hardened in 20+ ways
  • 3. ● randomness, object rotation, metadata protection, double free & use-after-free detection, heap overflow detection ● half of hardening features enabled by default Pledge: POSIX subsets ● No subtle behavior changes ● No error returns ● fails-closed ● illegal operations crash ● easy to learn How does pledge help? ● 2nd spec by programmers, directly in the program ● no behavior changes, only used to detect violations ● 2nd spec also useful to programmers as debug tool Privilege Separation + Pledge ● Pledge enforces the separation Common ideas behind mitigation ● reduce discoverable knowledge ● improve historical weakness of permission models ● disrupt non standard control flows ● education of privilege separation during program design ● reduce syscall availability during execution Mitigations change details not specified in standards ● harm current attack methods and help us debug code Resistance against mitigations ● some await language/compiler advances to save us ○ e.g. control flow integrity in hardware and software ● some prefer long-term binary compatibility over security ● some business models require ignoring security ● “X-will-save -us” -> “X-fail-to-compile perl”- > ... ● NIH syndrome Limiting choice is related to safety (photo of traffic jam at intersection in Vietnam) (slowing down is a way to achieve safety) Safety systems innovations are crucial ● old solutions may not match modern needs ● don’t get tied down by back compat ● innovation crucial ● don’t sleep on shoulders of giants Q&A ● Could hardware manufacturers help? (e.g. CFI) A: would be great but haven’t seen anything that’d really work. ○ Always wanted an instruction that stores random values in registers or memory really cheaply. For stopping info leaks. ○ Mark cache as “may not be read unless written to before” ○ ROP gadgets create reads and writes to memory as artifacts, could detect these and stop them Postel’s maxim is dangerous ● IETF: draft-thomson-postel-was-wrong-02.txt ● similar problem with ABI + below, which benefits attackers ● POSIX standard is too liberal ● POSIX implementations are full of historical standard behaviours which attackers rely upon