Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to find what accounts can execute xp_cmdshell?

Tags:

sql

sql-server

I'd like to find out what users on a SQL Server system can execute xp_cmdshell. Is there a query that will do this?

I'd like to know how to do it for SQL Server 2000 - 2008

like image 377
Abe Miessler Avatar asked Dec 30 '25 07:12

Abe Miessler


1 Answers

Googling "xp_cmdshell":

When first enabled, xp_cmdshell requires CONTROL SERVER
permission to execute and the Windows process created by
xp_cmdshell has the same security context as the SQL Server 
service account.

http://msdn.microsoft.com/en-us/library/ms175046.aspx

like image 169
Ken Downs Avatar answered Jan 01 '26 20:01

Ken Downs