fuzz testing for fun and profit
play

Fuzz Testing for Fun and Profit Presented by: - PDF document

W3 Testing at Scale Wednesday, October 2nd, 2019 11:30 AM Fuzz Testing for Fun and Profit Presented by: Melissa Benua


  1. ¡ ¡ W3 ¡ Testing ¡at ¡Scale ¡ Wednesday, ¡October ¡2nd, ¡2019 ¡11:30 ¡AM ¡ ¡ ¡ ¡ ¡ Fuzz ¡Testing ¡for ¡Fun ¡and ¡Profit ¡ ¡ Presented ¡by: ¡ ¡ ¡ ¡ Melissa ¡Benua ¡ ¡ mParticle ¡ ¡ Brought ¡to ¡you ¡by: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ 888 -­‑-­‑-­‑ 268 -­‑-­‑-­‑ 8770 ¡ ·√·√ ¡904 -­‑-­‑-­‑ 278 -­‑-­‑-­‑ 0524 ¡-­‑ ¡info@techwell.com ¡-­‑ ¡http://www.starwest.techwell.com/ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

  2. Melissa ¡Benua ¡ ¡ In ¡her ¡career ¡at ¡companies ¡from ¡large ¡to ¡small, ¡Melissa ¡Benua ¡has ¡worked ¡in ¡nearly ¡ every ¡software ¡development ¡role ¡-­‑ ¡engineer, ¡test, ¡DevOps, ¡and ¡program ¡ management. ¡She's ¡created ¡and ¡run ¡high-­‑availability, ¡high-­‑quality ¡services ¡at ¡Boeing ¡ and ¡Microsoft ¡on ¡products ¡such ¡as ¡Bing, ¡Cortana, ¡and ¡Xbox ¡One. ¡Melissa ¡discovered ¡ her ¡love ¡of ¡massively-­‑scaled ¡systems ¡while ¡working ¡on ¡the ¡Bing ¡backend, ¡where ¡she ¡ honed ¡the ¡art ¡of ¡keeping ¡highly-­‑available ¡complex ¡systems ¡up ¡while ¡undergoing ¡ massive ¡code ¡churn. ¡Now ¡a ¡senior ¡engineer ¡and ¡manager ¡at ¡the ¡disruptive ¡gaming ¡ startup ¡PlayFab, ¡Melissa ¡isn’t ¡afraid ¡to ¡mix ¡traditional ¡approaches ¡with ¡bold ¡new ¡ ideas ¡to ¡make ¡her ¡products ¡better, ¡faster, ¡and ¡more ¡reliable. ¡She’s ¡passionate ¡not ¡ only ¡about ¡maximizing ¡efficiency ¡both ¡in ¡her ¡product ¡code ¡and ¡in ¡her ¡developer ¡ tools ¡but ¡also ¡about ¡sharing ¡best ¡practices ¡among ¡colleagues ¡and ¡the ¡tech ¡world ¡at ¡ large! ¡ ¡

  3. 9/27/19 STARWEST 2019 Fuzz Testing for Fun and Profit!! Melissa Benua / Senior Engineering Manager ABOUT ME Melissa Benua Senior Engineering Manager mParticle Get in touch! mbenua@gmail.com @queenofcode Follow my work! https://www.linkedin.com/in/mbenua/ https://www.slideshare.net/MelissaBenua/ https://github.com/queen-of-code/ https://queenofcode.net 1

  4. 9/27/19 Request Forking Service AKA T’ed Traffic Performance Environment Optimized for driving out Parallel Prod performance issues and doing perf Production, but with testing additional debugging options Release Candidate B Release Candidate A More new code! New code! PRODUCTIO N ENV Key Definitions Fuzz Testing Attack Manipulation • generating random • data meant to drive • combination of an input to explore the out a specific class of input and an attack bounds of a system bug under test Creation Insertion Generational Manipulation Manipulation Manipulation • substituting in a de • modifying a known • successively modifying novo generated input input to include an attack an input based on from an attack system behavior 2

  5. 9/27/19 Attack Model Plan PROFIT!! Set Keys to Successful Fuzzing Defining the Data Model Query Params Version Method URI GET https://www.bing.com/search?q=ponies&qs=n&form=QBRE HTTP/1.1 User-Agent: Fiddler/4.6.20171.9220 (.NET 4.6.2) Host: www.bing.com Headers Accept-Language: en-US Header Values Accept-Encoding: gzip, deflate, br Accept: text/html,application/xhtml+xml Pragma: no-cache Cookie: DUP=Q=N51ltffjRFaNUXQ2&T=69727&A=1&IG=140419BB6CF3209258263; SRCHS=PC=U316; SRCHD=AF=CHROMN; SRCHUID=V=2&GUID= 2222333DDDD3333C0C0C0C0F00D33227 &dmnchg=1; _EDGE_V=1; MUID=2222333DDDD3333C0C0C0C0F00D33227; _ITAB=STAB=REC; Cookie Values 3

  6. 9/27/19 JSON-based HTTP Request Fuzzing URI Version Method POST https://s2s.mparticle.com/v2/events HTTP/1.1 Headers Host : s2s.mparticle.com Authorization : Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlYAAAAA== { JSON POST Body Array "events" : [ { "data" : { "timestamp_unixtime_ms" : 1402521613976, "event_name" : "click“ }, "event_type" : "custom_event" } ], "device_info" : { "brand": "iPhone6,1", "ios_advertising_id": "613ff528-afd1-4c1b-9628-e6ed25ece9c0“ }, "user_identities" : { "customerid": "1234", "other" : “helpers@mparticle.com” }, "schema_version": 2, Object "environment": “development" } Attack Selection Random String • aaaaaaaaaa • ' select * from SQL Injection information_schema.tables-- Control • Power ًررُبّصلُلُبّصُلُل ॣ ॣ h ॣ ॣ 冗 Characters • firefoxurl:test|"%20-new-window XSS %20javascript:alert(\'Cross %2520Browser%!\’);” Integer Overflow • 0xffffffff Redirects • /cgi-bin/redirect.cgi?{targetUrl} 4

  7. 9/27/19 Bad Sample Fuzzed HTTP Request GE AA T https://www.bi %20 ng.com/ (oNcliCk=alert()) ?q=ponies HTTP/1.1 User-Agent: /cgi-bin/redirect.cgi?www.google.com Host: www.bing.com AAA Accept-Language: 0xFFFFFFF NULL : text/html,application/xhtml+xml Pragma: no-cache “” : DUP=Q=N51ltffjRFaNUXQ2&T=69727&A=1&IG=140419BB6CF3209258263; SRCHS=PC=U316; C:/boot.ini =AF=CHROMN; SRCHUID=V=2&GUID= 2222333DDDD3333C0C0C0C0F00D33227 &dmnchg=1; _EDGE_V=1; MUID=2222333DDDD3333C0C0C0C0F00D33227; _ITAB=STAB=REC; Making A Plan <Request MaxAttacks=“3”> <Method AttackSet=“AttacksA” Probability=“5%” MaxAttacks=“1”/> <URI> <Host Probability=“0%” /> <Path AttackSet=“AttackSetPath” Probability=“10%” MaxAttacks=“2”/> <QueryLine AttackSet=“Values” Probability=“50%” MaxAttacks=“2”/> </URI> <Headers KeyChance=“2%” KeyAttacks=“AttacksA” ValueChance=“25%” ValueAttacks=“Values” > <Authorization KeyChance=“0%” ValueChance=“10%” /> </Headers> <Cookie KeyChance=“2%” KeyAttacks=“AttacksA” ValueChance=“25%” ValueAttacks=“Values” /> </Request> 5

  8. 9/27/19 Good Sample Fuzzed HTTP Request GET https://www.bing.com/search?q=AAAAAA%20&qs=n&form=QBRE HTTP/1.1 User-Agent: Fiddler/4.6.20171.9220 (.NET 4.6.2) Host: www.bing.com Accept-Language: en-US Accept-Encoding: gzip, deflate, br Accept: text/html,application/xhtml+xml Pragma: no-cache Cookie: DUP=Q=N51ltffjRFaNUXQ2&T=69727&A=1&IG=140419BB6CF3209258263; SRCHS=PC=U316; SRCHD=AF=CHROMN; SRCHUID=V=2&GUID= 2222333DDDD3333C0C0C0C0F00D33227 &dmnchg=1; _EDGE_V=1; MUID= (oNcliCk=alert()) ; _ITAB=STAB=REC; Also Good Sample Fuzzed HTTP Request POST https://s2s.mparticle.com/v2/events HTTP/1.1 Host : s2s.mparticle.com Authorization : Basic ZXhhbXBsZS1hcGkta2V5OmV4YW1wbGUtYXBpLXNlYAAAAA== { "events" : [ { "data" : { "timestamp_unixtime_ms" : 0xFFFFFFFF , "event_name" : "click“ }, "event_type" : "custom_event" } ], "device_info" : { "brand": "iPhone6,1", "ios_advertising_id": "613ff528-afd1-4c1b-9628-e6ed25ece9c0“ }, "user_identities" : { "customerid": " ; alert(\'Cross%2520Browser%!\’); ", "other" : "helpers@mparticle.com" } } 6

  9. 9/27/19 What can you find? Crashes Memory Problems Exploits SQL Injection Buffer Overflow Leaks XSS Exceptions Thread Contamination Code Execution How do you know you found a Metrics Logs Core Dumps Side Effects problem? 7

  10. 9/27/19 Want To Explore Further? If you: • Like dotnet core • Want to use something lightweight Try out: • https://github.com/queen-of-code/DotnetModelFuzzing References & Further Reading Fuzzing Book - https://www.fuzzingbook.org/ - From • introduction to deep dive; uses Python as an example for crafting in-depth fuzzing runs AFL (American Fuzzy Lop) - • https://github.com/google/AFL - Security-focused fuzzer utilizing code coverage to guide genetic algorithms FuzzDB - https://github.com/fuzzdb-project/fuzzdb – • Dictionary of useful attacks for use in fuzzing BlackArch Fuzz Listing - • https://www.blackarch.org/fuzzer.html – A (non-exhaustive but good) list of fuzzers across platforms and models 8

  11. 9/27/19 Thank you! GET IN TOUCH! Melissa Benua Senior Engineering Manager mbenua@gmail.com @queenofcode Learn more 9

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