Module 45 (More Web Hacking)



Similar documents
(WAPT) Web Application Penetration Testing

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

Ethical Hacking as a Professional Penetration Testing Technique

Cyber Security Workshop Ethical Web Hacking

User and Programmer Guide for the FI- STAR Monitoring Service SE

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Anatomy of a Pass-Back-Attack: Intercepting Authentication Credentials Stored in Multifunction Printers

Qualys API Limits. July 10, Overview. API Control Settings. Implementation

Hack Yourself First. Troy troyhunt.com

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

CloudOYE CDN USER MANUAL

Information Extraction Art of Testing Network Peripheral Devices

Web attacks and security: SQL injection and cross-site scripting (XSS)

Using Foundstone CookieDigger to Analyze Web Session Management

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

Playing with Web Application Firewalls

Hypertext for Hyper Techs

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

No. Time Source Destination Protocol Info HTTP GET /ethereal-labs/http-ethereal-file1.html HTTP/1.

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

APACHE HTTP SERVER 2.2.8

Project 2: Web Security Pitfalls

Sticky Session Setup and Troubleshooting

Check list for web developers

Playing with Web Application Firewalls

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Dynamic Content. Dynamic Web Content: HTML Forms CGI Web Servers and HTTP

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

HTTP Fingerprinting and Advanced Assessment Techniques

A Tale of the Weaknesses of Current Client-side XSS Filtering

Cyber Security Challenge Australia 2014

HTTP Authentication. RFC 2617 obsoletes RFC 2069

Acunetix Website Audit. 5 November, Developer Report. Generated by Acunetix WVS Reporter (v8.0 Build )

Automated Vulnerability Scan Results

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

Introduction to Computer Security

HTTP Protocol. Bartosz Walter

Web Security Testing Cookbook*

STABLE & SECURE BANK lab writeup. Page 1 of 21

The Hyper-Text Transfer Protocol (HTTP)

URLs and HTTP. ICW Lecture 10 Tom Chothia

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

Lecture 11 Web Application Security (part 1)

Network Technologies

1. Building Testing Environment

Secure Web Development Teaching Modules 1. Threat Assessment

Internet Technologies 4-http. F. Ricci 2010/2011

Vodia PBX RESTful API (v2.0)

ivoyeur: permission to parse

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

Project #2. CSE 123b Communications Software. HTTP Messages. HTTP Basics. HTTP Request. HTTP Request. Spring Four parts

WP4: Cloud Hosting Chapter Object Storage Generic Enabler

CIT 380: Securing Computer Systems

Internet Technologies Internet Protocols and Services

Exercises: FreeBSD: Apache and SSL: SANOG VI IP Services Workshop

Application layer Web 2.0

Virtual Code Authentication User s Guide. June 25, 2015

Chapter 1 Web Application (In)security 1

Hack Yourself First. Troy troyhunt.com

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

T14 SECURITY TESTING: ARE YOU A DEER IN THE HEADLIGHTS? Ryan English SPI Dynamics Inc BIO PRESENTATION. Thursday, May 18, :30PM

Anomaly Detection Using Negative Security Model in Web Application

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Exploiting Local File Inclusion in A Co-Hosting Environment

HP WebInspect Tutorial

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

HTTP Caching & Cache-Busting for Content Publishers

Cache All The Things

Essential IT Security Testing

GET /FB/index.html HTTP/1.1 Host: lmi32.cnam.fr

Firewalls and Software Updates

Configure Single Sign on Between Domino and WPS

A Server and Browser-Transparent CSRF Defense for Web 2.0 Applications. Slides by Connor Schnaith

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Cross Site Scripting in Joomla Acajoom Component

Internet Banking System Web Application Penetration Test Report

Web application security: Testing for vulnerabilities

of HTTP Headers Dirk Licence:

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

Secure Coding SSL, SOAP and REST. Astha Singhal Product Security Engineer salesforce.com

Advanced Web Security, Lab

Extending Remote Desktop for Large Installations. Distributed Package Installs

SECURITY ADVISORY. December 2008 Barracuda Load Balancer admin login Cross-site Scripting

CS615 - Aspects of System Administration

Managing Qualys Scanners

How to configure Linksys SPA for VOIP Connections

CMP3002 Advanced Web Technology

Release: August Gluster Filesystem Unified File and Object Storage Beta 2

CDN Operation Manual

Modern Web Development From Angle Brackets to Web Sockets

The Web History (I) The Web History (II)

Transcription:

(More Web Hacking) In this Module, you'll lear how to use netcat to perform cursory server reconnaissance. You'll lear what a web proxy is and how it functions. You'll know how to enable your browser to use a web proxy and you'll know how to run the Burp suite to perform interception and editing of web requests. You'll be able to use this to perform Javascript validation bypass. You'll know how the Cookie Manager functions and use it to forge session tokens. 1/23

Finding Out About Web Servers using netcat root@kali:~# nc 192.168.1.191 80 GET / HTTP/1.0 Response Code followed by Headers HTTP/1.1 200 OK Date: Tue, 26 Nov 2013 15:26:01 GMT Server: Apache/2.2.22 (Ubuntu) Last-Modified: Tue, 29 Oct 2013 14:24:01 GMT ETag: "2215-119-4e9e1f7cd467d" Accept-Ranges: bytes Content-Length: 281 Vary: Accept-Encoding Connection: close Content-Type: text/html Server Version <html><body> <h1><center>welcome to Samurai-WTF!</center></h1> <script> commandmodulestr = '<script src="' + window.location.protocol + '//' + window.location.host + ':3000/hook.js type="text/javascript"><\/script>'; document.write(commandmodulestr); </script> What's this? (See next module.) </body></html> 2/23

More Information From nc root@kali:~# nc 192.168.1.191 80 GET /mutillidae/ HTTP/1.1 Host: 192.168.1.191 Host header required for HTTP/1/1 Request HTTP/1.1 200 OK Date: Tue, 26 Nov 2013 15:34:31 GMT PHP Version Server: Apache/2.2.22 (Ubuntu) (may have known flaws) X-Powered-By: PHP/5.3.10-1ubuntu3.2 Set-Cookie: PHPSESSID=gfn67c5ohin7r0qrqfv023c4a4; path=/ Set-Cookie: showhints=0 Logged-In-User: Vary: Accept-Encoding Transfer-Encoding: chunked Cookies from server Content-Type: text/html 278a <!-- I think the database password is set to blank or perhaps samurai. 3/23

Web Connection Without Proxy Typical Connection Web browser directly communicates with server. Web Server Apache (80) iceweasel(49785) 4/23

Web Connection With Proxy Instead of directly communicating to the web site, your browser connects to a proxy which forwards requests and responses. Web Server Apache (80) burpsuite(8080) iceweasel(49785) 5/23

Why Would I Ever Want a Proxy? Proxies can provide benefits: Store commonly referenced pages Restrict web usage Track web usage Much, much, more The Burp Suite implements a web proxy that provides the ability to capture, edit, replay, manipulate, and programmatically control the interactions between a web browser and any servers it may contact. 6/23

The Burp Suite Proxy Start burp in Kali by selecting Applications->Kali Linux->Web Applications ->Web Application Proxies->burpsuite 7/23

Configuring Burp Interception Proxy On the Proxy->Options Tab make sure the interface is set to 127.0.0.1:8080 8/23

Configuring IceWeasel Ice Weasel Edit->Preferences->Advanced ->Network->Settings Manual proxy configuration should be 127.0.0.1:8080 9/23

Intercepting Requests/Responses On the Burp proxy/intercept page Note that Intercept is on. 10/23

Navigate to a Web Page When navigating to 192.168.1.191/mutillidae our browser hangs. Inspecting burp shows this: 11/23

Javascript Validation Bypass Servers may try to enforce security by using Javascript client-side code to validate input. Because the server is trusting the browser to do the right thing and because the browser is under the user's control, this is inherently unreliable. The burp intruder can be effectively used to bypass client-side validation. 12/23

Toggle Security on Mutillidae to 1 The login page now protects the page with a javascript filter that disallows quote and other special characters. 13/23

Disable Javascript? Disabling Javascript doesn't help too much because the page requires javascript to render correctly. 14/23

Use Burp To Bypass the check Set burp interceptor on, enter values that will pass the Javascript filter in the Name and Password fields. 15/23

Burp View Data sent to the host has been intercepted. username and password are both xyz 16/23

Edit Data in Burp Before Forwarding Change username to ' or 1 == 1 -- and then forward to server. 17/23

Success! Response shows we are now logged in as admin. Turn Intercept off and go about your business as admin. Admin user 18/23

Forging Session Tokens If multiple web pages must be visited in the context of a single session, the server must maintain some kind of session token in the user's browser. If the security of the session information is weak, an attacker may be able to forge information from another user. 19/23

Register a new user Register a new user. Then log in. 20/23

Look at the Cookies with Cookie Manager The Cookie Manager Firefox extension is installed in Samurai WTF. 21/23

You Can Edit the UID Session Cookie In this case, klaatu (the new user) has uid 19. We can edit this to substitute a more interesting value (like 1). 22/23

Success Navigating to any page thereafter (here we pressed What Should I Do?) shows we are logged in as admin. Admin user 23/23