Andreas Wolter
  • Consulting & Services
    • SQL Server Security Assessment by Andreas Wolter
    • SQL Server Health Check
    • Performance Analysis
    • SQL Server Discovery
    • Air-Gapped SQL Server
  • My Customers
  • About
    • Conferences
    • Certifications
    • Training
  • Blog
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

10 hours of SQL Server under attack – takeaways

10 hours of SQL Server under attack – takeaways

Have you ever wondered what are signs of attacks on SQL Server?

Once in a while, just for fun, I do expose a SQL Server directly to the internet. Then I wait and see how long it takes for the attempts to breach happen.

This year at the SQLSaturday New York City conference which took place at the Microsoft offices in New York City, I had the honor to deliver my Performance Monitoring workshop as a 1 day PreCon . What distinguishes my workshop is that attendees can connect to my SQL Server, which is running a production-like workload, and do some hands-on analysis themselves.\

I decided to make it easy – for myself as well as for attackers – and left the standard SQL Server port 1433 exposed to the internet, on purpose.

Then I waited for the first break-in attempts to show up in the Logs.

In this post, I am sharing with you what happened:

First break-in attempts after 10 minutes

It took only 10 minutes, while I was still preparing the Demo-environment (workload simulations etc.) for the first attacker to try.

SQLogonAttempt

The attacker apparently came from Iran. – Yes, I know, this can be forged, but based on experience, this was likely not the case.

Who leaves SQL Server exposed to the public internet?

If you think it is unrealistic that someone would leave SQL Server exposed to the internet, I understand where you are coming from. However, not every company has sufficiently well-informed DBA’s and Network Admins working for them.

Shodan has a list of network scan results for the whole internet, and currently there are about 330.000 such SQL Server instances found as you can see here:  https://www.shodan.io/search?query=SQL+Server  (I exclude the number of browser services as those may well point to the same SQL Servers already in the list)

Main workshop day, waiting for the first attacker of the day

Then came the day of the workshop. This time, the SQL Server would be online and hence exposed much longer.

Just for fun, I made a bet with the attendees: which of the major nation-states known for aggressive and organized cyberattacks – China, russia, Iran, or North Korea – would be the first to hit my server that day?

Well, the first attempt to breach the sa account came from Saudi Arabia. 🙂 And in addition to that, for the remainder of that day, most attackers used North American IPs. Therefore, nobody won the bet.

SQLogonAttempt 

Security recommendation

Since sa is well documented for SQL Server, this is always the first account that is tried. Therefore, the recommendation is: do not use the sa account. Disable the sa account after setting a very long (100+ characters) password. Use a separate account for sysadmin-privileges.



Other signs of ongoing probing or attacks

So far, we have seen the classic attempts to breach the sa account followed by attempts of other well-known account names such as “admin”, “mssql”, “su” etc.

But there are other signs that someone is probing your environment and SQL Server.

Here are some of the typical error messages you will see in such cases:

SQLError 17821

SQLError 17832

SQLError 17836

So do not dismiss those. If you see these, pay extra attention.

I hope this was interesting.

If you feel you need a professional to look at your data estate from a security angle, please reach out to me and my team.

Andreas

How exposed are your SQL Servers? Attacks like these target weak authentication and default configuration. Database service hardening closes those gaps.

Harden Your SQL Server
Share article
  • Share on Facebook
  • Share on X
  • Share on LinkedIn
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Security Assessment Community Edition

Learn about my free Community Edition script.

Recent
  • Sample result in SSMS: local NTLM connections over shared memory from SQL01, and NTLM connections over TCP from a reporting server, an ETL server and a workstation
    NTLM Deprecation and SQL Server: How to Find NTLM Connections...18. November 2026 - 17:01in: Security
  • SQL Server Consolidation: $3M+ in Projected Savings and...30. September 2026 - 15:47in: Architecture & High Availability, Security
  • Using a Database Server as a Honeypot for Threat Detect...18. September 2026 - 16:00in: Security
  • Azure Arc for SQL Server: “Least Privilege” Mode Still...8. September 2026 - 15:56in: Security
  • When SIEM Enrichment Becomes False Attribution3. September 2026 - 14:26in: Security
Comments
  • Thanks Scott. Goof feedback. NETSTAT is a useful addition,...21. November 2026 - 15:44 by Andreas Wolter
  • I would go a little deeper with how to troubleshoot SQL...21. November 2026 - 15:15 by Scott O
  • Protecting database data at rest is essential for maintaining...21. October 2026 - 2:23 by Viska
  • Thanks Now Microsoft could document them as well, and put...19. August 2026 - 16:26 by Andreas Wolter
  • List of Action_IDs for Filter https://sqlquantumleap.com/reference/server-audit-filter-values-for-action_id/ Great...18. August 2026 - 0:59 by Peter Dünsch

Articles

Analysis Services Auditing Availability Groups Azure Best Practices Certification Columnstore Consolidation Deadlocks & Blocking Encryption Extended Events Get-SqlSafe In-Memory OLTP Indexing Least Privilege PASS Summit Patching Performance Analysis Permissions Privilege Escalation Reporting Services Security Principles Spatial Data SQLBits SQL Injection SQLSaturday SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2022 SQL Server 2025 SQL Trace & Profiler sysadmin & Server Roles Threat Detection Vulnerabilities Workshop & PreCon
© 2026 Andreas WolterContactImprintPrivacy PolicyLinkedInRSS
Link to: Why you should use SQL Server contained availability groups to save time – and why consultants may not tell you about them Link to: Why you should use SQL Server contained availability groups to save time – and why consultants may not tell you about them Why you should use SQL Server contained availability groups to save time –...ContainedAvailabilityGroup_Databases Link to: Cumulative Update 19 for SQL Server 2022 includes important fixes Link to: Cumulative Update 19 for SQL Server 2022 includes important fixes bug patchCumulative Update 19 for SQL Server 2022 includes important fixes
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}