Pwning Intranets with HTML5



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

Security Threat Kill Chain What log data would you need to identify an APT and perform forensic analysis?

Port Scanning and Vulnerability Assessment. ECE4893 Internetwork Security Georgia Institute of Technology

Sitefinity Security and Best Practices

Web Application Threats and Vulnerabilities Web Server Hacking and Web Application Vulnerability

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

DNS REBINDING DENIS BARANOV, POSITIVE TECHNOLOGIES

Penetration Testing. NTS330 Unit 1 Penetration V1.0. February 20, Juan Ortega. Juan Ortega, juaorteg@uat.edu. 1 Juan Ortega, juaorteg@uat.

Learn Ethical Hacking, Become a Pentester

Web Tracking for You. Gregory Fleischer

Web Application Vulnerability Testing with Nessus

McAfee Certified Assessment Specialist Network

Bust a cap in a web app with OWASP ZAP

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

ANNEXURE-1 TO THE TENDER ENQUIRY NO.: DPS/AMPU/MIC/1896. Network Security Software Nessus- Technical Details

Penetration Testing with Kali Linux

Vulnerability Assessment and Penetration Testing

VULNERABILITY ASSESSMENT WHITEPAPER INTRODUCTION, IMPLEMENTATION AND TECHNOLOGY DISCUSSION

1 Scope of Assessment

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

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

Hacking Intranet Websites from the Outside (Take 2) Fun With & Without JavaScript Malware

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

During your session you will have access to the following lab configuration. CLIENT1 (Windows XP Workstation) /24

PTSv2 in pills: The Best First for Beginners who want to become Penetration Testers. Self-paced, online, flexible access

How-to: DNS Enumeration

How Your Computer Accesses the Internet through your Wi-Fi for Boats Router

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

CS 558 Internet Systems and Technologies

MWR InfoSecurity Security Advisory. pfsense DHCP Script Injection Vulnerability. 25 th July Contents

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

CS2107 Introduction to Information and System Security (Slid. (Slide set 8)

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

Outline. Outline. Outline

HTML5. Eoin Keary CTO BCC Risk Advisory.

Administering the Web Server (IIS) Role of Windows Server

Is the Scanning of Computer Networks Dangerous?

Next Generation Clickjacking

Firewalls and Software Updates

How to hack a website with Metasploit

Using Nessus In Web Application Vulnerability Assessments

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Web Application Security

Webapps Vulnerability Report

How to Hack Millions of Routers. Craig Heffner, Seismic LLC

Divide and Conquer Real World Distributed Port Scanning

(WAPT) Web Application Penetration Testing

W3Perl A free logfile analyzer

1 hours, 30 minutes, 38 seconds Heavy scan. All scanned network resources. Copyright 2001, FTP access obtained

Looking for Trouble: ICMP and IP Statistics to Watch

Social Engineering Toolkit

Tools for penetration tests 1. Carlo U. Nicola, HT FHNW With extracts from documents of : Google; Wireshark; nmap; Nessus.

EKT 332/4 COMPUTER NETWORK

FortiWeb 5.0, Web Application Firewall Course #251

Firewall Firewall August, 2003

The Nexpose Expert System

Preparing for the Cross Site Request Forgery Defense

Instructions for Activating and Configuring the SAFARI Montage Managed Home Access Software Module

Ethical Hacking as a Professional Penetration Testing Technique

Administrator s Guide

Release Notes for Websense Security v7.2

QualysGuard WAS. Getting Started Guide Version 4.1. April 24, 2015


Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

COURSE NAME: INFORMATION SECURITY INTERNSHIP PROGRAM

Bank Hacking Live! Ofer Maor CTO, Hacktics Ltd. ATC-4, 12 Jun 2006, 4:30PM

Armitage. Part 1. Author : r45c4l Mail : infosecpirate@gmail.com.

Cisco IPS Tuning Overview

Malicious Network Traffic Analysis

Networks and Security Lab. Network Forensics

How To Create A Spam Detector On A Web Browser

Penetration Testing Report Client: Business Solutions June 15 th 2015

Attacks and Defense. Phase 1: Reconnaissance

HTTPParameter Pollution. ChrysostomosDaniel

Web Vulnerability Scanner by Using HTTP Method

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

Automated Penetration Testing with the Metasploit Framework. NEO Information Security Forum March 19, 2008

April 11, (Revision 2)

Quick Installation Guide

Internet Explorer turns your personal computer into a publicfile Server

A43. Modern Hacking Techniques and IP Security. By Shawn Mullen. Las Vegas, NV IBM TRAINING. IBM Corporation 2006

MWR InfoSecurity Security Advisory. BT Home Hub SSID Script Injection Vulnerability. 10 th May Contents

Web Application Firewall

Advancements in Botnet Attacks and Malware Distribution


Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

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

Shellshock. Oz Elisyan & Maxim Zavodchik

Setting Up Scan to SMB on TaskALFA series MFP s.

Acunetix Web Vulnerability Scanner. Manual V6.5. By Acunetix Ltd.

Controlling Risk, Conserving Bandwidth, and Monitoring Productivity with Websense Web Security and Websense Content Gateway

Finding and Preventing Cross- Site Request Forgery. Tom Gallagher Security Test Lead, Microsoft

Penetration Testing Workshop

National Endowment for the Arts Evaluation Report. Table of Contents. Results of Evaluation Areas for Improvement Exit Conference...

Course Content: Session 1. Ethics & Hacking

Getting Started with PRTG Network Monitor 2012 Paessler AG

Security Basics - Lessons From a Paranoid. Stuart Larsen Yahoo! Paranoids - Pentest

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

Bypassing Internet Explorer s XSS Filter

A Quick Guide to Publish Thecus NAS on Internet. Contents

Transcription:

Javier Marcos de Prado Juan Galiana Lara Pwning Intranets with HTML5 2009 IBM Corporation

Agenda How our attack works? How we discover what is in your network? What does your infrastructure tell us for free? Diagrams your administrator want and we now have No limit communication = exploitation Demo Conclusions References and Links 2

How our attack works? 3

Attack vector 4

How we discover what is in your network? 5

Why would you use HTML5? HTML5 ~= HTML + JS + CSS 6 Backwards compatibility with HTML4 New tags in, old tags out JavaScript APIs Canvas, WebGL, geolocation, native media support Cross-Domain communication You will have to eventually

Why would we use HTML5? HTML5 ~= HTML + JS + CSS WebSockets CORS WebWorkers Javascript APIs 7

What is BeEF? BeEF: Browser Exploitation Framework Brought to public by Wade Alcorn in 2005 Powerful tool to squeeze XSS attacks, owning completely the client (victim) machine and providing a complete C&C Different modules to attack in real time: OS/Browser/plugins information, opened sessions, visited links, custom JS... Great to scare people who think that XSS is a popup! 8

HTML5 + BeEF The attack can be triggered by: Spot a victim with access to the Intranet Trick victim to visit a malicious website Follow a link: url shorteners, twitter, facebook... Phishing Cross-Site-Scripting BeEF as Command & Control for hooked victims Our HTML5 code will run through BeEF in the victim 9

What does your infrastructure tell us for free? 10

Using a technique known as footprinting We want... 11 Locate network range Identify active machines Unearth internal hostnames Discover open ports Detect operating systems Uncover services on ports Map the network

Toolkit: Modules in BeEF Control Panel to manage hooked browsers Comes out of the box with a set of Modules You can develop and add your own module! 12

Toolkit: Add your own module 13

Discover Internal Network Get Network Settings Get the local IP address of the hooked browser Know the internal network that the victim is connected to 14

Ping 15

Ping sweep Discover active machines in the intranet or adjacent networks Ping over a Class C network Iterates the whole network ip range Example: 192.168.1.1-192.168.1.254 16

Intranet footprinting Discover web servers in port 80 and 8080 Scans for Apache, IIS.. and known Routers and Printers It works trying to load known images resources and handling the onload event What if there is an interesting host at intranet.company.com 10.126.209.198? 17

DNS enumeration Discover internal hostnames Most important servers normally have a DNS associated to their IP Address If we try to resolve intranet in a web browser the web browser will try to resolve intranet.company.com 18

DNS enumeration We can not resolve DNS in JavaScript We can make cross-domain request with Cross Origin Resource Sharing and WebSockets Process of extracting hostnames using dictionary and timing attacks TODO: Run multiple threads in parallel with WebWorkers Jump to adjacent networks, common hostnames are intranet, ftp, webmail... 19

DNS enumeration Using a dictionary of possible subdomains is possible to discover internal hostnames 20

Port Scanning Analogy: Figure out what a building does by looking at the door Most known port scanner: Nmap What information can I extract from port scanning? Basic OS Fingerprinting Service probing Filtered ports sometimes appear as open Port filtered Firewall Juicy stuff! INFORMATION INFORMATION INFORMATION 21

Port Scanning Most intranets are not filtered FUN! Finding services to kick off an APT Basic port scanning: OPEN or CLOSED? Classic approach: img/iframe src + JavaScript HTML5 approach: CORS and WebSockets + JavaScript Problems? Firefox, WebSockets and CORS block known ports Solution! Use a different protocol: ftp still rocks Similar to basic TCP nmap scan: Example: nmap -st hostname -p PORT 22

Port Scanning: Beating protections Blocking example for known ports: (Firefox, WebSockets and CORS) http://example.com:22 Workaround! ftp://example.com:22 It works on Internet Explorer, Mozilla Firefox, Google Chrome and Safari Based on timeouts, it can be configured 23

Port Scanning module Scan can be performed using ranges, lists or single ports Uses a mixed method to workaround security measures: ports blocked can be still scanned! 24

Diagrams your administrator wants 25

Network Topology All the previous techniques have been successful and the pwnage is close... What to do now? Show results! All the information gathered previously, displayed in a nice format Simple OS fingerprinting performed Looks great on reports... 26

Network Topology 27

No limits communication = exploitation 28

Inter-protocol Launch requests from a web browser to non HTTP-based services How? Playing with 'POST' forms Using the multipart/form-data encoding type Services will ignore lines like the http headers but will execute the commands they understand 29

Inter-protocol: IRC 30

Inter-protocol: exploitation Exploit vulnerabilities within the internal network to gain control Force the victim to send a request to the internal host The vulnerability triggers and execute the shellcode The shellcode launches a bind shell or back-connect shell to gain full-control to the remote machine 31

Inter-protocol: exploitation 32

Demo 33

Conclusions An attacker could get information from your network As well could exploit and communicate to the network Use No-script plugin for Firefox in order to protect! Users are exposed to HTML5 features abuse each time they visit a website Browsers should block this kind of request by default 34

References and Links OWASP http://www.owasp.org BeEf explotation framework http://code.google.com/p/beef/ Any query? Give us a shout! @jgaliana @javutin Thanks! 35