How to Make Your Oracle APEX Application Secure



Similar documents
HOW TO MAKE YOUR ORACLE APEX APPLICATION SECURE Peter Lorenzen, WM-data a LogicaCMG company

Expert Oracle Application. Express Security. Scott Spendolini. Apress"

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

<Insert Picture Here> Michael Hichwa VP Database Development Tools Stuttgart September 18, 2007 Hamburg September 20, 2007

Securing Web Services From Encryption to a Web Service Security Infrastructure

Security Implications of Oracle Product Desupport April 23, 2015

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

Webapps Vulnerability Report

(WAPT) Web Application Penetration Testing

Web application security

Cyber Security Workshop Ethical Web Hacking

Secure Web Development Teaching Modules 1. Threat Assessment

Enterprise Application Security Workshop Series

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

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

SQL Injection in web applications

Fixing Common Problems in Data Storage - A Review

Ethical Hacking Penetrating Web 2.0 Security

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

Revisiting SQL Injection Will we ever get it right? Michael Sutton, Security Evangelist

Oracle Security Auditing

Oracle Security Auditing

What is Web Security? Motivation

Web Application Security

Application Security Testing

Web Application Report

An Introduction to SQL Injection Attacks for Oracle Developers. January 2004 INTEGRIGY. Mission Critical Applications Mission Critical Security

SQL Injection. The ability to inject SQL commands into the database engine through an existing application

Railo Installation on CentOS Linux 6 Best Practices

Oracle Database 11g: Security. What you will learn:

Hack Proof Your Webapps

Web Application Security Assessment and Vulnerability Mitigation Tests

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

Onegini Token server / Web API Platform

Oracle Security on Windows

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper

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

Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

Still Aren't Doing. Frank Kim

NEW AND IMPROVED: HACKING ORACLE FROM WEB. Sumit sid Siddharth 7Safe Limited UK

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

CYBERTRON NETWORK SOLUTIONS

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

Where every interaction matters.

5 Simple Steps to Secure Database Development

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

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

Securing Data in Oracle Database 12c

An Oracle White Paper June RESTful Web Services for the Oracle Database Cloud - Multitenant Edition

WebCruiser Web Vulnerability Scanner User Guide

SQL Injection Protection by Variable Normalization of SQL Statement

REDCap General Security Overview

Web Vulnerability Scanner by Using HTTP Method

Sitefinity Security and Best Practices

Passing PCI Compliance How to Address the Application Security Mandates

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Web Plus Security Features and Recommendations

Implementing Database Security and Auditing

Application Security Testing. Erez Metula (CISSP), Founder Application Security Expert

CMP3002 Advanced Web Technology

Project 2: Web Security Pitfalls

McAfee Database Security. Dan Sarel, VP Database Security Products

Oracle Database 11g: Security

Web Application Attacks and Countermeasures: Case Studies from Financial Systems

Testing Web Applications for SQL Injection Sam Shober

Common Security Vulnerabilities in Online Payment Systems

The Top Web Application Attacks: Are you vulnerable?

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Data Breaches and Web Servers: The Giant Sucking Sound

Best Practices for Dynamic SQL

Oracle Database 11g: Security Release 2. Course Topics. Introduction to Database Security. Choosing Security Solutions

Advanced Web Security, Lab

Cloud Security:Threats & Mitgations

Check list for web developers

Oracle Database: Program with PL/SQL

Secret Server Qualys Integration Guide

OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair

Offensive Security. Advanced Web Attacks and Exploitation. Mati Aharoni Devon Kearns. v. 1.0

Hacking and Protecting Oracle DB. Slavik Markovich CTO, Sentrigo

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

Web Application Security

Oracle Database 11g: Security Release 2

REDCap Technical Overview

SQL Injection. Sajjad Pourali CERT of Ferdowsi University of Mashhad

Sichere Software- Entwicklung für Java Entwickler

Criteria for web application security check. Version

Half Bridge mode }These options are all found under Misc Configuration

Oracle Database Express Edition

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

Virtually Secure. a journey from analysis to remote root 0day on an industry leading SSL-VPN appliance

Information Technology Policy

Web application security: Testing for vulnerabilities

Vulnerability Assessment: The Right Tools to Protect Your Critical Data

Transcription:

How to Make Your Oracle APEX Application Secure Peter Lorenzen Technology Manager WM-data Denmark a LogicaCMG Company peloz@wmdata.com LogicaCMG 2006. All rights reserved 1

Presentation Target audience is developers Focus is on how to prevent hackers from gaining access In terms of what I believe an APEX developer in a small shop, without a fulltime security expert or DBA, should know More an overview of security threats and countermeasures than a thorough analysis Point you to resources with more information about the different subjects Assumption: An application that is accessed from the Internet contains valuable and secret information 2

APEX Project References The Danish Department of Prisons and Probation uses APEX in the process of deciding in which facility a client should serve RTX Telecom uses APEX to control DECT cordless telephones in Rumania Naturgas Fyn is a provider of natural gas in Denmark. Currently we are developing a system that calculates the amount of gas that is needed from each gas provider the following day 3

Agenda Intro Architecture HTTP Servers Choosing an Architecture Hardening the Architecture Patching Hardening the Database Hardening the HTTP Web Server Specific Threats Cross-Site Scripting SQL Injection Hardening APEX Miscellaneous Conclusion 4

Intro Security, what security? A security company estimates that there are a 71% likelihood that a Website has a Cross-Site Scripting vulnerability and 20% for a SQL Injection 5

Architecture APEX Components Oracle HTTP Server (Database Companion CD) Oracle HTTP Server (Oracle Application Server) Oracle XML DB HTTP Server Oracle 9i/10g Database Oracle Express Edition HTTP server There is such a thing as too cheap 6

Architecture Which HTTP Server to Use? Oracle HTTP Server (OHS) Oracle XML DB HTTP Server Technology Apache 1.3.x Developed by Oracle. Builds on the Oracle Shared Server architecture Database connection mod_plsql Embedded PL/SQL Gateway Use known technology 7

Architecture "Security is an architecture, not an appliance - Art Wittman Minimum Only HTTP communication Proxy HTTP Servers Standard Apache 1.3/2.0 HTTP Server OHS based on an Apache 2.0.x HTTP Server mod_proxy Database + HTTP server 8

Architecture Using Secure Sockets Layer (SSL) encryption SSL? Database + HTTP server Security measures should match the risk and the value of the secured application/data 9

Hardening the Architecture Patch, Patch, Patch Critical Patch Update (CPU) Oracle Security Alerts Remember regular Patch Sets The Oracle HTTP Server Patches from Oracle Standard Apache HTTP Servers Patches from Apache Remember the OS Patching can be difficult! Patching should be part of the daily operations. 10

Hardening the Architecture Hardening the Database Do not use the free Express Edition (XE) database The simple stuff Follow the principle of least privilege Lock or remove unused users Use sensible passwords SYS password!= SYSTEM password Must-reads Oracle Database Security Checklist Hacking and Securing Oracle - A Guide To Oracle Security by Pete Finnigan A good place to start Oracles Project Lockdown Use checklists and adopt best practices 11

Hardening the Architecture Hardening the Apache HTTP Web Server Remove pre-loaded modules Remove pre-installed content Don t publicize names/versions of your running software ServerSignature Off (Removes server information from error pages) ServerTokens Prod (Removes server version from the HTTP header) Comprehensive Checklists Securing Oracle Application Server by Caleb Sima Hardening Oracle Application Server 9i and 10g by Alexander Kornbrust Give away as little as possible about yourself 12

Specific Threats - Cross-Site Scripting (XSS) Simple definition Attacker injects JavaScript in an application in order to steal data or corrupt the application Quick example in APEX Create a Form on a table of type Form on a Table with Report Run the Report and create a row with this data in a VARCHAR2 column Test<script>alert( Hello world );</script> When you press Create and branch back to the Report the JavaScript is executed 13

Specific Threats - Cross-Site Scripting Fix: Escape Special characters like <,>,& Change Display as Standard Report Column Display as text (escape special characters, does not save state) 14

Specific Threats - Cross-Site Scripting Escaping is the weapon of choice when dealing with XSS threats Escape all output The page source will now look like this Test<script>alert('Hello world');</script> In PL/SQL use this function: HTF.escape_sc Read about safe items in the User s Guide Don t trust any input from the end-user 15

Specific Threats - SQL Injection Definition An attacker inputs extra SQL in an application Simple example in APEX Report based on a SQL Query select job, sal from emp where ename = '&P1_ENAME.' The P1_ENAME item is input by a user If an user input the text below all rows will be shown qwerty' or 1=1-- The fix for this specific situation is to use bind variables select job, sal from emp where ename = :P1_ENAME 16

Specific Threats - SQL Injection Take care when an end-user can input text that is used in DML Watch out for concatenation of user input in DML Take care when using Dynamic SQL DBMS_SQL or Native Dynamic SQL e.g. Execute Immediate Validate end-user input: Check for max. length Check for parentheses, comments (--, /* */) Validate the input against a table Always use Bind Variables! 17

Hardening APEX Session State Protection (SSP) APEX URL 42 f?p=101:7:2564045792426426::::p7_user_id:99 APEX URL with SSP checksum f?p=101:7:2564045792426426::::p7_user_id:99&cs=38d6164631f9364754257f3 Use APEX_UTIL.prepare_url to generate checksum from PL/SQL SSP should not be the only security measure! Also check in the database Via triggers Virtual Private Database (VPD) Always use Session State Protection 18

Hardening APEX Security Options in the Administration Services (Options for you production system) Disable Administrator Login Disable Workspace Login Restrict Access by IP Address Workspace Password Policy Miscellaneous Debugging should be disabled Build Status should be Run Application Only Lock down your production system 19

Hardening APEX Obfuscate the APEX_PUBLIC_USER Password Use the dadtool.pl script If you use marvel.conf rename it temporarily to dads.conf Checkboxes, Radio Buttons and Select Lists can be converted to text input Always validate input! Example using the Web Developer Firefox add-on 20

Secure Sockets Layer (SSL) encryption Check How-to s on the APEX Wiki Using SSL with the Oracle HTTP Server Using SSL with the Oracle XML DB HTTP Server 21

Conclusion Security is important Create a sensible architecture Use SSL encryption Patch everything Harden the database and the Apache HTTP Server Escape output to prevent Cross-Site Scripting Validate input to prevent SQL Injection Use Session State Protection Prevent admin and development access to the production APEX installation Obfuscate the APEX_PUBLIC_USER password Always validate input from Checkboxes, Radio buttons, Select lists, etc. 22

How to Make Your Oracle APEX Application Secure Questions? For More Information Contact Information Peter Lorenzen peloz@wmdata.com CPU and Security Alerts http://tinyurl.com/5dhto Oracle Database Security Checklist http://tinyurl.com/ytake2 Hacking and Securing Oracle - A Guide To Oracle Security by Pete Finnigan http://tinyurl.com/28jrt7 Oracles Project Lockdown http://tinyurl.com/24s4nf Securing Oracle Application Server by Caleb Sima http://tinyurl.com/2ey89a Hardening Oracle Application Server 9i and 10g by Alexander Kornbrust http://tinyurl.com/2x5h3h APEX Wiki http://tinyurl.com/2zosrp 23