Database Security and Auditing: Leading Practices. Rob Barnes Director, Enterprise Auditing Solutions Application Security, Inc.



Similar documents
Database Auditing: Best Practices. Rob Barnes, CISA Director of Security, Risk and Compliance Operations

Database Security & Auditing

Top 10 Database. Misconfigurations.

Defending the Database Techniques and best practices

D1: Database Activity Scanning and Monitoring Rob Barnes, Application Security, Inc.

Securing Business by Securing Database Applications

Anatomy of a Database Attack

Data Platform Security. Vinod Kumar Technology Evangelist

1 Copyright 2012, Oracle and/or its affiliates. All rights reserved. Public Information

Hacking databases for owning your data. Cesar Cerrudo Esteban Martinez Fayo Argeniss (

Data Privacy: The High Cost of Unprotected Sensitive Data 6 Step Data Privacy Protection Plan

How To Protect Data From Attack On A Computer System

Real-Time Database Protection and. Overview IBM Corporation

Making Database Security an IT Security Priority

How To Secure A Database From A Leaky, Unsecured, And Unpatched Server

Hacking Database for Owning your Data

Database Assessment. Vulnerability Assessment Course

Security and Control Issues within Relational Databases

Protecting Sensitive Data Reducing Risk with Oracle Database Security

Global Partner Management Notice

DEFENSE THROUGHOUT THE VULNERABILITY LIFE CYCLE WITH ALERT LOGIC THREAT AND LOG MANAGER

MySQL Security: Best Practices

Complete Database Security. Thomas Kyte

Passing PCI Compliance How to Address the Application Security Mandates

Implementing Database Security and Auditing

SANS Top 20 Critical Controls for Effective Cyber Defense

Securing SharePoint 101. Rob Rachwald Imperva

Guardium Change Auditing System (CAS)

Database security issues PETRA BILIĆ ALEXANDER SPARBER

Seven Things To Consider When Evaluating Privileged Account Security Solutions

Mitigating Risks and Monitoring Activity for Database Security

Larry Wilson Version 1.0 November, University Cyber-security Program Critical Asset Mapping

8 Steps to Holistic Database Security

Securing Database Servers. Database security for enterprise information systems and security professionals

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

A Decision Maker s Guide to Securing an IT Infrastructure

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

GFI White Paper PCI-DSS compliance and GFI Software products

2012 North Dakota Information Technology Security Audit Vulnerability Assessment and Penetration Testing Summary Report

McAfee Database Security. Dan Sarel, VP Database Security Products

Secret Server Qualys Integration Guide

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Securing ephi with Effective Database Activity Monitoring. HIMSS Webcast 4/26/2011. p. 1

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

Comprehensive Approach to Database Security

North Dakota 2013 IT Security Audit Vulnerability Assessment & Penetration Test Project Briefing

ensure prompt restart of critical applications and business activities in a timely manner following an emergency or disaster

Achieving PCI COMPLIANCE with the 2020 Audit & Control Suite.

05.0 Application Development

Secure Web Applications. The front line defense

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

Formulate A Database Security Strategy To Ensure Investments Will Actually Prevent Data Breaches And Satisfy Regulatory Requirements

Managing Privileged Identities in the Cloud. How Privileged Identity Management Evolved to a Service Platform

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

The Need for Real-Time Database Monitoring, Auditing and Intrusion Prevention

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

PCI DSS Reporting WHITEPAPER

A Database Security Management White Paper: Securing the Information Business Relies On. November 2004

PCI DSS Requirements - Security Controls and Processes

Locking down a Hitachi ID Suite server

The Business Case for Security Information Management

An Oracle White Paper January Oracle Database Firewall

Intelligent Security Design, Development and Acquisition

Key Steps to Meeting PCI DSS 2.0 Requirements Using Sensitive Data Discovery and Masking

Oracle Database Security Myths

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

REGULATIONS FOR THE SECURITY OF INTERNET BANKING

IBM Security Strategy

Auditing Data Access Without Bringing Your Database To Its Knees

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

What s Wrong with Information Security Today? You are looking in the wrong places for the wrong things.

Protecting Your Organisation from Targeted Cyber Intrusion

Oracle Audit Vault and Database Firewall

Preparing for a Cyber Attack PROTECT YOUR PEOPLE AND INFORMATION WITH SYMANTEC SECURITY SOLUTIONS

Pension Benefit Guaranty Corporation. Office of Inspector General. Evaluation Report. Penetration Testing An Update

March

Top Three POS System Vulnerabilities Identified to Promote Data Security Awareness

Obtaining Value from Your Database Activity Monitoring (DAM) Solution

NNT CIS Microsoft SQL Server 2008R2 Database Engine Level 1 Benchmark Report 0514a

Attachment A. Identification of Risks/Cybersecurity Governance

Introduction to IT Security

USM IT Security Council Guide for Security Event Logging. Version 1.1

This chapter covers the following topics: Why Network Security Is Necessary Secure Network Design Defined Categorizing Network Security Threats How

The Nexpose Expert System

Security Awareness For Server Administrators. State of Illinois Central Management Services Security and Compliance Solutions

Barracuda Web Site Firewall Ensures PCI DSS Compliance

Network Security Audit. Vulnerability Assessment (VA)

ICTN Enterprise Database Security Issues and Solutions

Where every interaction matters.

Vulnerability Assessment: The Right Tools to Protect Your Critical Data

Thick Client Application Security

PCI DSS Policies Outline. PCI DSS Policies. All Rights Reserved. ecfirst Page 1 of 7

74% 96 Action Items. Compliance

Oracle Database Security

How NETGEAR ProSecure UTM Helps Small Businesses Meet PCI Requirements

Everything You Wanted to Know about DISA STIGs but were Afraid to Ask

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Hack Your SQL Server Database Before the Hackers Do

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

Transcription:

Database Security and Auditing: Leading Practices Rob Barnes Director, Enterprise Auditing Solutions Application Security, Inc.

Getting to Know Database Threats and Vulnerabilities

Key Objectives Understand threats and vulnerabilities in common database environments. Oracle DB2/UDB Microsoft SQL Server MySQL Sybase 3

What Do The Numbers Tell Us? 84 56 73 Percent of companies that feel database security is adequate Percent of the same companies that experienced a breach in the last 12 months Percent of companies that predict database attacks will increase Source: 4 Enterprise Strategy Group Survey of 200 Enterprise Organizations

The Threats to Enterprise Data Continue to Rise The database security landscape has changed: Attacks are targeting the database where records can be harvested in bulk on a global scale Perimeter security measures are necessary but not sufficient 5

Databases Account For 92% of Stolen Records! 428 Million Number of records compromised 2008-2009 Hundreds of incidents, Dozens of industries Source: Verizon Source of Records Lost in 2009 Cost Per Exposed Record $204 $202 $197 $181 3% 1%4% 92% Source: Verizon 6 $138 Source: Ponemon Research Database Laptop Mail Server FTP Server 2005 2006 2007 2008 2009

More Numbers - Overview Who is behind data breaches? 62% external sources - 10% business partners 46% insiders - 18% multiple parties What s involved in a data breach? 40% hacking and intrusion 38% incorporated malicious code 48% abuse of privileges 15% physical threats 2% significant error 43% multiple vectors 2009 Top Exploits: - SQL injection - Stolen Credentials Source: Verizon 2010 Data Breach Investigations Report 7

Organizations Aren t Protecting Themselves 96% of breaches in 2009 were avoidable through simple controls 79% of organizations with credit card data breaches in 2009 failed their last PCI audit 41% of successful attacks in 2009 involved script kiddie skills or less. 85% not considered highly difficult 48% of attacks were insiders abusing privileges 70% were executed by non-technical employees In 2009 The % of Records Stolen by Industry Others 4% Financial Services Source: Verizon 2010 Data Breach Investigation Report 8 96%

Database Breach Settlements Heartland settles with Visa - $60M Heartland settles with AMEX - $3.6M Heartland CEO only set aside $12.6M 5 Issuing banks seeking class action lawsuits against Heartland Bank and Key Bank Countrywide settles 35 lawsuits Could cost $17M to $51M (credit monitoring alone) 9

Databases and Data Breaches More Stats Databases are the central repositories for the most confidential data Statistics show more sensitive data is stored in databases than file servers, web and email servers, and endpoints such as PCs and laptops. 43% of enterprise databases contain sensitive data The threat landscape has changed: Attackers are well-funded, organized, and extremely sophisticated Attackers have been successfully harvesting data en masse Organizations increasingly grant access to data to: employees, contractors, suppliers, partners, customers and 3rd party (outsourcing) vendors Source: ESG 2009 Database Security Controls Survey 10

But with the Threat Landscape Changed We still fail to include the database in our Audit and Security Programs Still mainly focus at the application level Separation of duties at the application level reviewing toxic combinations If we do include it, we run into challenges: DBA s are reluctant to give access Only audit a small sample set of in-scope at times Don t always understand what audit controls to review at the database 11

Emerging Database Threats Sophisticated attacks that exploit un-patched vulnerabilities Double or triple encrypted SQL-injection attacks that render web-application firewalls virtually useless Insider attacks The Insider Threat Insider mistakes Advanced identity theft via database rootkits Increasingly sophisticated social engineering leading to full-blown database disclosures Weak or non-existent audit controls Powerful self-propagating attacks distributed via infection kits on legitimate websites and other creative means 12

Common Database Threats 13

Database Vulnerabilities Patchable Vulnerabilities Misconfigurations & Excessive Privileges Default & Weak Passwords 14

Database Vulnerabilities: Default Accounts Databases have their own user accounts and passwords User: system / Password: manager User: sys / Password: change_on_install User: dbsnmp / Password: dbsnmp User: SA / Password: null User: db2admin / Password: db2admin User: db2as / Password: ibmdb2 User: root / Password: null User: admin / Password: admin User: myusername / Password: mypassword User: SA / Password: null Proper Safeguards are Needed because: Not all databases have Account Lockout Database Login activity is seldom monitored Scripts and Tools for exploiting weak passwords are widely available 15

Database Vulnerabilities: Missing Patches Databases have their own Privilege Escalation, DoS s & Buffer Overflows Denial of Service Attacks Result in the database crashing or failing to respond to connect requests or SQL Queries Buffer Overflow Attacks Result in an unauthorized user causing the application to perform an action the application was not intended to perform Privilege Escalation Become a DBA or equivalent privileged user 16

Database Vulnerabilities: Misconfigurations Misconfigurations can make databases vulnerable External Procedure Service Privilege to grant Java permissions Default HTTP Applications Privilege to Execute UTL_FILE Permissions granted on xp_cmdshell CREATE_NOT_FENCED privilege granted (allows logins to create SPs) Permissions on User Table (mysql.user) Standard SQL Server Authentication Allowed Permissions granted on xp_cmdshell Simple changes can make a big difference: Remember? 96% of breaches were avoidable through simple controls Remember? 85% of breaches were not considered highly difficult 17

Database Insider Threat : Excessive Privileges The CISO of one of the largest banks in the world says I define insiders in three categories 1. Authorized and Intelligent - use IT resources appropriately 2. Authorized and stupid - make mistakes that may appear as malicious or fraudulent. 3. Unauthorized and Malicious - mask either their identity or their behavior or both! The first two categories I can identify and track with identity management systems the later, I can not!! 18

Recap: Emerging Database Threats Sophisticated attacks that exploit un-patched vulnerabilities Double or triple encrypted SQL-injection attacks that render web-application firewalls virtually useless Insider attacks Insider mistakes Advanced identity theft via database rootkits Increasingly sophisticated social engineering leading to full-blown database disclosures Weak or non-existent audit controls Powerful self-propagating attacks distributed via infection kits on legitimate websites and other creative means 19 19

Database Security Leading Practice

Key Objectives Understand the database security lifecycle. Understand how to secure common database environments. 21

Leading Practices: Stopping the Attack Key Findings Half of the insiders had authorized access to the systems/networks at the time of the incidents. Over half of the insiders used relatively sophisticated tools or methods for their illicit activities. Over half of the insiders exploited systemic vulnerabilities in applications, processes, and/or procedures. 22

Leading Practices: Stopping the Attack Implications Apply the principle of least privilege giving users only the access they need to do their jobs separation of duties Eliminate weak or default passwords on systems Maintain role-based access controls and disable access after an employee changes positions within a company Formal policies and procedures for disabling access upon an employee s termination or resignation should be established and followed Procedural and technical controls should be established for system administrator functions Periodic account audits should be conducted to check for unneeded or unauthorized accounts, including: Remote access accounts, login accounts, DBA accounts, application, customer, and company accounts 23

How to Protect Against Attacks Start with a Secure Configuration Stay Patched Stay on top of all the security alerts and bulletins Implement the Principal of Least Privilege Review User Rights to ensure all access is appropriate Defense in Depth / Multiple Levels of Security Regularly scan your databases for vulnerabilities Fix the problems reported! Implement database activity monitoring and database intrusion detection Especially if you can t stay patched! Encryption of data-in-motion / data-at-rest 24

How to Protect Against Attacks Set a good password policy: Use strong passwords or passphrases. Keep up to date with security patches: Try to install patches as fast as you can. Database vulnerabilities are serious and sometimes a database server can be easily compromised with just a simple query. Always test patches for some time on non-production databases 25

How to Protect Against Attacks Protect access to the database server: Allow connections only from trusted hosts and block non used ports and outbound connections. Establish exceptions for special instances like replication, linked databases, etc. Disable all non used functionality: Excess functionality can lead to vulnerabilities Use selective encryption: At network level: use SSL, database proprietary protocols. At file level for backups, laptops, etc. 26

Data Security Life Cycle Discover Monitor Purpose Discover Produce a database or asset inventory Classify Finds sensitive data to determine business value of systems and associated regulatory requirements Assess Scan databases for vulnerabilities, misconfigurations / configuration changes, and user entitlements Prioritize Combine info from classify and assess phases to determine what to fix, what to mitigate through compensating controls (monitoring), and in what order to do the work Fix Create and run fix scripts, apply patches, create monitoring policies to implement compensating controls Monitor Audit privileged access and access to sensitive data. Monitor for exploits and suspicious or unusual behavior Classify Assess Fix Lifecycle Component Prioritize 27

Bringing it All Together Entities Relationships Data Classify Discover Values are based on interrelationships and level of criticality Who, What, Where, and How They are Involved Network Operating System Monitor Application Alert for any deviation from the established baseline Assess Pinpoint weakest link in the chain Middleware Database Fix Prioritize Remediation efforts are ranked based upon their value and criticality Viable remediation and compensating controls are applied along with new baselines 28

Database Auditing Leading Practice

Key Objectives Preparing for the Audit Understand how to audit Users and User Entitlements. Understand how to audit for baseline configuration, password and patch-level settings. Understand Continuous Compliance/Continuous Assurance (Activity Monitoring and Compensating Controls) 30

Relational Database Environments Most business applications use database management systems including: Oracle DB2 LUW MS SQL Server Sybase MySQL Audit and control for each type are similar but require an understanding of the architecture and technology. Source: John Tannahill, J. Tannahill & Associates 31

Security as Part of the Audit A database environment is a data repository or data store for: Operational Data (Financial, Personal, etc.) Data Warehouse Data Security Data You need to understand security requirements for data in terms of: Confidentiality Integrity Availability Need to understand the compliance and regulatory requirements based on the business Source: John Tannahill, J. Tannahill & Associates environment. 32

Security as Part of the Audit Database security mechanisms include: Identification and authentication mechanisms Access controls Audit trail mechanisms Network security and host operating system security are required in addition to database security Database systems are TCP/IP services and can be compromised even when the operating system is hardened Database compromise can result in an operating system compromise Source: John Tannahill, J. Tannahill & Associates 33

Security Architecture and Design Need to understand network and application system architecture and design Need to identify and understand database connections in relation to the following access paths to the database environment: On-line transaction processing Batch processing Business user ad-hoc access Database administration Developer and application support access Source: John Tannahill, J. Tannahill & Associates 34

Database Audit Initial Planning Understand application system and network infrastructure Identify database administrators Identify database environments and versions Operating system hosts Database configuration files/documentation Database schemas Security design SQL queries to obtain database security information Source: John Tannahill, J. Tannahill & Associates 35

OS Considerations for Database OS accounts and related password controls Privileged OS accounts Group memberships Unix groups Windows 2000/2003 Administrators Group Owner/Service accounts for Database Management System software Program and file protection OS directory and file permissions Source: John Tannahill, J. Tannahill & Associates 36

Database Vulnerability Testing Vulnerability tests OS probes for known vulnerabilities Identify vulnerable TCP/IP connections Database probes for known weaknesses and vulnerabilities Specific tests for default accounts and weak passwords Manual Scripts versus Automation AppDetectivePro Source: John Tannahill, J. Tannahill & Associates 37

Database Security Standards Secure configuration (hardening) Secure patch management Example standards include: Center for Internet Security (cisecurity.org) Benchmarks Oracle 8i/9i/10g/11g SQL Server 2000/2005 DB2 (Windows/Unix Hosts) Sybase ASE Database Security (STIG) http://iase.disa.mil/stigs/stig/index.html AppDetectivePro Only automated solution with complete database STIG controls, standards and test work plan. Source: John Tannahill, J. Tannahill & Associates 38

Major Components of Database Auditing 1. Access & Authentication Auditing Who accessed which systems, when, and how 2. User & Administrator Auditing What activities were performed in the database by both users and administrators 3. Security Activity Monitoring Identify and flag any suspicious, unusual or abnormal access to sensitive data or critical systems 4. Vulnerability & Threat Auditing Detect vulnerabilities in the database, then monitor for users attempting to exploit them 5. Change Auditing Establish a baseline policy for database; configuration, schema, users, privileges and structure, then track deviations from that baseline 39

Database Users and Passwords Common Issues Use of generic and shared user accounts Use of OS authentication Problem if OS password is compromised Default or week passwords Lack of password controls No requirement to force password changes Minimum password length not used Application connections to the database Source: John Tannahill, J. Tannahill & Associates 40

Database Objects Common Issues Ownership of database schemas and objects Control over Administrative Users DBAs and Developers System privileges and authorities Segregation of Duties (SOD) Object privileges required for production environment Public Access Should be limited to SELECT Default access provided to PUBLIC Source: John Tannahill, J. Tannahill & Associates 41

Database Objects Common Issues Check for object and system permissions: Check views, stored procedures, tables, etc. permissions. Check file, folder, registry, etc. permissions. Changes on permissions could mean a compromise or mis-configuration. Look for new database installations: Third party products can install database servers and new installed servers could be installed with blank or weak passwords, un-patched, mis-configured, etc. Detect new database installations and secure or remove them. Search for users with DBA privileges: This helps to detect intrusions, elevation of privileges, etc. 42

Database Users Segregation of Duties Audit Segregation of Duties Audit Who are the users? What are their effective privileges? Who has access to sensitive data? How did they get that access? How many databases do I have??? Segregation of Duties is the core to most compliance and regulatory mandates! 43

Database Change Control New Database Instances Audit database configuration and settings If security configurations or settings are changed for instance by a system upgrade, patch, etc. your databases could be open to attack. If they change and there wasn't a system upgrade then it could mean a compromise. Check database system objects against changes If you detect a change in a system object and you haven't applied a fix or upgrade to your database server it could mean that a rootkit is present. 44

Database Audit Trail Issues Application versus database audit trail issues Audit trail configuration Audit trail requirements System Access Logins Success / Fail Account / Role / Permissions Changes Data Access SELECT Success / Fail Data Change INSERT, UPDATE, DELETE Schema / Object Changes CREATE / ALTER / DROP Privileged User Activity All Monitoring, analysis, and follow-up process Database Activity Monitoring Source: John Tannahill, J. Tannahill & Associates 45

Advantages of Off-database Auditing Native database auditing has its disadvantages Must be enabled and configured on each system individually Separation of controls? Can be solved with audit management tools (aka Audit Vault) Native auditing Can be disabled or deleted by attacker in the database Most databases have NO auditing configured 46

Compensating Controls - Monitoring Complete these steps first. Then monitor! Outside in and Inside out scan of all database applications to assess Security strength Database vulnerabilities Application discovery and inventory Fix security holes and misconfigurations Develop policies based on results from scan to identify: Database vulnerability Roles and responsibilities functionality to segregate users Compliance risk factors Auditing Comprehensive reporting Real-Time Monitoring Defend against misuse, fraud, and abuse from internal and external users Monitor all user activity and system changes (DDL, DML, DCL) Tune detection parameters to capture events while bypassing false positives 47

Wrap Up Databases are under attack. Security and Audit work together. The security lifecycle is key to developing a programmatic approach to security and audit. Focusing on a few key areas will help you simplify the process and reduce the workload. 48

Questions? Vulnerabilities? Locking down the database? Email our security experts at: asktheexpert@appsecinc.com 49