<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>Martin Poon - Microsoft MVP blog [SQL Server] : Security</title><link>http://msmvps.com/blogs/martinpoon/archive/tags/Security/default.aspx</link><description>Tags: Security</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Lateral SQL injection in Oracle</title><link>http://msmvps.com/blogs/martinpoon/archive/2008/04/28/lateral-sql-injection-in-oracle.aspx</link><pubDate>Mon, 28 Apr 2008 05:41:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1606878</guid><dc:creator>Martin Poon</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/rsscomments.aspx?PostID=1606878</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/commentapi.aspx?PostID=1606878</wfw:comment><comments>http://msmvps.com/blogs/martinpoon/archive/2008/04/28/lateral-sql-injection-in-oracle.aspx#comments</comments><description>&lt;p&gt;David Litchfield has just released&amp;nbsp;a&amp;nbsp;paper, showing&amp;nbsp;that it is possible to&amp;nbsp;do SQL injection using DATE or even NUMBER data types to exploit a PL/SQL procedure in Oracle RDBMS! The attacker can exploit a PL/SQL procedure that doesn&amp;#39;t even take user input! &lt;/p&gt;
&lt;p&gt;The&amp;nbsp;trick is to apply an &amp;#39;&amp;#39;ALTER SESSION SET NLS_DATE_FORMAT&amp;#39;&amp;#39; command in order to change the NLS variable such that the PL/SQL compiler will accept an arbitrary SQL as a &amp;#39;&amp;#39;DATE&amp;#39;&amp;#39; (even though it is not).&lt;/p&gt;
&lt;p&gt;=== For more information ===&lt;/p&gt;
&lt;p&gt;~ Lateral SQL Injection: A New Class of Vulnerability in Oracle&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf"&gt;http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1606878" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/Security/default.aspx">Security</category><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/Oracle/default.aspx">Oracle</category></item><item><title>Enabling xp_cmdshell in SQL Server 2005</title><link>http://msmvps.com/blogs/martinpoon/archive/2006/10/03/Enabling-xp_5F00_cmdshell-in-SQL-Server-2005.aspx</link><pubDate>Tue, 03 Oct 2006 11:33:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:151268</guid><dc:creator>Martin Poon</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/rsscomments.aspx?PostID=151268</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/commentapi.aspx?PostID=151268</wfw:comment><comments>http://msmvps.com/blogs/martinpoon/archive/2006/10/03/Enabling-xp_5F00_cmdshell-in-SQL-Server-2005.aspx#comments</comments><description>&lt;p&gt;xp_cmdshell is used to spawn a Windows command shell and executes a command line process by the operating system. &lt;/p&gt;
&lt;p&gt;In order to minimize the security risk of executing malicious code outside SQL Server 2005, xp_cmdshell is disabled by default, and the following error message will be shown when xp_cmdshell is being executed.&lt;/p&gt;
&lt;p&gt;Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1 &lt;br /&gt;SQL Server blocked access to procedure &amp;#39;sys.xp_cmdshell&amp;#39; of component &amp;#39;xp_cmdshell&amp;#39; because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of &amp;#39;xp_cmdshell&amp;#39; by using sp_configure. For more information about enabling &amp;#39;xp_cmdshell&amp;#39;, see &amp;quot;Surface Area Configuration&amp;quot; in SQL Server Books Online. &lt;/p&gt;
&lt;p&gt;(*Only* when there is an absolute need to enable the xp_cmdshell option) xp_cmdshell can be enabled by either one of the following methods.&lt;/p&gt;
&lt;p&gt;[1] Using the Surface Area Configuration tool (or using the &amp;quot;sac&amp;quot; utility for surface area configuration) &lt;/p&gt;
&lt;p&gt;Surface Area Configuration application can be found on the SQL Server &lt;br /&gt;--&amp;gt; Start &lt;br /&gt;&amp;nbsp; --&amp;gt; Programs &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; Microsoft SQL Server 2005 &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; Configuration Tools &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; SQL Server Surface Area Configuration &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; click on Surface Area Configuration for Features &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; SQL Sever instance /Database Engine &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; xp_cmdshell (check the &amp;quot;Enable xp_cmdshell&amp;quot; checkbox)&lt;/p&gt;
&lt;p&gt;[2] Running the sp_configure system stored procedure (administrative login required).&lt;/p&gt;
&lt;p&gt;-- To allow advanced options to be changed.&lt;br /&gt;EXEC sp_configure &amp;#39;show advanced options&amp;#39;, 1&lt;br /&gt;GO&lt;br /&gt;-- To update the currently configured value for advanced options.&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;br /&gt;-- To enable the feature.&lt;br /&gt;EXEC sp_configure &amp;#39;xp_cmdshell&amp;#39;, 1&lt;br /&gt;GO&lt;br /&gt;-- To update the currently configured value for this feature.&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO &lt;/p&gt;
&lt;p&gt;-- To disallow advanced options to be changed.&lt;br /&gt;EXEC sp_configure &amp;#39;show advanced options&amp;#39;, 0&lt;br /&gt;GO&lt;br /&gt;-- To update the currently configured value for advanced options.&lt;br /&gt;RECONFIGURE&lt;br /&gt;GO&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;===== For more information =====&lt;/p&gt;
&lt;p&gt;- xp_cmdshell (Transact-SQL) &lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms175046.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms175046.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;- Surface Area Configuration for Features (xp_cmdshell) - Database Engine &lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms177290.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms177290.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;- xp_cmdshell Option &lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms190693.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms190693.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;- sac Utility &lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms162800.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms162800.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;===== Other posts that point here =====&lt;/p&gt;
&lt;p&gt;~ xp_cmdshell&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sql-server-performance.com/community/forums/p/25032/139207.aspx"&gt;http://sql-server-performance.com/community/forums/p/25032/139207.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=151268" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/Security/default.aspx">Security</category><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/T-SQL/default.aspx">T-SQL</category></item><item><title>SQL Server service pack installation may save the system administrator password in a file for SQL Server 7.0 and SQL Server 2000</title><link>http://msmvps.com/blogs/martinpoon/archive/2006/09/18/SQL-Server-service-pack-installation-may-save-the-system-administrator-password-in-a-file-for-SQL-Server-7.0-and-SQL-Server-2000.aspx</link><pubDate>Mon, 18 Sep 2006 12:45:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:131264</guid><dc:creator>Martin Poon</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/rsscomments.aspx?PostID=131264</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinpoon/commentapi.aspx?PostID=131264</wfw:comment><comments>http://msmvps.com/blogs/martinpoon/archive/2006/09/18/SQL-Server-service-pack-installation-may-save-the-system-administrator-password-in-a-file-for-SQL-Server-7.0-and-SQL-Server-2000.aspx#comments</comments><description>&lt;p&gt;&lt;font face="trebuchet ms,geneva"&gt;During the installation of SQL Server products and service packs, the password(s) of system administrator (sa) and/or SQL Server Sevices domain account may be stored as clear text or weakly encrypted readable format in the SQL Server Setup files and/or &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_runsetup_8ege.asp" title="Setup.iss" target="_blank"&gt;&lt;font face="trebuchet ms,geneva"&gt;Setup.iss&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt; file. These files can be found in the following locations / files, and should be removed when the files are no longer required.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="trebuchet ms,geneva"&gt;- %Windir% folder &lt;br /&gt;- %Windir%\Temp folder &lt;br /&gt;- Temp folder (as specified in System Control Panel --&amp;gt; Advanced --&amp;gt; Environment Variables) &lt;br /&gt;- %SystemDrive%\MSSQL7\Install\or\Tools folder &lt;br /&gt;- Sqlstp.log &lt;br /&gt;- Sqlsp*.log &lt;br /&gt;- Setup.iss &lt;br /&gt;- Drive:\Program Files\Microsoft SQL Server\MSSQL\Install folder &lt;br /&gt;- Drive:\Program Files\Microsoft SQL Server\MSSQL$InstanceName\Install folder &lt;br /&gt;- Remsetup.ini (at %Windir%) &lt;br /&gt;- remote install script (RemoteComputerName_InstanceName.iss) at %Windir% folder &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="trebuchet ms,geneva"&gt;Users are suggested to do the following on or after the installation of SQL Server products and service packs. &lt;br /&gt;- Copy *.iss file (for &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_runsetup_8ege.asp" title="unattended installation" target="_blank"&gt;&lt;font face="trebuchet ms,geneva"&gt;unattended installation&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt;) to a security-enhanced location that is not in searchable folders. &lt;br /&gt;- Use Microsoft Windows NT Security Authentication to install SQL Server products and service packs. &lt;br /&gt;- Use LocalSystem account to configure the SQL Services &lt;br /&gt;- After the installation of SQL Server service packs, change the SQL Server system administrator (sa) password and SQL Service domain account password.&lt;br /&gt;- Use the &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?amp;amp;displaylang=en&amp;amp;familyid=7BDA4AE4-E287-4A6B-86E4-9AFDB3EA26C9&amp;amp;displaylang=en" title="Killpwd.exe" target="_blank"&gt;&lt;font face="trebuchet ms,geneva"&gt;Killpwd.exe&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt;&amp;nbsp;utility to clear the setup files. &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?amp;amp;displaylang=en&amp;amp;familyid=7BDA4AE4-E287-4A6B-86E4-9AFDB3EA26C9&amp;amp;displaylang=en" title="Killpwd" target="_blank"&gt;&lt;font face="trebuchet ms,geneva"&gt;Killpwd&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt; utility automates scanning for the setup files and removes the passwords from them. &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?amp;amp;displaylang=en&amp;amp;familyid=7BDA4AE4-E287-4A6B-86E4-9AFDB3EA26C9&amp;amp;displaylang=en" title="Killpwd" target="_blank"&gt;&lt;font face="trebuchet ms,geneva"&gt;Killpwd&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt; can be found at &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?amp;amp;displaylang=en&amp;amp;familyid=7BDA4AE4-E287-4A6B-86E4-9AFDB3EA26C9&amp;amp;displaylang=en"&gt;&lt;font face="trebuchet ms,geneva"&gt;http://www.microsoft.com/downloads/details.aspx?amp;amp;displaylang=en&amp;amp;familyid=7BDA4AE4-E287-4A6B-86E4-9AFDB3EA26C9&amp;amp;displaylang=en&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="trebuchet ms,geneva"&gt;References&lt;br /&gt;- &lt;/font&gt;&lt;a href="http://support.microsoft.com/kb/263968/en-us"&gt;&lt;font face="trebuchet ms,geneva"&gt;http://support.microsoft.com/kb/263968/en-us&lt;/font&gt;&lt;/a&gt;&lt;font face="trebuchet ms,geneva"&gt; &lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=131264" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/Security/default.aspx">Security</category><category domain="http://msmvps.com/blogs/martinpoon/archive/tags/SQL+Server/default.aspx">SQL Server</category></item></channel></rss>