Transcript
Page 1: Uniface Web Application Security

WEB APPLICATION SECURITY

James RodgerSolution Consultant30/04/2014

Page 2: Uniface Web Application Security

AgendaIntroduction

Client Server vs. Web

Security Areas

Threats• Password Cracking

• Interpreter Injection

• Session Hijacking

Page 3: Uniface Web Application Security

Why Bother?Internet facing web applications

Internal web applications

Increasingly a developer role

Good tooling helps improve security

Page 4: Uniface Web Application Security

Introduction

Huge topic

Taking a developer point of view

Looking at Uniface based solutions

Example code

Page 5: Uniface Web Application Security

Client Server vs. Web

Stateless

No control over client

Network is part of the application

Page 6: Uniface Web Application Security

Overview

Page 7: Uniface Web Application Security

Security Areas

Some areas we need to consider:Authentication

Authorisation

Browser Security

Session Management

Data I/O

Configuration and Deployment

Page 8: Uniface Web Application Security

Threats

Password Cracking

Interpreter Injection• SQL Injection

• JavaScript Injection

• Parameter Manipulation

Session Hijacking

Page 9: Uniface Web Application Security

Password CrackingThese attacks include techniques like:

Brute forcing the login page (remotely)

Brute forcing the database with common passwords

Brute forcing the database with rainbow tables

Page 10: Uniface Web Application Security

Brute ForceSimply trying a lot of passwords at a login page

Basic protection include:Throttling login requests

Logging failed attempts:• Locking out accounts

• Issuing a CAPTCHA

Password policies

Page 11: Uniface Web Application Security

Cracking Hashed PasswordsAttacker has access to the user database

Plain text passwords make abuse trivial

Passwords should be properly hashed

Page 12: Uniface Web Application Security

Password Hashing Basics

Page 13: Uniface Web Application Security

DemoStoring Passwords

Page 14: Uniface Web Application Security

Unifacesleep

$webinfo(“WEBSERVERCONTEXT”)

$encode

LDAP driver

Page 15: Uniface Web Application Security

ThreatsPassword Cracking

Interpreter Injection• SQL Injection

• JavaScript Injection

• Parameter Manipulation

Session Hijacking

Page 16: Uniface Web Application Security

Interpreter InjectionThese attacks include techniques like:

SQL Injection

JavaScript Injection

Parameter Manipulation

Page 17: Uniface Web Application Security

SQL InjectionID: 1Date of Birth: 23-feb-1982Name: Robert

INSERT INTO students VALUES(1, ‘23-feb-1982', ‘Robert');

Page 18: Uniface Web Application Security

DemoSQL Injection

Page 19: Uniface Web Application Security

SQL InjectionID: 2Date of Birth: 13-Nov-1973Name: Robert'); DROP TABLE students;--

INSERT INTO students VALUES(1, ‘23-feb-1982', ‘Robert'); DROP TABLE students; --’);

Page 20: Uniface Web Application Security

JavaScript InjectionGetting a browser to execute unintended JS

Usually injected where user input is allowed

Malicious code runs for anyone visiting the page

The code appears to have come from the application

Page 21: Uniface Web Application Security

DemoJavaScript Injection

Page 22: Uniface Web Application Security

Parameter ManipulationUser has control of the browser

JavaScript based validation can be bypassed

Requests can be sent at any time to:• Any Public Web operation

• Any Public Trigger

Page 23: Uniface Web Application Security

DemoRead Only Fields

Page 24: Uniface Web Application Security

UnifaceSQL Injection

• Database drivers prevent SQL injection

JavaScript Injection• Widgets correctly escape HTML

• Any Public Web operation

• Any Public Trigger

Parameter Manipulation• Model definitions used for validation at each step

• Read-only field handling

• Public web / Public trigger

• Standard triggers

Page 25: Uniface Web Application Security

ThreatsPassword Cracking

Interpreter Injection• SQL Injection

• JavaScript Injection

• Parameter Manipulation

Session Hijacking

Page 26: Uniface Web Application Security

Session HijackingThese attacks include techniques like:

Session Fixation

Session Sidejacking

Physical Access

Page 27: Uniface Web Application Security

DemoSession Sidejacking

Page 28: Uniface Web Application Security

UnifaceTomcat session handling

• $webinfo(“SESSIONCOMMANDS”)

• $webinfo(“WEBSERVERCONTEXT”)

HTTP only cookies by default

Page 29: Uniface Web Application Security

SummarySecurity needs to be designed in

Good tooling helps improve security

What else?• Security audits

• Vericode – regular security testing

Page 30: Uniface Web Application Security

HeartbleedUniface uses OpenSSL

9.5 / 9.6 vulnerable if using SSL

Patches out now• Uniface 9.5 – E123s

• Uniface 9.6 – X402s

Tomcat version shipped with Uniface is safe• Changed Tomcat version?

• Using different servlet engine?

More information at unifaceinfo.com

Page 31: Uniface Web Application Security

QuestionsIf you have any questions, or feedback about this session, please send an email to [email protected]

Page 32: Uniface Web Application Security

Enterprise Application Development


Recommended