23
By Josh Sokol

Using Proxies To Secure Applications And More

Embed Size (px)

DESCRIPTION

The last Austin OWASP presentation of the year is a must see for anyone responsible for the security of a web application. It is a demonstration of the various types of proxy software and their uses. We've all heard about WebScarab, BurpSuite, RatProxy, or Paros but how familiar are you with actually using them to inspect for web security issues? Did you know that you can use RatProxy for W3C compliance validation? By the time you leave this presentation, you will be able to go back to your office and wow your co-workers with the amazing new proxy skills that you've acquired.

Citation preview

Page 1: Using Proxies To Secure Applications And More

By Josh Sokol

Page 2: Using Proxies To Secure Applications And More

# whoami

Josh Sokol ([email protected]) B.S. in Computer Science Cisco Certified Network Associate

(CCNA) SANS GIAC in Web Application Security

(GWAS) Web Systems Engineer for National

Instruments Own the Web Systems “Security

Practice”

Page 3: Using Proxies To Secure Applications And More

Some Questions To Be Answered What’s this proxy thing everyone is

talking about? When and why should I use a proxy? My company doesn’t like to spend

money on security so why are you wasting my time?

Talk is cheap…show me how it works!

Page 4: Using Proxies To Secure Applications And More

What is a Proxy?

A process that accepts requests for some service and passes them on to the real server.

Request

Request

Proxy

Page 5: Using Proxies To Secure Applications And More

Types of Proxies

Caching Proxy Web Proxy Content-filtering Web Proxy Anonymizing Proxy Hostile Proxy Intercepting Proxy Forced Proxy Open Proxy Reverse Proxy

Page 6: Using Proxies To Secure Applications And More

•Firefox•Extension: SwitchProxy•Tor and Privoxy

Act I – Anonymizing Proxies

Page 7: Using Proxies To Secure Applications And More

Anonymizing Proxies

http://www.whatismyip.com Start Tor and Privoxy Select “Tor” from SwitchProxy http://www.whatismyip.com

Am I really anonymous?Kinda, but not really. My HTTP requests are being passed through the proxy, but what about DNS? Also, does my proxy know who I am? Yes!

Problems•Speed•False sense of security

Page 8: Using Proxies To Secure Applications And More

Proxy 4 Free List

http://www.proxy4free.com/page1.html

Page 9: Using Proxies To Secure Applications And More

•Apache

•mod_proxy

Act II – Reverse Proxies

Page 10: Using Proxies To Secure Applications And More

Reverse Proxies

ProxyRequests Off<Location /owasp> ProxyPass http://www.owasp.org ProxyPassReverse

http://www.owasp.org Order allow,deny allow from all</Location>

http://doughboy.homeip.net/owasp

Page 11: Using Proxies To Secure Applications And More

Benefits of Reverse Proxies Single machine acts as a gateway to

the real servers in the network. Use mod_cache (and

mod_mem_cache) to keep static documents in memory.

Single point of authentication

Page 12: Using Proxies To Secure Applications And More

•Firefox•Extension: SwitchProxy•Extension: Tamper Data | Google Ratproxy | OWASP WebScarab

Act III – Intercepting Proxies

Page 13: Using Proxies To Secure Applications And More

Tamper Data

Use tamperdata to view and modify HTTP/HTTPS headers and post parameters.

Trace and time http response/requests.

Security test web applications by modifying POST parameters.

Page 14: Using Proxies To Secure Applications And More

Tamper Data Example

http://www.altoromutual.com Username: jsmith Password: Demo1234

Page 15: Using Proxies To Secure Applications And More

Google Ratproxy

A semi-automated, largely passive web application security audit tool, optimized for an accurate and sensitive detection, and automatic annotation, of potential problems and security-relevant design patterns based on the observation of existing, user-initiated traffic in complex web 2.0 environments.

Detects and prioritizes broad classes of security problems, such as dynamic cross-site trust model considerations, script inclusion issues, content serving problems, insufficient XSRF and XSS defenses, and much more.

Page 16: Using Proxies To Secure Applications And More

Using Ratproxy with Cygwin Install Cygwin with make, gcc-core,

openssl-dev, and openssl utilities. Download Ratproxy. Modify the make file by removing the

“-Wno-pointer-sign”. Download the Flare action script

decompiler. “make” Ratproxy. Add the Cygwin libraries to your

Windows path.

Page 17: Using Proxies To Secure Applications And More

Google RatProxy Example

ratproxy.exe –v C:\cygwin –w ratproxy.log –p 8282 –d yourdomain.com –lfscm

Tell SwitchProxy to use Ratproxy. Surf! sh ratproxy-report.sh ratproxy.log >

report.html

Page 18: Using Proxies To Secure Applications And More

OWASP WebScarab

WebScarab is a framework for analyzing applications that communicate using the HTTP and HTTPS protocols.

In its most common usage, WebScarab operates as an intercepting proxy, allowing the operator to review and modify requests created by the browser before they are sent to the server, and to review and modify responses returned from the server before they are received by the browser.

Page 19: Using Proxies To Secure Applications And More

OWASP WebScarab Example

Start WebScarab. Check the “Proxy” tab to verify port

configuration. Tell SwitchProxy to use WebScarab. Surf http://www.altoromutual.com! Change cookie information. Change GET/POST information.

Page 20: Using Proxies To Secure Applications And More

OWASP WebScarab Example 2Web Services Google search for inurl:”?wsdl” http://www.altoromutual.com/bank/

ws.asmx?WSDL http://www.weather.gov/forecasts/xml/

SOAP_server/ndfdXMLserver.php?wsdl http://terraservice.net/TerraService.asmx?

WSDL http://webservices.amazon.com/

AWSECommerceService/AWSECommerceService.wsdl

Page 21: Using Proxies To Secure Applications And More

Other Cool Features of WebScarab Site Spider XSS/CSRF Session ID Analysis Fuzzer

Page 22: Using Proxies To Secure Applications And More

Other FREE Proxy Software Paros (http://www.parosproxy.org/)

Through Paros's proxy nature, all HTTP and HTTPS data between server and client, including cookies and form fields, can be intercepted and modified.

Burp Suite (http://portswigger.net/suite/) Burp Suite is an integrated platform for attacking

web applications. It contains all of the Burp tools with numerous interfaces between them designed to facilitate and speed up the process of attacking an application. All tools share the same robust framework for handling HTTP requests, authentication, downstream proxies, logging, alerting and extensibility.

Page 23: Using Proxies To Secure Applications And More