Re: How to disable dangerous extended stored procedures In SQL2005
- From: "Russell Fields" <russellfields@xxxxxxxxxx>
- Date: Wed, 7 May 2008 12:05:18 -0400
Fancy,
If you saw the following syntax defined somewhere, could you point out the
location?
exec sp_configure 'xp_dirtree', 0;
The sp_configure stored procedure has a defined list of configurables. For
2005, the list is here:
http://technet.microsoft.com/en-us/library/ms189631.aspx
If you could disable them, you would not want to, since they are used by SQL
Server itself. I see that these by default are granted to the public role.
If you feel safe doing so, you could revoke the permission to public by:
REVOKE EXECUTE ON xp_dirtree TO public
The system itself should still be able to use these procedures (it runs as
sysadmin after all) but the general user will no longer be able to do so.
If you determine that some non-sysadmin users actually need these rights,
you might create a role in 'master' to which you add the needed users. For
that role to work, you would need to GRANT EXECUTE ON xpname TO XPUserRole.
RLF
"Fancy" <FancyFan@xxxxxxxxxxxxxxxx> wrote in message
news:eA7MycDsIHA.3940@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a question about SQL2005 security enhancing.
In SQL2005, I need disable some dangerous extended stored procedures, such
as xp_dirtree, xp_regread .
I got a method from Internet to achieve that:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
exec sp_configure 'xp_dirtree', 0;
GO
RECONFIGURE;
GO
sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO
But it seems not work. I got an error message:
Message 15123£¬Level 16£¬status 1£¬procedure sp_configure£¬No. 51 line
option 'xp_dirtree' doesn't exist£¬maybe advanced option¡£
So I wanna know how can I disable these dangerous extended stored
procedures? I cannot find any guide from MS sites.
I hope get your help.
Thanks a lot!
Fancy Fan
7th May
.
- Follow-Ups:
- Re: How to disable dangerous extended stored procedures In SQL2005
- From: Fancy
- Re: How to disable dangerous extended stored procedures In SQL2005
- From: Erland Sommarskog
- Re: How to disable dangerous extended stored procedures In SQL2005
- References:
- Prev by Date: Re: Alter User for domain user
- Next by Date: Re: Alter User for domain user
- Previous by thread: How to disable dangerous extended stored procedures In SQL2005
- Next by thread: Re: How to disable dangerous extended stored procedures In SQL2005
- Index(es):
Relevant Pages
|
|