SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
Enhancing API
Security with
Runtime
Secrets &
Attestation
PRESENTED BY: Ted Miracco
2
Ted: Defense Electronics -> RF/Microwave CAE -> Electronic Design
Automation -> Anti-Piracy Technology -> Mobile App & API Security
Skip: Chip Design -> Reconfigurable Computing -> HW/SW ->
Embedded & Crypto Acceleration -> Mobile and API Security
approov.io
tedmiracco skiphovsmith
3
Outline
● Mobile Attack Surfaces
● Hiding API Secrets in App
● Moving Secrets Off Device
● App Attestation
● Summary & Next Steps
4
5 Mobile Attack Surfaces
● Attackers can use their
devices, emulators,
environments
for reconnaissance
● Better reconnaissance,
the more profitable
attacks
5
Danger - Hardcoded API Keys
● In the Headlines…
○ Automotive
○ Retail
○ Fintech
6
Attack: Static Analysis
● Search for high-entropy strings
● Use static analysis tools like
MobSF, JADX, AndroGuard
● Keys could be constants,
resources, or inside NDK
● Surprising how often this yields
results
7
Recently Published “Secrets Report”
● Looked at the top 200
Financial Apps - Sensor Tower
● Downloaded the APKs
● Performed Static Analysis
○ apk_api_key_extractor
○ Git Leaks
○ Trufflehog
● Categorized the Findings
● Grouped the Results by
Application Type and Country
8
Key Findings
9
Report Findings - By Country
1
0
Findings by Industry
Secrets
Hide &
Seek
1
2
Initial Defense: Obfuscation
● Obscure hardcoded secrets,
program flow, and security
code
● Use R8, ProGuard, or others
● Trade obscurity vs run time cost
● If a secret is valuable enough, it
may be reverse engineered
1
3
Attack: Run in Debugger
● Though secret is hidden in
code, it's still exposed in the
run time, go after it there
● Analyze code flow and call
signatures to identify values
exposed at run time
● Replace key functional blocks
1
4
Defense: Run Time Checking
● Block running in debugger and emulator
● See https://github.com/scottyab/rootbeer,
for simple approach
● Adds more functionality to protect and to
be protected
● Attacks evolve over time, do detection
tools keep pace?
1
5
Defense: Play Integrity
● Stronger form of run time
checking which guards
against rooting, tampering,
and repackaging
● Requires Google Play services
● Time and quotas may limit use
● Note that the verdict is evaluated off device
1
6
Attack: Manipulator in the Middle
● Pivot to the channel
● Manipulator pollutes the
device trust store and spoofs
the service identity.
● Manipulator decrypts and
reads and/or manipulates
credentials and API
calls/responses.
1
7
Defense: Certificate Pinning
● App compares public key
fingerprint of presented and
expected certificates.
● Fingerprint can be specified
statically in the android
manifest file or specified at
networking client
construction.
● Fingerprint is not a secret, but
should be write-protected.
1
8
Attack: Bypass Certificate Pinning
● Add instrumentation frameworks
to hook functions without
tampering
● Objection and Frida can detect
and bypass OkHttp pinning
● With obfuscation, may need to
search for function call signatures
blog.nviso.eu/2019/04/02/circumventing-
ssl-pinning-in-obfuscated-apps-with-
okhttp/
1
9
Defense: Trust On First Use
● On first launch, your app
requests some primary secrets
● Primary secrets no longer
hardcoded but are placed
in secure storage
● Primary secrets may be used to decrypt other hard coded
secrets
● Assumes app & channel are initially trustworthy and
storage is safe
Store secrets in secure storage
On first launch, request secrets
2
0
Defense: Harden Channel
● Use short-lived JWT Tokens
○ Use API secret to sign JWTs
○ Secret not exposed in channel
● Sign or encrypt API messages
○ Increases anti-tampering or
confidentiality
○ Requires more secrets, time, and
functionality
Moving
Secrets Off
Device
2
2
Hide & Seek Observations
Upsides
● Loading secrets remotely (TOFU) avoids
hardcoding them
● Play Integrity evaluates verdicts off app
● JWTs do not directly expose secrets in the
channel
Downsides
● TOFU requires blind trust
● More protection capabilities mean more
secrets and more functionality to hide
● Frequent code updates are required as
attacks evolve
2
3
Design Objectives
● Keep no secrets in app at rest
(in code or storage)
● Minimize amount of security
functionality in app
○ Measure app and run-time
environment
○ Make security decisions off app
● Provide live updates to both secrets
and security
2
4
Proposed Architecture
Protocol: Request - Measurement - Verdict - API Call - Validation
2
5
Making a 1st Party API Call
If app attests as healthy, a properly-signed token is validated by the
1st party recipes service
2
6
Making a 1st Party API Call
If app attests dirty, an improperly-signed token is rejected by the
recipes service
2
7
Changing the Signing Secret
● Ops team changes secret at the service and the gateway.
● Each app’s next attestation is signed with the new secret.
2
8
Making a 3rd Party API Call
● If app attests clean, the 3rd party API key is passed to the SDK.
● The SDK rewrites the API call to use the API key.
2
9
Changing an API Key
● Ops team changes the 3rd party API Key at the service.
● Each app’s next clean attestation returns the updated API key.
3
0
Managing Certificate Pinning
● Ops team changes certificate at the app auth service
● The next attestation updates the certificate, and the SDK generates a
new certificate-pinning client
3
1
Signing a Message
● If app attests clean, the message signing key is passed to the SDK.
● The SDK rewrites the API call after signing the message.
3
2
Updating Security Live
Security Posture
● Changing security posture is simply a
change in how measurements are used to
decide the attestation verdict
● Ops team can change security policies at
the app auth service
● Full measurements are still being reported
Security Enhancements
● Cannot update dex code of the app, but
can reconfigure the measurement service
inside the SDK after a clean attestation
Summary
and Next
Steps
3
4
Mobile Application Security
Verification Standard
● Impede Dynamic Analysis and Tampering
○ All detections can be split into measurements and verdicts
○ Detection and response are separated and further protected by
on/off app split (stealthy)
● Device Binding
○ Unique IDs enable different security policies per device and app
● Impede Comprehension
○ Small footprint SDK and auth channel can be rigorously shielded
○ Other portions of an app can be independently obfuscated
● Impede Eavesdropping
○ Certificate pinning and message encryption can be managed off
device
Resilience is strengthened by having secrets never at rest,
splitting measurement from verdict, and live updating:
3
5
API Secrets Exposed
● 23% Financial Applications
Immediately Revealed Secrets
● Code Obfuscation Ineffective
○ 93% with Obfuscation
○ 96% without Obfuscation
● Only 4% Used TLS Certificate
Pinning
● Vulnerabilities exist both at rest
and at runtime
3
6
App Auth as a Service
● Removed secrets in app code
and storage
● Minimized security
vulnerabilities in app by:
○ Measuring conditions in app
○ Deciding security verdicts off app
● Provide live updates to secrets
and security
● Provide live telemetry and
forensics
Thank You
approov.io
ted.miracco@approov.io
skip.hovsmith@approov.io
3
8
Questions
● How expensive is an attestation, and how often should a
running app be re-attested?
● What's the relationship between user authorization and app
attestation/authorization?
● Why is remote attestation better than really strong in-app
self-protection?
3
9
Man-in-the-Middle Attacks
MitM attacks occur when an attacker intercepts or manipulates mobile
device communications to gain access to sensitive information. Apps
were considered protected if pinning is detected in the network config
file and no other red flags are raised. They were rated vulnerable if (1)
user-generated trust anchors were permitted, (2) cleartext traffic its
permitted for non-localhost domains, or (3) Android SDK API level
below 25 is declared in the Android Manifest.

Weitere ähnliche Inhalte

Ähnlich wie APIsecure 2023 - Enhancing API Security with Runtime Secrets & Attestation, Ted Miracco (Approov)

apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...apidays
 
Volodymyr Kimak "Security Tips for Android App"
Volodymyr Kimak "Security Tips for Android App"Volodymyr Kimak "Security Tips for Android App"
Volodymyr Kimak "Security Tips for Android App"Igor Beliaiev
 
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...AppSolid by SEWORKS
 
2018 android-security-udacity-morrison chang
2018 android-security-udacity-morrison chang2018 android-security-udacity-morrison chang
2018 android-security-udacity-morrison changmjchang
 
Internet of Things: Identity & Security with Open Standards
Internet of Things: Identity & Security with Open StandardsInternet of Things: Identity & Security with Open Standards
Internet of Things: Identity & Security with Open StandardsGeorge Fletcher
 
Peeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API SecurityPeeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API SecurityMatt Tesauro
 
Mobile App Security - Best Practices
Mobile App Security - Best PracticesMobile App Security - Best Practices
Mobile App Security - Best PracticesRedBlackTree
 
What It Takes to Build API Integrations
What It Takes to Build API IntegrationsWhat It Takes to Build API Integrations
What It Takes to Build API IntegrationsNordic APIs
 
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker IdentityFederation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker IdentityCA API Management
 
CIS14: Securing the Internet of Things with Open Standards
CIS14: Securing the Internet of Things with Open StandardsCIS14: Securing the Internet of Things with Open Standards
CIS14: Securing the Internet of Things with Open StandardsCloudIDSummit
 
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...Codemotion
 
Mobile api test approach
Mobile api test approachMobile api test approach
Mobile api test approachIndium Software
 
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...Ping Identity
 
Mobile Enterprise Application Platform
Mobile Enterprise Application PlatformMobile Enterprise Application Platform
Mobile Enterprise Application PlatformNugroho Gito
 
Android Application Security
Android Application SecurityAndroid Application Security
Android Application SecurityChong-Kuan Chen
 
Virtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesVirtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesJimmy Attia
 
Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Tomek Cejner
 

Ähnlich wie APIsecure 2023 - Enhancing API Security with Runtime Secrets & Attestation, Ted Miracco (Approov) (20)

apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
apidays London 2023 - Overengineering Weakens your API Security, Dr. David Va...
 
Volodymyr Kimak "Security Tips for Android App"
Volodymyr Kimak "Security Tips for Android App"Volodymyr Kimak "Security Tips for Android App"
Volodymyr Kimak "Security Tips for Android App"
 
How To Fix The Most Critical API Security Risks.pdf
How To Fix The Most Critical API Security Risks.pdfHow To Fix The Most Critical API Security Risks.pdf
How To Fix The Most Critical API Security Risks.pdf
 
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...
Six Strategies for Protecting Mobile Games Against Hackers, Crackers, and Cop...
 
OWASP Mobile Top 10 Deep-Dive
OWASP Mobile Top 10 Deep-DiveOWASP Mobile Top 10 Deep-Dive
OWASP Mobile Top 10 Deep-Dive
 
2018 android-security-udacity-morrison chang
2018 android-security-udacity-morrison chang2018 android-security-udacity-morrison chang
2018 android-security-udacity-morrison chang
 
Owasp masvs spain 17
Owasp masvs spain 17Owasp masvs spain 17
Owasp masvs spain 17
 
Internet of Things: Identity & Security with Open Standards
Internet of Things: Identity & Security with Open StandardsInternet of Things: Identity & Security with Open Standards
Internet of Things: Identity & Security with Open Standards
 
Peeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API SecurityPeeling the Onion: Making Sense of the Layers of API Security
Peeling the Onion: Making Sense of the Layers of API Security
 
Mobile App Security - Best Practices
Mobile App Security - Best PracticesMobile App Security - Best Practices
Mobile App Security - Best Practices
 
What It Takes to Build API Integrations
What It Takes to Build API IntegrationsWhat It Takes to Build API Integrations
What It Takes to Build API Integrations
 
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker IdentityFederation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
Federation Evolved: How Cloud, Mobile & APIs Change the Way We Broker Identity
 
CIS14: Securing the Internet of Things with Open Standards
CIS14: Securing the Internet of Things with Open StandardsCIS14: Securing the Internet of Things with Open Standards
CIS14: Securing the Internet of Things with Open Standards
 
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
 
Mobile api test approach
Mobile api test approachMobile api test approach
Mobile api test approach
 
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
Standard Based API Security, Access Control and AI Based Attack - API Days Pa...
 
Mobile Enterprise Application Platform
Mobile Enterprise Application PlatformMobile Enterprise Application Platform
Mobile Enterprise Application Platform
 
Android Application Security
Android Application SecurityAndroid Application Security
Android Application Security
 
Virtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesVirtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best Practices
 
Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.
 

Mehr von apidays

apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...apidays
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOapidays
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...apidays
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...apidays
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...apidays
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...apidays
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...apidays
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...apidays
 

Mehr von apidays (20)

apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
 

Kürzlich hochgeladen

『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 

Kürzlich hochgeladen (20)

『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 

APIsecure 2023 - Enhancing API Security with Runtime Secrets & Attestation, Ted Miracco (Approov)

  • 1. Enhancing API Security with Runtime Secrets & Attestation PRESENTED BY: Ted Miracco
  • 2. 2 Ted: Defense Electronics -> RF/Microwave CAE -> Electronic Design Automation -> Anti-Piracy Technology -> Mobile App & API Security Skip: Chip Design -> Reconfigurable Computing -> HW/SW -> Embedded & Crypto Acceleration -> Mobile and API Security approov.io tedmiracco skiphovsmith
  • 3. 3 Outline ● Mobile Attack Surfaces ● Hiding API Secrets in App ● Moving Secrets Off Device ● App Attestation ● Summary & Next Steps
  • 4. 4 5 Mobile Attack Surfaces ● Attackers can use their devices, emulators, environments for reconnaissance ● Better reconnaissance, the more profitable attacks
  • 5. 5 Danger - Hardcoded API Keys ● In the Headlines… ○ Automotive ○ Retail ○ Fintech
  • 6. 6 Attack: Static Analysis ● Search for high-entropy strings ● Use static analysis tools like MobSF, JADX, AndroGuard ● Keys could be constants, resources, or inside NDK ● Surprising how often this yields results
  • 7. 7 Recently Published “Secrets Report” ● Looked at the top 200 Financial Apps - Sensor Tower ● Downloaded the APKs ● Performed Static Analysis ○ apk_api_key_extractor ○ Git Leaks ○ Trufflehog ● Categorized the Findings ● Grouped the Results by Application Type and Country
  • 9. 9 Report Findings - By Country
  • 12. 1 2 Initial Defense: Obfuscation ● Obscure hardcoded secrets, program flow, and security code ● Use R8, ProGuard, or others ● Trade obscurity vs run time cost ● If a secret is valuable enough, it may be reverse engineered
  • 13. 1 3 Attack: Run in Debugger ● Though secret is hidden in code, it's still exposed in the run time, go after it there ● Analyze code flow and call signatures to identify values exposed at run time ● Replace key functional blocks
  • 14. 1 4 Defense: Run Time Checking ● Block running in debugger and emulator ● See https://github.com/scottyab/rootbeer, for simple approach ● Adds more functionality to protect and to be protected ● Attacks evolve over time, do detection tools keep pace?
  • 15. 1 5 Defense: Play Integrity ● Stronger form of run time checking which guards against rooting, tampering, and repackaging ● Requires Google Play services ● Time and quotas may limit use ● Note that the verdict is evaluated off device
  • 16. 1 6 Attack: Manipulator in the Middle ● Pivot to the channel ● Manipulator pollutes the device trust store and spoofs the service identity. ● Manipulator decrypts and reads and/or manipulates credentials and API calls/responses.
  • 17. 1 7 Defense: Certificate Pinning ● App compares public key fingerprint of presented and expected certificates. ● Fingerprint can be specified statically in the android manifest file or specified at networking client construction. ● Fingerprint is not a secret, but should be write-protected.
  • 18. 1 8 Attack: Bypass Certificate Pinning ● Add instrumentation frameworks to hook functions without tampering ● Objection and Frida can detect and bypass OkHttp pinning ● With obfuscation, may need to search for function call signatures blog.nviso.eu/2019/04/02/circumventing- ssl-pinning-in-obfuscated-apps-with- okhttp/
  • 19. 1 9 Defense: Trust On First Use ● On first launch, your app requests some primary secrets ● Primary secrets no longer hardcoded but are placed in secure storage ● Primary secrets may be used to decrypt other hard coded secrets ● Assumes app & channel are initially trustworthy and storage is safe Store secrets in secure storage On first launch, request secrets
  • 20. 2 0 Defense: Harden Channel ● Use short-lived JWT Tokens ○ Use API secret to sign JWTs ○ Secret not exposed in channel ● Sign or encrypt API messages ○ Increases anti-tampering or confidentiality ○ Requires more secrets, time, and functionality
  • 22. 2 2 Hide & Seek Observations Upsides ● Loading secrets remotely (TOFU) avoids hardcoding them ● Play Integrity evaluates verdicts off app ● JWTs do not directly expose secrets in the channel Downsides ● TOFU requires blind trust ● More protection capabilities mean more secrets and more functionality to hide ● Frequent code updates are required as attacks evolve
  • 23. 2 3 Design Objectives ● Keep no secrets in app at rest (in code or storage) ● Minimize amount of security functionality in app ○ Measure app and run-time environment ○ Make security decisions off app ● Provide live updates to both secrets and security
  • 24. 2 4 Proposed Architecture Protocol: Request - Measurement - Verdict - API Call - Validation
  • 25. 2 5 Making a 1st Party API Call If app attests as healthy, a properly-signed token is validated by the 1st party recipes service
  • 26. 2 6 Making a 1st Party API Call If app attests dirty, an improperly-signed token is rejected by the recipes service
  • 27. 2 7 Changing the Signing Secret ● Ops team changes secret at the service and the gateway. ● Each app’s next attestation is signed with the new secret.
  • 28. 2 8 Making a 3rd Party API Call ● If app attests clean, the 3rd party API key is passed to the SDK. ● The SDK rewrites the API call to use the API key.
  • 29. 2 9 Changing an API Key ● Ops team changes the 3rd party API Key at the service. ● Each app’s next clean attestation returns the updated API key.
  • 30. 3 0 Managing Certificate Pinning ● Ops team changes certificate at the app auth service ● The next attestation updates the certificate, and the SDK generates a new certificate-pinning client
  • 31. 3 1 Signing a Message ● If app attests clean, the message signing key is passed to the SDK. ● The SDK rewrites the API call after signing the message.
  • 32. 3 2 Updating Security Live Security Posture ● Changing security posture is simply a change in how measurements are used to decide the attestation verdict ● Ops team can change security policies at the app auth service ● Full measurements are still being reported Security Enhancements ● Cannot update dex code of the app, but can reconfigure the measurement service inside the SDK after a clean attestation
  • 34. 3 4 Mobile Application Security Verification Standard ● Impede Dynamic Analysis and Tampering ○ All detections can be split into measurements and verdicts ○ Detection and response are separated and further protected by on/off app split (stealthy) ● Device Binding ○ Unique IDs enable different security policies per device and app ● Impede Comprehension ○ Small footprint SDK and auth channel can be rigorously shielded ○ Other portions of an app can be independently obfuscated ● Impede Eavesdropping ○ Certificate pinning and message encryption can be managed off device Resilience is strengthened by having secrets never at rest, splitting measurement from verdict, and live updating:
  • 35. 3 5 API Secrets Exposed ● 23% Financial Applications Immediately Revealed Secrets ● Code Obfuscation Ineffective ○ 93% with Obfuscation ○ 96% without Obfuscation ● Only 4% Used TLS Certificate Pinning ● Vulnerabilities exist both at rest and at runtime
  • 36. 3 6 App Auth as a Service ● Removed secrets in app code and storage ● Minimized security vulnerabilities in app by: ○ Measuring conditions in app ○ Deciding security verdicts off app ● Provide live updates to secrets and security ● Provide live telemetry and forensics
  • 38. 3 8 Questions ● How expensive is an attestation, and how often should a running app be re-attested? ● What's the relationship between user authorization and app attestation/authorization? ● Why is remote attestation better than really strong in-app self-protection?
  • 39. 3 9 Man-in-the-Middle Attacks MitM attacks occur when an attacker intercepts or manipulates mobile device communications to gain access to sensitive information. Apps were considered protected if pinning is detected in the network config file and no other red flags are raised. They were rated vulnerable if (1) user-generated trust anchors were permitted, (2) cleartext traffic its permitted for non-localhost domains, or (3) Android SDK API level below 25 is declared in the Android Manifest.