Auditing WebObjects applications. Ilja van Sprundel <ivansprundel@ioactive.com>



Similar documents
WebObjects Web Applications Programming Guide. (Legacy)

Securing ios Applications. Dr. Bruce Sams, OPTIMAbit GmbH

Carlos Muñoz Application Security Engineer WhiteHat

Creating a Guest Book Using WebObjects Builder

Project 2: Web Security Pitfalls

Security Products Development. Leon Juranic

Bypassing Internet Explorer s XSS Filter

Thomas Röthlisberger IT Security Analyst

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

Advanced Tornado TWENTYONE Advanced Tornado Accessing MySQL from Python LAB

Intrusion detection for web applications

Web Application Security

Electronic Ticket and Check-in System for Indico Conferences

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

External Network & Web Application Assessment. For The XXX Group LLC October 2012

XSS Lightsabre techniques. using Hackvertor

T320 E-business technologies: foundations and practice

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

Still Aren't Doing. Frank Kim

The Django web development framework for the Python-aware

Phishing by data URI

Finding XSS in Real World

Hack-proof Your Drupal App. Key Habits of Secure Drupal Coding

Web Development with Flask and the Raspberry Pi Leading by Example CUAUHTEMOC CARBAJAL ITESM CEM 22/04/2014

InternetVista Web scenario documentation

Page 18. Using Software To Make More Money With Surveys. Visit us on the web at:

Web Applications. Originals of Slides and Source Code for Examples:

WebCruiser Web Vulnerability Scanner Test Report. Input Vector Test Cases Cases Count Report Pass Rate. Erroneous 200 Responses %

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

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

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

The Social Accelerator Setup Guide

Step by step guides. Deploying your first web app to your FREE Azure Subscription with Visual Studio 2015

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

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

CS 155 Final Exam. CS 155: Spring 2013 June 11, 2013

At the most basic level you need two things, namely: You need an IMAP account and you need an authorized source.

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

Recommended readings. Lecture 11 - Securing Web. Applications. Security. Declarative Security

Pentesting Web Frameworks (preview of next year's SEC642 update)

Using WhatCounts Publicaster Edition To Send Transactional s

TACKYDROID. Pentesting Android Applications in Style

CGI Programming. What is CGI?

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

Dove User Guide Copyright Virgil Trasca

Web development... the server side (of the force)

MetaXSSploit. Bringing XSS in Pentesting A journey in building a security tool. Claudio

ECE458 Winter Web Security. Slides from John Mitchell and Vitaly Shmatikov (Modified by Vijay Ganesh)

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

SAP: Session (Fixation) Attacks and Protections

How To Understand The History Of The Web (Web)

TCP/IP Networking, Part 2: Web-Based Control

Some Notes on Web Application Firewalls

Magento Security and Vulnerabilities. Roman Stepanov

Mobile development with Apache OFBiz. Ean Schuessler, Brainfood

Yandex.Widgets Quick start

Web Application Penetration Testing

Direct Mail Tutorial

1. Building Testing Environment

Here s how to choose the right mobile app for you.

SAML single sign-on configuration overview

CS 558 Internet Systems and Technologies

JVA-122. Secure Java Web Development

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

Advanced Web Technology 10) XSS, CSRF and SQL Injection 2

Web Application Security

Working with Databases

Comparing Application Security Tools

Ruby on Rails Secure Coding Recommendations

JISIS and Web Technologies

State of The Art: Automated Black Box Web Application Vulnerability Testing. Jason Bau, Elie Bursztein, Divij Gupta, John Mitchell

Barracuda Web Application Firewall vs. Intrusion Prevention Systems (IPS) Whitepaper

Working with Indicee Elements

Cross-site site Scripting Attacks on Android WebView

Portals and Hosted Files

Sichere Webanwendungen mit Java

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

The end. Carl Nettelblad

Overview. How It Works

SESSION IDENTIFIER ARE FOR NOW, PASSWORDS ARE FOREVER

Web application Architecture

Abusing HTML5. DEF CON 19 Ming Chow Lecturer, Department of Computer Science TuCs University Medford, MA

Moving beyond hardware

Testing the OWASP Top 10 Security Issues

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

Webapps Vulnerability Report

Introduction to Computer Security

Website Promotion for Voice Actors: How to get the Search Engines to give you Top Billing! By Jodi Krangle

Step One Check for Internet Connection

Penetration from application down to OS

What is Web Security? Motivation

Salesforce Mobile Push Notifications Implementation Guide

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

Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH January 17, Mega Conference

Cross Site Scripting in Joomla Acajoom Component

Transcription:

Auditing WebObjects applications Ilja van Sprundel <ivansprundel@ioactive.com>

Who am I? Ilja van sprundel IOActive netric blogs.23.nu/ilja

Agenda Why? Escaping data Introduction Deployment issues WebObjects? Components todo html wod conclusion java Direct actions Q&A what do Direct actions and Component requests look like? response splitting escaping data

Why? not really all that common I ve had to codereview and pentest WebObject webapps there is virtually _NOTHING_ published about WebObjects (in terms of security) These are my notes (in a more coherent form)

Introduction This talk is about WebObjects How it looks from an code reviewing perspective...... and a pentesting perspective not about new types of webbugs or attackvectors

Introduction Will walk through how most WebObjects more or less look and feel what s required to make it work what you care about from a security point of view will only consider WebObject specifics. if it ain t related to WebObject api s and classes I m not covering it limited to rendering (for now)

WebObjects? An application server By Apple Application server Web Application framework

WebObjects? Early versions (up untill 4.x) used objectivec MacOSX only later versions (5.x) are pure java and can be deployed anywhere this talk will only cover the later versions

Components Rather object orientated way of making web applications each web application is seen as a collection of components each component exist out of 3 basic things: html file (.html) object definition file (.wod) java source code files (.java)

components example hw.html <html> <head> <title>untitled</title> </head> <body> Hello World <webobject name = "Now"> </webobject> </body> </html> hw.java hw.wod Now: WOString { value = now; dateformat = "%m%d%y"; } package your.app.components; import com.webobjects.foundation.*; public class hw extends WOComponent { private static final long serialversionuid = 1L; public hw(wocontext context) { super(context); } public NSTimestamp now() { return new NSTimestamp(); }

.html file WebObject html files also support a <webobject> tag <webobject name= name >...</webobject> only a name is given, nothing else it s defined in the.wod file

.wod.wod file specifies what type of objects there s quite a few of them WOString WOHyperlink WOImage WOTextField WOForm WOButton... you can also embed your own objects in there

.wod Each of these types has attributes most of these types get rendered into html eventually not really any consistency among them some do encode, some dont not documented at all! the attributes can be static or can all into java code

WOString does html escaping by default has an attribute HTMLescape set to True by default XSS possible if set to false

name1: WOString { value = getvalue; } Not vuln to xss name2: WOString { value = getvalue; escapehtml = false; } Vulnerable to xss

WOHyperlink href attribute does not encode with absolute url s does encode with relative ones

WOImage src attribute like WOHyperlink s href filename is properly encoded value is properly encoded aswell

WOTextField both value and name are properly encoded

WOForm href never encoded, vuln to xss has an attribute named querydictionary callback returns a dict of key/value pairs will be used as <input> tags inside the form key is not encoded! value is properly encoded name is not encoded

many more none are documented (as in, how is encoding handled) can also include other WOComponents

.java file Each components is seen as a class extends from WOComponent it s constructor has 1 argument WOContext basically an http context (contains stuff like request, response, session,...) all it s methods can call context() to get the current WOContext

.java file Classes you want to know about: WORequest is class for the http request WOResponse is class for http response WOSession holds the session all methods can call session() to get it WOContext is the http context

WOComponent all components inherit from this one some of it s methods (always) get called can be seen as entry- and exit-points Constructor AppendToResponse() (if derived class overwrote it)

public class Main extends WOComponent { public Main(WOContext context) { super(context); } } public void appendtoresponse(woresponse response, WOContext ctx) { super.appendtoresponse(response, ctx); } response.setcontent(ctx.request().stringformvalueforkey("xss") );

Direct actions More light weight than Component based easier to wrap your head around class that extends from WODirectAction no.html file no.wod file pretty straight forward

Direct actions implements methods that look like public WOActionResults NameAction() {... } basically <anything>action() that looks like that can directly get called with GET or POST

Direct actions method request() available which provides the current WORequest

what does it look like Calling Component action directly: http://site/cgi-bin/webobjects/ applicationname.woa/wo/ component.wo?... Calling Direct action directly: http://site/cgi-bin/webobjects/ applicationname.woa/wa/action?...

response splitting Default redirect object WORedirect public WOActionResults toeteraction() { WORedirect page = (WORedirect) pagewithname("woredirect") ; page.seturl ( request().stringformvalueforkey("toeter") ); return page; } Vulnerable to http response splitting does not url encode \r or \n

response splitting yes, cookies too public void appendtoresponse(woresponse response, WOContext ctx) { super.appendtoresponse(response, ctx); WOCookie acookie = new WOCookie("key", ctx.request().stringformvalueforkey("cookieval")); response.addcookie(acookie); } also, no encoding of ; allows for cookie injection same thing with all of WOCookie s set*() methods

response splitting Works on response.setheader() too...

escaping data WOResponse.appendContentHtmlString() WOResponse.appendContentHTMLAttributeValu e() does not encode single quote ( ) think of apps doing: <... blah= [append here]...> can still break out of quotes, maybe inject onclick, onload,..., depends on tag

Deployment issues a whole bunch of standard applications http://host:1085/cgi-bin/webobjects/wotaskd.woa/woconfig cgi-bin/webobjects/monitor cgi-bin/webobjects/woadapterinfo cgi-bin/webobjects/<app>.woa/ wa/wostats wa/woeventdisplay wa/woeventsetup Should be password protected on any decent deployment...

todo should I ever revisit WebObjects anything that s not rendering Enterprise objects (database integration)

Conclusion hard to wrap your head around turns out, browsing webpages really isn t object orientated! framework feels old (web 1.0). Security wise it s not up to par with others no easy XSRF protection almost everything is XSS able Response splitting is everywhere

Questions?