+ All Categories
Home > Documents > By Josh Sokol. # whoami Josh Sokol ([email protected]) B.S. in Computer Science Cisco Certified...

By Josh Sokol. # whoami Josh Sokol ([email protected]) B.S. in Computer Science Cisco Certified...

Date post: 15-Dec-2015
Category:
Upload: christian-gleaves
View: 218 times
Download: 0 times
Share this document with a friend
Popular Tags:
23
USING PROXIES TO SECURE APPLICATIONS AND MORE By Josh Sokol
Transcript
Page 1: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

USING PROXIES TO SECURE APPLICATIONS AND MOREBy Josh Sokol

Page 2: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

# 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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

•Firefox

•Extension: SwitchProxy

•Tor and Privoxy

Act I – Anonymizing Proxies

Page 7: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

Proxy 4 Free List

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

Page 9: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

•Apache

•mod_proxy

Act II – Reverse Proxies

Page 10: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

•Firefox

•Extension: SwitchProxy

•Extension: Tamper Data | Google Ratproxy | OWASP WebScarab

Act III – Intercepting Proxies

Page 13: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

Tamper Data Example

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

Page 15: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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 21: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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

Page 22: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

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: By Josh Sokol. # whoami  Josh Sokol (josh.sokol@ni.com)  B.S. in Computer Science  Cisco Certified Network Associate (CCNA)  SANS GIAC in Web Application.

Recommended