fuzzing for cybersecurity
play

Fuzzing for CyberSecurity Abe Cohen 2019-11-13 Fuzzing for - PowerPoint PPT Presentation

Fuzzing for CyberSecurity Abe Cohen 2019-11-13 Fuzzing for CyberSecurity What is fuzzing/fuzz testing? Why AFL? How does it work with GNAT Pro/Ada? Premise: Fuzz Testing Definition: Stable Software Software that is highly


  1. Fuzzing for CyberSecurity Abe Cohen 2019-11-13

  2. Fuzzing for CyberSecurity ● What is fuzzing/fuzz testing? ● Why AFL? ● How does it work with GNAT Pro/Ada?

  3. Premise: Fuzz Testing Definition: Stable Software ● Software that is highly unlikely to enter exceptional situations that it was ○ not designed for or tested against More situations tested, more stable software ● Stability via negative input testing equates to a higher level of security ●

  4. How Fuzzing Works Seed with test corpus (optional) Generate new input Black Box Test connected to an input ● The fuzzer “fuzzes” the input data and feeds it ● Execute into the program no Fault? If the program crashes , it logs the bug ● yes Bugs

  5. Fuzz Testing Benefits ● Helps you find bugs/vulnerabilities in your code ○ Not just crashing bugs when used with specific Sanitizers ● Replicates what a hacker might do to find a vulnerability ● High benefit-to-cost ratio

  6. Fuzz Testing Limitations Doesn’t test software quality ● Meant to be used in addition to other testing techniques ○ Requires context/knowledge of the system to determine each found bug’s ● potential danger Ada mitigates this using compiler checks ○

  7. American Fuzzy Lop American American Fuzzy Lop is Fuzzy Lop is a also a fuzzing rabbit breed library

  8. AFL Sales Pitch Smart : input mutation based, driven Fast : fork-point optimization and by CFG instrumentation feedback in-process fuzzing loops Program Feedbac Not Init / setup phase k all that Repeat Input processing only this phase Fault ?

  9. AFL Bug Trophy Case

  10. AFL Bonuses Chainable to other tools ● Can sync/share test corpus with other tools ○ Low complexity setup ● No guesswork, settings to fine-tune ○

  11. What We’re Working On Original idea came from customer blog post on AdaCore’s blog ● Leveraging Ada Run-Time Checks with Fuzz Testing in AFL by Lionel Matias ○ ○ https://blog.adacore.com/running-american-fuzzy-lop-on-your-ada-code Improve GCC instrumentation plugin ● Provide facilities to leverage AFL’s fork server & in-process abilities ● Nightly build available for beta testing on demand ● Further work underway through a research project ●

  12. How AFL Works with GNAT Pro/Ada AFL looks for crashes via signal from OS ● Ada crashes more gracefully than that ● Assuming a program P processing an input file : Fuzzing with AFL first incurs a simple wrapper : with P; with Worker; procedure P_Crash is procedure P is begin Filename : constant String := P; Command_Line.Argument (1); exception begin when E : others => Worker.Process (Filename); GNAT.Exception_Actions.Core_Dump (E); end; end;

  13. How AFL Works with GNAT Pro/Ada Then a very simple sequence of commands : Only minor project file updates to access ● The instrumenting compiler ● Facilities to leverage AFL’s fork-server PATH=<...> AFL_PATH=<...> and in-process fuzzing gprbuild -Pp.gpr p_crash.adb -XDRIVER=afl-gcc-fast afl-fuzz -i inputs -o findings -- obj/p_crash @@

  14. Conclusion More fuzzing -> more stability -> more security ● Easy to configure and run, effective at finding bugs, and useful to other tools ● Starting to see it all over tech ● Becoming best practice to integrate into your testing process ○ Look out for GNATFuzz soon! ●

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend