설치 후 해당 쿼리를 이용해서 제거 해주세요 위부터 하시면 됩니다.
MSSQL 2005 에서는 일부 쿼리가 사용되지 않습니다. 사용되지 않는것은..넣어보시면 압니다..-_-)
에러가 나는 라인은 삭제하시고 던져주세요~ *-_-)
============================================================================
불필요한 권한 삭제
use msdb
go
--- msdb database
REVOKE EXECUTE ON sp_add_job FROM public
REVOKE EXECUTE ON sp_add_jobstep FROM public
REVOKE EXECUTE ON sp_add_jobserver FROM public
REVOKE EXECUTE ON sp_start_job FROM public
REVOKE ALL ON dbo.mswebtasks FROM public
REVOKE EXECUTE ON sp_enum_dtspackages FROM public
REVOKE EXECUTE ON sp_get_dtspackage FROM public
REVOKE EXECUTE ON sp_get_sqlagent_properties FROM public
use master
go
--- master database
REVOKE EXECUTE ON xp_regread FROM public
REVOKE EXECUTE ON xp_instance_regread FROM public
REVOKE EXECUTE ON dbo.sp_runwebtask FROM public
--- 시스템 명령이 가능한 확장 프로시저 제거 합니다
USE master
GO
IF OBJECT_ID('[dbo].[xp_cmdshell]') IS NOT NULL BEGIN
EXEC sp_dropextendedproc 'xp_cmdshell'
END
GO
---쿼리를 이용해서 제거 하여도 dll 파일은 남아 있습니다
dbcc xp_cmdshell(free)
dbcc xp_cmdshell(free)
dbcc xp_dirtree(free)
dbcc xp_regdeletekey(free)
dbcc xp_regenumvalues(free)
dbcc xp_regread(free)
dbcc xp_regwrite(free)
dbcc sp_makewebtask(free)
dbcc sp_adduser(free)
---- SQL 인젝션방지용
DENY EXECUTE ON [master].[dbo].[xp_subdirs] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_dirtree] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_availablemedia] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regwrite] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regread] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regaddmultistring] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regdeletekey] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regdeletevalue] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regremovemultistring] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_regaddmultistring] TO [guest] CASCADE
--일반 사용자의 물리적인 파일 접근을 차단
DENY EXECUTE ON [master].[dbo].[xp_fileexist] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_fixeddrives] TO [guest] CASCADE
DENY EXECUTE ON [master].[dbo].[xp_getfiledetails] TO [guest] CASCADE
go