SlideShare a Scribd company logo
BDD Mobile security testing with OWASP MASVS,
OWASP MSTG and Calabash
About Me
• #whoami
• Davide Cioccia
• Security Engineer @ ING Bank NL
• Italian leaving in the NL
• +7 years security experience
• Security magazines and OWASP MSTG contributor
• Focus:
– Mobile application security
– SSDLC
– PT & VA
– Incident Response
• Agile Way of Working
• CICD
Requirements Design Code Build Test Release Deploy Operate
Agile Development
Continuous Integration
Continuous Delivery
Continuous Deployment
DevOps
• Security challenges
• Technical:
• Provide security at the DevOps speed
• Detect vulnerabilities in early stage
• Have developers understand security
• Have Pentesters focus on “serious” stuff
• Business
• Lower cost to fix
• Lower time to fix
• Lower time for testing
• Lower time to market
• Manual vs Automation
• Automate the testing: the biggest problem
• Solution: BDD Testing
Describe the behavior
of your software
in a very understandable
language
• Solution: BDD Testing with Cucumber and
Gherkin
• Automated
• Understandable by all the stakeholders
• It fits in the workflow of CI/CD
• BDD Testing
Business facing
Technology
facing
• BDD security tests
• Different frameworks available in the market
• Usage of PT tools, such as Nessus, ZAP, Burp etc
• Focused on server side testing (API, Web
Services..)
• Mobile BDD security tests?
• Mobile BDD security tests?
• Main problems
– different Operating Systems
– client side testing
– different apps (native, hybrid,web)
– different security controls
– different way of testing (iOS, Android, Windows
Phone)
How to fix these problems?
• We need a security standard for Mobile
Testing
• We need a process
Requirements Design Code Build Test Release
Security Requirements
Threat modeling
(abuse case generation)
Threat based security
controls & test specification
Implement BDD
standardized security tests
Implement BDD
application specific
security tests
Test against acceptance
environment
MSTG Test cases
MASVS Checklist
Manual PT
Identify the flaw
Patch the flaw
• We need a tool
• Cross platform (Android, iOS), we just cut Windows Phone off right?
• Support for hybrid apps
• Running on emulators
• Running on real devices
• Possibility to integrate it in the CI/CD
• Support for Gherkin syntax
• A lot of customization
• Free! (We like that :D)
• And the winner is …
calaba.sh
• Calabash
• Calabash
• Integration with with other mobile security
frameworks
• Pentest frameworks for Android and iOS
• Automate manual activities
• scriptable
• the agent must run on the device
– Powered by MWRlab
Let’s try it out
https://github.com/dineshshetty/Android-InsecureBankv2
• UC1: sensitive information in
log file (standard test)
– Requirements
1. Logs must not contain usernames
2. Logs must not contain passwords
3. Logs must not contain information related to
the user
4. Logs must not disclose sensitive information
MASVS V2 - Data Storage and Privacy
MSTG 2.1: Sensitive information in log files
• What’s wrong here?
• What’s wrong here?
• Use case 1: sensitive information in log file
– Feature
• Use case 1: sensitive information in log file
– Feature
• Use case 1: sensitive information in log file
– Step
• Similar tests implemented
• Sensitive data in the clipboard
▪ adb shell su <uid> service call
clipboard 2 s16 <package_name>
• Sensitive data in keyboard cache
▪ query
/data/data/com.android.providers.user
dictionary/databases/user_dict.db
• Use case 2: Internal activities must not be
exported
– Requirements
1. The only exported activity must be the login
2. Internal activities should have the flag exported set to false
MASVS:
V6 - Platform Interaction
V4 - Authentication and Session Management
• Use case 2: Internal activities must not be
exported
– Feature
• Use case 2: Internal activities must not be
exported
– Step without Drozer
• Use case 2: Internal activities must not be
exported
– Step with Drozer
• Use case 3: JavaScript in WebView must be
disabled
– Requirements
1. The Webview must not execute JavaScript code
2. If an input is reflected in the WebView it must be sanitized
MASVS V6: Platform interaction
MSTG:
V6.5: JavaScript is disabled in WebViews unless explicitly required.
• Use case 3: JavaScript in WebView must be
disabled
– Feature
• Use case 3: JavaScript in WebView must be
disabled
<HMTL />
loadsave
• Use case 3: JavaScript in WebView must be
disabled
– Step
• Provided by calabash
• Checks if an alert box is executed and contains the text
specified
• Use case 4: Content provider information
disclosure
– Requirements
1. Content Providers must not expose sensitive information
2. Content Providers must not be exported if there are no other apps
from the same developer
3. Content Providers must use android:export = false instead of
android:export = true
MASVS V6: Platform Interaction
MSTG: Testing Platform Interaction on Android
• Use case 4: Content provider information
disclosure
– Feature
• Use case 4: Content provider information
disclosure
– Feature
• Use case 4: Content provider information
disclosure
– Step
Other tests implemented:
• Exploit Broadcast Receivers
• Intent Sniffing
• Sensitive information in Pasteboard
• More…
• Integration with CI/CD (Jenkins)
– Android emulator plugin
– Add Gemfile to your workspace
– Shell script
https://azevedorafaela.wordpress.com/2014/10/08/9-steps-to-configure-jenkins-with-calabashcucumber/
Improvements
• Include OWASP ZAP for API test
• Use the ”backdoor” feature to modify the
code at runtime
• ?
DEMO
• Achievements
– Speed
– Quality
– Accuracy
– Scalability
– Maturity
“Trying to speed project schedule by reducing testing
is like trying to lose weight by donating blood”
Klaus Leopold
THANK YOU
Davide Cioccia
email: davide.cioccia@ing.nl
web: davidecioccia.com

More Related Content

What's hot

Maturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High ImpactMaturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High Impact
SBWebinars
 
DevSecOps : an Introduction
DevSecOps : an IntroductionDevSecOps : an Introduction
DevSecOps : an Introduction
Prashanth B. P.
 
How to get the best out of DevSecOps - an operations perspective
How to get the best out of DevSecOps - an operations perspectiveHow to get the best out of DevSecOps - an operations perspective
How to get the best out of DevSecOps - an operations perspective
Colin Domoney
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & Now
Checkmarx
 
DevSecOps reference architectures 2018
DevSecOps reference architectures 2018DevSecOps reference architectures 2018
DevSecOps reference architectures 2018
Sonatype
 
Bug Bounties and The Path to Secure Software by 451 Research
Bug Bounties and The Path to Secure Software by 451 ResearchBug Bounties and The Path to Secure Software by 451 Research
Bug Bounties and The Path to Secure Software by 451 Research
HackerOne
 
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
DevSecCon
 
How Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivityHow Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivity
Ivan Porta
 
Pentest is yesterday, DevSecOps is tomorrow
Pentest is yesterday, DevSecOps is tomorrowPentest is yesterday, DevSecOps is tomorrow
Pentest is yesterday, DevSecOps is tomorrow
Amien Harisen Rosyandino
 
Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1
Mohammed A. Imran
 
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
Agile Testing Alliance
 
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
Sec4dev 2021  - Catch Me If You can : Continuous Delivery vs. Security AssuranceSec4dev 2021  - Catch Me If You can : Continuous Delivery vs. Security Assurance
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
Abdessamad TEMMAR
 
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP IndonesiaStrengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
Mohammed A. Imran
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs
 
All Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of WorkAll Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of Work
Davide Benvegnù
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
ATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App TestingATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App Testing
Agile Testing Alliance
 
Securing the Pipeline
Securing the PipelineSecuring the Pipeline
Securing the Pipeline
Thoughtworks
 
Serverless Security: Doing Security in 100 milliseconds
Serverless Security: Doing Security in 100 millisecondsServerless Security: Doing Security in 100 milliseconds
Serverless Security: Doing Security in 100 milliseconds
James Wickett
 
Hacker Games & DevSecOps
Hacker Games & DevSecOpsHacker Games & DevSecOps
Hacker Games & DevSecOps
lokori
 

What's hot (20)

Maturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High ImpactMaturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High Impact
 
DevSecOps : an Introduction
DevSecOps : an IntroductionDevSecOps : an Introduction
DevSecOps : an Introduction
 
How to get the best out of DevSecOps - an operations perspective
How to get the best out of DevSecOps - an operations perspectiveHow to get the best out of DevSecOps - an operations perspective
How to get the best out of DevSecOps - an operations perspective
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & Now
 
DevSecOps reference architectures 2018
DevSecOps reference architectures 2018DevSecOps reference architectures 2018
DevSecOps reference architectures 2018
 
Bug Bounties and The Path to Secure Software by 451 Research
Bug Bounties and The Path to Secure Software by 451 ResearchBug Bounties and The Path to Secure Software by 451 Research
Bug Bounties and The Path to Secure Software by 451 Research
 
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
DevSecCon Boston 2018: Automated DevSecOps infrastructure deployment: recipes...
 
How Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivityHow Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivity
 
Pentest is yesterday, DevSecOps is tomorrow
Pentest is yesterday, DevSecOps is tomorrowPentest is yesterday, DevSecOps is tomorrow
Pentest is yesterday, DevSecOps is tomorrow
 
Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1
 
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
 
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
Sec4dev 2021  - Catch Me If You can : Continuous Delivery vs. Security AssuranceSec4dev 2021  - Catch Me If You can : Continuous Delivery vs. Security Assurance
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
 
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP IndonesiaStrengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
 
Your Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
 
All Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of WorkAll Around Azure: DevOps with GitHub - Managing the Flow of Work
All Around Azure: DevOps with GitHub - Managing the Flow of Work
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
ATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App TestingATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App Testing
 
Securing the Pipeline
Securing the PipelineSecuring the Pipeline
Securing the Pipeline
 
Serverless Security: Doing Security in 100 milliseconds
Serverless Security: Doing Security in 100 millisecondsServerless Security: Doing Security in 100 milliseconds
Serverless Security: Doing Security in 100 milliseconds
 
Hacker Games & DevSecOps
Hacker Games & DevSecOpsHacker Games & DevSecOps
Hacker Games & DevSecOps
 

Similar to BDD Mobile Security Testing (OWASP AppSec Bucharest 2017)

Cloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For OperationsCloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
VMware Tanzu
 
ProdSec: A Technical Approach
ProdSec: A Technical ApproachProdSec: A Technical Approach
ProdSec: A Technical Approach
Jeremy Brown
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices
Dynatrace
 
Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...
Achim D. Brucker
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
Amazon Web Services
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Matt Tesauro
 
Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT world
Rogue Wave Software
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services
 
Centralized Secure Vault with Dimensions CM
Centralized Secure Vault with Dimensions CMCentralized Secure Vault with Dimensions CM
Centralized Secure Vault with Dimensions CM
Serena Software
 
Fragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your AppFragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your App
Appsecco
 
Vipin qa engineer-3.5+years_exp
Vipin qa engineer-3.5+years_expVipin qa engineer-3.5+years_exp
Vipin qa engineer-3.5+years_exp
Vipin Gupta
 
AppSec in an Agile World
AppSec in an Agile WorldAppSec in an Agile World
AppSec in an Agile World
David Lindner
 
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay BhargavOWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
Abhay Bhargav
 
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
tdc-globalcode
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Márcio Rosa
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
Agile Montréal
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded system
Rogue Wave Software
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
Ambientia
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA
 

Similar to BDD Mobile Security Testing (OWASP AppSec Bucharest 2017) (20)

Cloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For OperationsCloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
 
ProdSec: A Technical Approach
ProdSec: A Technical ApproachProdSec: A Technical Approach
ProdSec: A Technical Approach
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices
 
Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
 
Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT world
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Centralized Secure Vault with Dimensions CM
Centralized Secure Vault with Dimensions CMCentralized Secure Vault with Dimensions CM
Centralized Secure Vault with Dimensions CM
 
Fragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your AppFragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your App
 
Vipin qa engineer-3.5+years_exp
Vipin qa engineer-3.5+years_expVipin qa engineer-3.5+years_exp
Vipin qa engineer-3.5+years_exp
 
AppSec in an Agile World
AppSec in an Agile WorldAppSec in an Agile World
AppSec in an Agile World
 
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay BhargavOWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
 
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded system
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612
 

More from Davide Cioccia

Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetupAvoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Davide Cioccia
 
Attacking and defending GraphQL applications: a hands-on approach
 Attacking and defending GraphQL applications: a hands-on approach Attacking and defending GraphQL applications: a hands-on approach
Attacking and defending GraphQL applications: a hands-on approach
Davide Cioccia
 
DevSecCon Boston2018 - advanced mobile security automation with bdd
DevSecCon Boston2018 - advanced mobile security automation with bddDevSecCon Boston2018 - advanced mobile security automation with bdd
DevSecCon Boston2018 - advanced mobile security automation with bdd
Davide Cioccia
 
Black Hat Europe 2018 Arsenal Tools - Squatm3
Black Hat Europe 2018 Arsenal Tools - Squatm3Black Hat Europe 2018 Arsenal Tools - Squatm3
Black Hat Europe 2018 Arsenal Tools - Squatm3
Davide Cioccia
 
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gatorBH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
Davide Cioccia
 
NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin
Davide Cioccia
 
Inside TorrentLocker (Cryptolocker) Malware C&C Server
Inside TorrentLocker (Cryptolocker) Malware C&C Server Inside TorrentLocker (Cryptolocker) Malware C&C Server
Inside TorrentLocker (Cryptolocker) Malware C&C Server
Davide Cioccia
 
One shot eight banks
One shot eight banksOne shot eight banks
One shot eight banks
Davide Cioccia
 
Windows Mobile 6.5: Client for a multimedia conferencing platform
Windows Mobile 6.5:  Client for a multimedia conferencing platform Windows Mobile 6.5:  Client for a multimedia conferencing platform
Windows Mobile 6.5: Client for a multimedia conferencing platform Davide Cioccia
 
A statistical framework to evaluate the "diversity" impact against Advanced P...
A statistical framework to evaluate the "diversity" impact against Advanced P...A statistical framework to evaluate the "diversity" impact against Advanced P...
A statistical framework to evaluate the "diversity" impact against Advanced P...Davide Cioccia
 

More from Davide Cioccia (10)

Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetupAvoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
Avoiding GraphQL insecurities with OWASP SKF - OWASP HU meetup
 
Attacking and defending GraphQL applications: a hands-on approach
 Attacking and defending GraphQL applications: a hands-on approach Attacking and defending GraphQL applications: a hands-on approach
Attacking and defending GraphQL applications: a hands-on approach
 
DevSecCon Boston2018 - advanced mobile security automation with bdd
DevSecCon Boston2018 - advanced mobile security automation with bddDevSecCon Boston2018 - advanced mobile security automation with bdd
DevSecCon Boston2018 - advanced mobile security automation with bdd
 
Black Hat Europe 2018 Arsenal Tools - Squatm3
Black Hat Europe 2018 Arsenal Tools - Squatm3Black Hat Europe 2018 Arsenal Tools - Squatm3
Black Hat Europe 2018 Arsenal Tools - Squatm3
 
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gatorBH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
BH ASIA 2019 Arsenal Tools - Squatm3 and Squatm3gator
 
NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin
 
Inside TorrentLocker (Cryptolocker) Malware C&C Server
Inside TorrentLocker (Cryptolocker) Malware C&C Server Inside TorrentLocker (Cryptolocker) Malware C&C Server
Inside TorrentLocker (Cryptolocker) Malware C&C Server
 
One shot eight banks
One shot eight banksOne shot eight banks
One shot eight banks
 
Windows Mobile 6.5: Client for a multimedia conferencing platform
Windows Mobile 6.5:  Client for a multimedia conferencing platform Windows Mobile 6.5:  Client for a multimedia conferencing platform
Windows Mobile 6.5: Client for a multimedia conferencing platform
 
A statistical framework to evaluate the "diversity" impact against Advanced P...
A statistical framework to evaluate the "diversity" impact against Advanced P...A statistical framework to evaluate the "diversity" impact against Advanced P...
A statistical framework to evaluate the "diversity" impact against Advanced P...
 

Recently uploaded

UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 

Recently uploaded (20)

UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 

BDD Mobile Security Testing (OWASP AppSec Bucharest 2017)

  • 1. BDD Mobile security testing with OWASP MASVS, OWASP MSTG and Calabash
  • 2. About Me • #whoami • Davide Cioccia • Security Engineer @ ING Bank NL • Italian leaving in the NL • +7 years security experience • Security magazines and OWASP MSTG contributor • Focus: – Mobile application security – SSDLC – PT & VA – Incident Response
  • 3. • Agile Way of Working
  • 4. • CICD Requirements Design Code Build Test Release Deploy Operate Agile Development Continuous Integration Continuous Delivery Continuous Deployment DevOps
  • 5. • Security challenges • Technical: • Provide security at the DevOps speed • Detect vulnerabilities in early stage • Have developers understand security • Have Pentesters focus on “serious” stuff • Business • Lower cost to fix • Lower time to fix • Lower time for testing • Lower time to market
  • 6. • Manual vs Automation
  • 7. • Automate the testing: the biggest problem
  • 8. • Solution: BDD Testing Describe the behavior of your software in a very understandable language
  • 9. • Solution: BDD Testing with Cucumber and Gherkin • Automated • Understandable by all the stakeholders • It fits in the workflow of CI/CD
  • 10. • BDD Testing Business facing Technology facing
  • 11. • BDD security tests • Different frameworks available in the market • Usage of PT tools, such as Nessus, ZAP, Burp etc • Focused on server side testing (API, Web Services..)
  • 12. • Mobile BDD security tests?
  • 13. • Mobile BDD security tests?
  • 14. • Main problems – different Operating Systems – client side testing – different apps (native, hybrid,web) – different security controls – different way of testing (iOS, Android, Windows Phone)
  • 15. How to fix these problems?
  • 16. • We need a security standard for Mobile Testing
  • 17. • We need a process Requirements Design Code Build Test Release Security Requirements Threat modeling (abuse case generation) Threat based security controls & test specification Implement BDD standardized security tests Implement BDD application specific security tests Test against acceptance environment MSTG Test cases MASVS Checklist Manual PT Identify the flaw Patch the flaw
  • 18. • We need a tool • Cross platform (Android, iOS), we just cut Windows Phone off right? • Support for hybrid apps • Running on emulators • Running on real devices • Possibility to integrate it in the CI/CD • Support for Gherkin syntax • A lot of customization • Free! (We like that :D)
  • 19. • And the winner is … calaba.sh
  • 22. • Integration with with other mobile security frameworks • Pentest frameworks for Android and iOS • Automate manual activities • scriptable • the agent must run on the device – Powered by MWRlab
  • 23. Let’s try it out https://github.com/dineshshetty/Android-InsecureBankv2
  • 24. • UC1: sensitive information in log file (standard test) – Requirements 1. Logs must not contain usernames 2. Logs must not contain passwords 3. Logs must not contain information related to the user 4. Logs must not disclose sensitive information MASVS V2 - Data Storage and Privacy MSTG 2.1: Sensitive information in log files
  • 27. • Use case 1: sensitive information in log file – Feature
  • 28. • Use case 1: sensitive information in log file – Feature
  • 29. • Use case 1: sensitive information in log file – Step
  • 30. • Similar tests implemented • Sensitive data in the clipboard ▪ adb shell su <uid> service call clipboard 2 s16 <package_name> • Sensitive data in keyboard cache ▪ query /data/data/com.android.providers.user dictionary/databases/user_dict.db
  • 31. • Use case 2: Internal activities must not be exported – Requirements 1. The only exported activity must be the login 2. Internal activities should have the flag exported set to false MASVS: V6 - Platform Interaction V4 - Authentication and Session Management
  • 32. • Use case 2: Internal activities must not be exported – Feature
  • 33. • Use case 2: Internal activities must not be exported – Step without Drozer
  • 34. • Use case 2: Internal activities must not be exported – Step with Drozer
  • 35. • Use case 3: JavaScript in WebView must be disabled – Requirements 1. The Webview must not execute JavaScript code 2. If an input is reflected in the WebView it must be sanitized MASVS V6: Platform interaction MSTG: V6.5: JavaScript is disabled in WebViews unless explicitly required.
  • 36. • Use case 3: JavaScript in WebView must be disabled – Feature
  • 37. • Use case 3: JavaScript in WebView must be disabled <HMTL /> loadsave
  • 38. • Use case 3: JavaScript in WebView must be disabled – Step • Provided by calabash • Checks if an alert box is executed and contains the text specified
  • 39. • Use case 4: Content provider information disclosure – Requirements 1. Content Providers must not expose sensitive information 2. Content Providers must not be exported if there are no other apps from the same developer 3. Content Providers must use android:export = false instead of android:export = true MASVS V6: Platform Interaction MSTG: Testing Platform Interaction on Android
  • 40. • Use case 4: Content provider information disclosure – Feature
  • 41. • Use case 4: Content provider information disclosure – Feature
  • 42. • Use case 4: Content provider information disclosure – Step
  • 43. Other tests implemented: • Exploit Broadcast Receivers • Intent Sniffing • Sensitive information in Pasteboard • More…
  • 44. • Integration with CI/CD (Jenkins) – Android emulator plugin – Add Gemfile to your workspace – Shell script https://azevedorafaela.wordpress.com/2014/10/08/9-steps-to-configure-jenkins-with-calabashcucumber/
  • 45. Improvements • Include OWASP ZAP for API test • Use the ”backdoor” feature to modify the code at runtime • ?
  • 46. DEMO
  • 47. • Achievements – Speed – Quality – Accuracy – Scalability – Maturity “Trying to speed project schedule by reducing testing is like trying to lose weight by donating blood” Klaus Leopold
  • 48. THANK YOU Davide Cioccia email: davide.cioccia@ing.nl web: davidecioccia.com