SlideShare a Scribd company logo
Securing a web app: business
security VS the OWASP top 10
By Jean-Baptiste Aviat
LONDON 18-19 OCT 2018
Who am I?
Jean-Baptiste Aviat
CTO & CO-FOUNDER OF SQREEN.IO
EX APPLE RED TEAM
Email jb@sqreen.io
Twitter @JbAviat
2000’s
Code
Frame-
works
Frameworks
Code
2010’s
5
2020’s
What is an attack
against business logic?
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
WAF
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
How to do it in practice?
def track(event_name)
Let’s define a function
function generate_user_token(user_id) {
...
track(‘user_token’)
}
function reset_password(email) {
...
track(‘reset_password’)
}
1
2
3
4
1
2
3
4
function login(email, password) {
...
track(‘login’)
}
1
2
3
4
Event Stream
Event Stream
Processing
& analysis
Event Stream
Processing
& analysis
Response
if (rate(user_token_gen) is unusual) {
 respond: lock_user_account
 alert: send_webhook
}
1
2
3
4
if (count(user_impersonation) is above 10 over last 1 minute) {
 respond: raise_exception, block_ip in reverse proxy
 alert: call_pager
}
1
2
3
4
Application Performance Monitoring
How to do this
at scale?
1
2
4AUTHENTICATE
5 6
1
2
HOOK 4
5 6
AUTHENTICATE
1
2
HOOK 4
5 6
AUTHENTICATE
Dynamic?
23
def override_instance_method(klass_name, meth, hook)
saved_meth_name = "#{meth}_saved"
new_method = "#{meth}_modified".to_sym
klass_name.class_eval do
alias_method saved_meth_name, meth
define_method(new_method, hook)
end
alias_method meth, new_method
end
1
2
3
4
5
6
7
8
9
10
11
12
In Ruby
24
Class<?> dynamicType = new ByteBuddy()
.subclass(Object.class)
.method(ElementMatchers.named("toString"))
.intercept(FixedValue.value("Hello World!"))
.make()
.load(getClass().getClassLoader())
.getLoaded();
1
2
3
4
5
6
7
In Java
Retrieve all the
context you need
• Authenticated user
• Custom business information
• Custom code / framework information
• Any HTTP value
• Previous service called
• Spanning information
26
Architecting for
performance
[
{
"class": "User",
"method": "token_generation",
"event_name": "user_token_generation",
"custom_properties": {
"impersonated": "@impersonated"
}
},
{
"class": "User",
"method": "impersonation",
"event_name": "user_impersonation"
}
]
instrumentation.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
How could
this work?
Analyze
• The volume of calls
• The successive actions performed by a
given user (or IP)
• Detect unusual activity
• Anomalies in volume, proportions
• Check logic flows
• Deny access to sensitive
functions
• Deny access to a whole
service
• Set account “read only”
• Lock a user account
• Log a user out
• Trigger a pager
• Fire a webhook
• Create a ticket
• …
Respond
30
Case Study
Facebook Hack
View as
Video uploader
User Token Management
How to solve it
Record business logic
actions (down to the code)
Define rules to detect a
vulnerability exploitation
Trigger security responses
to be applied
(a)Impersonate a user
(b) Generate a token
User is calling (impersonation) too much OR

user is calling (generate_token) too much
Lock the user AND
Tag the user for review
33
DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10
Event Stream
Processing
& analysis
Respond:
Lock UserView as
Video uploader
User Token Management
instru-
mentation
.json
https://github.com/sqreen/BusinessLogicAttacksPOC
Example Open Source Project
Questions?
Thank You!
LONDON 18-19 OCT 2018

More Related Content

PDF
Revealing Unique MitB Builder C&C Server
PDF
Threat hunting O365
PDF
[OPD 2019] Threat modeling at scale
PPT
PHPUG Presentation
PPTX
2022 APIsecure_Method for exploiting IDOR on nodejs+mongodb based backend
PDF
Security threat analysis points for enterprise with oss
PDF
Securing MicroServices - ConFoo 2017
PDF
Logging and observability
Revealing Unique MitB Builder C&C Server
Threat hunting O365
[OPD 2019] Threat modeling at scale
PHPUG Presentation
2022 APIsecure_Method for exploiting IDOR on nodejs+mongodb based backend
Security threat analysis points for enterprise with oss
Securing MicroServices - ConFoo 2017
Logging and observability

Similar to DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10 (20)

PDF
How to secure and manage modern IT - Ondrej Vysek
PDF
Metrics-Driven Engineering
PDF
BSidesLV 2016: Don't Repeat Yourself - Automating Malware Incident Response f...
PPTX
Budapest Spark Meetup - Apache Spark @enbrite.ly
PDF
Un-broken logging - the foundation of software operability - Operability.io -...
PDF
Un-broken Logging - Operability.io 2015 - Matthew Skelton
DOCX
DE REPORT ON CAPTCHA CODE FOR CSE B.TECH STUDENTS
PDF
[@IndeedEng] Logrepo: Enabling Data-Driven Decisions
PDF
fundamentalsofeventdrivenmicroservices11728489736099.pdf
PPTX
What is going on - Application diagnostics on Azure - TechDays Finland
PPTX
September Patch Tuesday Analysis 2018
PDF
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
PDF
Overcoming the Challenges of Experimentation on a Service Oriented Architecture
PDF
Architecting Azure (I)IoT Solutions @ IoT Saturday 2019
PPT
Web security leeds sharp dot netnotts
PDF
Web Application Security in Rails
PPT
Web Application Hacking
PDF
Evolving your Data Access with MongoDB Stitch
PPTX
Practical Secure Coding Workshop - {DECIPHER} Hackathon
PDF
A little bit about code injection in WebApplication Frameworks (CVE-2018-1466...
How to secure and manage modern IT - Ondrej Vysek
Metrics-Driven Engineering
BSidesLV 2016: Don't Repeat Yourself - Automating Malware Incident Response f...
Budapest Spark Meetup - Apache Spark @enbrite.ly
Un-broken logging - the foundation of software operability - Operability.io -...
Un-broken Logging - Operability.io 2015 - Matthew Skelton
DE REPORT ON CAPTCHA CODE FOR CSE B.TECH STUDENTS
[@IndeedEng] Logrepo: Enabling Data-Driven Decisions
fundamentalsofeventdrivenmicroservices11728489736099.pdf
What is going on - Application diagnostics on Azure - TechDays Finland
September Patch Tuesday Analysis 2018
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
Overcoming the Challenges of Experimentation on a Service Oriented Architecture
Architecting Azure (I)IoT Solutions @ IoT Saturday 2019
Web security leeds sharp dot netnotts
Web Application Security in Rails
Web Application Hacking
Evolving your Data Access with MongoDB Stitch
Practical Secure Coding Workshop - {DECIPHER} Hackathon
A little bit about code injection in WebApplication Frameworks (CVE-2018-1466...
Ad

More from DevSecCon (20)

PDF
DevSecCon London 2019: Workshop: Cloud Agnostic Security Testing with Scout S...
PDF
DevSecCon London 2019: Are Open Source Developers Security’s New Front Line?
PDF
DevSecCon London 2019: How to Secure OpenShift Environments and What Happens ...
PDF
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
PPTX
DevSecCon Seattle 2019: Containerizing IT Security Knowledge
PPTX
DevSecCon Seattle 2019: Decentralized Authorization - Implementing Fine Grain...
PPTX
DevSecCon Seattle 2019: Liquid Software as the real solution for the Sec in D...
PPTX
DevSecCon Seattle 2019: Fully Automated production deployments with HIPAA/HIT...
PDF
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
PPTX
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
PDF
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
PDF
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
PDF
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
PDF
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
PDF
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
PDF
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
PDF
DevSecCon Singapore 2019: Preventative Security for Kubernetes
PPTX
DevSecCon London 2018: Is your supply chain your achille's heel
PPTX
DevSecCon London 2018: Get rid of these TLS certificates
PDF
DevSecCon London 2018: Open DevSecOps
DevSecCon London 2019: Workshop: Cloud Agnostic Security Testing with Scout S...
DevSecCon London 2019: Are Open Source Developers Security’s New Front Line?
DevSecCon London 2019: How to Secure OpenShift Environments and What Happens ...
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon Seattle 2019: Containerizing IT Security Knowledge
DevSecCon Seattle 2019: Decentralized Authorization - Implementing Fine Grain...
DevSecCon Seattle 2019: Liquid Software as the real solution for the Sec in D...
DevSecCon Seattle 2019: Fully Automated production deployments with HIPAA/HIT...
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon London 2018: Get rid of these TLS certificates
DevSecCon London 2018: Open DevSecOps
Ad

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
August Patch Tuesday
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Modernising the Digital Integration Hub
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
STKI Israel Market Study 2025 version august
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Tartificialntelligence_presentation.pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
Zenith AI: Advanced Artificial Intelligence
Programs and apps: productivity, graphics, security and other tools
Web App vs Mobile App What Should You Build First.pdf
August Patch Tuesday
O2C Customer Invoices to Receipt V15A.pptx
A comparative study of natural language inference in Swahili using monolingua...
DP Operators-handbook-extract for the Mautical Institute
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Chapter 5: Probability Theory and Statistics
Modernising the Digital Integration Hub
WOOl fibre morphology and structure.pdf for textiles
NewMind AI Weekly Chronicles – August ’25 Week III
STKI Israel Market Study 2025 version august
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Tartificialntelligence_presentation.pptx
observCloud-Native Containerability and monitoring.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network

DevSecCon London 2018: Securing a web app: business security VS the OWASP top 10