<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySql Stored Procedures And Functions</title>
	<atom:link href="http://www.notsosecure.com/folder2/2008/11/04/mysql-stored-procedures-and-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notsosecure.com/folder2/2008/11/04/mysql-stored-procedures-and-functions/</link>
	<description>From Pentesters To Pentesters</description>
	<lastBuildDate>Sun, 22 Aug 2010 14:39:55 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Infosec Update</title>
		<link>http://www.notsosecure.com/folder2/2008/11/04/mysql-stored-procedures-and-functions/comment-page-1/#comment-60105</link>
		<dc:creator>Infosec Update</dc:creator>
		<pubDate>Fri, 07 Nov 2008 09:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.notsosecure.com/folder2/?p=154#comment-60105</guid>
		<description>Interesting stuff, I&#039;ve never seen SQL Security Invoker used in a real world LAMP-type application.

Actually I&#039;ve found that for internally developed applications (as in within companies by in-house developers) stored procedures are quite rare on MySQL compared to Oracle (which probably explains why I haven&#039;t seen SQL Security Invoker used). In fact overall I&#039;d say I&#039;m more likely to see Oracle security than MySQL security (in terms of application use, I don&#039;t see people hardening databases themselves at all). 

Do you see many differences between Oracle and MySQL security functionality use in web apps?</description>
		<content:encoded><![CDATA[<p>Interesting stuff, I&#8217;ve never seen SQL Security Invoker used in a real world LAMP-type application.</p>
<p>Actually I&#8217;ve found that for internally developed applications (as in within companies by in-house developers) stored procedures are quite rare on MySQL compared to Oracle (which probably explains why I haven&#8217;t seen SQL Security Invoker used). In fact overall I&#8217;d say I&#8217;m more likely to see Oracle security than MySQL security (in terms of application use, I don&#8217;t see people hardening databases themselves at all). </p>
<p>Do you see many differences between Oracle and MySQL security functionality use in web apps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sid</title>
		<link>http://www.notsosecure.com/folder2/2008/11/04/mysql-stored-procedures-and-functions/comment-page-1/#comment-60045</link>
		<dc:creator>sid</dc:creator>
		<pubDate>Tue, 04 Nov 2008 21:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.notsosecure.com/folder2/?p=154#comment-60045</guid>
		<description>One of the things, i wanted to achieve here, was to create a function with &quot;sql security invoker&quot; directive and then inject a function into the vulnerable stored procedure. This would have helped me to bypass the input length restrictions, but it seems that function drops its privs(or may be i have missed something). Anyways, this is what i was trying:

mysql&gt; create  function testing(input varchar(100)) returns varchar(50) READS SQL DATA  sql security invoker
    -&gt; begin
    -&gt; DECLARE sUserName VARCHAR(50);
    -&gt; select user into outfile &#039;/tmp/a.txt&#039; from mysql.user;
    -&gt; return &#039;aaa&#039;; 
    -&gt; end
    -&gt; //
Query OK, 0 rows affected (0.01 sec)


mysql&gt; call sp_root(testing(1));
    -&gt; //
ERROR 1045 (28000): Access denied for user &#039;test&#039;@&#039;%&#039; (using password: NO)</description>
		<content:encoded><![CDATA[<p>One of the things, i wanted to achieve here, was to create a function with &#8220;sql security invoker&#8221; directive and then inject a function into the vulnerable stored procedure. This would have helped me to bypass the input length restrictions, but it seems that function drops its privs(or may be i have missed something). Anyways, this is what i was trying:</p>
<p>mysql&gt; create  function testing(input varchar(100)) returns varchar(50) READS SQL DATA  sql security invoker<br />
    -&gt; begin<br />
    -&gt; DECLARE sUserName VARCHAR(50);<br />
    -&gt; select user into outfile &#8216;/tmp/a.txt&#8217; from mysql.user;<br />
    -&gt; return &#8216;aaa&#8217;;<br />
    -&gt; end<br />
    -&gt; //<br />
Query OK, 0 rows affected (0.01 sec)</p>
<p>mysql&gt; call sp_root(testing(1));<br />
    -&gt; //<br />
ERROR 1045 (28000): Access denied for user &#8216;test&#8217;@'%&#8217; (using password: NO)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
