The design of SQL Data Discovery & Classification could let attackers pinpoint sensitive information while flying under organizations' radars.

Kelly Sheridan, Former Senior Editor, Dark Reading

December 16, 2019

4 Min Read

SQL Data Discovery & Classification, a tool within Microsoft's SQL Server 2019, could inform attackers which data within a database is labeled sensitive, and which isn't, researchers report.

Imperva security research engineer Avidan Reich emphasizes this tool does not grant attackers access to sensitive data, nor is this finding a vulnerability in SQL Server 2019. Rather, the research reveals a security issue that exists in the way SQL Data Discovery & Classification is designed to work.

This tool is built into SQL Server Management Studio (SSMS) to let users detect, classify, and report sensitive data stored within their databases. The classification engine first scans a database and identifies which columns hold potentially sensitive information. From there, the tool gives employees a simpler way to apply classification recommendations and manually classify columns, either by SSMS GUI or by SQL statements "Add Sensitivity Classification."

When the data's classification state is determined, it's added to the audit log so employees can better monitor access to sensitive information for compliance and auditing, Reich explains.

There are tools designed to complete this process outside the database, he points out in a blog post on his findings. The "segregation of duties" principle advises a best practice of only giving database administrators the tools they need to do their jobs: designing databases, managing the database, and monitoring its usage and performance. The idea behind this principle is to separate responsibilities so no single employee has access to too much sensitive information.

If organizations adhere to the segregation of duties, this means only security personnel would perform a classification, he explains. An application owner would review and label sensitive data; a security expert would apply the appropriate controls. If a scan is conducted outside the database, the admin is not involved and doesn't have the opportunity to classify the data.

The issue Reich found with SQL Data Discovery & Classification is it shows where sensitive information is stored by labeling it within the database itself. This makes it easier for a malicious insider, or an employee whose credentials have been compromised, to figure out which database columns contain sensitive data and then gain access to it, Reich explains. They would only need the "view any sensitivity classification" permission and a simple query.

"For insider threats, such as malicious employees or employees whose security has been compromised, it would be very easy to use the tool output to access sensitive data under the radar of security tools, such as behavior analytics solutions," he says. It's worth noting that database admins and accounts used by applications connecting to the database usually are able to view both nonencrypted and encrypted information.

"Without the tool output, insider threats would have to scan all application tables for sensitive data, which is a noisy approach that can trigger an incident within any behavior analytics security solution," Reich continues. An attacker who is able to ascertain exactly where valuable data is located can bypass the added step of scanning application tables.

An attacker who holes the server permission Control Server, or the database permission Alter, could also update sensitive data with the label "Drop Sensitivity Classification." This could render a sensitive column nonsensitive; in doing this, an attacker could make the data accessible under data activity monitoring and behavioral analytics tools.

Imperva shared the details of their findings with Microsoft, which says the tool's purpose is to discover and help classify data. "The reported findings do not pose a security risk and we do not plan to address it with a security update," officials said in an email to Dark Reading.

If your business uses the SQL Data Discovery & Classification tool, Reich advises the following mitigation steps:

  • Monitor access to the catalog view "sys[.]sensitivity_classifications, which has the location of the sensitive data.

  • Monitor executions of SQL statement "Drop Sensitivity Classification," which deletes the classification label.

  • Verify that only authorized accounts can execute the SQL statement "Drop Sensitivity Classification."

Related Content:

Check out The Edge, Dark Reading's new section for features, threat data, and in-depth perspectives. Today's top story: "Disarming Disinformation"

About the Author(s)

Kelly Sheridan

Former Senior Editor, Dark Reading

Kelly Sheridan was formerly a Staff Editor at Dark Reading, where she focused on cybersecurity news and analysis. She is a business technology journalist who previously reported for InformationWeek, where she covered Microsoft, and Insurance & Technology, where she covered financial services. Sheridan earned her BA in English at Villanova University. You can follow her on Twitter @kellymsheridan.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights