Securing SQL Server 2016 Databases

Slides:



Advertisements
Similar presentations
Overview and Roadmap for Microsoft SQL Server Security
Advertisements

Chapter 7 HARDENING SERVERS.
1 Database Security & Encryption
ORACLE DATABASE SECURITY
Jim McLeod MyDBA  SQL Server Performance Tuning Consultant with MyDBA  Microsoft Certified Trainer with SQLskills Australia 
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Hands-On Microsoft Windows Server Security Enhancements in Windows Server 2008 Windows Server 2008 was created to emphasize security –Reduced attack.
SEC835 Practical aspects of security implementation Part 1.
Mission critical features in SQL 2016 David Lyth Pat Martin Premier Field Engineers, Microsoft New Zealand.
Mirek Sztajno SQL Server Security PM
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
Kristina Rumpff Securing Data on your Terms DAT33 1.
SQLintersection Session: Tuesday, 12:00-1:00pm NEW SECURITY FEATURES IN SQL SERVER 2016 & AZURE SQL DB Aaron Bertrand
C Copyright © 2007, Oracle. All rights reserved. Security New Features.
#SQLSAT454 SQL Server 2016 New Security Features Gianluca
SQL SATURDAY #444 – Kansas City, MO. A LOOK AT ALWAYS ENCRYPTED SQL SATURDAY #444 – KANSAS CITY, MO DAVE WALDEN PRINCIPAL SOLUTIONS ARCHITECT DB BEST.
Overview of Security Investments in SQL Server 2016 and Azure SQL Database Jamey Johnston 1/15/2016Security Investments in SQL Server 2016 and Azure SQL.
Securing Data on your Terms Kristina Rumpff SQL Saturday #464, Melbourne 20 th February 2016.
Warwick Rudd | Principal Consultant – consulting.com.au #456 | Auckland 2015 Mission Critical SQL Server.
End to End Always Encrypted in SQL Server 2016 Steve Jones SQLServerCentral Redgate Software.
SQL Server 2016 Security Features Marek Chmel Microsoft MVP: Data Platform Microsoft MCT: Regional Lead MCSE: Data Platform Certified Ethical Hacker.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 18/06/2016David Postlethwaite.
SQL Organizational Security & Compliance George Walters Senior Technology Solutions Professional Data Platform
Defense In Depth: Minimizing the Risk of SQL Injection
Data Security with Power BI, SSAS, SQL Server 2016 and Active Directory June 10, 2017.
Microsoft Connect /23/ :39 PM
Azure SQL Database Updates
Securing Your Data With SQL 2016 (An overview of Always Encrypted)
How to tune your applications before moving your database to Microsoft Azure SQL Database (MASD) OK, you've jumped into your Azure journey by creating.
Recommended Practices & Fundamentals
SQL Server 2016 Security and Privacy Features
Why are you still taking backups?
Fast Start for Microsoft Azure – SQL Server IaaS Workshop
Row-Level Security and Dynamic Data Masking overview
Enterprise Row Level Security: SQL Server 2016 and Azure SQL DB
Securing Data with SQL Server 2016
Overview of Security Investments
Configuring Windows Firewall with Advanced Security
Cloud BI with Azure Analysis 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.
Hiding your data with SQL Server 2016/17
Exam in just 24 hours!!! Pass your exam in first attempt by the help of our latest braindumps
Encryption in SQL Server
Power BI Security Best Practices
Digital Forensics 2 Lecture 2A: Obfuscation and Synchronization of
Common Security Mistakes
Always Encrypted, Data Masking, Row Level Security
SQL Server 2016 Security Features
Always Encrypted in the Real World
Security enhancements in SQL Server 2016
Encrypting Data within SQL Server
Beginners 101 Guide To Always Encrypted
Overview of Security Investments
Security Enhancements in SQL Server 2016
Organizational Security & Compliance
Cloud BI with Azure Analysis Services
Azure SQL Database - Managing your database on the cloud
Introduction to .NetTiers
Row Level Security in SQL Azure and in On Premise
Implementing Row Level Security (RLS)
End to End Security and Encryption in SQL Server
SQL Server 2016 Security Features
Chapter 11 Managing Databases with SQL Server 2000
Governing Your Enterprise with Policy-Based Management
Michelle Haarhues Keeping up with SSMS.
Boston Code Camp – April 2019 Jason Haley
Secure SQL Server Design
ZORAN BARAC DATA ARCHITECT at CIN7
We Need To Talk Security
Presentation transcript:

Securing SQL Server 2016 Databases Gianluca Hotz @glhotz www.ugiss.org

Sponsors

Organizers

Gianluca Hotz | @glhotz Fondatore e Mentor SolidQ 20 anni con SQL Server (dalla 4.21 nel 1996) Modellazione basi di dati, dimensionamento e amministrazione, sviluppo, ottimizzazione Interessi Modello relazionale, architettura DBMS, alta disponibilità e Disaster Recovery Microsoft MVP SQL Server dal 1998 Fondatore e presidente UGISS User Group Italiano SQL Server (PASS Chapter)

Agenda Introduction Always Encrypted Row-level Security Data Masking

Securing SQL Server 2016 Databases Introduction

Security Layering Data Encryption Data Access Access Control Proactive monitoring Transport Layer Security (in transit) Transparent Data Encryption (at rest) Cell-Level Encryption (at rest) Always Encrypted (at rest and in transit) Data Encryption Dynamic Data Masking Row-Level Security Data Access Encrypted Authentication SQL Firewall* Access Control Auditing Threat Detection* Proactive monitoring https://docs.microsoft.com/en-us/azure/sql-database/sql-database-security-overview https://docs.microsoft.com/en-us/azure/sql-database/sql-database-protect-data https://www.microsoft.com/en-us/TrustCenter/Compliance/default.aspx

Always Encrypted Securing SQL Server 2016 Databases https://msdn.microsoft.com/en-us/library/mt163865.aspx Always Encrypted

Encryption Before 2016 Transparent Data Encryption (TDE) Data, log and backup files Data decrypted when loaded in memory* Fully transparent to applications Cell-Level Encryption (CLE) Column level granularity Partial protection in memory Not transparent to applications Both Server-Side Encryption Protect data at rest (e.g. theft of drives or backup sets) High privilege users can gain access to data Both server-side, protects from stolen files but not attack in memory AES-NI support is new in SQL Server 2016, before an alternative could be to use Bitlocker with AES-NI support Partial protection in memory by CLE is provided because ENCRYPTBYKEY/DECRYPTBYKEY still needs to be used High privilege users can be local admin or admin at the hosting site https://blogs.msdn.microsoft.com/sqlsecurity/2016/10/05/feature-spotlight-transparent-data-encryption-tde

Always Encrypted Overview

Always Encrypted Keys Column Encryption Key (CEK) Used to encrypt data Stored in encrypted form as metadata on server Bound to specific column(s) Column Master Key (CMK) Used to encrypt CEKs Stored in a external key store Windows Certificate Store, Azure Key Vault, HSM, Custom Must be available to applications Custom example: can store the key in Amazon and build a custom store provider

CMK Encryption Deterministic Randomized Allows equality/grouping/join operations Allows indexing Weaker e.g. small value domains like Sex or Flags Requires _BIN2 collation! Randomized No operations allowed No indexing Strongest Custom example: can store the key in Amazon and build a custom store provider

Always Encrypted Configuration SQL Server Management Studio End-to-End Wizard Specific dialogs Rotation scenarios supported Only part of the configuration in T-SQL Unencrypted CMK available only externally PowerShell

Always Encrypted Client Configuration Connection String Column Encryption Setting=Enabled Single Command SqlCommand.ColumnEncryptionSetting* Disabled, Enabled, ResultSetOnly, UseConnectionSetting ResultsSetOnly decrypts only the result set without calling the stored procedure to get encrypted keys metadata (useful when you’re using parameters on columns that are not encrypted)

Always Encrypted Parameters Parametrized statements requires round-trip Call to sys.sp_describe_parameter_encryption Returns columns keys metadata and encrypted key .NET Framework 4.6.2 avoid round-tripping by implementing a cache on the application-tier In general No ad-hoc queries with literal predicates No operations involving cyphertexts and plaintexts Nothing that requires unencrypted data on server

Always Encrypted Demo

Row Level Security Securing SQL Server 2016 Databases https://msdn.microsoft.com/en-us/library/dn765131.aspx Row Level Security

Row Level Security Overview Restricts access to a subset of rows Based on Security Predicates Defined as inline Table-Valued Functions Filter predicates restrict rows to read operations SELECT, UPDATE and DELETE Block predicates block write operation AFTER INSERT, AFTER/BEFORE UPDATE, BEFORE DELETE Security Policy Applies Security Predicates to tables

Row-Level Security Database Security Policy Application Patients Uno Policy manager creates in T-SQL a predicate to filter data based on user ID and a security policy that constrains the predicate to the Patients table. Tre Security Policy transparently re-writes the query applying the predicate. Due The user (e.g. the nurse) selects from the Patients table. Nurse Database Policy Manager Filter Predicate: INNER JOIN… Security Policy Application Patients CREATE FUNCTION dbo.fn_securitypredicate(@wing int) RETURNS TABLE WITH SCHEMABINDING AS return SELECT 1 as [fn_securitypredicate_result] FROM StaffDuties d INNER JOIN Employees e ON (d.EmpId = e.EmpId) WHERE e.UserSID = SUSER_SID() AND @wing = d.Wing; CREATE SECURITY POLICY dbo.SecPol ADD FILTER PREDICATE dbo.fn_securitypredicate(Wing) ON Patients WITH (STATE = ON) https://msdn.microsoft.com/en-us/library/dn765131.aspx SELECT * FROM Patients SEMIJOIN APPLY dbo.fn_securitypredicate(patients.Wing); SELECT * FROM Patients SELECT Patients.* FROM Patients, StaffDuties d INNER JOIN Employees e ON (d.EmpId = e.EmpId) WHERE e.UserSID = SUSER_SID() AND Patients.wing = d.Wing;

Row-Level Security & Multi Tenancy Restrict tenant access when shards shares same tables Assuming there’s a column identifying the tenant https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-tools-multi-tenant-row-level-security Image source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-tools-multi-tenant-row-level-security

Row Level Security Demo

Dynamic Data Masking Securing SQL Server 2016 Databases https://msdn.microsoft.com/en-us/library/mt130841.aspx Dynamic Data Masking

Dynamic Data Masking Masking Rule/permission based Table.CreditCardNo 4465-6571-7868-5796 4468-7746-3848-1978 4484-5434-6858-6550 Masking Real-time Different mask type Partial masks Rule/permission based Column level Permissions to unmask Azure configuration in portal SQL Database https://msdn.microsoft.com/en-us/library/mt130841.aspx https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dynamic-data-masking-get-started

Dynamic Data Masking Demo

Dynamic Data Masking Functions Default Type dependent ‘X’, 0, 01.01.1900 00:00:00.0000000 Email aXXX@XXXX.com Random Integer range Custom String Prefix length, [padding char], suffix length

Dynamic Data Masking Permissions CRATE and ALTER table ALTER ANY MASK (w/ ALTER on table) UNMASK Can still update data!

Dynamic Data Masking Gotchas Beware when moving data Export/Import SELECT…INTO INSERT…SELECT…FROM Brute-force techniques Value inference with range predicates Domain table

Azure SQL Database Only Securing SQL Server 2016 Databases Azure SQL Database Only

«SQL Database Auditing» Similar to SQL Server Audit No T-SQL support (portal, PowerShell, REST API) Events destinations Table in “Azure Storage Table” File in “Azure Storage Blob” Analysis Extended Events file (SSMS, PowerShell, C# library) Pre-configure Excel file with Power Query https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auditing-get-started

SQL Database Threat Detection (preview) Simple per-database option to activate Requires activation of “SQL Database Auditing” Detects potential threats/vulnerabilities “SQL Injection” kind of attacks Unusual accesses (e.g. from unusual places) Alarms Real-time Recommendations on what to investigate/how to mitigate/remediate https://myignite.microsoft.com/videos/2998

Azure Security Center Service to manage security resources in Azure Recommendations also for Azure SQL Database Encryption (e.g. TDE) Audit & Monitor (e.g. Server/Database Auditing) Dynamic Data Masking (e.g. sensible data) https://azure.microsoft.com/en-us/services/security-center Demos in https://myignite.microsoft.com/videos/2998

Resources Documentation SQL Server Security Blog MVA Course http://aka.ms/AlwaysEncrypted SQL Server Security Blog https://blogs.msdn.microsoft.com/sqlsecurity MVA Course https://mva.microsoft.com/en-US/training-courses/16076 GitHub Samples https://github.com/Microsoft/azure-sql-security-sample https://github.com/Microsoft/sql-server-samples

#sqlsat589 Thanks! Q&A