SlideShare una empresa de Scribd logo
1 de 52
Descargar para leer sin conexión
Bil Corry
Control-Flow Integrity
http://research.microsoft.com/pubs/145858/caas-oakland-final.pdf
PayPal
• Collects
Payment
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order ID
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order IDSkips PayPal
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order IDSkips PayPal
Collects
signed
Order ID
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order ID
Attacker
buys low-
cost item
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order ID
Attacker
buys low-
cost item
Attacker
substitutes
High-Cost
Order ID
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order ID
Attacker
buys low-
cost item
Attacker
substitutes
High-Cost
Order ID
Repeat
PayPal
• Collects
Payment
Store
• Session
= PAID
PayPal
• Returns
Buyer to
store
Store
• Signs
Order ID
Store
• Validates
session
and
Order ID
Attacker
buys low-
cost item
Attacker
substitute
s High-
Cost
Order ID
Repeat
Store
verifies
the Order
ID
matches
the
session
PayPal
• Collects
Payment
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAID
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAID
Attacker
buys first
item
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAID
Attacker
copies
token
value
Attacker
buys first
item
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAIDSkips PayPal
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAIDSkips PayPal
Attacker
uses PAID
token
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAIDSkips PayPal
Attacker
uses PAID
token
Repeat
PayPal
• Collects
Payment
Store
• Token =
PAID
PayPal
• Returns
Buyer to
store
Store
• Confirms
token
PAIDSkips PayPal
Attacker
uses PAID
token
Repeat
Store
limits
token to
one time
use
http://web.sec.uni-passau.de/members/bastian/index.php
Framework Survey
CFI Attacks
• Unsolicited Request Sequences
• Compromising Use of the “Back”
Button
• Race Conditions
• HTTP Parameter Manipulation
Unsolicited Request
Sequences
• Follow arbitrary sequence in flow
• Single session
• Cross-session
• Omit steps in flow
Back Button
• Re-do last action
• Follow another path
Race Conditions
• Actions initiated by attacker
simultaneously
• Multi-tab (single session)
• Multi-browser (multiple session)
• (Buy.com example)
Param Manipulation
• Manipulated values
• Predicted values
• Cross-session tampering
• Unexpected input
Root Cause
• Developer expects users to follow
paved path through application
• No enforcement if they don’t
• Sometimes see it show up when a
user bookmarks a deep-link
Enforcing
Control Flow
Integrity
Integration
• Enforcement must be placed in
place where every request passes
through it
• Easiest with MVC-type apps
• Otherwise, called first for each
request
Protection Goals
• Back button support
• Multi-tab support
• Race condition prevention
• Parameter validation
• Omit protection for public pages
• Enforce flow sequence
Back Button Support
• Detect back button was used by
looking at currently requested step
and determining if it was the step
just previous to the last one
Multi-Tab Support
• Implement JavaScript handler
• XHR (aka AJAX) request when
tab open, closed or tab-switch
• Each tab assigned unique tab ID
• Enforce CFI on per-tab basis
Race Condition
Prevention
• Implement lock using session ID
• Lock is for all tabs with same
session ID
• Lock is for specific resource
• Other sessions are not affected
• Other resources are not affected
Param Validation
• Define data type and enforce
• Optionally mark as WORM (write
once, read many)
• Blacklist of params to exclude
Omit Protection
• Designate portions of site that
don’t need CFI protection.
Enforce Flow
Sequence
• All flows must be defined
• Page names and corresponding
URLs must be determined
• pg1 = /step1
• pg2 = /step1?tos=1
Flow Sequence
Language
• flow1 -> flow2
• flow1 -> (flow2 | flow3)
• ?flow1 (allow back button)
• !flow1 (enable race protection)
• @flow1 (repeatable step)
Flow Sequence
Example
• Buyer adds items to cart
• Buyer navigates to checkout and
is presented with totoal
• Buyer opens another tab, adds
more items to shopping cart
• Buyer returns to payment tab and
pays
Flow Sequence
Example
Checkout.logIn
-> Payment.chooseMethod
-> Payment.validateStatus
-> Checkout.completeOrder
Performance
Thank You!

Más contenido relacionado

Similar a Control-Flow Integrity

Super simple application security with Apache Shiro
Super simple application security with Apache ShiroSuper simple application security with Apache Shiro
Super simple application security with Apache ShiroMarakana Inc.
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJSrobertjd
 
«How to start in web application penetration testing» by Maxim Dzhalamaga
«How to start in web application penetration testing» by Maxim Dzhalamaga «How to start in web application penetration testing» by Maxim Dzhalamaga
«How to start in web application penetration testing» by Maxim Dzhalamaga 0xdec0de
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationSam Bowne
 
CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management Sam Bowne
 
Raising money for a Tech Startup
Raising money for a Tech StartupRaising money for a Tech Startup
Raising money for a Tech StartupKyle Redinger
 
Code your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnCode your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnDan Rinzel
 
Rest API Security
Rest API SecurityRest API Security
Rest API SecurityStormpath
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoLiam Cleary [MVP]
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guideihji
 
How to get full power from WebApi
How to get full power from WebApiHow to get full power from WebApi
How to get full power from WebApiRaffaele Rialdi
 
CNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking AuthenticationCNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking AuthenticationSam Bowne
 
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfBrute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfLior Rotkovitch
 
CNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationSam Bowne
 

Similar a Control-Flow Integrity (20)

Super simple application security with Apache Shiro
Super simple application security with Apache ShiroSuper simple application security with Apache Shiro
Super simple application security with Apache Shiro
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
 
«How to start in web application penetration testing» by Maxim Dzhalamaga
«How to start in web application penetration testing» by Maxim Dzhalamaga «How to start in web application penetration testing» by Maxim Dzhalamaga
«How to start in web application penetration testing» by Maxim Dzhalamaga
 
ppt.pptx
ppt.pptxppt.pptx
ppt.pptx
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking Authentication
 
CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management
 
Raising money for a Tech Startup
Raising money for a Tech StartupRaising money for a Tech Startup
Raising money for a Tech Startup
 
Code your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard LearnCode your Own: Authentication Provider for Blackboard Learn
Code your Own: Authentication Provider for Blackboard Learn
 
Rest API Security
Rest API SecurityRest API Security
Rest API Security
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San Francisco
 
In-App Purchase
In-App PurchaseIn-App Purchase
In-App Purchase
 
Making the most out of CakePHP 2.2
Making the most out of CakePHP 2.2Making the most out of CakePHP 2.2
Making the most out of CakePHP 2.2
 
Secure all things with CBSecurity 3
Secure all things with CBSecurity 3Secure all things with CBSecurity 3
Secure all things with CBSecurity 3
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guide
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
 
Java zone ASVS 2015
Java zone ASVS 2015Java zone ASVS 2015
Java zone ASVS 2015
 
How to get full power from WebApi
How to get full power from WebApiHow to get full power from WebApi
How to get full power from WebApi
 
CNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking AuthenticationCNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking Authentication
 
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfBrute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
 
CNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the Application
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Último (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Control-Flow Integrity