SlideShare a Scribd company logo
Fault Models and Fuzz TechniquesShmuel GershonSTAREAST 2011Copyright © CC:BY-NC-SA 2007-11, Shmuel Gershon.
About...Shmuel Gershon
Testing Engineer
http://testing.gershon.info
Creator of Rapid Reporter
Twitter: @sgershon, Skype: sgershon, shmuel@gershon.infoDisclaimer:Names and Brands referenced herein may be claimed as property of third parties
Views expressed in this presentation are solely my own, and do not in any manner represent the views of my employer
Information in this presentation is provided 'as is' without any warranties or representations of any kindCopyright © CC:BY-NC-SA 2007-11
Fault Models and FuzzTalk ObjectivesUnderstand the principles of the techniquesMeet tools available for both techniquesLearn to apply the methods (in different app types)Perceive drawbacks and difficultiesLay down a foundation for further researchHave at least one new idea for your tests  :)Testing is questioning a product in order to evaluate its value to a person that mattersAdapted from Jerry Weinberg + James Bach + Michael BoltonCopyright © CC:BY-NC-SA 2007-11
Putting Concepts into ContextAvailabilityRobustnessDependabilitySecurityReliabilityStabilityCopyright © CC:BY-NC-SA 2007-11
Fault Models and FuzzTalk OutlineFault ModelsOverviewExamples + DemosPitfalls and TricksFuzzingOverviewExamples + DemosPitfalls and TricksSummary and QuestionsCopyright © CC:BY-NC-SA 2007-11
Fault Models OverviewConceptual DiagramOS – Disk StorageInjectionRuntimeFaultLayerApplication Under TestOS – User I/OOS - MemoryOS - NetworkCopyright © CC:BY-NC-SA 2007-11
Fault Models Overview – DefinitionDefinitions:Introducing faults in order to test (error handling) code paths, that might otherwise rarely be followedAssess the robustness of software by checking it's reaction to adverse eventsPurposeValidation of: Robustness, Dependability (Availability) and SecurityAlso known as: Recovery Code test, Fault Injection, Negative test, Error Handling, Stress test...Copyright © CC:BY-NC-SA 2007-11
Fault Models Overview – ApproachesRandom Runtime Fault Injections:A tool control the type, time and location to ‘attack’. May modify the coverage of a set of tests (issues found may be harder to reproduce or debug).Initiated Runtime Fault Injection:Specific tests in which the faults are controlled at specific point, aiming a clear error handling flow.Bugs found in this approach may be easier to reproduce, accept and fix.(This is the approach we'll focus on).Copyright © CC:BY-NC-SA 2007-11
Fault Models Overview – ReactionsReactions against Runtime Fault BugsIt will never happen in real lifeA user will not do thatIt should fail in such conditionsIt is an unsupported scenarioWe can’t fix thisIt is a third-party problemHow would you reply?Whose decision it ultimately is?Copyright © CC:BY-NC-SA 2007-11
Fault Injection – Example #1Memory Starvation:Refuses to allocate a memory upon request (Insufficient Memory).Pinball:Silently skips the action,no harm done.WordPad:Disappears with your most valuable workCopyright © CC:BY-NC-SA 2007-11
Fault Injection – Example #2Network Errors:Simulates an error responses for common network requests and resources.Browser Wars:One browser survives

More Related Content

DOCX
Faq
PDF
Design for Testability: A Tutorial for Devs and Testers
PDF
Classic Testing Mistakes 0226
PPTX
Software techniques
PDF
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
PDF
Design for Testability: A Tutorial for Devs and Testers
PDF
Software process methodologies and a comparative study of various models
PDF
Testing and TDD - KoJUG
Faq
Design for Testability: A Tutorial for Devs and Testers
Classic Testing Mistakes 0226
Software techniques
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Design for Testability: A Tutorial for Devs and Testers
Software process methodologies and a comparative study of various models
Testing and TDD - KoJUG

What's hot (20)

PPT
Manual testing visonia
PDF
Software Quality Assurance
PPT
Testing Presentation
PPT
Software Testing_Overview
DOC
Document defect tracking for improving product quality and productivity
PDF
2007 EBU Training VRT news security and continuity
PDF
Software testing
PPT
Software testing overview by subbu
PDF
Software Testing Fundamentals
PPT
179 black-box-software-testing-copyright-2003-cem-kaner1652
PDF
Software engineering principles (marcello thiry)
PPTX
Software testability slide share
DOCX
Risk analysis
PDF
5-Ways-to-Revolutionize-Your-Software-Testing
DOCX
Interview questions
PPTX
Quality & Reliability in Software Engineering
PDF
Winning strategies in Test Automation
PPT
Software Testability
PPTX
Bug Tracking System
PPTX
5 Ways to Reduce 3rd Party Developer Risk
Manual testing visonia
Software Quality Assurance
Testing Presentation
Software Testing_Overview
Document defect tracking for improving product quality and productivity
2007 EBU Training VRT news security and continuity
Software testing
Software testing overview by subbu
Software Testing Fundamentals
179 black-box-software-testing-copyright-2003-cem-kaner1652
Software engineering principles (marcello thiry)
Software testability slide share
Risk analysis
5-Ways-to-Revolutionize-Your-Software-Testing
Interview questions
Quality & Reliability in Software Engineering
Winning strategies in Test Automation
Software Testability
Bug Tracking System
5 Ways to Reduce 3rd Party Developer Risk
Ad

Viewers also liked (12)

PPT
PPTX
Presentaciónseminario5
PPTX
Menu a punti
PPT
ENJ-400-Tribunales de Trabajo
 
PPT
CPLD & FPLD
PPTX
Owasp mobile top 10
PPTX
Escuela para padres: Estilos de Crianza
PPTX
Доставка зловредов через облака
PPTX
FPGA Architecture Presentation
PPTX
Field programable gate array
PPTX
What is FPGA?
PPT
Presentaciónseminario5
Menu a punti
ENJ-400-Tribunales de Trabajo
 
CPLD & FPLD
Owasp mobile top 10
Escuela para padres: Estilos de Crianza
Доставка зловредов через облака
FPGA Architecture Presentation
Field programable gate array
What is FPGA?
Ad

Similar to Fault Models and Fuzzing (20)

PDF
Unit Testing Guide. Helps to understand the basics of unit testing .
DOC
Manual testing interview question by INFOTECH
PPTX
Successful Software Projects - What you need to consider
PDF
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
PPTX
T5_Test_08182022T5_Test_08182022T5_Test_08182022
DOC
Manualtestinginterviewquestionbyinfotech 100901071035-phpapp01
DOC
Manual testing interview questions by infotech
DOC
Manual testing interview questions
PPT
Tdd dev session
PPTX
Fundamental Of Testing (Dhea Frizky)
PPT
Why test with flex unit
PDF
Open Source Security – A vendor's perspective
PDF
Tiếng Anh công nghệ thông tin VHU Tuần 5
PPTX
Cyber security - It starts with the embedded system
PPT
Fuzzing101 uvm-reporting-and-mitigation-2011-02-10
PDF
The best way to design secure software products
PPTX
Defect Tracking Software Project Presentation
PPTX
Where to learn best software course
PDF
nullcon 2011 - Fuzzing with Complexities
PPTX
Testing concepts
Unit Testing Guide. Helps to understand the basics of unit testing .
Manual testing interview question by INFOTECH
Successful Software Projects - What you need to consider
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
T5_Test_08182022T5_Test_08182022T5_Test_08182022
Manualtestinginterviewquestionbyinfotech 100901071035-phpapp01
Manual testing interview questions by infotech
Manual testing interview questions
Tdd dev session
Fundamental Of Testing (Dhea Frizky)
Why test with flex unit
Open Source Security – A vendor's perspective
Tiếng Anh công nghệ thông tin VHU Tuần 5
Cyber security - It starts with the embedded system
Fuzzing101 uvm-reporting-and-mitigation-2011-02-10
The best way to design secure software products
Defect Tracking Software Project Presentation
Where to learn best software course
nullcon 2011 - Fuzzing with Complexities
Testing concepts

Recently uploaded (20)

PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Tartificialntelligence_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Approach and Philosophy of On baking technology
PPTX
A Presentation on Touch Screen Technology
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
Hindi spoken digit analysis for native and non-native speakers
Heart disease approach using modified random forest and particle swarm optimi...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Tartificialntelligence_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
DP Operators-handbook-extract for the Mautical Institute
Approach and Philosophy of On baking technology
A Presentation on Touch Screen Technology
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A novel scalable deep ensemble learning framework for big data classification...
NewMind AI Weekly Chronicles - August'25-Week II
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Mushroom cultivation and it's methods.pdf
Getting Started with Data Integration: FME Form 101
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Enhancing emotion recognition model for a student engagement use case through...

Fault Models and Fuzzing

  • 1. Fault Models and Fuzz TechniquesShmuel GershonSTAREAST 2011Copyright © CC:BY-NC-SA 2007-11, Shmuel Gershon.
  • 6. Twitter: @sgershon, Skype: sgershon, shmuel@gershon.infoDisclaimer:Names and Brands referenced herein may be claimed as property of third parties
  • 7. Views expressed in this presentation are solely my own, and do not in any manner represent the views of my employer
  • 8. Information in this presentation is provided 'as is' without any warranties or representations of any kindCopyright © CC:BY-NC-SA 2007-11
  • 9. Fault Models and FuzzTalk ObjectivesUnderstand the principles of the techniquesMeet tools available for both techniquesLearn to apply the methods (in different app types)Perceive drawbacks and difficultiesLay down a foundation for further researchHave at least one new idea for your tests :)Testing is questioning a product in order to evaluate its value to a person that mattersAdapted from Jerry Weinberg + James Bach + Michael BoltonCopyright © CC:BY-NC-SA 2007-11
  • 10. Putting Concepts into ContextAvailabilityRobustnessDependabilitySecurityReliabilityStabilityCopyright © CC:BY-NC-SA 2007-11
  • 11. Fault Models and FuzzTalk OutlineFault ModelsOverviewExamples + DemosPitfalls and TricksFuzzingOverviewExamples + DemosPitfalls and TricksSummary and QuestionsCopyright © CC:BY-NC-SA 2007-11
  • 12. Fault Models OverviewConceptual DiagramOS – Disk StorageInjectionRuntimeFaultLayerApplication Under TestOS – User I/OOS - MemoryOS - NetworkCopyright © CC:BY-NC-SA 2007-11
  • 13. Fault Models Overview – DefinitionDefinitions:Introducing faults in order to test (error handling) code paths, that might otherwise rarely be followedAssess the robustness of software by checking it's reaction to adverse eventsPurposeValidation of: Robustness, Dependability (Availability) and SecurityAlso known as: Recovery Code test, Fault Injection, Negative test, Error Handling, Stress test...Copyright © CC:BY-NC-SA 2007-11
  • 14. Fault Models Overview – ApproachesRandom Runtime Fault Injections:A tool control the type, time and location to ‘attack’. May modify the coverage of a set of tests (issues found may be harder to reproduce or debug).Initiated Runtime Fault Injection:Specific tests in which the faults are controlled at specific point, aiming a clear error handling flow.Bugs found in this approach may be easier to reproduce, accept and fix.(This is the approach we'll focus on).Copyright © CC:BY-NC-SA 2007-11
  • 15. Fault Models Overview – ReactionsReactions against Runtime Fault BugsIt will never happen in real lifeA user will not do thatIt should fail in such conditionsIt is an unsupported scenarioWe can’t fix thisIt is a third-party problemHow would you reply?Whose decision it ultimately is?Copyright © CC:BY-NC-SA 2007-11
  • 16. Fault Injection – Example #1Memory Starvation:Refuses to allocate a memory upon request (Insufficient Memory).Pinball:Silently skips the action,no harm done.WordPad:Disappears with your most valuable workCopyright © CC:BY-NC-SA 2007-11
  • 17. Fault Injection – Example #2Network Errors:Simulates an error responses for common network requests and resources.Browser Wars:One browser survives
  • 18. The other crashes!Copyright © CC:BY-NC-SA 2007-11
  • 19. Fault Injection – Example #3Low Resources / Slow or Clogged CPUComputer behaves as a busy or old computer(CPU is busy on other tasks / time scheduler starvation...)Playing to win:Can we escape from death by simply slowing down the rest?Copyright © CC:BY-NC-SA 2007-11
  • 20. Fault Models – NotesFinding bugs can take a long time (but you record important data during the process)Abstract knowledge of the internal flows of the software is imperative for good resultsBugs are received with the comments seen earlierIt is difficult to assess the exposure of such bugsThese points can make it harder to adopt the practices in the company......so be sure to address themCopyright © CC:BY-NC-SA 2007-11
  • 21. Fault Injection Tools ExamplesCanned Heat is free & easy, but buggyLimitations:Does not support .NET apps or ServicesBug: In some systems it will not load or needs to be reloaded between applications.Others:Verifier, AppVerifierSlowProc, HeavyLoadHolodeck - not free.PIN and (soon) the random malloc blockerIn-House or Brute-Force toolsCopyright © CC:BY-NC-SA 2007-11
  • 22. FuzzFuzzFuzzFuzzFuzzFuzzFuzz TestingConceptual DiagramOS – Disk StorageApplication Under TestOS – User I/OOS - MemoryOS - NetworkCopyright © CC:BY-NC-SA 2007-11
  • 23. Fuzz Testing – DefinitionDefinitions:Providing random data which is free of preconceptions to the inputs of a program, in order to reach unexpected statesFuzz explores the points that programmers and testers leave out due to assumption(Data that does not necessarily map to harmful inputs, or to valid inputs)PurposeBuilt-in code assertions, Coding and state assumptionsValidation of: Robustness, Dependability (Availability) and Security (many times it finds buffer overflows)Copyright © CC:BY-NC-SA 2007-11
  • 24. Be only as smart as you have to Fuzz Testing – ApproachesSmart Fuzzers:Organize the input data so it would pass initial filters on the software (or the environments)Dumb Fuzzers:Data is close to random and chaos, in order to avoid assumption pitfallsTest approach:Simple, automated, no assumptions or objectiveCopyright © CC:BY-NC-SA 2007-11
  • 25. Fuzz Testing – ReactionsContrary Reactions are similar, but usually in less extentIt will never happen in real lifeA user will not do thatIt should fail in such conditionsWe can not fix itWhen fuzz finally finds a bug it can be very severe, (crashes? overflows? data loss?)Can take little active time from testers, adoption mostly requires initial investment.Copyright © CC:BY-NC-SA 2007-11
  • 26. Fuzz Testing – Failures to look forCrashesFailing built-in Code AssertionsUndesired (or impossible) statesWrong Error messagesAbsence of error messagesCopyright © CC:BY-NC-SA 2007-11
  • 27. Fuzz Testing – Example #1GUI Fuzzer:Sends random keyboard and mouse events all over the application.Solitaire
  • 28. MS PaintCopyright © CC:BY-NC-SA 2007-11
  • 29. Fuzz Testing – Example #2File Fuzzer:Manipulates a file in order to create a set of randomly modified files.File Fuzzerdemo
  • 30. WordPad:Gives an error message.Open Office:Crashes! and MS Word too!!Copyright © CC:BY-NC-SA 2007-11
  • 31. Fuzz Testing – Examples #3CD-Rom driver:Interface is easy, the Peach Frameworkmakes it automaticWeb HTTP:
  • 33. Web Fuzzer FuzzingWeb fuzzers are very diverse, and are available in many formsCopyright © CC:BY-NC-SA 2007-11
  • 34. Comments on Fuzz TestingFinding bugs can take a long timeKnowledge of the internal flows of the software is no necessary, and it can even hurtDoes not necessarily find software weaknesses in the shortest amount of timeNot every issue found is exploitableDeveloping a smart framework is important in order to achieve efficiency.Copyright © CC:BY-NC-SA 2007-11
  • 35. Fuzz Testing Tools ExamplesFree tools:GUI and Command line:Fuzzer by the University of WisconsinFile manipulation:FileFuzzFuzz Framework:Peach FuzzerList of fuzzers:http://www.infosecinstitute.com/blog/2005/12/fuzzers-ultimate-list.htmlhttp://www.computerdefense.org/2007/01/15/fuzzing-tools/Commercial tools:Network Protocols:Codenomicon’sDefensicsIxiaCopyright © CC:BY-NC-SA 2007-11
  • 36. Fault Models and Fuzz SummaryWe can reach hard-to-reach-in-lab scenarios with these techniques
  • 37. These tests are a good way to prevent(some) surprises
  • 38. Impact of such bugs can be very high!
  • 39. There are tools available, many of them free
  • 40. You can build your own
  • 41. this is not a way of doing, It is a way of thinkingCopyright © CC:BY-NC-SA 2007-11
  • 42. Fault Models and Fuzz Techniques - Learn MoreWikipedia:Fuzz: http://en.wikipedia.org/wiki/Fuzz_testingFault Injection: http://en.wikipedia.org/wiki/Fault_injectionUniversity of Wisconsin-Madison Fuzz Articles and Software:http://www.cs.wisc.edu/~bart/fuzz/Look out! It’s the fuzz:http://iac.dtic.mil/iatac/download/Vol10_No1.pdfFault Injection:“How to Break Software” book by James WhitakerA study on fuzzing effectiveness:http://www.docstoc.com/docs/53958850/Fuzz-By-NumberFuzzing Examples at the Open Wen App Security Project:http://www.owasp.org/index.php/FuzzingAttack your programs before someone else does:http://www.whitestar.linuxbox.org/pipermail/fuzzing/2006-November/000168.htmlCopyright © CC:BY-NC-SA 2007-11
  • 43. Fault Models and FuzzCredits:<stripped in web version>Questions??Copyright © CC:BY-NC-SA 2007-11