Recently we have disabled a module which is dependent on xp_cmdshell. Though we are not directly using the xp_cmdshell (instead we are using the proxy), we would now like to disable the xp_cmdshell itself.
Can anyone explain to me with a simple scenario based on the the statement below, why some people are for xp_cmdshell and most of the people are against xp_cmdshell?
"xp_cmdshell" is an extended stored procedure provided by Microsoft and stored in the master database. This procedure allows you to issue operating system commands directly to the Windows command shell via T-SQL code. It is dangerous as it can be used by trojans and worms to gain access to the system.
Reference: Restrict Microsoft SQL Server XP_CMDSHELL Procedure (Trend Micro)
- Though only SQL Server admin can use it, why people are still against ?
- (Not in a negative sense) Is it really possible for SQL Injection using xp_cmdshell? Any simple hint / example of a scenario of SQL Injection via xp_cmdshell, I just want to understand the background.
- What are the dangerous Windows OS commands one can think of?
Apologize, though there are many articles and write-ups on xp_cmdshell, I am bit confused on what are the dangerous stuff it could do.