37
WFUZZ para Penetration Testers Christian Martorella & Xavier Mendez SOURCE Conference 2011 Barcelona

Wfuzz for Penetration Testers

Embed Size (px)

DESCRIPTION

Presentation on how Wfuzz can be used by Penetration testers to exploit vulnerabilities in Web applications.

Citation preview

Page 1: Wfuzz for Penetration Testers

WFUZZ para Penetration Testers!Christian Martorella & Xavier Mendez!SOURCE Conference 2011!Barcelona!!!

Page 2: Wfuzz for Penetration Testers

Who we are?

•  Security Consultants at Verizon Business Threat and Vulnerability Team EMEA

•  Members of Edge-security.com

Page 3: Wfuzz for Penetration Testers

What is this presentation about?

WFUZZ a web application brute forcer / fuzzer And how this tool can be used in your Penetration test engagements

Page 4: Wfuzz for Penetration Testers

What is WFUZZ?

•  It ́s a web application brute forcer, that allows you to perform complex brute force attacks in different web application parts as: parameters, authentication, forms, directories/files, headers files, etc.

•  It has complete set of features, payloads and encodings.

Page 5: Wfuzz for Penetration Testers

Wfuzz

•  Started a few years ago and have been improving until now (and hopefully will continue improving)

•  Has been presented at Blackhat Arsenal US 2011

•  New advanced features that make this tool unique

Page 6: Wfuzz for Penetration Testers

Key features

•  Multiple injection points

•  • Advance Payload management

•  • Multithreading

•  • Encodings

•  • Result filtering

•  • Proxy and SOCKS support (multiple proxies)

Page 7: Wfuzz for Penetration Testers

New features •  Added HEAD method scanning Added magictree

support Fuzzing in HTTP methods#Hide responses by regex

•  Bash auto completion script (modify and then copy wfuzz_bash_completion into /etc/bash_completion.d)

•  Verbose output including server header and redirect location

•  Added follow HTTP redirects option (this functionality was already provided by reqresp)

Page 8: Wfuzz for Penetration Testers

A brute force attack is a method to determine an unknown value by using an automated process to try a large number of possible values.

Page 9: Wfuzz for Penetration Testers
Page 10: Wfuzz for Penetration Testers

What can be bruteforced?

"   Predictable credentials (HTML Forms and HTTP)!

"   Predictable sessions identifier (session id’s)!

"   Predictable resource location (directories and files)!

"   Variables values and ranges!

"   Cookies!

"   WebServices methods!

Page 11: Wfuzz for Penetration Testers

Where?

"   Headers!

"   Forms (POST)!

"   URL (GET)!

"   Authentication!

Page 12: Wfuzz for Penetration Testers

How?

"   Dictionary attack!

"   Search attack!

"   Rule based search attack!

Page 13: Wfuzz for Penetration Testers

Automated scanning tools are designed to take full advantage of the state-less nature of the HTTP protocol and insecure development techniques by bombarding the hosting server with specially crafted content requests and/or data submissions.!

Page 14: Wfuzz for Penetration Testers

Why 2010 still bruteforcing?

"   In 2007 Gunter Ollmann proposed a series of countermeasures to stop automated attack tools.!

Page 15: Wfuzz for Penetration Testers

Countermeasures

"   Block HEAD requests!

"   Timeouts and thresholds!

"   Referer checks!

"   Tokens !

Page 16: Wfuzz for Penetration Testers

Countermeasures

"   Turing tests (captchas)!

"   Honeypot links !

"   One time links!

"   Custom messages!

"   Token resource metering (Hashcash)!

Page 17: Wfuzz for Penetration Testers

Countermeasures

Page 18: Wfuzz for Penetration Testers

Bypass??

Page 19: Wfuzz for Penetration Testers

How?

"   Distributing scanning source traffic

"   Distributing scanning in target (differents subdomains,servers)

"   Diagonal scanning (different username/password each round)

"   Horizontal scanning (different usernames for common passwords)

Page 20: Wfuzz for Penetration Testers

How?

"   Three dimension ( Horizontal,Vertical or Diagonal + Distributing source IP)

"   Four dimensions ( Horizontal, Vertical or Diagonal + time delay)

Page 21: Wfuzz for Penetration Testers

2010..

https://dcp2.att.com/OEPClient/openPage?ICCID=NUMBER&IMEI=0

114.000 emails!

Page 22: Wfuzz for Penetration Testers

2010.. Facebook – Access Any Users Photo Albums

http://www.facebook.com/album.php?aid=-3&id=1508034566&l=aad9c aid=-3 (-3 for every public profile album) id=0123456789 (Obtained by searching for the user and hovering over the add friend button) l=? (all we know is its 5 characters from the 0123456789abcdef range)

Page 23: Wfuzz for Penetration Testers

2010...

Page 24: Wfuzz for Penetration Testers

2010...

Webservice “/config/isp_verify_user”

http://l33.login.scd.yahoo.com/config/isp_verify_user?l=USERNAME&p=PASSWORD!

OK:0:username ERROR:101:Invalid Password

ERROR:102:Invalid Login

Page 25: Wfuzz for Penetration Testers

2010...

python wfuzz.py -c -z file -f wordlists/common.txt --hc 200 -d"[email protected]&input_password=FUZZ&timezone=1" "https://www.tuenti.com/?m=Login&func=do_login"

Page 26: Wfuzz for Penetration Testers

Tools

Page 27: Wfuzz for Penetration Testers

Webslayer

•  The main objective is to provide to the security tester a tool to perform highly customized brute force attacks on web applications, and a useful results analysis interface. It was designed thinking in the professional tester.

Evolution of WFUZZ

Page 28: Wfuzz for Penetration Testers

Webslayer

"   Predictable credentials (HTML Forms and HTTP)!

"   Predictable sessions identifier (cookies,hidden fields, url)!

"   Predictable resource location (directories and files)!

"   Variables values and ranges!

"  Cookies!

"  WebServices methods!

Page 29: Wfuzz for Penetration Testers

Webslayer

"  Encodings: 15 encodings supported!

"  Authentication: supports Ntml and Basic (known or guess)!

"  Multiple payloads: you can use 2 payloads in different parts!

"  Proxy support (authentication supported!

"  Multithreads!

"  Multiple filters for improving the performance and for producing cleaner results !

Page 30: Wfuzz for Penetration Testers

Webslayer

"  Predictable resource location: Recursion, common extensions, non standard code detection (Huge collection of dictionaries) !

"  Advanced payload generation!

"  Live filters!

"  Session saving/restoring!

"   Integrated browser (webKit)!

"  Full page screenshot!

Page 31: Wfuzz for Penetration Testers

Webslayer

"   Multiple OS, Linux, Windows and OSX

"   Python, QT

Page 32: Wfuzz for Penetration Testers

Payload Generation

"  Payload generator:!"  Usernames!

"  Credit Card numbers!

"   Permutations!

"  Character blocks!

"   Ranges!

"   Files!

"   Pattern creator and regular expression (encoders) !

Page 33: Wfuzz for Penetration Testers

Resource location prediction

"   Based on the idea of Dirb (Darkraver)!

"   Custom dictionaries of know resources or common passwords!

"   Servers: Tomcat,Websphere,Weblogic,Vignette,etc!

"  Common words: common (950), big (3500), spanish!

"  CGIs (vulnerabilities)!

"  Webservices !

"   Injections (SQL, XSS, XML,Traversals)!

Page 34: Wfuzz for Penetration Testers

Cool uses

"   Sweep an entire range with a common dictionary!

"   Scanning through proxies!

"   Bruteforce users with a group of valid passwords (Horizontal bruteforce)!

Page 35: Wfuzz for Penetration Testers
Page 36: Wfuzz for Penetration Testers
Page 37: Wfuzz for Penetration Testers

References " http://www.owasp.org/index.php/Testing_for_Brute_Force_(OWASP-AT-004)

" http://projects.webappsec.org/Predictable-Resource-Location

" http://projects.webappsec.org/Credential-and-Session-Prediction

" http://projects.webappsec.org/Brute-Force

" http://www.technicalinfo.net/papers/StoppingAutomatedAttackTools.html

" http://gawker.com/5559346/

" http://tacticalwebappsec.blogspot.com/2009/09/distributed-brute-force-attacks-against.html

" http://praetorianprefect.com/archives/2010/06/114000-ipad-owners-the-script-that-harvested-their-e-mail-addresses/

" http://www.securitybydefault.com/2009/07/no-no-uses-captchas-ni-ningun-otro.html

" http://nukeit.org/facebook-hack-access-any-users-photo-albums/