Press "Enter" to skip to content

Category: Security

Securing SQL Server Maintenance Tasks

Fabiano Amorim shares some advice:

SQL Server is often marketed or perceived as secure by default, but real-world testing shows that default installations and default permissions still expose several attack surfaces. With this in mind, “secure by default” does not mean “safe without review.” 

Many risks come from legacy behavior, backward compatibility, broad permissions granted to the public role, system procedures, implicit trust boundaries, and administrative convenience features. 

The risk appears when they are combined: a database user with more permissions than necessary, a maintenance job running as a highly privileged owner, an unexpected trigger, or an impersonated module that changes how permissions are evaluated. 

Click through for a depiction of how the attack path works and things you can do to prevent systems compromise.

Leave a Comment

Querying Shodan from SQL Server

Vlad Drumea makes use of a new procedure in SQL Server 2025:

In this post I’m querying Shodan‘s REST API directly from SQL Server using SQL Server 2025’s sp_invoke_external_rest_endpoint stored procedure.

In my previous post I looked through Shodan for publicly exposed SQL Server instances.
And, at one of the steps, pulled some of the data into SQL Server to get a better sense of the major versions of SQL Server that were out there on the public internet.
At that point I mentioned I would go into the details about that process in a separate post, so here we are.

Click through to see how.

Leave a Comment

Finding Internet-Exposed SQL Server Instances

Vlad Drumea does some sleuthing:

In this post I dig through some data that Shodan provides for internet-exposed SQL Server instances, their versions and locations.

I occasionally check Shodan for SQL Server instances that are publicly exposed on the internet for anyone to poke at. I make a LinkedIn post about it (like this one) and then just leave it at that.
So, this time, I’ve decided to dig a bit more into that data and document it here.

Click through to see what Vlad was able to find.

Leave a Comment

Working with Group Managed Service Accounts in SQL Server

Aleksey Vitsko uses a gMSA:

I plan to install several SQL Server instances across different servers. On all servers, I would like to use the same accounts for the SQL Server services for easier management. I’ve heard there are Group Managed Service Accounts (gMSA) that can be used as SQL Server service accounts, for example for the database engine service and SQL Agent service. How can I configure gMSAs?

Click through for a good solution to a security problem that becomes all the more important when you need high availability.

Leave a Comment

SQL Login Overhead in SQL Server 2025

Sean Gallardy has a wonderful rant:

There were a few emails about login times so I figured it warranted a blog post. Strap in, this one goes sideways fast.

Some people noted that the amount of time to log in with a SQL Login in SQL Server 2025 all of a sudden took longer. This is clearly stated in the Docs, though the way it is written is documented is problematic.

As Sean mentions, this is on purpose and it is good. Yeah, the amount of time it takes to log in using SQL authenticated accounts in SQL Server 2025 is higher. That’s because the mechanism to log in is now considerably more secure than it was before. And let’s be honest: how frequently are you logging into SQL Server? What percentage of your processing time does that take? Because if the answer is “a large percentage,” that sounds like a job for connection pooling or revising the calling application.

2 Comments

No More RC4 for Kerberos

Mike Lynn provides a heads-up:

In July 2026 Microsoft is making a change that may impact your environment. The change being implemented will make your environment more secure by no longer accepting the RC4 algorithm for the Kerberos protocol by default. The problem though is it could cause authentication failures, services to not start, and Kerberos to stop working. Microsoft has been working to implement this change since January 2026, and July 2026 is the final phase.

Click through to see what this means and what you can do to make sure it doesn’t affect you.

Comments closed

Patched SQL Injection Vulnerability in sys.sp_dbmmonitorupdate

Fabiano Amorim digs into a fixed issue:

What makes this case particularly interesting is not just that the vulnerability exists in a trusted system object, but how it works: the injection bypasses a REPLACE-based sanitization attempt through a subtle Unicode character conversion that happens silently during a variable assignment.

The vulnerability was reported to Microsoft and they have since fixed it, but it’s still worth exposing and explaining given how intricate it is. So, that’s what I’ll do in this article.

Click through to see how it works. And of course this database mirroring stored procedure is still hanging around long after database mirroring itself was deprecated. But that’s the downside to deprecation without subsequent removal.

Comments closed

Using Entra ID Authentication in Azure Database for PostgreSQL

Taiob Ali wants to use Entra for authentication:

During the livestream of my session at the POSETTE: An Event for Postgres 2026 conference, I received the following question on the hallway track via Discord:

I have one question : I added an Entra group as PostgreSQL Entra administrator, created/mapped the PostgreSQL role for that group, and granted permissions to that group. I am a member of the Entra group, but I still cannot log in with my own Entra user. Does Azure PostgreSQL allow group members to authenticate through the group role, or must each user also be individually created/mapped as a PostgreSQL role?

Read on for Taiob’s full answer.

Comments closed

Fabric Data Agents and Power BI Row-Level Security

Jens Vestergaard digs into a security challenge:

In the last post I walked through auditing a semantic model before connecting it to an AI tool like Fabric Data Agent. Descriptions, naming, explicit measures, star schema: the things that decide whether a Fabric data agent generates an accurate query or a confident wrong one. I left one thing out on purpose, because it deserved its own post and because I got it wrong the first time I thought about it.

Security.

Click through for a few subtle security issues that automated agents can expose. It turns out to be a lot more challenging than you may first expect, just as Jens discovered.

Comments closed

Treating Query Store Abort Hints like a SQL Firewall

Emad Al-Mousa plays around a bit:

It’s a security mechanism designed to filter, and block unauthorized or malicious SQL query being executed against the database system before it reaches the database kernel itself. It acts as a specialized gatekeeper that ensures only “known good” queries are allowed to run. In a sense, you can compare it with WAF (web application firewall) in terms of protection mechanism.

SQL Firewall will provide protection against the following threats and attacks:

SQL Injection

Privilege Escalation

Data Exfiltration

Emad makes it very clear that this is not a viable technique, but it is also a fun enough idea that it’s worth checking out.

Comments closed