Top Banner
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP Foundation OWASP http://www.owasp.org Fuzzing Piotr Łaskawiec J2EE Developer/Pentester Metrosoft (www.metrosoft.com) [email protected] 14.01.2010
29

OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

Apr 01, 2018

Download

Documents

vanthu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

Copyright © The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation

OWASP

http://www.owasp.org

Fuzzing

Piotr ŁaskawiecJ2EE Developer/Pentester

Metrosoft (www.metrosoft.com)[email protected]

14.01.2010

Page 2: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

2OWASP

Abstract

Methods of testing the applicationEnsuring application securityFuzzing – definitionUse of fuzzingTypes of fuzzersFuzzing and SDLCWho uses fuzzers?Examples of fuzzersWeb application fuzzingSummary

Page 3: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

3OWASP

Application testing

Popular tests:Unit testingFunctional testingRegression testingPerformance testingUsability tests

Other classification:Whitebox, Graybox, Blackbox

What about security?Security on level of design, implementation, testing

and deployment.

Page 4: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

4OWASP

Ensuring application security

Response vs preventionResponse:

FirewallIDS/IPSAntivirusAuthentication mechanismsVulnerability scanners (Nessus, Nikto, etc.)Etc.

Prevention:Fuzzing!Code audit/RE

Page 5: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

5OWASP

Fuzzing - definition

Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data.

Fuzzing most frequently is fully automated process - „run and wait for result”.

Page 6: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

6OWASP

Fuzzing – what does it mean in practice?

Fuzzing == Negative testingThe aim of the fuzzer is to send invalid data to

application (too long strings, improper encoding, bad file format, bad sequence of communicates).

We hope that the application will accept the data and an atypical reaction of the program will occur – DoS, error message, fast-growing demand for resources.

Our target is to break the application!

Page 7: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

7OWASP

Using fuzzers

Local applicationsWeb applicationsWebServicesNetwork applicationsActiveX controlsFilesLibraries…

Page 8: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

8OWASP

Fuzzer's classification

There are many criteria for classificationExamples:

Fuzzers

Mutational Generational Evolutionary

Fuzzers

Manual Semiautomatic/Automatic

Fuzzery

Web applications Protocols ...

Page 9: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

9OWASP

Fuzzing process

Setup Data transfer to application Reporting

Monitoring

Environment preparation

Programpreparation

Definition of input data

Input datapreparation

Page 10: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

10OWASP

Monitoring

Observation of program behaviorLogsDebuggers (!exploitable...)Files, processes and network monitorsVirtualization (VMWare)Source code modifications (breakpoints)Additional techniques (Valgrind, Guard Malloc)Combined techniques

Page 11: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

11OWASP

Process Explorer

Page 12: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

12OWASP

Process Monitor

Page 13: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

13OWASP

Fuzzing and SDLC

Initial analysis

Design

ImplementationTesting

Maintenance

Page 14: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

14OWASP

Fuzzing and SDLC

Fuzzing

Initial analysis

Design

ImplementationTesting

Maintenance

Page 15: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

15OWASP

Fuzzing and SDLC

After publication of the new version, application is tested by a previously prepared fuzzer.

Test results are verified by testers. Next, they are sent to programmers.

If any errors occur, programmers must fix the application.

New build once again must pass the fuzzing process.

Page 16: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

16OWASP

Examples:

Adobe http://blogs.adobe.com/asset/2009/12/fuzzing_reader_-_lessons_learned.html

Bugs in IIS http://pentestit.com/2009/12/28/microsoft-iis-day-open/

Mozilla JavaScript fuzzer http://blog.mozilla.com/security/2007/08/02/javascript-fuzzer-available/

Microsoft MiniFuzz http://www.microsoft.com/downloads/details.aspx?FamilyID=b2307ca4-638f-4641-9946-

dc0a5abe8513&displaylang=en

Google Flayer http://code.google.com/p/flayer/

Page 17: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

17OWASP

Examples of fuzzers:

Frameworks:Peach (http://peachfuzzer.com/)Sulley

Specialized fuzzers:JBroFuzz (OWASP)WSFuzzer (OWASP)TAOFWfuzzSpike ProxyWebFuzz

Custom solutions

Page 18: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

18OWASP

WebScarab Fuzzer plugin

Page 19: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

19OWASP

JBroFuzz

Page 20: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

20OWASP

Web application fuzzing

Problems:Identification of input points

HTTP communication analysis Webspidering Search engines

Generation of test data Payloads hardcoded in fuzzers Bruteforce Payloads based on patterns

Error identification

Page 21: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

21OWASP

Error identification

HTTP response codesAnalysis of website contentComparision of website internal structureTime attacksMultiple requestsAnalysis of unique data identifying website.Logs

Page 22: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

22OWASP

Anti-fuzzing

We can't directly defend against fuzzing!Generic defense:

Validation of input dataApplication of good programming practicesEnsuring security through all phases of SDLC

Page 23: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

23OWASP

Summary

Page 24: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

24OWASP

Fuzzing advantages

Full automatization (in most cases)Fuzzers find real vulnerabilitiesAbility to identify bugs which are hard to find by

manual testingAbility to quickly obtain satisfactory results (first

bug)

Page 25: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

25OWASP

Fuzzing disadvantages

Inability to find logical bugsInability to find complex bugsTime required for performing test is very hard to

specify

Page 26: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

26OWASP

Additional information

Talks:PyCON 2008SEConference 2009

Sites:fuzzing.eufuzzing.orgkrakowlabs.com/lof.html

Page 27: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

27OWASP

09-10.04.2010www.seconference.pl

Page 28: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

28OWASP

Questions

Page 29: OWASP - Piotr Łaskawiec - Fuzzing · Fuzzing is a method of testing software to find security holes and unexpected behavior of an application, using semirandom data. Fuzzing most

29OWASP

Thanks for your attention!