<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SQL Server Security Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sqlsecurity/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/feed.xml</link>
    <description />
    <lastBuildDate>Fri, 29 Mar 2019 18:22:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>We have moved!</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/we-have-moved</link>
      <pubDate>Fri, 29 Mar 2019 11:22:56 GMT</pubDate>
      <dc:creator><![CDATA[Pam Lahoud]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3375</guid>
      <description><![CDATA[Thanks for visiting! This blog has now been migrated...]]></description>
      <content:encoded><![CDATA[Thanks for visiting! This blog has now been migrated to:

<a href="https://techcommunity.microsoft.com/t5/Azure-SQL-Database/bg-p/Azure-SQL-Database/label-name/SQLServerSecurity">https://techcommunity.microsoft.com/t5/Azure-SQL-Database/bg-p/Azure-SQL-Database/label-name/SQLServerSecurity</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SQL Vulnerability Assessment now supports Azure SQL Data Warehouse and Azure SQL Database Managed Instance</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/sql-vulnerability-assessment-now-supports-azure-sql-data-warehouse-and-azure-sql-database-managed-instance</link>
      <pubDate>Tue, 25 Sep 2018 12:00:24 GMT</pubDate>
      <dc:creator><![CDATA[Ronit Reger]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3235</guid>
      <description><![CDATA[SQL Vulnerability Assessment is now available for Azure SQL Data Warehouse and for Azure SQL...]]></description>
      <content:encoded><![CDATA[SQL Vulnerability Assessment is now available for Azure SQL Data Warehouse and for Azure SQL Database Managed Instance. The assessment functionality and experience are similar to that of <span><a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">SQL Vulnerability Assessment for Azure SQL Database</a></span>, while exposing vulnerabilities and security best practices covering the surface area of each particular service.

<span><a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">SQL Vulnerability Assessment</a></span> is an easy-to-use service that you can use to continually monitor your database or data warehouse, ensuring they maintain a high level of security at all times and that your organizational policies are met. It provides a comprehensive security report along with actionable remediation steps for each issue found, making it easy to proactively manage your database security stature even if you are not a security expert.

<span><a href="https://docs.microsoft.com/azure/sql-database/sql-database-managed-instance">Azure SQL Database Managed Instance</a></span> supports a very rich functionality set, similar to on-premises SQL Server, including the availability of many features that are not supported by Azure SQL Database. To address this, Vulnerability Assessment has a significantly larger and more extensive set of security checks to help you maintain a high level of security for your Managed Instance deployments.

<span><a href="https://docs.microsoft.com/azure/sql-data-warehouse/sql-data-warehouse-overview-what-is">Azure SQL Data Warehouse</a></span> is a fast, flexible and secure cloud data warehouse tuned for running complex queries fast and across petabytes of data. Vulnerability Assessment support enhances Azure SQL Data Warehouse security even further, and the assessment has been tuned to focus on elements important to Data Warehouse security.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/VAscreenshot-DW.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/08/VAscreenshot-DW-1024x488.png" alt="" width="879" height="419" class="aligncenter wp-image-3245 size-large" /></a>

SQL Vulnerability Assessment is part of <span><strong><a href="https://docs.microsoft.com/azure/sql-database/sql-advanced-threat-protection">SQL Advanced Threat Protection (ATP)</a></strong></span>. SQL ATP is a security package, providing a single go-to location for discovering, classifying and protecting sensitive data, managing your database vulnerabilities, and detecting anomalous activities that could indicate a threat to the database. The SQL ATP package is available already for SQL Managed Instance, and will soon be available as a package for SQL Data Warehouse as well.

To get started with Vulnerability Assessment on Azure SQL Database Managed Instance or Azure SQL Data Warehouse, all you need to do is a run a scan, which will scan your database system for vulnerabilities. The scan report will be automatically displayed in the Azure Portal, and the results include an overview of your security state, and details about each security issue found. For each issue, you can view details on the impact of the finding, and you will find actionable remediation information to directly resolve the issue.

Learn more about <span><a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">SQL Vulnerability Assessment</a></span>, and try it out on your database platform of choice!]]></content:encoded>
    </item>
    <item>
      <title>Always Encrypted with Secure Enclaves - Try It Now in SQL Server 2019 Preview!</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/always-encrypted-with-secure-enclaves-try-it-now-in-sql-server-2019-preview</link>
      <pubDate>Mon, 24 Sep 2018 07:00:50 GMT</pubDate>
      <dc:creator><![CDATA[Jakub Szymaszek]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3295</guid>
      <description><![CDATA[Last year, we revealed our efforts to bring confidential computing capabilities of Always Encrypted...]]></description>
      <content:encoded><![CDATA[Last year, <a href="https://blogs.msdn.microsoft.com/sqlsecurity/tag/always-encrypted/">we revealed our efforts to bring confidential computing capabilities of Always Encrypted to the next level</a>, by leveraging secure enclave technologies. Over the last twelve months, the SQL team, alongside Microsoft Research, Windows and Developer Tools groups, have worked together to make the SQL Server platform the first commercial RDBMS that can protect sensitive data in use while preserving the ability of the database to support rich operations on the protected data.

Today, we are super excited to announce that you can now try and evaluate <strong>Always Encrypted with secure enclaves</strong> in t<span>he </span><a href="https://www.microsoft.com/sqlserver2019">preview of SQL Server 2019</a>.

Always Encrypted with secure enclaves in SQL Server 2019 preview uses an enclave technology called <a href="https://cloudblogs.microsoft.com/microsoftsecure/2018/06/05/virtualization-based-security-vbs-memory-enclaves-data-protection-through-isolation/">Virtualization Based Security (VBS) memory enclaves</a> in the upcoming version of Windows (Windows Server 2019 and Windows 10, version 1809), which is currently also in preview. A VBS enclave is an isolated region of memory within the address space of a user-mode process. The isolation of VBS enclaves is provided by the Windows hypervisor, which makes VBS enclaves appear as black boxes, not only to the processes containing them, but also all other processes and the Windows OS on the machine. Even machine administrators are not able to see the memory of the enclave. The below screenshot shows what an admin would get to see when browsing the enclave memory using a debugger (note the question marks, as opposed to the actual memory content).

[caption id="attachment_3305" align="aligncenter" width="425"]<a href="https://msdnshared.blob.core.windows.net/media/2018/09/windbg-ae.png"><img width="425" height="219" class="size-full wp-image-3305" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/windbg-ae.png" /></a> Browsing a VBS enclave with WinDbg[/caption]

An instance of SQL Server 2019 preview can be configured to contain a VBS enclave for Always Encrypted, which adds the following new capabilities:
<ul>
 	<li><strong>In-place encryption</strong>. You can now encrypt your column, rotate a column encryption key, or change an encryption type of a column, without moving your data out of the database – the data can be encrypted, re-encrypted or decrypted locally on the server side, inside the secure enclave. And, you can trigger such cryptographic transformations using <code>ALTER TABLE ALTER COLUMN</code> Transact-SQL statements, without client-side tools, such as Always Encrypted wizard in SSMS or PowerShell.</li>
 	<li><strong>Rich computations</strong>. The SQL Server Engine can now delegate some operations on encrypted database columns to the enclave, which can decrypt the sensitive data and execute the operations requested in the query on plaintext values. This dramatically expands the types of queries supported on sensitive data, and therefore opens Always Encrypted to new scenarios and new applications. The new operations supported in SQL Server 2019 preview are pattern matching (<code>LIKE</code>) and equality comparisons on columns using randomized encryption (which is stronger than the alternative deterministic encryption).</li>
</ul>
<strong>Note:</strong> Rich computations are pending several performance optimizations and include limited functionality (e.g., you cannot create indexes to support rich computations). Therefore, they are disabled by default. See the online docs on how to enable them.

Our next goals include:
<ul>
 	<li>Enabling indexing to accelerate rich computations (<code>LIKE</code>, range queries) on encrypted columns.</li>
 	<li>Adding support for Intel SGX enclaves, which are now available in Azure. This will enable us to bring Always Encrypted with secure enclaves to Azure SQL Database customers.</li>
</ul>
You can find comprehensive documentation on the new capabilities and on how to get started with Always Encrypted with secure enclaves at <a href="https://aka.ms/AlwaysEncryptedwithSecureEnclaves">https://aka.ms/AlwaysEncryptedwithSecureEnclaves</a>. We will also continue discussing this fascinating technology on this blog. And, if you are at Ignite in Orlando this week, make sure you join our session: <a href="https://myignite.techcommunity.microsoft.com/sessions/65357?source=sessions#ignite-html-anchor">BRK3157 - Confidential computing with SQL secure enclaves</a>, or you can also watch its recording.

We are looking forward to hearing your feedback and partnering with you on your Proof of Concept projects exploring the new functionality of Always Encrypted. You can contact us directly at <a>AEwithEnclaves@microsoft.com</a>.]]></content:encoded>
    </item>
    <item>
      <title>SQL Audit logs in Azure Log Analytics and Azure Event Hubs</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/sql-audit-logs-in-azure-log-analytics-and-azure-event-hubs</link>
      <pubDate>Thu, 13 Sep 2018 12:00:37 GMT</pubDate>
      <dc:creator><![CDATA[Ronit Reger]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3185</guid>
      <description><![CDATA[We are pleased to announce that Azure SQL Database Audit logs can now be written directly to Azure...]]></description>
      <content:encoded><![CDATA[<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">We are pleased to announce that Azure SQL Database Audit logs can now be written directly to Azure Log Analytics or Azure Event Hubs. This ability, now available in public preview, provides SQL Database Auditing customers with an easy way to centrally manage all of their log data, along with a rich set of tools for consuming and analyzing database audit logs at scale.</span></span>

<b><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">Azure Log Analytics </span></span></b><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">plays a central role in monitoring and management of your Azure environment. It enables collecting telemetry and other data from a variety of sources across Azure, and provides a query language and analytics engine for deep analysis and insights on the operation of applications and resources. For more information on the Log Analytics platform, see </span><span><a href="https://docs.microsoft.com/azure/log-analytics/log-analytics-overview">What is Azure Log Analytics</a></span><span style="color: #000000">.</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">With native support for saving SQL audit logs directly to Log Analytics, log data from all of your database resources can be gathered and stored in a single central location. The logs can now be analyzed using the rich analysis tools provided by the platform, which can provide deeper visibility and advanced cross-resource analytics. </span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">In addition, SQL Server audit logs (from on-premises SQL Servers or SQL Servers on a VM) can also be collected in Log Analytics via OMS agent integration, as described in </span><span><a href="https://blogs.msdn.microsoft.com/sqlsecurity/2017/12/28/azure-log-analytics-oms-agent-now-collects-sql-server-audit-logs/">this article</a></span><span style="color: #000000">. Thus, you can manage and analyze all of your database audit logs, whether from the cloud or on-premises, in a single central location using the power of Azure Log Analytics.</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">Writing audit logs to Azure Log Analytics is as easy as selecting Log Analytics as a target in the Auditing configuration blade, whether configuring Auditing for the database server or for an individual database.</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"><a href="https://msdnshared.blob.core.windows.net/media/2018/08/3-auditing_select_oms.png"><img width="920" height="531" class="aligncenter wp-image-3205" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/08/3-auditing_select_oms.png" /></a></span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">You can choose to write logs to an existing OMS workspace or create a new one. Once this option is configured, logs will be written directly to the OMS workspace where you can analyze them using Log Analytics. Take a look at this </span><span><a href="https://docs.microsoft.com/azure/log-analytics/log-analytics-tutorial-viewdata">tutorial for viewing and analyzing data collected in Log Analytics</a></span><span style="color: #000000"> to help get you started.</span></span>

<b><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">Azure Event Hubs</span></span></b><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"> is a big data streaming platform and event ingestion service, which can be used to stream events and process them in real time. Learn more about building a big data pipeline with Event Hubs in the </span><span><a href="https://docs.microsoft.com/azure/event-hubs/">Azure Event Hubs documentation</a></span><span style="color: #000000">.</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">With audit logs being written directly to an Event Hub, you can stream events to any data analytics service whether inside or outside Azure. This enables you to build a processing system for online analysis of logs, including anomaly detection or other real time alerting. </span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">As with Log Analytics, you can configure writing logs to an Event Hub by choosing this option in the configuration blade.</span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"><a href="https://msdnshared.blob.core.windows.net/media/2018/08/4-auditing_select_event_hub1.png"><img width="879" height="397" class="aligncenter wp-image-3225 size-large" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/08/4-auditing_select_event_hub1-1024x462.png" /></a></span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">You also have the flexibility to configure any combination of Azure Storage, Log Analytics and Event Hubs to store your SQL audit logs.</span></span>
<blockquote><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"><strong>Please note</strong> that u<span>sing Event hubs or Log Analytics as targets for audit logs at the server level is currently not supported for secondary geo-replicated databases.</span> </span></span></blockquote>
<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">For more details on working with Auditing for Azure SQL Database, take a look at the </span><span><a href="https://docs.microsoft.com/azure/sql-database/sql-database-auditing">Auditing Getting Started documentation</a></span><span style="color: #000000">.</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"> </span></span><span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">Try it out and let us know what you think!</span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000"> </span></span>

<span style="margin: 0px;font-family: 'Calibri',sans-serif;font-size: 11pt"><span style="color: #000000">SQL Security team</span></span>]]></content:encoded>
    </item>
    <item>
      <title>Azure SQL Vulnerability Assessment - now with PowerShell support!</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/azure-sql-vulnerability-assessment-now-with-powershell-support</link>
      <pubDate>Thu, 02 Aug 2018 05:49:15 GMT</pubDate>
      <dc:creator><![CDATA[Ronit Reger]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3175</guid>
      <description><![CDATA[You can now manage your SQL Vulnerability Assessments at scale using the new SQL VA PowerShell...]]></description>
      <content:encoded><![CDATA[You can now manage your SQL Vulnerability Assessments at scale using the new SQL VA PowerShell cmdlets. The cmdlets can be found in the Azure Resource Manager module, AzureRM 6.6.0, within the AzureRM.Sql package. Take a look at the <a href="https://www.powershellgallery.com/packages/AzureRM/6.6.0">AzureRM PowerShell Gallery</a> for more details.
<h2><span>Managing Vulnerability Assessment with cmdlets</span></h2>
SQL Vulnerability Assessment (VA) is a service that provides visibility into your security state, and includes actionable steps to resolve security issues, and enhance your database security. For more details, please see the <a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">Vulnerability Assessment Getting Started guide</a>.

Vulnerability Assessment is part of the <a href="https://docs.microsoft.com/azure/sql-database/sql-advanced-threat-protection">SQL Advanced Threat Protection</a> package for Azure SQL Database. The full package provides a single go-to location for discovering and classifying sensitive data (<a href="https://docs.microsoft.com/azure/sql-database/sql-database-data-discovery-and-classification">Information Protection</a>), detecting database threats (<a href="https://docs.microsoft.com/azure/sql-database/sql-database-threat-detection">Threat Detection</a>) and running vulnerability assessments with <a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">SQL Vulnerability Assessment</a>.

The new cmdlets can be used initially to turn on the Advanced Threat Protection (ATP) package on your database. Additionally, there are cmdlets available for setting up Vulnerability Assessment parameters, running scans, managing scan results and managing baselines. Using these capabilities, you can now run and manage assessments across a fleet of databases, all from the comfort of your PowerShell console.
<h2><span>Example script using Vulnerability Assessment cmdlets</span></h2>
The following PowerShell script demonstrates the use of the new VA cmdlets. The script walks through the following steps:
<ol type="1">
 	<li value="1"><span>Turn on Advanced Threat Protection on the server</span></li>
 	<li><span>Set up Vulnerability Assessment for all databases on that server, including setting recurring scans to run automatically once per week.</span></li>
 	<li><span>Set a customized </span><span>baseline value</span><span> for one of the checks run by the scan</span></li>
 	<li><span>Run a vulnerability scan on the database, and consume the results</span></li>
 	<li><span>Download the scan results to an Excel summary file</span></li>
</ol>
<strong>Sample script</strong>
<blockquote>
<pre>{

<span style="color: #339966"># set parameters - resource group, server, database and storage account</span>
<span style="color: #ff0000">$params </span><span>=</span><span>  @{ rgname </span><span>= </span><span style="color: #800000">"rg"</span><span>;</span>
<span>     serverName </span><span>= </span><span style="color: #800000">"my-server"</span><span>;</span>
<span>     databaseName </span><span>= </span><span style="color: #800000">"my-db"</span><span>;</span>
<span>     storageAccount </span><span>= </span><span style="color: #800000">"mystorage"</span>
<span>}</span>
<span style="color: #339966"># Turn on ATP</span>
<span style="color: #0000ff">Enable-AzureRmSqlServerAdvancedThreatProtection </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName</span>

<span style="color: #339966"># Set Vulnerability Assessment storage settings for all the databases in the server</span>

<span style="color: #0000ff">Get-AzureRmSqlDatabase </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName `</span>
<span>        </span><span>| </span><span style="color: #0000ff">where</span><span> {</span><span>$_</span><span>.</span><span>DatabaseName </span><span>-ne </span><span style="color: #800000">"master"</span><span>}  `</span>
<span>        </span><span>| </span><span style="color: #0000ff">Update-AzureRmSqlDatabaseVulnerabilityAssessmentSettings</span><span> `</span>
<span>            </span><span>-StorageAccountName </span><span style="color: #ff0000">$params</span><span>.</span><span>storageAccount </span>

<span style="color: #339966"># Update vulnerability assessment settings to turn ON recurring scans, and provide email to receive results</span>
<span style="color: #ff0000">$scanNotificationEmail </span><span>=</span><span> @(</span><span style="color: #3366ff">"<a>user1@microsoft.com</a>"</span><span>)</span>
<span style="color: #0000ff">Get-AzureRmSqlDatabase </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName`</span>
<span>        </span><span>| </span><span style="color: #0000ff">where</span><span> {</span><span style="color: #ff0000">$_</span><span>.</span><span>DatabaseName </span><span>-ne </span><span style="color: #800000">"master"</span><span>}  `</span>
<span>        </span><span>| </span><span style="color: #0000ff">Update-AzureRmSqlDatabaseVulnerabilityAssessmentSettings</span><span> `</span>
<span>            </span><span>-RecurringScansInterval </span><span>Weekly</span><span> `</span>
<span>                 </span><span>-NotificationEmail </span><span style="color: #ff0000">$scanNotificationEmail</span><span> `</span>
<span>                 </span><span>-EmailAdmins </span><span style="color: #ff0000">$true</span>

<span><span style="color: #339966"># Set Vulnerability Assessment baseline for rule VA1143 on all the databases in the server</span> </span>
<span style="color: #ff0000">$ruleId </span><span>= </span><span style="color: #800000">"VA1143"
</span><span style="color: #ff0000">$baselineResult </span><span>=</span><span> @( </span><span>'1'</span><span>)</span>
<span style="color: #0000ff">Get-AzureRmSqlDatabase </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName `</span>
<span>            </span><span>| </span><span style="color: #0000ff">where</span><span> {</span><span style="color: #ff0000">$_</span><span>.</span><span>DatabaseName </span><span>-ne </span><span style="color: #800000">"master"</span><span>}  `</span>
<span>            </span><span>| </span><span style="color: #0000ff">Set-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline</span><span> `</span>
<span>                </span><span>-RuleId </span><span style="color: #ff0000">$ruleId</span><span> `</span>
<span>                </span><span>-BaselineResult </span><span style="color: #ff0000">$baselineResult
</span>
<span style="color: #339966"># Run a new scan on a database</span>
<span style="color: #ff0000">$scanId1 </span><span>= </span><span style="color: #800000">"custom-scan1"
</span><span style="color: #ff0000">$scanJob </span><span>= </span><span style="color: #0000ff">Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan</span><span> `</span>
<span>                 </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname `</span>
<span>                 </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName `</span>
<span>                 </span><span>-DatabaseName </span><span style="color: #ff0000">$params</span><span>.</span><span>databaseName `</span>
<span>                 </span><span>-ScanId </span><span style="color: #ff0000">$scanId1</span><span> `</span>
<span>                 </span><span>-AsJob</span>

<span style="color: #ff0000">$scanJob </span><span>| </span><span style="color: #0000ff">Wait-Job
</span><span style="color: #ff0000">$scanRecord </span><span>= </span><span style="color: #ff0000">$scanJob </span><span>| </span><span style="color: #0000ff">Receive-Job
</span>
<span style="color: #339966"># Convert the raw scan results to an Excel file</span>
<span style="color: #ff0000">$convertScanResult </span><span>= </span><span style="color: #0000ff">Convert-AzureRmSqlDatabaseVulnerabilityAssessmentScan</span><span> `</span>
<span>                                    </span><span>-ResourceGroupName </span><span style="color: #ff0000">$params</span><span>.</span><span>rgname `</span>
<span>                                    </span><span>-ServerName </span><span style="color: #ff0000">$params</span><span>.</span><span>serverName `</span>
<span>                                    </span><span>-DatabaseName </span><span style="color: #ff0000">$params</span><span>.</span><span>databaseName `</span>
<span>                                    </span><span>-ScanId </span><span style="color: #ff0000">$scanId1</span>

<span style="color: #339966"># Download the scan results Excel summary file</span>
<span style="color: #ff0000">$connectionStringToStorageAccount </span><span>= </span><span style="color: #800000">"DefaultEndpointsProtocol=https;AccountName=......."</span>
<span style="color: #ff0000">$convertedScanResultsDownloadLocalFolder </span><span>= </span><span style="color: #800000">"C:\ScanResults\"</span>
<span style="color: #ff0000">$storageAccountContext </span><span>= </span><span style="color: #0000ff">New-AzureStorageContext </span><span>-ConnectionString </span><span style="color: #ff0000">$connectionStringToStorageAccount
$convertScanResultSplitted </span><span>= </span><span style="color: #ff0000">$convertScanResult</span><span>.</span><span>ExportedReportLocation </span><span>-split </span><span>"/"</span>
<span style="color: #ff0000">$containerName </span><span>= </span><span style="color: #ff0000">$convertScanResultSplitted</span><span>[</span><span>3</span><span>]</span>
<span style="color: #0000ff">Get-AzureStorageBlobContent </span><span>-Blob</span><span> (</span><span style="color: #ff0000">$convertScanResult</span><span>.</span><span>ExportedReportLocation </span><span>-split </span><span style="color: #ff0000">$containerName </span><span>+ </span><span>'/'</span><span>)</span><span>[</span><span>1</span><span>]</span><span> `</span>
<span>                            </span><span>-Container </span><span style="color: #ff0000">$containerName</span><span> `</span>
<span>                            </span><span>-Destination </span><span style="color: #ff0000">$convertedScanResultsDownloadLocalFolder</span><span> `</span>
<span>                            </span><span>-Context </span><span style="color: #ff0000">$storageAccountContext
</span>}</pre>
</blockquote>
<h2>Reference</h2>
For a full set of Azure SQL-related PowerShell cmdlets, take a look at the <a href="https://docs.microsoft.com/powershell/module/azurerm.sql">Azure RM SQL PowerShell</a> documentation. The new cmdlets supporting Advanced Threat Protection and SQL Vulnerability Assessment are:
<div>
<table title="" border="1" cellspacing="0" cellpadding="0" summary="">
<tbody>
<tr>
<td><strong>Cmdlet</strong></td>
<td><span><strong>Usage</strong> </span></td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Enable-AzureRmSqlServerAdvancedThreatProtection?view=azurermps-6.6.0">Enable-AzureRmSqlServerAdvancedThreatProtection</a></p>
</td>
<td>Enables Advanced Threat Protection on a server.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Get-AzureRmSqlServerAdvancedThreatProtectionPolicy?view=azurermps-6.6.0">Get-AzureRmSqlServerAdvancedThreatProtectionPolicy</a></p>
</td>
<td>Gets the Advanced Threat Protection policy of a server.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Disable-AzureRmSqlServerAdvancedThreatProtection?view=azurermps-6.6.0">Disable-AzureRmSqlServerAdvancedThreatProtection</a></p>
</td>
<td>Disables Advanced Threat Protection on a server.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Update-AzureRmSqlDatabaseVulnerabilityAssessmentSettings?view=azurermps-6.6.0">Update-AzureRmSqlDatabaseVulnerabilityAssessmentSettings</a></p>
</td>
<td>Updates the vulnerability assessment settings of a database</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Get-AzureRmSqlDatabaseVulnerabilityAssessmentSettings?view=azurermps-6.6.0">Get-AzureRmSqlDatabaseVulnerabilityAssessmentSettings</a></p>
</td>
<td>Returns the vulnerability assessment settings of a database</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Clear-AzureRmSqlDatabaseVulnerabilityAssessmentSettings?view=azurermps-6.6.0">Clear-AzureRmSqlDatabaseVulnerabilityAssessmentSettings</a></p>
</td>
<td>Clear the vulnerability assessment settings of a database</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Set-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline?view=azurermps-6.6.0">Set-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline</a></p>
</td>
<td>Sets the vulnerability assessment rule baseline.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Get-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline?view=azurermps-6.6.0">Get-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline</a></p>
</td>
<td>Gets the vulnerability assessment rule baseline for a given rule.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Clear-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline?view=azurermps-6.6.0">Clear-AzureRmSqlDatabaseVulnerabilityAssessmentRuleBaseline</a></p>
</td>
<td>Clears the vulnerability assessment rule baseline. First set the baseline before using this cmdlet to clear it.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan?view=azurermps-6.6.0">Start-AzureRmSqlDatabaseVulnerabilityAssessmentScan</a></p>
</td>
<td>Triggers the start of a vulnerability assessment scan</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord?view=azurermps-6.6.0">Get-AzureRmSqlDatabaseVulnerabilityAssessmentScanRecord</a></p>
</td>
<td>Gets all vulnerability assessment scan record(s) associated with a given database.</td>
</tr>
<tr>
<td>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 10.45pt"><a href="https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/Convert-AzureRmSqlDatabaseVulnerabilityAssessmentScan?view=azurermps-6.6.0">Convert-AzureRmSqlDatabaseVulnerabilityAssessmentScan</a></p>
</td>
<td>Converts vulnerability assessment scan results to an Excel file</td>
</tr>
</tbody>
</table>
</div>
<h2><span></span></h2>
&nbsp;
<h2><span>Get started now with VA PowerShell Cmdlets </span></h2>
Get started now with managing your Azure SQL vulnerability assessments at scale using PowerShell cmdlets.

Install the latest Azure Resource Manager Module containing the new cmdlets at the <a href="https://www.powershellgallery.com/packages/AzureRM/6.6.0">AzureRM PowerShell Gallery</a>.

Documentation for all supported Azure SQL-related PowerShell cmdlets can be found at <a href="https://docs.microsoft.com/powershell/module/azurerm.sql">Azure RM SQL PowerShell</a>.

For more details on the SQL Vulnerability Assessment, see the <a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">SQL Vulnerability Assessment documentation</a>.

<span>To learn more about VA, and see an assessment in action on Azure SQL Database, check out this </span><a href="https://channel9.msdn.com/Shows/Data-Exposed/Track-and-remediate-potential-database-vulnerabilities-with-SQL-Vulnerability-Assessment"><span>Channel 9 demo</span></a><span>.</span>

Try it out and let us know what you think!]]></content:encoded>
    </item>
    <item>
      <title>PowerShell cmdlets for managing SQL Vulnerability Assessments</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/powershell-cmdlets-for-managing-sql-vulnerability-assessments</link>
      <pubDate>Thu, 05 Jul 2018 05:39:22 GMT</pubDate>
      <dc:creator><![CDATA[Ronit Reger]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3135</guid>
      <description><![CDATA[We are pleased to announce the availability of PowerShell cmdlets for managing SQL Vulnerability...]]></description>
      <content:encoded><![CDATA[We are pleased to announce the availability of PowerShell cmdlets for managing SQL Vulnerability Assessments for your SQL Servers. The cmdlets can be used to run assessments programmatically, export the results and manage baselines. They enable the scenario of running assessments and managing baselines across multiple databases in your environment.

To get started, download the latest <a href="https://www.powershellgallery.com/packages/SqlServer/">SqlServer PowerShell module</a> on the PowerShell Gallery site.
<h2><span>Vulnerability Assessment</span></h2>
SQL Vulnerability Assessment (VA) is a service that provides visibility into your security state, and includes actionable steps to resolve security issues, and enhance your database security. It can help you:
<ul>
 	<li>Meet compliance requirements that require database scan reports.</li>
 	<li>Meet data privacy standards.</li>
 	<li>Monitor a dynamic database environment where changes are difficult to track.</li>
</ul>
VA runs vulnerability scans on your database, flagging security vulnerabilities and highlight deviations from best practices, such as misconfigurations, excessive permissions, and unprotected sensitive data. The rules are based on Microsoft’s best practices and focus on the security issues that present the biggest risks to your database and its valuable data. These rules also represent many of the requirements from various regulatory bodies to meet their compliance standards.

Results of the scan include actionable steps to resolve each issue and provide customized remediation scripts where applicable. An assessment report can be customized for your environment by setting an acceptable baseline for permission configurations, feature configurations, and database settings. This baseline is then used as a basis for comparison in subsequent scans, to detect deviations or drifts from your secure database state.
<h2><span>Cmdlets for managing assessments</span></h2>
Until now, SQL Vulnerability Assessment could be run and managed via the <a href="https://docs.microsoft.com/azure/sql-database/sql-vulnerability-assessment">Azure portal</a> for Azure SQL Database, and <a href="https://go.microsoft.com/fwlink/?linkid=863617">using SQL Server Management Studio (SSMS)</a> for SQL Server, supporting SQL Server 2012 and up. Now, you can also use PowerShell cmdlets to run and manage scans at scale on SQL Server installations, whether on-premises or installed on a VM.

The available cmdlets are:
<table>
<tbody>
<tr>
<td><b>Cmdlet</b></td>
<td><b>Usage </b></td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/Invoke-SqlVulnerabilityAssessmentScan?view=sqlserver-ps">Invoke-SqlVulnerabilityAssessmentScan</a></td>
<td>Use this cmdlet to run a VA scan on your database. Provide the target server and database, and optionally an existing baseline, and get the scan results as output. You can authenticate to the database using Windows Authentication or using a valid credential.</td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/export-sqlvulnerabilityassessmentscan?view=sqlserver-ps">Export-SqlVulnerabilityAssessmentScan </a></td>
<td>Use this cmdlet to export the results of a VA scan to an Excel file.</td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/new-sqlvulnerabilityassessmentbaseline?view=sqlserver-ps">New-SqlVulnerabilityAssessmentBaseline</a></td>
<td>Use this cmdlet to create a new baseline for a particular VA security check. This baseline can then be added to a baseline set, which can in turn be used to run a new VA scan with customized result values. A result from a previous VA scan can be used to set the value for this baseline.</td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/new-sqlvulnerabilityassessmentbaselineset?view=sqlserver-ps">New-SqlVulnerabilityAssessmentBaselineSet</a></td>
<td>Use this cmdlet to create a new VA baseline set, which is a collection of VA baseline values for different security checks. The baseline set can be used to run VA scans with customized results, tailored to your database environment.</td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/export-sqlvulnerabilityassessmentbaselineset?view=sqlserver-ps">Export-SqlVulnerabilityAssessmentBaselineSet</a></td>
<td>Use this cmdlet to export a VA baseline set to a file. The output file can be opened and managed in SSMS.</td>
</tr>
<tr>
<td><a href="https://docs.microsoft.com/powershell/module/sqlserver/import-sqlvulnerabilityassessmentbaselineset?view=sqlserver-ps">Import-SqlVulnerabilityAssessmentBaselineSet</a></td>
<td>Use this cmdlet to import a VA baseline set from a file. It can be used to import baseline sets created by SSMS.</td>
</tr>
</tbody>
</table>
For a detailed reference on all SQL Server PowerShell cmdlets, see the <a href="https://docs.microsoft.com/powershell/module/sqlserver/">online documentation</a>.
<h2><span>Get started now with VA PowerShell Cmdlets </span></h2>
<span>The SqlServer PowerShell module can be found on the </span><a href="https://www.powershellgallery.com/packages/SqlServer/"><span>PowerShell Gallery</span></a><span> site. See the </span><a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-ps-module"><span>download</span></a><span> instructions for more details.</span>

<span>For more details on working with VA in SSMS, see </span><a href="https://go.microsoft.com/fwlink/?linkid=863617"><span>Getting Started with SQL Vulnerability Assessment in SSMS</span></a><span>. </span>

<span>To learn more about VA, and see an assessment in action on Azure SQL Database, check out this </span><a href="https://channel9.msdn.com/Shows/Data-Exposed/Track-and-remediate-potential-database-vulnerabilities-with-SQL-Vulnerability-Assessment"><span>Channel 9 demo</span></a><span>.</span>

Try it out and let us know what you think!

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Introducing SQL Information Protection for Azure SQL Database and on-premises SQL Server!</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/introducing-sql-information-protection-for-azure-sql-database-and-on-premises-sql-server</link>
      <pubDate>Tue, 20 Feb 2018 11:48:10 GMT</pubDate>
      <dc:creator><![CDATA[Gilad Mittelman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=3016</guid>
      <description><![CDATA[We are delighted to announce the public preview of SQL Information Protection (Data Discovery &amp;...]]></description>
      <content:encoded><![CDATA[We are delighted to announce the public preview of SQL Information Protection (Data Discovery &amp; Classification), introducing advanced capabilities built into Azure SQL Database for <strong>discovering</strong>, <strong>classifying</strong>, <strong>labeling</strong> &amp; <strong>protecting</strong> the sensitive data in your databases. Similar capabilities are also being introduced for on-premises SQL Server via SQL Server Management Studio.

Discovering and classifying your most sensitive data (business, financial, healthcare, PII, etc.) can play a pivotal role in your organizational information protection stature. It can serve as an infrastructure for:
<ul>
 	<li>Helping meet data privacy standards and regulatory compliance requirements, such as GDPR.</li>
 	<li>Data-centric security scenarios, such as monitoring (auditing) and alerting on anomalous access to sensitive data.</li>
 	<li>Controlling access to and hardening the security of databases containing highly sensitive data.</li>
</ul>
<h3>What is SQL Information Protection?</h3>
SQL Information Protection (SQL IP) introduces a set of advanced services and new SQL capabilities, forming a new information protection paradigm in SQL aimed at protecting the data, not just the database:
<ul>
 	<li><strong>Discovery &amp; recommendations </strong>– The classification engine scans your database and identifies columns containing potentially sensitive data. It then provides you an easy way to review and apply the appropriate classification recommendations via the Azure portal.</li>
 	<li><strong>Labeling </strong>– Sensitivity classification labels can be persistently tagged on columns using new classification metadata attributes introduced into the SQL Engine. This metadata can then be utilized for advanced sensitivity-based auditing and protection scenarios.</li>
 	<li><strong>Monitoring/Auditing </strong>– Sensitivity of the query result set is calculated in real time and used for auditing access to sensitive data (<em>currently in Azure SQL DB only</em>).</li>
 	<li><strong>Visibility </strong>– The database classification state can be viewed in a detailed dashboard in the portal. Additionally, you can download a report (in Excel format) to be used for compliance &amp; auditing purposes, as well as other needs.</li>
</ul>
Additional SQL IP capabilities will continue rolling out throughout 2018 – Stay tuned!
<h3>How does SQL IP work?</h3>
We designed SQL IP with the goal of streamlining the process of discovering -&gt; classifying -&gt; labeling sensitive data in your database environment.

Our built-in automated classification engine identifies columns containing potentially sensitive data, and provides a list of classification recommendations, which can be easily applied as sensitivity metadata on top of columns, using new column sensitivity attributes that have been added to the SQL engine. You can also manually classify &amp; label your columns.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_1-2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_1-2.png" alt="" width="1341" height="728" class="alignnone size-full wp-image-3025" /></a>

Once you classify &amp; label your data, our detailed overview dashboard provides you visibility into the classification state of your database, as well as the ability to export and download a classification report in Excel format:

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_2-2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_2-2.png" alt="" width="1341" height="959" class="alignnone size-full wp-image-3035" /></a>

Finally, the SQL engine utilizes the column classifications to determine the sensitivity of query result sets. Combined with Azure SQL Database Auditing, this enables you to audit the sensitivity of the actual data being returned by queries:

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_auditing.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/Screenshot_auditing.png" alt="" width="868" height="134" class="alignnone size-full wp-image-3045" /></a>
<h3>Get started today!</h3>
We encourage you to try out SQL Information Protection today for improved visibility into your database environment, as well as for monitoring access to your sensitive data.

More details on using SQL Information Protection can be found in:
<ul>
 	<li><a target="_blank" href="https://docs.microsoft.com/azure/sql-database/sql-database-data-discovery-and-classification" rel="noopener">Azure SQL Database: Getting Started Data Discovery &amp; Classification</a></li>
 	<li><a target="_blank" href="https://docs.microsoft.com/sql/relational-databases/security/sql-data-discovery-and-classification" rel="noopener">SQL Server (on-prem): Getting Started with Data Discovery &amp; Classification</a></li>
</ul>
&nbsp;

<strong>Regards,</strong>

<strong>SQL Security team</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/microsoft.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/microsoft.png" alt="" width="216" height="46" class="alignnone size-full wp-image-2575" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Azure Log Analytics (OMS) Agent now collects SQL Server audit logs</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/azure-log-analytics-oms-agent-now-collects-sql-server-audit-logs</link>
      <pubDate>Thu, 28 Dec 2017 00:13:01 GMT</pubDate>
      <dc:creator><![CDATA[Gilad Mittelman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=2946</guid>
      <description><![CDATA[We are happy to inform that the Azure Log Analytics (OMS) Agent is now capable of pushing SQL Server...]]></description>
      <content:encoded><![CDATA[We are happy to inform that the Azure Log Analytics (OMS) Agent is now capable of pushing SQL Server audit logs into Azure Log Analytics (OMS), supporting SQL Server both on-premises, as well as on Azure VMs.

The Azure Log Analytics (OMS) platform can now be used as a centralized data store for all your SQL Server audit logs, for deeper visibility and advanced cross-resource analytics. Additional info on the platform can be found in <em><a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-overview">What is Log Analytics</a></em>.

<a href="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_4.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_4.png" alt="" width="741" height="361" class="alignnone wp-image-3015" /></a>

To enable this new capability, SQL Server audit logs need to be written to the <strong>Windows Application Log</strong>. This can be configured using T-SQL, as well as via the Audit Properties in SSMS:

<span style="text-decoration: underline">T-SQL example:</span>

CREATE SERVER AUDIT MyServerAudit
TO APPLICATION_LOG
WITH (QUEUE_DELAY = 1000, ON_FAILURE = CONTINUE)

<span style="text-decoration: underline">SSMS example:</span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_1.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_1.png" alt="" width="678" height="600" class="alignnone size-full wp-image-2965" /></a>

After setting up SQL Server auditing as described above, the Azure Log Analytics (OMS) agent should be configured to send logs to a Workspace. This can be done from <strong>Control Panel</strong> --&gt; <strong>Microsoft Monitoring Agent Properties</strong> --&gt; <strong>Azure Log Analytics (OMS)</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_3.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_3.png" alt="" width="550" height="463" class="alignnone size-full wp-image-2995" /></a>

Finally, the Azure Log Analytics (OMS) Workspace needs to be configured to collect Application Logs. This can be done from the Azure Login Analytics / OMS portals via <strong>Settings </strong>--&gt; <strong>Data</strong> --&gt; <strong>Windows Event Logs</strong> --&gt; <strong>Application</strong>:

<a href="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_2.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/12/oms_agent_2.png" alt="" width="1321" height="561" class="alignnone size-full wp-image-2975" /></a>

&nbsp;

&nbsp;

Additional info:

<a target="_blank" href="https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-engine" rel="noopener">SQL Server Auditing</a>

<a target="_blank" href="https://docs.microsoft.com/en-us/azure/log-analytics/" rel="noopener">Log Analytics (OMS) - documentation</a>

<a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-quick-collect-windows-computer">Log Analytics (OMS) - Collect data from Windows computers</a>

<a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-quick-collect-azurevm">Log Analytics (OMS) - Collect data from Azure VMs</a>

&nbsp;

SQL Security team

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/microsoft.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/microsoft.png" alt="" width="159" height="34" class="alignnone wp-image-2575" /></a>]]></content:encoded>
    </item>
    <item>
      <title>SQL Vulnerability Assessment now available for SQL Server 2012 and up</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/sql-vulnerability-assessment-now-available-for-sql-server-2012-and-up</link>
      <pubDate>Mon, 11 Dec 2017 00:10:11 GMT</pubDate>
      <dc:creator><![CDATA[Ronit Reger]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=2905</guid>
      <description><![CDATA[SQL Vulnerability Assessment has been available for preview on Azure SQL Database for a couple of...]]></description>
      <content:encoded><![CDATA[<strong>SQL Vulnerability Assessment has been available for preview on Azure SQL Database for a couple of months, and has now been released on SSMS 17.4, supporting scanning of SQL Server 2012 and up. Whether on-premises or on a VM!</strong>
<h2>SQL Vulnerability Assessment</h2>
SQL Vulnerability Assessment (VA) is your one-stop-shop to discover, track and remediate potential database vulnerabilities. It can be used as an excellent preventive security measure, providing visibility into your security state and offering actionable steps to investigate, manage and resolve security issues and enhance your database fortifications.

[caption id="attachment_2915" align="aligncenter" width="879"]<a href="https://msdnshared.blob.core.windows.net/media/2017/12/3-SSMSScanResults.png"><img width="879" height="554" class="size-large wp-image-2915" alt="Vulnerability Assessment report in SSMS" src="https://msdnshared.blob.core.windows.net/media/2017/12/3-SSMSScanResults-1024x645.png" /></a> Vulnerability Assessment report in SSMS[/caption]

Not only does VA expose some of the possible security flaws you have in your database system, it also provides remediation scripts to resolve issues within a couple of mouse clicks. In addition, you can accept specific results as your <strong>approved baseline </strong>state, and the VA scan report will be customized accordingly to expect these values.

[caption id="attachment_2935" align="aligncenter" width="741"]<a href="https://msdnshared.blob.core.windows.net/media/2017/12/SSMSSetBaseline_med.png"><img width="741" height="657" class="wp-image-2935 size-full" alt="Approving a VA result as your baseline" src="https://msdnshared.blob.core.windows.net/media/2017/12/SSMSSetBaseline_med.png" /></a> Approving a VA result as your baseline[/caption]

Beyond improving your database security, VA can be an invaluable tool to help meet data privacy requirements or help comply with data protection regulations like the EU GDPR. VA simplifies the processes involved in addressing these, and also facilities ongoing monitoring of your database protection status.
<h2>What are people saying about Vulnerability Assessment?</h2>
VA was designed to be straightforward and easy to use, giving you a simple way to improve your database security stature.

Our preview customers have been using the service to lock down their database security, and to help address their data privacy requirements.

Customers have been most impressed with the quick and lightweight nature of the scan. They are also very appreciative of the actionable remediations available directly within the VA experience.
<blockquote>“<em>I personally like the tool, and the feedback from other teams has been positive. Everyone found the tool very easy to run, the findings easy to understand, and fixes were straightforward thanks to the remediation scripts.</em>”

- Anton Popov, Principal Security Engineer at Schneider Electric Software, LLC

&nbsp;

<em>“This is another example of Microsoft making security more approachable, even if you are not a security expert. After running a scan you will probably see some quick wins making your database more secure step by step.”</em>

- Tom Kerkhove, Azure Consultant at Codit and Microsoft Azure MVP</blockquote>
<h2>Now in SSMS</h2>
VA has now been released as an integral part of SQL Server Management Studio (SSMS)! You can run an assessment from within SSMS on any database you connect to, whether on-premises or in the cloud. VA supports SQL Server 2012 and up.

Running a VA scan on your SQL Server includes a richer set of security checks than the scan on Azure SQL Database, since there are more relevant checks for the SQL Server surface area. When running a scan from SSMS on your Azure SQL Database, you can expect a similar result to the one you see in the Azure Portal. Your baselines do not persist across, though, so you will need to manage them separately.

To run an assessment from SSMS, all you need to do is connect to your database, right click on the database and select <strong>Tasks -&gt;</strong> <strong>Vulnerability Assessment -&gt; </strong> <strong>Scan for Vulnerabilities… </strong>The scan takes just a few seconds to run, and the results are stored on your local file system, (you can configure the target location). You will then see the full results report in the SSMS pane, and you can drill down to each individual result for details and remediation steps, and to set your result baseline.

For more details on working with VA, see <a href="https://go.microsoft.com/fwlink/?linkid=863617">Getting Started with SQL Vulnerability Assessment in SSMS</a>.
<h2>Get started now</h2>
To get started with VA, download the newest version of SSMS <a href="https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms">here</a>. VA is supported as of <strong>SSMS 17.4</strong>.

To learn more about VA, and see an assessment in action on Azure SQL Database, check out this <a href="https://channel9.msdn.com/Shows/Data-Exposed/Track-and-remediate-potential-database-vulnerabilities-with-SQL-Vulnerability-Assessment">Channel 9 demo</a>.

Be sure to check out <a href="https://go.microsoft.com/fwlink/?linkid=863617">Getting Started with Vulnerability Assessment</a> for more details on how to run and manage your assessment.

Try it out and let us know what you think!]]></content:encoded>
    </item>
    <item>
      <title>Enabling Confidential Computing with Always Encrypted using Enclaves (Early Access Preview)</title>
      <link>https://docs.microsoft.com/archive/blogs/sqlsecurity/enabling-confidential-computing-with-always-encrypted-using-enclaves-early-access-preview</link>
      <pubDate>Thu, 05 Oct 2017 10:06:02 GMT</pubDate>
      <dc:creator><![CDATA[Jakub Szymaszek]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqlsecurity/?p=2875</guid>
      <description><![CDATA[Last week at Ignite, we announced a major SQL security investment that enhances Always Encrypted...]]></description>
      <content:encoded><![CDATA[Last week at Ignite, we announced a major SQL security investment that enhances Always Encrypted with secure enclave technologies to enable:
<ul>
 	<li><strong>Rich computations</strong> on encrypted columns, including pattern matching, range comparisons, and sorting, which unlocks Always Encrypted to a broad range applications and scenarios that require such computations to be performed inside the database system.</li>
 	<li><strong>In-place encryption</strong> - schema changes that involve cryptographic operations on sensitive data, for example: initial data encryption, rotating a column encryption key, or changing a data type of an encrypted column, without migrating the data outside of the database for all cryptographic operations.</li>
</ul>
Our efforts to enhance the functionality of Always Encrypted are part of the <a href="https://azure.microsoft.com/en-us/blog/introducing-azure-confidential-computing/">recently announced the Azure confidential computing initiative</a>.

Introduced in 2016, Always Encrypted makes it possible to encrypt sensitive data in use to ensure the confidentiality of the data is protected from malware the machines hosting the database may be infected with, and from high-privilege, but unauthorized users, including machine admins, DBAs and administrators of the cloud platform hosting the database. However, in the currently generally available versions of SQL Server (2016 and 2017) and Azure SQL Database, this unparalleled level of protection comes at a price that is too high to some customers: functionality of queries on encrypted columns gets substantially reduced, as equality comparison is the only SQL operation possible on encrypted columns (and only with deterministic encryption). Other challenges, we hear customers often struggle with today, stem from the fact that the SQL Server Engine cannot (by design) perform any cryptographic operations on sensitive data and never has access to the cryptographic keys. To encrypt existing data or make any schema changes involving re-encrypting or decrypting the data, customers need to use tools, such as <a href="https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-wizard">Always Encrypted Wizard in SSMS </a>or the Set-SqlColumnEncryption cmdlet in PowerShell, which load the data, encrypt, decrypt or re-encrypt it and upload the data back to the database. This process can take a long time and is prone to network errors.

To address the above challenges, we plan to leverage cutting-edge secure enclave technologies, such as Intel Software Guard Extensions (SGX). An enclave is a protected region of memory that acts as a trusted execution environment. An enclave appears as a black box to the containing process and to other processes running on the machine. There is no way to view the data or the code inside the enclave from the outside, even with a debugger. In the case of SGX, this guarantee is hardware-based and provided by the processor. Enclaves also ensure that only authorized code is permitted to run inside an enclave and access the data. If the code is altered or tampered with, the operations are denied, and the environment disabled. The enclave enforces these protections throughout the execution of code within it.

The way the enhanced Always Encrypted feature uses enclaves is illustrated on the below diagram. The SQL Server Engine process contains an enclave, loaded with the code implementing cryptographic algorithms, used in Always Encrypted (e.g. AES-256), as well as the code implementing SQL operations, such LIKE predicates or range comparisons (e.g. using '&lt;' or '&gt;'). Before submitting a query to the SQL Server Engine for processing, the SQL client driver inside the application sends the keys, that are required for the operations in the query, to the enclave over a secure channel. When processing queries, the SQL Server Engine delegates rich computations and cryptographic operations on encrypted columns to the enclave, where the data is safely decrypted and processed. Note that sensitive data remains encrypted within the SQL Server Engine, when outside of the enclave.

<a href="https://msdnshared.blob.core.windows.net/media/2017/10/ae-using-enclaves-1.png"><img width="693" height="226" class="wp-image-2895 aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/ae-using-enclaves-1.png" /></a>

While the new architecture will enable us to support a broad range of computations on encrypted columns inside the SQL Server Engine, we initially target the most commonly requested operations, such as pattern matching (LIKE), range queries, sorting (ORDER BY), as well as a broad set of data type conversions. The below example shows a query searching employee records based on the last four digits of a social security number (assuming the SSN column is encrypted).<code>
</code>

<code> DECLARE @SSNPattern CHAR(11) = '%9838'
SELECT * FROM [dbo].[Employees] WHERE [SSN] LIKE @SSNPattern
GO</code>

Enabling cryptographic operations locally, eliminates the need to move the data out of the database for initial encryption or for other encryption-related schema changes. This greatly improves performance and reliability of such operations and means the operations can be triggered via <code>ALTER TABLE ALTER COLUMN</code> T-SQL statements and do not require special client-side tools. Here is an example of a statement that triggers a rotation of a column encryption key:
<code>
--Assuming SSN is a plaintext column, the below statement encrypts data in the column.
ALTER TABLE [dbo].[Employees]
ALTER COLUMN [SSN] [char](11)
ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = [CEK1], ENCRYPTION_TYPE = Randomized, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256') NOT NULL
GO
</code>

Always Encrypted using enclaves is currently in an early access technology preview. If you have a workload that can benefit from the new capabilities, please<strong> sign up for the preview at <a href="https://aka.ms/SQLEnclavesPreview">https://aka.ms/SQLEnclavesPreview </a></strong>and help influence the final shape of this technology in future versions of the SQL platform products and services.

To learn more and see the demos of Always Encrypted using enclaves, you can watch the below recordings of Ignite sessions:
<ul>
 	<li><a href="https://myignite.microsoft.com/videos/54962">Inside Microsoft Azure datacenter hardware and software architecture with Mark Russinovich</a> - fast forward to 49' 53''</li>
 	<li><a href="https://myignite.microsoft.com/videos/55105">Secure your data in Azure SQL Database and SQL Data Warehouse</a> - fast forward to 34' 17''</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>