1

Link: https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/determining-effective-database-engine-permissions?view=sql-server-ver15#summary

Is this true that Members of the local computer administrator group can always elevate their privileges to sysadmin.

I am confused because the local administrator group is not automatically added to the sql security post 2008. And so they cannot login into the SQL server instance.

variable
  • 3,590
  • 4
  • 37
  • 100

3 Answers3

4

Yes, a user with Local Administrator level access can do literally anything they want to the system.

Take a look at this question-and-answer that explains how to add a user to the sysadmin SQL Server role when no current sysadmin is available.

Hannah Vernon
  • 70,928
  • 22
  • 177
  • 323
Stephen Morris - Mo64
  • 4,656
  • 1
  • 10
  • 18
3

You have to bear in mind that a user with local administrator rights can literally do anything they want, including for example, attaching a debugger to sqlservr.exe process and modifying code or memory directly. They could also take ownership of the master database file and modify it with a hex editor.

You cannot lock them out, because there are many ways for them to elevate to SYSTEM rights, at which point they can do anything they want anyway.

For example, one of the methods on the excellent post linked by @StephenMorris uses impersonation. An administrator can impersonate any user, so they could act as the MSSQLSERVER user.

Charlieface
  • 17,078
  • 22
  • 44
1

am confused because the local administrator group is not automatically added to the sql security post 2008. And so they cannot login into the SQL server instance.

Adding to the correct technical answers, the Windows Admin owns the server. And so while we don't want Windows Admins connecting to the SQL instance as a privileged user (or at all) by default, the Windows Admin must always be able to "take ownership" of the instance and the data.

By analogy a home may have locks on bedroom or bathroom doors, but these aren't intended to permanently deny access to the homeowner. Only to prevent accidental or casual access.

David Browne - Microsoft
  • 49,000
  • 3
  • 53
  • 102