SlideShare a Scribd company logo
BRINGING THE HACKER
MINDSET INTO
REQUIREMENTS AND
TESTING
Jason Petry
Eapen Thomas
Nationwide Insurance
AGENDA
ο‚„ How bad is our application security? Why are we so bad at securing our
applications?
ο‚„ An example application: money transferring application
ο‚„ 2 Views of Quality – Producer vs. Consumer
ο‚„ Why are security requirements so hard?
ο‚„ Tools to aid requirements and test analysts
ο‚„ Threat Models
ο‚„ Attack trees
ο‚„ Securing our applications is getting more challenging
ο‚„ Call to action
2
YOUR PERSONAL INFO IS PUBLIC
3Source: Symantec Internet Security Threat Report
ο‚„A New Zero-Day Vulnerability Was Discovered
on Average Each Week in 2015
ο‚„ Advanced attack groups continue to profit from
previously undiscovered flaws in browsers and
website plugins
ο‚„Over Half a Billion Personal Records Were
Stolen or Lost in 2015
ο‚„Major Security Vulnerabilities in Three
Quarters of Popular Websites Put Us All at Risk
ο‚„ Web administrators still struggle to stay current on
patches
MOBILE VULNERABILITIES ARE OFF THE CHART
4Source: Symantec Internet Security Threat Report
ο‚„Android users willingly downloaded over two billion
malicious mobile applications last year
Source: http://www.itproportal.com/2016/02/26/smartphone-users-still-taking-cavalier-approach-mobile-security/
ο‚„Nearly 25 percent of mobile apps contain at least one
high-risk security flaw
ο‚„An average mobile device connects to 160 different IP
addresses daily
ο‚„35 percent of mobile device communications are
unencrypted
ο‚„There is a 50 percent greater chance that games
include a high-risk vulnerability than the average app.
SOME SCARY INDUSTRY NUMBERS
84% of cyber attacks are happening at the application layer
Source: Forbes / SAP (March 2015)
98% of applications scanned by Trustwave harbored one or more security
vulnerabilities. Meanwhile, the median number of vulnerabilities was 20 - up
from six the year prior.
Source: 2015 Trustwave Global Security Report
Exploiting many of these application vulnerabilities is β€œVERY EASY”
5
SECURITY VS FUNCTIONAL RQRMTS & TESTING
ο‚„ Security requirements and testing is different from functional
requirements & testing.
ο‚„ In security testing the goal is to find out if the system can stand up to
abusers. Negative tests are critical.
ο‚„ Security test scenarios may not be realistic from a common user
standpoint . Especially when considering web applications, attackers may
interact with the application in critically different ways compared to
regular users.
ο‚„ Anticipating and planning for these scenarios is vital for security testing
ο‚„ Security requirements and testing requires an adversarial mindset, a
"what if" mindset, i.e., the same one hackers use to break systems.
6
EXAMPLE REQUIREMENT STORY
ο‚„Cyclone Transfers – A Pay-pal like service.
ο‚„β€œAs a logged in customer, I can transfer money, so that I move
money from one of my accounts to another customer’s
account.”
ο‚„Acceptance Criteria:
ο‚„ The amount of money I transfer must be less than the amount of
money available.
ο‚„ All amounts are in US Dollars.
ο‚„ Transfers may be for fractions of a penny.
7
DEMO
8
WHAT IS QUALITY?
What are the two views of Quality?
ο‚„The producer view and the customer view.
ο‚„The producer view of quality: a product is a quality product if it
meets or conforms to the product requirements. This statement is
usually shortened to: quality means meets requirements.
ο‚„The customer view of quality: fit for use; the product or service
meets the customer’s needs regardless of the requirements
9
THE PRODUCER VIEW OF QUALITY
Ok, so, what is the problem?
ο‚„ We don’t have much/any application security requirements (this is an
industry wide problem)
ο‚„ To create good security requirements, the analyst should review
(Organizational requirements, Privacy requirements, statutory requirements
and industry requirements)
ο‚„ Organizational security policies and standards
ο‚„ Org privacy policies
ο‚„ Regulatory requirements (Sarbanes-Oxley, HIPAA etc.)
ο‚„ Other standards such as PCI DSS, ANSI-X9 for banks etc.
ο‚„ What is the solution? The requirements analysts have to be Creative
10
CUSTOMER VIEW OF QUALITY
Let’s now switch to the customer view of quality
Oops! We have a bigger problem!
To the customer, a product is a quality product if it meets the
customer’s needs, regardless of whether the requirements were met.
ο‚„ We have to go beyond requirements (even if we have some security
requirements).
ο‚„ For this, we definitely have to be creative, requires an adversarial
mindset
ο‚„ We talk about some resources from OWASP and other organizations
that can help
11
TESTERS HAVE TO BE CREATIVE
Test analysts should be creative in the absence of good security
requirements:
ο‚„Automated web application security testing tools can help
ο‚„Explore & Discover – Exploratory testing comes handy
ο‚„Use Common Sense & Experience - common knowledge that
comes from experience
ο‚„Discussions, Emails and Meeting Notes
ο‚„Create and review the high level test scenarios with the business
12
OWASP TOP 10
When we talk about web application vulnerabilities, we have to talk about Open Web
Application Security Project (OWASP) Top 10 vulnerabilities.
Please note: this is β€œa” list, not the exhaustive list of all possible web application
vulnerabilities (there are hundreds of them)
13
CURE FOR MOST PROBLEMS: INPUT VALIDATION
Many vulnerabilities are exploited by injecting malicious commands/code through
input forms
TYPE
οƒΌ Always check the data type of the input and make sure it matches the expected data type. For example,
if there is an input box which accepts numeric data and the letter β€˜O’ is typed instead of the number
zero, it should not be accepted.
LENGTH
οƒΌ Always check that the data lies within the acceptable range of lengths for the values expected. For
example, a zip code field will be either 5 or 10 (dashes included) digits in length. If nothing is entered, or
if 11 or more digits are entered, it should not be accepted.
FORMAT
οƒΌ Always check that data is in a specified format. For example, dates should be in a specific format (such
as MM/DD/YYYY). If it is not in the correct format, it should not be accepted.
RANGE
οƒΌ Always check that data lies within a specified range of values. For example, the month of a person’s date
of birth should lie between 1 and 12. If it does not fall within that range, it should not be accepted.
14
THREAT MODELLING
ο‚„β€œThreat modeling is about using models to find security
problems.” – Adam Shostack, Threat Modeling: Designing for
Security
ο‚„β€œComing up with a set of possible attacks you plan to protect
against” – Electronic Frontier Foundation
(https://ssd.eff.org/en/glossary/threat-model)
15
THREAT MODELLING EXAMPLE
May be many Data Flow
Diagrams (DFD’s) for one
application/process, at
varying levels of detail.
THREAT MODELLING
ο‚„Can be done with varying levels of formality, and
with different focuses; method adopted should
be tailored to specific application need.
ο‚„One Common Methodology is Microsoft’s STRIDE model.
ο‚§ Model: decompose the application as a data flow diagram (DFD) to
drive the overall risk analysis process.
ο‚§ Identify: In the next step, threats to the modeled system are
identified and enumerated
ο‚§ Mitigate: After threats have been identified, mitigations to those
threats are selected
ο‚§ Validate: Implement tests to validate threat is mitigated.
Spoofing: Impersonating something or
someone else
Tampering: Modifying data or code
Repudiation: Claiming to have not performed
an action
Information Disclosure: Exposing information
to someone not authorized to see it
Denial of Service: Deny or degrade service to
users
Elevation of Privilege: Gain capabilities
without proper authorization
Steal
someone’s
account
Trick someone
into giving me
money
Enter a
negative
number for a
transfer I make
ATTACK TREES
Get someone
else to give me
money
Fool the system
into giving me
money
Get Funds
Transferred to
me with no
work.
18
NEGATIVE TEST EXAMPLES
ο‚„#1 Test: The Single Quote: '
ο‚„ Helpful to make sure SQL injection attacks have been properly
mitigated against
ο‚„ Also useful for ensuring anti-SQL injection protections properly
deal with single quote characters in user data.
19
EXAMPLE SINGLE QUOTE TEST
ο‚„Cyclone Transfers: Test Procedure
ο‚„ Login
ο‚„ Go to all users.
ο‚„ Use Search function to find abcdef
ο‚„ Use Search function to find O’Brian
ο‚„Expected result: No users found same results for both
ο‚„Actual Result: Error Message in second case.
20
NEGATIVE TEST CASE: HTML CONTENT
ο‚„Another important test case: Allowing entry of HTML input,
and properly displaying the result. (i.e., as text)
ο‚„Cross-Site Scripting is the single most commonly
encountered security issue in web applications.
21
EXAMPLE HTML CONTENT TEST
ο‚„Cyclone Transfers: Test Procedure
ο‚„ Click on Sign In, then Sign Up.
ο‚„ Create new account, in Profile Statement section include following
content: <script>alert(123)</script>
ο‚„ Log in a different user, go to all users and search for newly created
user.
ο‚„Expected Result: Profile Statement is displayed in search
results as typed above.
ο‚„Actual Result: Alert Box Created.
22
NEGATIVE TEST CASE: DIRECT OBJECT ACCESS
ο‚„If URL’s to content are static, ensure that user’s cannot
access other users’ content.
ο‚„Unlike previous two cases, very difficult for multi-purpose
scanner tools to detect and respond; requires knowledge of
the application and data access rules.
23
EXAMPLE DIRECT OBJECT ACCESS
ο‚„Cyclone Transfers: Test Procedures
ο‚„ Create New User, as in last Test
ο‚„ In New User, add account, and upload test PDF as β€œBank
Statement”.
ο‚„ Click on link to uploaded PDF to validate. Create Bookmark to PDF.
ο‚„ Log in a different account, use bookmark to go to PDF
ο‚„ Expected Result: Access should be denied.
ο‚„ Actual Result: PDF Displayed
24
THE RUGGED MANIFESTO
HTTPS://WWW.RUGGEDSOFTWARE.ORG/
I am rugged and, more importantly, my code is rugged.
I recognize that software has become a foundation of our modern world.
I recognize the awesome responsibility that comes with this foundational role.
I recognize that my code will be used in ways I cannot anticipate, in ways it was
not designed, and for longer than it was ever intended.
I recognize that my code will be attacked by talented and persistent adversaries
who threaten our physical, economic and national security.
I recognize these things – and I choose to be rugged.
I am rugged because I refuse to be a source of vulnerability or weakness.
I am rugged because I assure my code will support its mission.
I am rugged because my code can face these challenges and persist in spite of
them.
I am rugged, not because it is easy, but because it is necessary and I am up for the
challenge.
25
THINGS ARE NOT GETTING ANY EASIER
Things are not getting any easier, they are
getting really complicated, very fast
ο‚„ Human beings are still the weakest link
ο‚„ Ballooning attack surface
ο‚„The number of Mobile devices are growing, mobile apps
are getting very functional/complicated
ο‚„Internet of things is making application security more
difficult with the amount of interconnected devices
26
CALL TO ACTION
ο‚„Don’t be left behind, security requirements elicitation &
testing skills are essential, not optional
ο‚„A skill you must have to be competitive/marketable/just to
survive
ο‚„Get trained, get competent in software security
requirements elicitation techniques & security testing
techniques
ο‚„ Resources are lacking
ο‚„ Conferences that cater to analysts, have no tracks or have very few
tracks on application security requirement/testing
27
RESOURCES
ο‚„ OWASP
https://www.owasp.org
ο‚„ OWASP Testing Guide (200+ page PDF document is free to download)
https://www.owasp.org/index.php/OWASP_Testing_Project
ο‚„ OWASP Application Security Verification Standard 3.0
https://www.owasp.org/images/6/67/OWASPApplicationSecurityVerificationStandard3.0.pdf
ο‚„ OWASP Broken Web Application Project
https://www.owasp.org/index.php/OWASP_Broken_Web_Applications_Project
ο‚„ SANS SWAT checklist
https://software-security.sans.org/resources/swat
ο‚„ Microsoft SDL Threat Modeling Tool
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49168
28
THANK YOU!
If you would like to contact us:
Jason Petry (petryj2@nationwide.com)
Eapen Thomas (eapen@nationwide.com)
29

More Related Content

PPTX
Security Testing by Ken De Souza
PDF
Digital transformation continues to drive IT strategy, How is QA and testing ...
PDF
10 Steps To Secure Agile Development
PDF
Webcast Presentation: Accelerate Continuous Delivery with Development Testing...
Β 
PDF
Healthcare application-security-practices-survey-veracode
PDF
Driving Risks Out of Embedded Automotive Software
PDF
Risks in the Software Supply Chain
PPTX
Veracode - InglΓͺs
Security Testing by Ken De Souza
Digital transformation continues to drive IT strategy, How is QA and testing ...
10 Steps To Secure Agile Development
Webcast Presentation: Accelerate Continuous Delivery with Development Testing...
Β 
Healthcare application-security-practices-survey-veracode
Driving Risks Out of Embedded Automotive Software
Risks in the Software Supply Chain
Veracode - InglΓͺs

What's hot (20)

PDF
Software testing lecture notes
PPTX
Application Security Risk Rating
PPTX
Strengthening cyber resilience with Software Supply Chain Visibility
PPTX
Continuous Acceleration with a Software Supply Chain Approach
PDF
EuroSPI 2016 - Software Safety and Security Through Standards
PPTX
Accelerating Innovation with Software Supply Chain Management
PDF
Rx for FDA Software Compliance
PDF
Software Testing Fundamentals
PDF
[Webinar] The Art & Value of Bug Bounty Programs
PPTX
7 Bug Bounty Myths, BUSTED
PDF
Tools & Techniques for Addressing Component Vulnerabilities for PCI Compliance
PPTX
Assess all the things
PDF
Snippets, Scans and Snap Decisions: How Component Identification Methods Impa...
PPTX
Supply Chain Solutions for Modern Software Development
PDF
Solving for Compliance: Mobile app security for banking and financial services
PPTX
Open Source 360 Survey Results
PPTX
3 Reasons to Swap Your Next Pen Test With a Bug Bounty Program
PPTX
A Framework for Developing and Operationalizing Security Use Cases
PDF
Lawyers and Licenses in Open Source-based Development: How to Protect Your So...
PDF
Future Of Software Testing
Software testing lecture notes
Application Security Risk Rating
Strengthening cyber resilience with Software Supply Chain Visibility
Continuous Acceleration with a Software Supply Chain Approach
EuroSPI 2016 - Software Safety and Security Through Standards
Accelerating Innovation with Software Supply Chain Management
Rx for FDA Software Compliance
Software Testing Fundamentals
[Webinar] The Art & Value of Bug Bounty Programs
7 Bug Bounty Myths, BUSTED
Tools & Techniques for Addressing Component Vulnerabilities for PCI Compliance
Assess all the things
Snippets, Scans and Snap Decisions: How Component Identification Methods Impa...
Supply Chain Solutions for Modern Software Development
Solving for Compliance: Mobile app security for banking and financial services
Open Source 360 Survey Results
3 Reasons to Swap Your Next Pen Test With a Bug Bounty Program
A Framework for Developing and Operationalizing Security Use Cases
Lawyers and Licenses in Open Source-based Development: How to Protect Your So...
Future Of Software Testing

Viewers also liked (20)

PPTX
Testing and checking by Newton Olivieri
PDF
What to do with the problems you cannot solve?
Β 
PPTX
Page object from the ground up by Joe Beale
PPTX
Defect Triage by Matt Eakin
PDF
Create testing commandos for creative problem solving!!! by Pradeepa Narayana...
PDF
Curating Your Cukes by Eric Kessler
PPTX
The psychology of testing
PPTX
How to deal with bad requirements of software
PPTX
Put Risk Based Testing in place right now!
Β 
PPTX
Requirements Driven Risk Based Testing
PDF
Improving Test Team Throughput via Architecture by Dustin Williams
PPT
Practical Application Of Risk Based Testing Methods
PPTX
Risk-based Testing
PPTX
risk based testing and regression testing
PDF
Automated Testing: DevOps Enabler by Alan Koch
PDF
Growth Mindset
PDF
Methods for Validating and Testing Software Requirements (lecture slides)
PPTX
Ignite Your Growth V2
PDF
Software Testing without Requirements: Survival Guide
PDF
Think Like A Growth Hacker
Testing and checking by Newton Olivieri
What to do with the problems you cannot solve?
Β 
Page object from the ground up by Joe Beale
Defect Triage by Matt Eakin
Create testing commandos for creative problem solving!!! by Pradeepa Narayana...
Curating Your Cukes by Eric Kessler
The psychology of testing
How to deal with bad requirements of software
Put Risk Based Testing in place right now!
Β 
Requirements Driven Risk Based Testing
Improving Test Team Throughput via Architecture by Dustin Williams
Practical Application Of Risk Based Testing Methods
Risk-based Testing
risk based testing and regression testing
Automated Testing: DevOps Enabler by Alan Koch
Growth Mindset
Methods for Validating and Testing Software Requirements (lecture slides)
Ignite Your Growth V2
Software Testing without Requirements: Survival Guide
Think Like A Growth Hacker

Similar to Bringing the hacker mindset into requirements and testing by Eapen Thomas and Jason Petry (20)

PDF
Insider's Guide to the AppExchange Security Review (Dreamforce 2015)
PPTX
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
PPT
Core.co.enterprise.deck.06.16.10
PPT
Web Application Security Testing
PDF
Top 10 Ways To Win Budget For Application Security - Cenzic.2013.05.22
Β 
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Intelligence on the Intractable Problem of Software Security
PDF
Website Security Statistics Report 2013
PDF
Application Security - Your Success Depends on it
Β 
PDF
Web Application Security Testing Guide | Secure Web Apps
PDF
Research challenges and issues in web security
PDF
ByteCode pentest report example
PDF
COVID-19 free penetration tests by Pentest-Tools.com
PDF
Thick Client Penetration Testing Modern Approaches and Techniques.pdf
PDF
Security overview 2
PDF
Web App Security: Top Threats and How to Protect Your App.pdf
PDF
Ultimate_Guide_to_getting_started_with_AppSec
PDF
Web Application Security - Everything You Should Know
ODP
Mobile Apps Security Testing -1
PDF
ultimate-guide-to-getting-started-with-appsec-veracode
Insider's Guide to the AppExchange Security Review (Dreamforce 2015)
What the New OWASP Top 10 2013 and Latest X-Force Report Mean for App Sec
Core.co.enterprise.deck.06.16.10
Web Application Security Testing
Top 10 Ways To Win Budget For Application Security - Cenzic.2013.05.22
Β 
Mobile App Security Testing_ A Comprehensive Guide.pdf
Intelligence on the Intractable Problem of Software Security
Website Security Statistics Report 2013
Application Security - Your Success Depends on it
Β 
Web Application Security Testing Guide | Secure Web Apps
Research challenges and issues in web security
ByteCode pentest report example
COVID-19 free penetration tests by Pentest-Tools.com
Thick Client Penetration Testing Modern Approaches and Techniques.pdf
Security overview 2
Web App Security: Top Threats and How to Protect Your App.pdf
Ultimate_Guide_to_getting_started_with_AppSec
Web Application Security - Everything You Should Know
Mobile Apps Security Testing -1
ultimate-guide-to-getting-started-with-appsec-veracode

More from QA or the Highway (20)

PDF
KrishnaToolComparisionPPT.pdf
PPTX
Ravi Lakkavalli - World Quality Report.pptx
PPTX
Caleb Crandall - Testing Between the Buckets.pptx
PDF
Thomas Haver - Mobile Testing.pdf
PDF
Thomas Haver - Example Mapping.pdf
PDF
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
PDF
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
PDF
Jeff Sing - Quarterly Service Delivery Reviews.pdf
PDF
Leandro Melendez - Chihuahua Load Tests.pdf
PDF
Rick Clymer - Incident Management.pdf
PPTX
Robert Fornal - ChatGPT as a Testing Tool.pptx
PDF
Federico Toledo - Extra-functional testing.pdf
PPTX
Andrew Knight - Managing the Test Data Nightmare.pptx
PDF
Melissa Tondi - Automation We_re Doing it Wrong.pdf
PDF
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
PPTX
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
PDF
Damian Synadinos - Word Smatter.pdf
PDF
Lee Barnes - What Successful Test Automation is.pdf
PPTX
Jordan Powell - API Testing with Cypress.pptx
PPTX
Carlos Kidman - Exploring AI Applications in Testing.pptx
KrishnaToolComparisionPPT.pdf
Ravi Lakkavalli - World Quality Report.pptx
Caleb Crandall - Testing Between the Buckets.pptx
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Example Mapping.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdf
Leandro Melendez - Chihuahua Load Tests.pdf
Rick Clymer - Incident Management.pdf
Robert Fornal - ChatGPT as a Testing Tool.pptx
Federico Toledo - Extra-functional testing.pdf
Andrew Knight - Managing the Test Data Nightmare.pptx
Melissa Tondi - Automation We_re Doing it Wrong.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
Damian Synadinos - Word Smatter.pdf
Lee Barnes - What Successful Test Automation is.pdf
Jordan Powell - API Testing with Cypress.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptx

Recently uploaded (20)

PPTX
Funds Management Learning Material for Beg
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
DOCX
Unit-3 cyber security network security of internet system
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
artificial intelligence overview of it and more
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
innovation process that make everything different.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Testing WebRTC applications at scale.pdf
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
Introduction to Information and Communication Technology
Funds Management Learning Material for Beg
QR Codes Qr codecodecodecodecocodedecodecode
Unit-3 cyber security network security of internet system
Sims 4 Historia para lo sims 4 para jugar
artificial intelligence overview of it and more
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
522797556-Unit-2-Temperature-measurement-1-1.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
innovation process that make everything different.pptx
WebRTC in SignalWire - troubleshooting media negotiation
Cloud-Scale Log Monitoring _ Datadog.pdf
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
international classification of diseases ICD-10 review PPT.pptx
Testing WebRTC applications at scale.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
presentation_pfe-universite-molay-seltan.pptx
Introduction to Information and Communication Technology

Bringing the hacker mindset into requirements and testing by Eapen Thomas and Jason Petry

  • 1. BRINGING THE HACKER MINDSET INTO REQUIREMENTS AND TESTING Jason Petry Eapen Thomas Nationwide Insurance
  • 2. AGENDA ο‚„ How bad is our application security? Why are we so bad at securing our applications? ο‚„ An example application: money transferring application ο‚„ 2 Views of Quality – Producer vs. Consumer ο‚„ Why are security requirements so hard? ο‚„ Tools to aid requirements and test analysts ο‚„ Threat Models ο‚„ Attack trees ο‚„ Securing our applications is getting more challenging ο‚„ Call to action 2
  • 3. YOUR PERSONAL INFO IS PUBLIC 3Source: Symantec Internet Security Threat Report ο‚„A New Zero-Day Vulnerability Was Discovered on Average Each Week in 2015 ο‚„ Advanced attack groups continue to profit from previously undiscovered flaws in browsers and website plugins ο‚„Over Half a Billion Personal Records Were Stolen or Lost in 2015 ο‚„Major Security Vulnerabilities in Three Quarters of Popular Websites Put Us All at Risk ο‚„ Web administrators still struggle to stay current on patches
  • 4. MOBILE VULNERABILITIES ARE OFF THE CHART 4Source: Symantec Internet Security Threat Report ο‚„Android users willingly downloaded over two billion malicious mobile applications last year Source: http://www.itproportal.com/2016/02/26/smartphone-users-still-taking-cavalier-approach-mobile-security/ ο‚„Nearly 25 percent of mobile apps contain at least one high-risk security flaw ο‚„An average mobile device connects to 160 different IP addresses daily ο‚„35 percent of mobile device communications are unencrypted ο‚„There is a 50 percent greater chance that games include a high-risk vulnerability than the average app.
  • 5. SOME SCARY INDUSTRY NUMBERS 84% of cyber attacks are happening at the application layer Source: Forbes / SAP (March 2015) 98% of applications scanned by Trustwave harbored one or more security vulnerabilities. Meanwhile, the median number of vulnerabilities was 20 - up from six the year prior. Source: 2015 Trustwave Global Security Report Exploiting many of these application vulnerabilities is β€œVERY EASY” 5
  • 6. SECURITY VS FUNCTIONAL RQRMTS & TESTING ο‚„ Security requirements and testing is different from functional requirements & testing. ο‚„ In security testing the goal is to find out if the system can stand up to abusers. Negative tests are critical. ο‚„ Security test scenarios may not be realistic from a common user standpoint . Especially when considering web applications, attackers may interact with the application in critically different ways compared to regular users. ο‚„ Anticipating and planning for these scenarios is vital for security testing ο‚„ Security requirements and testing requires an adversarial mindset, a "what if" mindset, i.e., the same one hackers use to break systems. 6
  • 7. EXAMPLE REQUIREMENT STORY ο‚„Cyclone Transfers – A Pay-pal like service. ο‚„β€œAs a logged in customer, I can transfer money, so that I move money from one of my accounts to another customer’s account.” ο‚„Acceptance Criteria: ο‚„ The amount of money I transfer must be less than the amount of money available. ο‚„ All amounts are in US Dollars. ο‚„ Transfers may be for fractions of a penny. 7
  • 9. WHAT IS QUALITY? What are the two views of Quality? ο‚„The producer view and the customer view. ο‚„The producer view of quality: a product is a quality product if it meets or conforms to the product requirements. This statement is usually shortened to: quality means meets requirements. ο‚„The customer view of quality: fit for use; the product or service meets the customer’s needs regardless of the requirements 9
  • 10. THE PRODUCER VIEW OF QUALITY Ok, so, what is the problem? ο‚„ We don’t have much/any application security requirements (this is an industry wide problem) ο‚„ To create good security requirements, the analyst should review (Organizational requirements, Privacy requirements, statutory requirements and industry requirements) ο‚„ Organizational security policies and standards ο‚„ Org privacy policies ο‚„ Regulatory requirements (Sarbanes-Oxley, HIPAA etc.) ο‚„ Other standards such as PCI DSS, ANSI-X9 for banks etc. ο‚„ What is the solution? The requirements analysts have to be Creative 10
  • 11. CUSTOMER VIEW OF QUALITY Let’s now switch to the customer view of quality Oops! We have a bigger problem! To the customer, a product is a quality product if it meets the customer’s needs, regardless of whether the requirements were met. ο‚„ We have to go beyond requirements (even if we have some security requirements). ο‚„ For this, we definitely have to be creative, requires an adversarial mindset ο‚„ We talk about some resources from OWASP and other organizations that can help 11
  • 12. TESTERS HAVE TO BE CREATIVE Test analysts should be creative in the absence of good security requirements: ο‚„Automated web application security testing tools can help ο‚„Explore & Discover – Exploratory testing comes handy ο‚„Use Common Sense & Experience - common knowledge that comes from experience ο‚„Discussions, Emails and Meeting Notes ο‚„Create and review the high level test scenarios with the business 12
  • 13. OWASP TOP 10 When we talk about web application vulnerabilities, we have to talk about Open Web Application Security Project (OWASP) Top 10 vulnerabilities. Please note: this is β€œa” list, not the exhaustive list of all possible web application vulnerabilities (there are hundreds of them) 13
  • 14. CURE FOR MOST PROBLEMS: INPUT VALIDATION Many vulnerabilities are exploited by injecting malicious commands/code through input forms TYPE οƒΌ Always check the data type of the input and make sure it matches the expected data type. For example, if there is an input box which accepts numeric data and the letter β€˜O’ is typed instead of the number zero, it should not be accepted. LENGTH οƒΌ Always check that the data lies within the acceptable range of lengths for the values expected. For example, a zip code field will be either 5 or 10 (dashes included) digits in length. If nothing is entered, or if 11 or more digits are entered, it should not be accepted. FORMAT οƒΌ Always check that data is in a specified format. For example, dates should be in a specific format (such as MM/DD/YYYY). If it is not in the correct format, it should not be accepted. RANGE οƒΌ Always check that data lies within a specified range of values. For example, the month of a person’s date of birth should lie between 1 and 12. If it does not fall within that range, it should not be accepted. 14
  • 15. THREAT MODELLING ο‚„β€œThreat modeling is about using models to find security problems.” – Adam Shostack, Threat Modeling: Designing for Security ο‚„β€œComing up with a set of possible attacks you plan to protect against” – Electronic Frontier Foundation (https://ssd.eff.org/en/glossary/threat-model) 15
  • 16. THREAT MODELLING EXAMPLE May be many Data Flow Diagrams (DFD’s) for one application/process, at varying levels of detail.
  • 17. THREAT MODELLING ο‚„Can be done with varying levels of formality, and with different focuses; method adopted should be tailored to specific application need. ο‚„One Common Methodology is Microsoft’s STRIDE model. ο‚§ Model: decompose the application as a data flow diagram (DFD) to drive the overall risk analysis process. ο‚§ Identify: In the next step, threats to the modeled system are identified and enumerated ο‚§ Mitigate: After threats have been identified, mitigations to those threats are selected ο‚§ Validate: Implement tests to validate threat is mitigated. Spoofing: Impersonating something or someone else Tampering: Modifying data or code Repudiation: Claiming to have not performed an action Information Disclosure: Exposing information to someone not authorized to see it Denial of Service: Deny or degrade service to users Elevation of Privilege: Gain capabilities without proper authorization
  • 18. Steal someone’s account Trick someone into giving me money Enter a negative number for a transfer I make ATTACK TREES Get someone else to give me money Fool the system into giving me money Get Funds Transferred to me with no work. 18
  • 19. NEGATIVE TEST EXAMPLES ο‚„#1 Test: The Single Quote: ' ο‚„ Helpful to make sure SQL injection attacks have been properly mitigated against ο‚„ Also useful for ensuring anti-SQL injection protections properly deal with single quote characters in user data. 19
  • 20. EXAMPLE SINGLE QUOTE TEST ο‚„Cyclone Transfers: Test Procedure ο‚„ Login ο‚„ Go to all users. ο‚„ Use Search function to find abcdef ο‚„ Use Search function to find O’Brian ο‚„Expected result: No users found same results for both ο‚„Actual Result: Error Message in second case. 20
  • 21. NEGATIVE TEST CASE: HTML CONTENT ο‚„Another important test case: Allowing entry of HTML input, and properly displaying the result. (i.e., as text) ο‚„Cross-Site Scripting is the single most commonly encountered security issue in web applications. 21
  • 22. EXAMPLE HTML CONTENT TEST ο‚„Cyclone Transfers: Test Procedure ο‚„ Click on Sign In, then Sign Up. ο‚„ Create new account, in Profile Statement section include following content: <script>alert(123)</script> ο‚„ Log in a different user, go to all users and search for newly created user. ο‚„Expected Result: Profile Statement is displayed in search results as typed above. ο‚„Actual Result: Alert Box Created. 22
  • 23. NEGATIVE TEST CASE: DIRECT OBJECT ACCESS ο‚„If URL’s to content are static, ensure that user’s cannot access other users’ content. ο‚„Unlike previous two cases, very difficult for multi-purpose scanner tools to detect and respond; requires knowledge of the application and data access rules. 23
  • 24. EXAMPLE DIRECT OBJECT ACCESS ο‚„Cyclone Transfers: Test Procedures ο‚„ Create New User, as in last Test ο‚„ In New User, add account, and upload test PDF as β€œBank Statement”. ο‚„ Click on link to uploaded PDF to validate. Create Bookmark to PDF. ο‚„ Log in a different account, use bookmark to go to PDF ο‚„ Expected Result: Access should be denied. ο‚„ Actual Result: PDF Displayed 24
  • 25. THE RUGGED MANIFESTO HTTPS://WWW.RUGGEDSOFTWARE.ORG/ I am rugged and, more importantly, my code is rugged. I recognize that software has become a foundation of our modern world. I recognize the awesome responsibility that comes with this foundational role. I recognize that my code will be used in ways I cannot anticipate, in ways it was not designed, and for longer than it was ever intended. I recognize that my code will be attacked by talented and persistent adversaries who threaten our physical, economic and national security. I recognize these things – and I choose to be rugged. I am rugged because I refuse to be a source of vulnerability or weakness. I am rugged because I assure my code will support its mission. I am rugged because my code can face these challenges and persist in spite of them. I am rugged, not because it is easy, but because it is necessary and I am up for the challenge. 25
  • 26. THINGS ARE NOT GETTING ANY EASIER Things are not getting any easier, they are getting really complicated, very fast ο‚„ Human beings are still the weakest link ο‚„ Ballooning attack surface ο‚„The number of Mobile devices are growing, mobile apps are getting very functional/complicated ο‚„Internet of things is making application security more difficult with the amount of interconnected devices 26
  • 27. CALL TO ACTION ο‚„Don’t be left behind, security requirements elicitation & testing skills are essential, not optional ο‚„A skill you must have to be competitive/marketable/just to survive ο‚„Get trained, get competent in software security requirements elicitation techniques & security testing techniques ο‚„ Resources are lacking ο‚„ Conferences that cater to analysts, have no tracks or have very few tracks on application security requirement/testing 27
  • 28. RESOURCES ο‚„ OWASP https://www.owasp.org ο‚„ OWASP Testing Guide (200+ page PDF document is free to download) https://www.owasp.org/index.php/OWASP_Testing_Project ο‚„ OWASP Application Security Verification Standard 3.0 https://www.owasp.org/images/6/67/OWASPApplicationSecurityVerificationStandard3.0.pdf ο‚„ OWASP Broken Web Application Project https://www.owasp.org/index.php/OWASP_Broken_Web_Applications_Project ο‚„ SANS SWAT checklist https://software-security.sans.org/resources/swat ο‚„ Microsoft SDL Threat Modeling Tool https://www.microsoft.com/en-us/download/confirmation.aspx?id=49168 28
  • 29. THANK YOU! If you would like to contact us: Jason Petry (petryj2@nationwide.com) Eapen Thomas (eapen@nationwide.com) 29