A Walk Around the SQL Server 2012 Audit Feature. Timothy P. McAliley Microsoft Premier Field Engineer SQL Server www.netcomlearning.

Similar documents
Windows Server 2012 / Windows 8 Audit Fundamentals

SQL Server Auditing. By Minette Steynberg. Audit all SQL Server activities using ApexSQL Comply

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

MCTS: SQL Server 2008 Implementation and Maintenance

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Microsoft SQL Server Beginner course content (3-day)

DATABASE SECURITY MECHANISMS AND IMPLEMENTATIONS

Below are the some of the new features of SQL Server that has been discussed in this course

Floating on a Hybrid Cloud: SQL Server 2012 & Microsoft Azure. Timothy P. McAliley Microsoft Premier Field Engineer SQL Server

10775A Administering Microsoft SQL Server 2012 Databases

Before attending this course, participants should have:

Administering Microsoft SQL Server 2012 Databases

10775 Administering Microsoft SQL Server Databases

Exam Number/Code : Exam Name: Name: PRO:MS SQL Serv. 08,Design,Optimize, and Maintain DB Admin Solu. Version : Demo.

Avatier Identity Management Suite

Securing Data on Microsoft SQL Server 2012

50238: Introduction to SQL Server 2008 Administration

Oracle Database 11g Security Essentials

Oracle 11g Database Administration

NE-2273B Managing and Maintaining a Microsoft Windows Server 2003 Environment

MS-55096: Securing Data on Microsoft SQL Server 2012

Microsoft SQL Server 2012 Administration

Oracle EXAM - 1Z Oracle Database 11g Security Essentials. Buy Full Product.

ORACLE DATABASE 11G: COMPLETE

Administering Microsoft SQL Server 2012 Databases

Online Transaction Processing in SQL Server 2008

MS-10775: Administering Microsoft SQL Server 2012 Databases. Course Objectives. Required Exam(s) Price. Duration. Methods of Delivery.

ExecuTrain Course Outline MOC 6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Database as a Service (DaaS) Version 1.02

Outline. MCSE: Data Platform. Course Content. Course 10776C: MCSA: Developing Microsoft SQL Server 2012 Databases 5 Days

Curriculum Selection for PTR SQL Server Courses Choose the Right Training. PTR Associates Ltd.

6231A - Maintaining a Microsoft SQL Server 2008 Database

MOC 20462C: Administering Microsoft SQL Server Databases

Only for Data Group Students Do not share with outsiders and do not use for commercial purposes.

Administering Microsoft SQL Server 2012 Databases

Exploring Organizational Security and Auditing

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Administering Microsoft SQL Server 2012 Databases

Course 6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

SQL Best Practices for SharePoint admins, the reluctant DBA. ITP324 Todd Klindt

Microsoft SQL Server Security & Auditing. March 23, 2011 ISACA Chapter Meeting

SQL Server Solutions GETTING STARTED WITH. SQL Safe Backup

sql server best practice

ITMT 1074 Course Syllabus

<Insert Picture Here> Oracle Database Security Overview

NETWRIX CHANGE NOTIFIER

SQL Server Performance Tuning and Optimization

1 of 10 1/31/2014 4:08 PM

GENWARE COMPUTER SYSTEMS AUDITING SOLUTION FOR COGNOS BUSINESS INTELLIGENCE

Microsoft SQL Database Administrator Certification

Get Success in Passing Your Certification Exam at first attempt!

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Microsoft Official Courseware

SQL Server Training Course Content

Database Security SQL Server 2012

3 Setting up Databases on a Microsoft SQL 7.0 Server

Active Directory Integration Manual

Server 2008 SQL. Administration in Action ROD COLLEDGE MANNING. Greenwich. (74 w. long.)

Microsoft SQL Server Installation Guide

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Larger, active workgroups (or workgroups with large databases) must use one of the full editions of SQL Server.

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

SQL Server What s New? Christopher Speer. Technology Solution Specialist (SQL Server, BizTalk Server, Power BI, Azure) v-cspeer@microsoft.

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

Microsoft SQL Server Installation Guide

Basic knowledge of the Microsoft Windows operating system and its core functionality Working knowledge of Transact-SQL and relational databases

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

Microsoft SQL Server 2008 R2 Enterprise Edition and Microsoft SharePoint Server 2010

Developing Microsoft SQL Server Databases 20464C; 5 Days

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

ORACLE DATABASE: ADMINISTRATION WORKSHOP I

Exam : Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2. Title : The safer, easier way to help you pass any IT exams.

Administering a Microsoft SQL Server 2000 Database

Microsoft SQL Server Staging

AV-004: Administering and Programming with ORACLE

Lesson Plans Microsoft s Managing and Maintaining a Microsoft Windows Server 2003 Environment

The Ultimate Remote Database Administration Tool for Oracle, SQL Server and DB2 UDB

Lepide Software. LepideAuditor for File Server [CONFIGURATION GUIDE] This guide informs How to configure settings for first time usage of the software

With each new release of SQL Server, Microsoft continues to improve

SAP Business Objects Security

Built-In Backup. For best results: Set up Backup after hours. Carefully apply the recommended settings

Netezza PureData System Administration Course

Preparing a SQL Server for EmpowerID installation

Estimate Performance and Capacity Requirements for Workflow in SharePoint Server 2010

20464C: Developing Microsoft SQL Server Databases

4cast Server Specification and Installation

File Auditor for NAS, Net App Edition

Websense Certified Engineer Web Security Professional Examination Specification

Developing Microsoft SQL Server Databases MOC 20464

Hands-On Microsoft Windows Server 2008

Built-In Backup. For best results: Set up Backup after hours. Carefully apply the recommended settings

Designing Database Solutions for Microsoft SQL Server 2012

PASS4TEST 専 門 IT 認 証 試 験 問 題 集 提 供 者

Dell InTrust Preparing for Auditing Microsoft SQL Server

11.1. Performance Monitoring

Getting to Know the SQL Server Management Studio

Integrating LANGuardian with Active Directory

Transcription:

A Walk Around the SQL Server 2012 Audit Feature Timothy P. McAliley Microsoft Premier Field Engineer SQL Server www.netcomlearning.com

Speaker Introduction: Timothy P. McAliley 14+ years in IT Currently work for Microsoft Premier Field Engineer SQL Server, Washington, DC. Previously Worked for: Symantec Football Fanatics (Jacksonville, FL) (High Volume e-commerce) ASM Research, Inc. (Fairfax, VA) (Defense Contractor) MCSA: SQL Server 2012, Windows Server 2012 MCSE: Data Platform, Server Infrastructure

Objective and Scope of this Presentation Overview of SQL Server 2012 Server and Database Auditing Demonstration of SQL Server Audit Configuration

Whom Would Hopefully Find This Most Useful Working in a an environment where auditing is a requirement Researching options for audit solutions Looking a for an overview to help get you started on trying the SQL Server Audit feature

Agenda Introduction to SQL Server Audit Configuring SQL Server Audit Audit Actions and Action Groups Defining Audit Targets Creating Audits Creating Server Audit Specifications Creating Database Audit Specifications Audit-related DMVs and System Views Demonstration Using SQL Server Audit Other Issues and Considerations Resources for More Information

Introduction to SQL Server Audit

Introduction to SQL Server Audit SQL Server Audit compared/in relation to Change Data Capture DML/DDL Audit Triggers C2 Auditing SQL Trace

Introduction to SQL Server Audit SQL Server Audit - A note on Performance Impact % increase in memory utilization % increase disk i/o % increase in cpu What is the Impact of Auditing? It Depends Synchronous /Asynchronous Scope of Audit Specifications Best Practice Test in Non-Production Environment Initiate/Sample with a Narrow Scope

Introduction to SQL Server Audit SQL Server Audit First introduced in SQL Server 2008 Event tracking and logging system based on Extended Events Full operation in Enterprise edition of SQL Server 2014 Fine-grained auditing (Database level) Basic auditing in other editions of SQL Server 2014 (Server level) Comprised of: Audits Server and Database Audit Specifications Actions and Action Groups Targets

Introduction to SQL Server Audit Improved Resilience On Audit Shut Down Server On Audit Log Failure: Continue On Audit Log Failure: Fail Operation Custom User Events sp_audit_write Ability to Determine T-SQL Method Used

Introduction to SQL Server Audit Leveraged by Extended Events - Is a lightweight operating system level eventing engine for servers outside of the SQL Engine Is designed to be able to process any type of event (auditable events) Can be integrated with Event Tracing for Windows (ETW) Extended Event Engine SQL Engine

Configuring SQL Server Audit

Configuring SQL Server Audit Configuring SQL Server Audit is a process: Create an audit and define the target Create an audit specification (server or database) Enable the audit and the audit specification Read the output events

Configuring SQL Server Audit Create Server Audit Configure Server or Database Audit Specification Enable Audit Specification Monitor and Review

Audit Actions and Action Groups

Audit Actions and Action Groups Audit actions are additional tasks that can be performed when events occur. Action groups are predefined sets of events that can be used instead of defining individual events. Categories of actions Server Database Audit Server audit state changes are always audited Action Groups Large number of predefined action groups for each audit category are provided Simplify setup and management of audits

Defining Audit Targets

Defining Audit Targets Results of an audit are sent to a target File 1 MB Minimum 2,147,483,647 TB Max Size or Disk Capacity if Unlimited is Configured Windows Application Event Log Windows Security Event Log Results must be reviewed and archived periodically Security of audit targets Be cautious with application log as any authenticated user can read it Writing to security event log requires the SQL Server service account to be added to "Generate Security Audits" policy

Creating Audits

Creating Audits Create Server Audit Configure Server or Database Audit Specification Enable Audit Specification Monitor and Review

Creating Audits Configuration Audit name Queue delay (in milliseconds) 0 = Synchronous On Audit Log Failure Audit destination Maximum rollover files Maximum file size (MB/GB/TB) Reserve disk space Maximum files Comment Name for the audit Amount in time before audit actions must be processed Continue Shut Down Server Fail Operation Audit Target; File or Event Log Maximum number of files to retain (only for files) Maximum size of each audit file Indicates whether disk space for the audit files should be reserved in advance Caps the number of audit files

Creating Audits Queue Delay - A bit more on configurations specifics: Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. A value of 0 indicates synchronous delivery. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647 (2,147,483.647 seconds or 24 days, 20 hours, 31 minutes, 23.647 seconds).

Creating Audits On Audit Log Failure - Continue - A bit more on configurations specifics: SQL Server operations continue. Audit records are not retained. The audit continues to attempt to log events and will resume if the failure condition is resolved. Selecting the Continue option can allow unaudited activity which could violate your security policies. Select this option when continuing operation of the Database Engine is more important than maintaining a complete audit. This is the default selection.

Creating Audits On Audit Log Failure Shut Down Server - A bit more on configurations specifics: Forces a server shut down when the server instance writing to the target cannot write data to the audit target. The login issuing this must have the SHUTDOWN permission. If the logon does not have this permission, this function will fail and an error message will be raised. No audited events occur. Select this option when an audit failure could compromise the security or integrity of the system

Creating Audits On Audit Log Failure Fail Operation- A bit more on configurations specifics: In cases where the SQL Server Audit cannot write to the audit log this option causes database actions to fail if they would otherwise cause audited events. No audited events occur. Actions which do not cause audited events can continue. The audit continues to attempt to log events and will resume if the failure condition is resolved. Select this option when maintaining a complete audit is more important than full access to the Database Engine.

Creating Audits Audit File Maximum Limit -A bit more on configurations specifics: Maximum rollover files Specifies that, when the maximum number of audit files is reached, the oldest audit files are overwritten by new file content. Maximum files Specifies that, when the maximum number of audit files is reached, any action that causes additional audit events to be generated will fail with an error. Unlimited check box When the Unlimited check box under Maximum rollover files is selected, there is no limit imposed on the number of audit files that will be created. The Unlimited check box is selected by default and applies to both the Maximum rollover files and Maximum files selections. Number of files box Specifies the number of audit files to be created, up to 2,147,483,647. This option is only available if Unlimited is unchecked.

Creating Audits Maximum File Size -A bit more on configurations specifics: Specifies the maximum size for an audit file in either megabytes (MB), gigabytes (GB), or terabytes (TB). You can specify between 1024 MB and 2,147,483,647 TB. Selecting the Unlimited check box does not place a limit on the size of the file. Specifying a value lower than 1024 MB will fail, returning an error. The Unlimited check box is selected by default.

Creating Audits Reserve Disk Space - A bit more on configurations specifics: Specifies that space is pre-allocated on the disk equal to the specified maximum file size. This setting can only be used if the Unlimited check box under Maximum file size is not selected. This check box is not selected by default.

Creating Server Audit Specifications

Creating Server Audit Specifications Create Server Audit Configure Server Audit Specification Enable Audit Specification Monitor and Review

Creating Server Audit Specifications Define the actions that should be audited and the Audit that the results should be sent to Can be configured in GUI or T-SQL CREATE SERVER AUDIT SPECIFICATION FailedLoginSpec FOR SERVER AUDIT Audit-20121222-171544 ADD (FAILED_LOGIN_GROUP);

Creating Server Audit Specifications Choose a server audit if you want to monitor the following: Actions that impact the entire server Actions that monitor changes across all databases Actions that monitor changes to schemas to all databases Server Audit Specifications reside in Master DB

Creating Database Audit Specifications

Creating Server Audit Specifications Create Server Audit Configure Database Audit Specification Enable Audit Specification Monitor and Review

Creating Database Audit Specifications Define the actions that should be audited and the Audit that the results should be sent to Can be configured in GUI or T-SQL CREATE DATABASE AUDIT SPECIFICATION BackupRestoreSpec FOR SERVER AUDIT Audit-20121222-171544 ADD (BACKUP_RESTORE_GROUP);

Creating Database Audit Specifications Choose database audit specifications if you want to monitor: Actions specific to a database, object, or schema Specific actions of a principal within a database Specific actions (SELECT, DELETE, UPDATE, and other Data Manipulation Language [DML] statements) within a database Database Audit Specifications Reside in Audited Database

Audit-related DMVs and System Views

Audit-related DMVs and System Views SQL Server provides a set of DMVs and system views for managing SQL Server Audit Audit-related DMVs sys.dm_server_audit_status sys.dm_audit_actions sys.dm_audit_class_type_map Audit-related System Views sys.server_audits sys.server_file_audits sys.server_audit_specifications sys.server_audit_specification_details sys.database_audit_specifications sys.database_audit_specification_details

Demonstration Using SQL Server Audit

Demonstration Using SQL Server Audit In this demonstration you will see how to: Create a SQL Server Audit and define its target Create and enable a database audit specification Create an auditable event and view the event in the Windows Event Viewer View the results of a file-based audit

Demonstration Using SQL Server Audit Create Server Audit Configure Server or Database Audit Specification Enable Audit Specification Monitor and Review

Other Issues and Considerations Audit Volume Auditing and Encryption Features, including auditing, behave the same with or without Transparent Data Encryption (TDE) Multi-Server Auditing with System Center 2012 -Operations Manager, Audit Collection Services (ACS) Integration with 3 rd Party Auditing Tools Enforce with SQL Server Policy Management

Other Issues and Considerations Attaching Attaching a database that has an audit specification and specifies a GUID that does not exist on the server will cause an orphaned audit specification. Because an audit with a matching GUID does not exist on the server instance, no audit events will be recorded. To correct this situation, use the ALTER DATABASE AUDIT SPECIFICATION command to connect the orphaned audit specification to an existing server audit. Or, use the CREATE SERVER AUDIT command to create a new server audit with the specified GUID. You can attach a database that has an audit specification defined on it to another edition of SQL Server that does not support SQL Server audit, such as SQL Server Express but it will not record audit events.

Other Issues and Considerations Mirroring/AG A database that has a database audit specification defined and that uses database mirroring will include the database audit specification. To work correctly on the mirrored SQL instance, the following items must be configured: The mirror server must have an audit with the same GUID to enable the database audit specification to write audit records. This can be configured by using the command CREATE AUDIT WITH GUID= <GUID from source Server Audit>. For binary file targets, the mirror server service account must have appropriate permissions to the location where the audit trail is being written. For Windows event log targets, the security policy on the computer where the mirror server is located must allow for service account access to the security or application event log.

Other Issues and Considerations Permissions - Any authenticated user can read records sent to the Windows Application Log Writing to the Windows Security log requires the SQL Server service account to be added to the Generate security audits policy Access to Files For Auditors

Other Issues and Considerations Permissions - To Create/Alter/Drop Server Audit: the ALTER ANY SERVER AUDIT or the CONTROL SERVER To Creat/Alter/Drop Database Audit: ALTER ANY DATABASE AUDIT permission or the ALTER or CONTROL permission on the database To View Catalogs (one of the following): Membership in the sysadmin fixed server role. The CONTROL SERVER permission. The VIEW SERVER STATE permission. The ALTER ANY AUDIT permission. The VIEW AUDIT STATE permission (gives only the principal access to the sys.server_audits catalog view). To Use DMVs: VIEW SERVER STATE or ALTER ANY AUDIT

Resources for More Information

Resources for More Information SQL Server Common Criteria Site: http://www.microsoft.com/sqlserver/en/us/common-criteria.aspx Introducing SQL Server Extended Events http://go.microsoft.com/fwlink/?linkid=237197 Understanding SQL Server Audit http://go.microsoft.com/fwlink/?linkid=233566 SQL Server Audit Action Groups and Actions http://go.microsoft.com/fwlink/?linkid=233440 SQL Server Audit (Database Engine) http://go.microsoft.com/fwlink/?linkid=233568

SQL Server 2012 Certifications Microsoft Certified Solutions Associate (MCSA) for SQL Server 2012 Microsoft Certified Solutions Expert: Data Platform Microsoft Certified Solutions Expert: Business Intelligence

Summary Introduction to SQL Server Audit Configuring SQL Server Audit Audit Actions and Action Groups Defining Audit Targets Creating Audits Creating Server Audit Specifications Creating Database Audit Specifications Audit-related DMVs and System Views Demonstration Using SQL Server Audit Other Issues and Considerations Resources for More Information

MCSA SQL Server 2012 MCSA: SQL Server 2012 10774: Querying Microsoft SQL Server 2012 10775: Administering Microsoft SQL Server 2012 Databases 10777: Implementing a Data Warehouse with Microsoft SQL Server 2012 MCSA: SQL Server 2012 Exam 70-461 (10774) Exam 70-462 (10775) Exam 70-463 (10777) Querying Microsoft SQL Server 2012 Administering Microsoft SQL Server 2012 Databases Implementing a Data Warehouse with Microsoft SQL Server 2012 Course Outline for MCSA: SQL Server 2012 www.netcomlearning.com

MCSE Data Platform Course Outline for MCSE: Data Platform www.netcomlearning.com

MCSE Business Intelligence Course Outline for MCSE: Business Intelligence

Q & A 1-888-5-NETCOM (563-8266) info@netcomlearning.com www.netcomlearning.com