Data Management Conference Data Security for Audit and Compliance Terry Room Architect, Microsoft Ltd London September 29th.

Slides:



Advertisements
Similar presentations
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Advertisements

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Notes: Update as of 1/13/2010. Vulnerabilities are included for SQL Server 2000, SQL Server 2005, SQL Server Oracle (8i, 9i, 9iR2, 10g, 10gR2,11g),
Vinod Kumar M MTC – Technology Specialist Level: 300.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Notes: Update as of 12/31/2010 inclusive. Chart counts NIST CVE – Reported Software Flaws by “published” date, utilizing the NIST NVD. SQL Server.
Brian Alderman | MCT, CEO / Founder of MicroTechPoint Pete Harris | Microsoft Senior Content Publisher.
 Il-Sung Lee Senior Program Manager Microsoft Corporation BB37.
Connect with life Vinod Kumar Technology Evangelist - Microsoft
1 Andrew Fryer Technical Evangelist R2 Data Governance for the IT Manager.
Understanding Active Directory
Varun Sharma Security Engineer | ACE Team | Microsoft Information Security
Microsoft Certification Exam Coaching Session: Windows SharePoint Services 3.0, Configuring.
Il-Sung Lee Senior Program Manager Microsoft Corporation DAT304.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Introduction to SQL 2005 Security Nick Ward SQL Server Specialist Nick Ward SQL Server Specialist
Stephan Hurni Consultant Trivadis AG, SQL Server notes from the field.
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Windows Azure Connect Name Title Microsoft Corporation.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Additional Security Tools Lesson 15. Skills Matrix.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Identity Solution in Baltic Theory and Practice Viktors Kozlovs Infrastructure Consultant Microsoft Latvia.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
Under New Management Andrew Fryer Microsoft UK Andrew Fryer Microsoft UK.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Secure Windows App Development. Authentication.
demo Demo.
Advanced SQL Azure Database Name Title Microsoft Corporation.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Microsoft ® Lync™ Server 2010 Setup and Deployment Module 04 Microsoft Corporation.
Secure Data Access with SQL Server 2005 Doug Rees Associate Technologist, CM Group

Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
demo User Signs Up Temporary Account is Created with Verification Link Sent User Clicks Link Account is Activated Login.Register(userName,
Secure SQL Database with TDE Thomas Chan SQL Saturday Raleigh.
Customer challenges Security features Protect data-at-rest Transparent Data Encryption Data/Key separation Extensible Key Managements Use strong authentication.
Microsoft SQL Server 2014 for Oracle DBAs Module 8
Deployment Planning Services
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Security in Windows Store apps
Auditing in SQL Server 2008 DBA-364-M
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /11/ :54 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Feature: Document Attachment - Flow from Master Records
Andrew Fryer Microsoft UK
Windows Azure Hybrid Architectures and Patterns
Azure AD Simon May Technical Evangelist.
Il-Sung Lee, Jack Richins Microsoft Corp
Presentation transcript:

Data Management Conference Data Security for Audit and Compliance Terry Room Architect, Microsoft Ltd London September 29th

Session Objectives Understand that Security is an important consideration for applications as well as the server Know what is available in SQL Server and how it can help you achieve security objectives

Agenda Protecting applications −Data protection −Authentication/Authorization −SQL Injection SQL 2008 Compliance New Features −Transparent Data Encryption −Extensible Key Management −Audit

A true story.....(kind of) The Company The Application The MD The IT Manager The DBA

What happened Day 1 due diligence −Review and change admin passwords 10 minutes later −Helpdesk reports problems −Login failures Smoking gun −ODBC DSN 10 minutes later −Helpdesk reports problems −Module failures, report failures −Code review ! using ‘sa’ context!

Code review Issues −No centralized data access layer −Embedded SQL −Lookup Order: −Lookup Customer: −Connection strings with hardcoded passwords “SELECT * FROM Orders WHERE OrderId=“ + varOrderId SELECT * FROM Customer WHERE SurName Like ‘”+ varSearchTerm +”’” Provider=sqloledb;Data Source=xxx;Initial Catalog=billingDB;User Id=sa;Password=‘’;

Protecting Applications

Authentication SQL AUTHENTICATIONWINDOWS AUTHENTICATION Userid/PasswordEncrypted Token (Kerberos) Challenge-Response (NTLM) Password obfuscated on wirePassword not transmitted on wire Subject to replay attack if channel not encrypted Not subject to replay attack (Kerberos) No mutual authenticationMutual authentication with Kerberos Logins managed in SQL ServerLogins managed by Windows DBAs create login accountsWindows/domain admins create login accounts Password policy enforced by Windows (Windows 2003+) Password policy enforced by Windows Security context may or may not be common between servers Security context is common between servers

Data Encryption In SQL Server 2000, 3 rd party support required Since SQL Server 2005 −Built-in support for data encryption −Support for key management Encryption additions in SQL Server 2008 −Transparent Data Encryption −Extensible Key Management

Channel Encryption Support for full SSL Encryption since SQL Server 2000 −Clients: MDAC 2.6 or later −Force encryption from client or server Login packet encryption −Used regardless of encryption settings −Supported since 2000 −Self-generated certificates avail since 2005

Permission Strategy Follow principal of least privilege! Avoid using sysadmin/sa and db_owner/dbo −Grant required perms to normal login Never use the dbo schema −User-schema separation Applications should have own schema −Consider multiple schemas Leverage Flexible Database Roles −Facilitates role separation Consider Auditing user activity

Ownership Chaining Beware of Ownership Chaining

Execution Context Best Practices Controlled escalation of privileges −DB scoped: EXECUTE AS and App Roles −Cross-DB scoped: Certificates −Avoid using dynamic SQL under an escalated context Do not use use CDOC and SETUSER Avoid allowing guest access on user DBs

SQL Injection SQL Injection is an attack where malicious code is inserted into strings and later passed to SQL Server for parsing and execution. SELECT * FROM Customer WHERE SurName Like ‘”+ varSearchTerm +”%’” ''';DROP TABLE CUSTOMERS--' SELECT * FROM Customer WHERE SurName Like ‘%’; DROP TABLE CUSTOMERS—’

SQL Injection – defence Use parameterized SQL queries Use Type-Safe SqlParameter in.Net Use parameterized SPs Least-privilege Principle Escape special characters Escape quotes with quotename/replace Escape wildcards in LIKE statements Validate buffer length to avoid truncation

DEMO : Protecting Applications

SQL 2008 Compliance New Features

Business Reasons Compliance requirements for PCI, HIPAA, GLBA among many other acronyms Key Management, Encryption, and Auditing are key components to meeting these compliance requirements Refer to Compliance SDK and the SQL Compliance site:

Data Encyption SQL Server 2005 −Built-in encryption functions −Key management in SQL Server −Encrypted File System (EFS) −Bit-Locker SQL Server 2008 −Extensible Key Management (EKM) −Transparent Data Encryption (TDE)

Extensible Key Management Key storage, management and encryption done by HSM module SQL EKM key is a proxy to HSM key SQL EKM Provider DLL implements SQLEKM interface, calls into HSM module SQL EKM Provider DLL SQL EKM Key (HSM key proxy) Data SQL Server

Advantages of using EKM Security −Data and keys are physically separated (keys are stored in HSM modules) −Centralized key management and storage for enterprise −Additional authentication layer −Separation of duties between db_owner and data owner Performance −Pluggable hardware encryption boards

EKM Key Hierarchy in SQL 2008 DataDataDataData Native Symmetric key TDE DEK key EKM Symmetric keyEKM Asymmetric key SQL Server Symmetric keyAsymmetric key

Transparent Data Encryption (TDE) Encryption/decryption at database level DEK is encrypted with: −Certificate −Key residing in a Hardware Security Module (HSM) Certificate required to attach database files or restore a backup SQL Server 2008 DEK Client Application Encrypted data page

TDE – Key Hierarchy Database Master Key encrypts Certificate In Master Database DPAPI encrypts Service Master Key Service Master Key encrypts Database Master Key Certificate encrypts Database Encryption Key

TDE – Key Hierarchy with EKM Asymmetric Key resides on the EKM device Asymmetric Key encrypts Database Encryption Key

TDE considerations Compatible with Database Compression Not recommended with Backup Compression Database Mirroring −Copy certificate from primary to mirror Log files are not retroactively encrypted −Encryption begins at next VLF boundary Tempdb is encrypted when 1 db in instance uses TDE Enterprise only

Transparent Data Encryption Operational Impact Storage replication at hardware level −Background task to encrypt all pages −At HW level, all pages get changed, i.e. all pages need to be replicated −Need to test if your hardware replication can handle this throughput When using Database Mirroring or Log Shipping, −Ensure that the mirror server has the master key and certificate as well −Bottleneck isn’t throughput of pages −Transaction log will have 1 entry for 4 extents (32 pages) noting extents are encrypted −But, secondary server restore of transaction log uses less threads than principle/primary servers, i.e. back log in restore activity −Possible Failover Issues −Synchronous mirroring backlog may result in not being able to failover since restoring received transaction log records could take a few hours −For log shipping restoration of the backups will fall behind, manual failover cannot take place before restore finally caught up. −May want to consider disabling HA and perform resynchronization of your HA configuration

Auditing Database Activity SQL Server 2005 −SQL Trace −DDL/DML Triggers −Third-party tools to read transaction logs −No management tools support SQL Server 2008 −SQL Server Audit

Audit Specifications 29 Audit Security Event Log Application Event Log File system 0..1 Server audit specification per Audit object 0..1 DB audit specification per database per Audit object CREATE SERVER AUDIT SPECIFICATION SvrAC TO SERVER AUDIT PCI_Audit ADD (FAILED_LOGIN_GROUP); CREATE SERVER AUDIT SPECIFICATION SvrAC TO SERVER AUDIT PCI_Audit ADD (FAILED_LOGIN_GROUP); CREATE DATABASE AUDIT SPECIFICATION AuditAC TO SERVER AUDIT PCI_Audit ADD (SELECT ON Customers BY public) CREATE DATABASE AUDIT SPECIFICATION AuditAC TO SERVER AUDIT PCI_Audit ADD (SELECT ON Customers BY public) Server Audit Specification Server Audit Action Database Audit Components Database Audit Specification Database Audit Action File

Reasons to use SQL Audit Leverages high performance eventing infrastructure to generate audits Runs within engine rather than as a side/separate app Parity with SQL 2005 Audit Generation Faster than SQL Trace Records changes to Audit configuration Configuration and management in SSMS (Note: Enterprise Edition only)

DEMO : SQL 2008 Compliance Features

Auditing Centralizing audit logs and reporting

Take aways Protect applications not just databases Get the basics right! Leverage all of the features of SQL Server to meet your compliance needs

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.