<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PlanetMysql.ru - информация о СУБД MySQL &#187; security</title>
	<atom:link href="http://planetmysql.ru/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Thu, 24 May 2012 22:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>The cost of improved security on a MySQL server</title>
		<link>http://www.dbasquare.com/2012/05/01/the-cost-of-improved-security-on-a-mysql-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-cost-of-improved-security-on-a-mysql-server</link>
		<comments>http://www.dbasquare.com/2012/05/01/the-cost-of-improved-security-on-a-mysql-server/#comments</comments>
		<pubDate>Tue, 01 May 2012 16:10:23 +0000</pubDate>
		<dc:creator>dba square</dc:creator>
				<category><![CDATA[Managing MySQL]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.dbasquare.com/?p=1477</guid>
		<description><![CDATA[Security-Enhanced Linux or SELinux is a Linux kernel feature that provides a mechanism for supporting access control security policies. It enables a system administrator to create an extra set of rules that define allowed operations for programs even after the standard controls are checked. In other words, SELinux can help improving system security by restricting access of an application to only a few resources it actually needs, which makes it more difficult for an attacker to gain access to the entire system through exploiting any possible vulnerabilities in the application.
However as rarely anything in life is free, is there any price we have to pay to use SELinux on a MySQL server?

I ran a simple MySQL benchmark first with database working in a system with SELinux enabled (SELINUX=enforcing), and then also with the extra security layer entirely disabled (SELINUX=disabled).
The tests were performed on a 8-core system, running RedHat Enterprise Linux 6.2. The benchmark used Sysbench&#8217;s read-write OLTP test with data fully fitting into the InnoDB buffer pool.
Here are the results:


As it turned out, the difference in MySQL performance was negligible with small concurrency. However at eight threads MySQL lost approximately 20% of the throughput when SELinux was enabled. At sixteen threads it got much worse. Not only the difference continued to grow, but while on a clean system MySQL was able to maintain the throughput and even show some improvements, with the security policies applied the throughput started dropping quite rapidly.
The cost of keeping SELinux enabled seems rather high on servers that can become busy, although it does not mean this security feature should always be avoided. There is always a balance of what is more important.
Often a database server is buried under many layers of other things such firewalls, reverse proxies, web servers, application servers, or various kinds of middleware. In such cases one may not actually need to rely on that extra bit of security in that place. But in cases when there are one or two servers running both web service and database (think a typical WordPress site), it is unlikely that achieving the absolute top MySQL performance matters all that much, whereas keeping the server(s) safe does.
P.S. Yes, I am aware that running a WordPress installation or a similar software rarely focuses one&#8217;s concerns about security on the database server :-)]]></description>
			<content:encoded><![CDATA[<p><em>Security-Enhanced Linux</em> or <em>SELinux</em> is a Linux kernel feature that provides a mechanism for supporting access control security policies. It enables a system administrator to create an extra set of rules that define allowed operations for programs even after the standard controls are checked. In other words, SELinux can help improving system security by restricting access of an application to only a few resources it actually needs, which makes it more difficult for an attacker to gain access to the entire system through exploiting any possible vulnerabilities in the application.</p>
<p>However as rarely anything in life is free, is there any price we have to pay to use SELinux on a MySQL server?</p>
<p><span></span></p>
<p>I ran a simple MySQL benchmark first with database working in a system with SELinux enabled (<em>SELINUX=enforcing</em>), and then also with the extra security layer entirely disabled (<em>SELINUX=disabled</em>).</p>
<p>The tests were performed on a 8-core system, running RedHat Enterprise Linux 6.2. The benchmark used <em>Sysbench&#8217;s</em> read-write OLTP test with data fully fitting into the InnoDB buffer pool.</p>
<p>Here are the results:</p>
<p><img src="http://www.dbasquare.com/wp-content/uploads/2012/05/selinux-mysql-throughput.png" alt="" title="MySQL performance with and without SELinux" width="660" height="291" class="aligncenter size-full wp-image-1481" /></p>
<p><img src="http://www.dbasquare.com/wp-content/uploads/2012/05/selinux-mysql-response.png" alt="" title="MySQL performance with SELinux" width="660" height="291" class="aligncenter size-full wp-image-1482" /></p>
<p>As it turned out, the difference in MySQL performance was negligible with small concurrency. However at eight threads MySQL lost approximately 20% of the throughput when SELinux was enabled. At sixteen threads it got much worse. Not only the difference continued to grow, but while on a clean system MySQL was able to maintain the throughput and even show some improvements, with the security policies applied the throughput started dropping quite rapidly.</p>
<p>The cost of keeping SELinux enabled seems rather high on servers that can become busy, although it does not mean this security feature should always be avoided. There is always a balance of what is more important.</p>
<p>Often a database server is buried under many layers of other things such firewalls, reverse proxies, web servers, application servers, or various kinds of middleware. In such cases one may not actually need to rely on that extra bit of security in that place. But in cases when there are one or two servers running both web service and database (think a typical <em>WordPress</em> site), it is unlikely that achieving the absolute top MySQL performance matters all that much, whereas keeping the server(s) safe does.</p>
<p>P.S. Yes, I am aware that running a WordPress installation or a similar software rarely focuses one&#8217;s concerns about security on the database server :-)</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33112&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33112&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/01/the-cost-of-improved-security-on-a-mysql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Injections, Again…</title>
		<link>http://databaseblog.myname.nl/2012/04/sql-injections-again.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sql-injections-again</link>
		<comments>http://databaseblog.myname.nl/2012/04/sql-injections-again.html#comments</comments>
		<pubDate>Sun, 22 Apr 2012 15:17:00 +0000</pubDate>
		<dc:creator>Daniel van Eeden</dc:creator>
				<category><![CDATA[encryption]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sql injection]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=32d32afaa7eee366e3ccdbc23c8016e0</guid>
		<description><![CDATA[Last Friday the Dutch TV program Zembla aired part two of the "verzuimpolitie" series. The first part was mainly about how employers could access medical information about employees. There is a news article about the second part here (with google translate).The second part is about the security of the IT system which is used to record medical information about employees. They give this information to the company to which the company they're working for is outsourcing everything related to workplace absenteeism. After the first part of the series some viewer reported that the website contained SQL injections. The creators of the program verified this and tried to report it to VCD (The company which offers the software as a service). Then VCD called to police to remove them from the VCD office.Then Zembla contacted the Radboud University and asked them to assist with this issue. The University verified the SQL Injection and confirmed that this was a serious security flaw. Then a VCD executive told Zembla that there wasn't a SQL Injection, someone just stole the passwords. This is strange because VCD reported to the University that they recorded a SQL Injection attack by the University.The users of the VCD Humannet software were not informed. And when some of the companies using this SaaS service became aware of the security incident it took a lot of effort before the service was temporarily shutdown to prevent further harm.This whole story reminded me of the situation around Comodo and DigiNotar. Comodo was hacked, stopped the issuing process, reported the issue and fixed it. Then DigiNotar was hacked, did not stop the issuing process. It also didn't report the issue. Then they became bankrupt.The lessons learned for SQL Injections for DBA's and Application Developers:1. Input validation. This is obvious.2. Use prepared statements if possible.3. Prepare for a security incident: make it easy to disable applications or parts of applications.If all client companies are in the same database then it's very hard to shutdown the application for just one company. Using one database instance per client company might be a solution.4. Use isolationIf there are 10 client companies and they all use different databases&#160; as separation, then you should also use 10 application users with the correct permissions. Then a SQL injection for one customer won't affect other customers.5. Use a database firewall.This is not very common yet. You could use GreenSQL or McAfee (partly opensource). There are more solutions available, but these are at least partly opensource.6. Use two factor authentication if dealing with sensitive data. You don't have to buy expensive tokens. There are enough free or almost free solutions available. Yubikey is a possible solution.7. Do not store passwords, store hashes.8. Use encryption an function like AES_ENCRYPT() to encrypt sensitive data. This could guard your data from 'curious' DBA's and other administrative users.&#160;Do not use a hardcoded password for this! Make sure that the AES_ENCRYPT doesn't end up in your binlogs, use a variable! And only use TLS secured connections. It might be better to encrypt the data in the application instead of in the database. It could even be possible to use client side encryption to encrypt the data in the browser.9. Remove old authentication methods, login screens, etc.The lessons learned for SQL Injections for management:1. Security scans are mandatory. Companies like Madison Gurkha and Fox IT can offer this.2. Don't only inclue your own services in security scans, but also the external services you use.3. Make sure that there is a security breach notification requirement in the contracts for security sensitive services.4. Make it easy to report security incidents.5. Do shutdown the service if needed for security.6. Do inform your customers about the security incident.]]></description>
			<content:encoded><![CDATA[Last Friday the Dutch TV program Zembla aired <a href="http://zembla.vara.nl/Afleveringen.1973.0.html?&amp;tx_ttnews%5Btt_news%5D=61711&amp;cHash=78612cca85bf43b53453c708b6447765">part two of the "verzuimpolitie"</a> series. <a href="http://zembla.vara.nl/Afleveringen.1973.0.html?&amp;tx_ttnews%5Btt_news%5D=58656&amp;cHash=d0cd8c783c4141ed6b8a255e8c139ea4">The first part</a> was mainly about how employers could access medical information about employees. There is a news article about the second part <a href="http://translate.google.com/translate?hl=en&amp;sl=nl&amp;tl=en&amp;u=http://zembla.vara.nl/Nieuws-detail.2624.0.html?&amp;tx_ttnews%255Btt_news%255D=62103&amp;tx_ttnews%255BbackPid%255D=1974&amp;cHash=ad611c3e125a72895e70e160eb5d35b9">here</a> (with google translate).<br /><br /><a href="http://2.bp.blogspot.com/-qghomSWknRk/T5QUuywGpNI/AAAAAAAAACE/Mt0wToeg_aQ/s1600/zembla.jpg" imageanchor="1"><img border="0" src="http://2.bp.blogspot.com/-qghomSWknRk/T5QUuywGpNI/AAAAAAAAACE/Mt0wToeg_aQ/s1600/zembla.jpg" /></a>The second part is about the security of the IT system which is used to record medical information about employees. They give this information to the company to which the company they're working for is outsourcing everything related to workplace <span lang="en"><span>absenteeism. </span></span><br /><br /><span lang="en"><span>After the first part of the series some viewer reported that the website contained SQL injections. The creators of the program verified this and tried to report it to <a href="http://www.vcd.nl/">VCD</a> (The company which offers the software as a service). Then VCD called to police to remove them from the VCD office.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>Then Zembla contacted the <a href="http://www.ru.nl/english/">Radboud University</a> and asked them to assist with this issue. The University verified the SQL Injection and confirmed that this was a serious security flaw. Then a VCD executive told Zembla that there wasn't a SQL Injection, someone just stole the passwords. This is strange because VCD reported to the University that they recorded a SQL Injection attack by the University.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>The users of the VCD Humannet software were not informed. And when some of the companies using this <a href="http://en.wikipedia.org/wiki/Software_as_a_service">SaaS</a> service became aware of the security incident it took a lot of effort before the service was temporarily shutdown to prevent further harm.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>This whole story reminded me of the situation around Comodo and DigiNotar. Comodo was hacked, stopped the issuing process, reported the issue and fixed it. Then DigiNotar was hacked, did not stop the issuing process. It also didn't report the issue. Then they became bankrupt.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span><b>The lessons learned for SQL Injections for DBA's and Application Developers:</b></span></span><br /><span lang="en"><span>1. Input validation. This is obvious.</span></span><br /><div><a href="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" imageanchor="1"><img border="0" height="195" src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" width="640" /></a></div><br /><span lang="en"><span>2. Use prepared statements if possible.</span></span><br /><br /><span lang="en"><span>3. Prepare for a security incident: make it easy to disable applications or parts of applications.</span></span><br /><span lang="en"><span>If all client companies are in the same database then it's very hard to shutdown the application for just one company. Using one database instance per client company might be a solution.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>4. Use isolation</span></span><br /><span lang="en"><span>If there are 10 client companies and they all use different databases&nbsp; as separation, then you should also use 10 application users with the correct permissions. Then a SQL injection for one customer won't affect other customers.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>5. Use a database firewall.</span></span><br /><span lang="en"><span>This is not very common yet. You could use <a href="http://www.greensql.net/">GreenSQL</a> or <a href="http://www.youtube.com/watch?v=PbmVSGTra30">McAfee</a> (partly opensource). There are more solutions available, but these are at least partly opensource.</span></span><br /><br /><span lang="en"><span>6. Use two factor authentication if dealing with sensitive data.</span></span><span lang="en"><span></span></span><span lang="en"><span> </span></span><br /><span lang="en"><span>You don't have to buy expensive tokens. There are enough free or almost free solutions available. <a href="http://www.yubico.com/yubikey">Yubikey</a> is a possible solution.</span></span><br /><br /><span lang="en"><span>7. Do not store passwords, store hashes.</span></span><br /><span lang="en"><span></span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span>8. Use encryption an function like <a href="http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_aes-encrypt">AES_ENCRYPT()</a> to encrypt sensitive data. </span></span><br /><span lang="en"><span>This could guard your data from 'curious' DBA's and other administrative users.<br />&nbsp;Do not use a hardcoded password for this! Make sure that the AES_ENCRYPT doesn't end up in your binlogs, use a variable! And only use TLS secured connections. It might be better to encrypt the data in the application instead of in the database. It could even be possible to use client side encryption to encrypt the data in the browser.</span></span><br /><br /><span lang="en"><span>9. Remove old authentication methods, login screens, etc.</span></span><br /><span lang="en"><span><br /></span></span><br /><span lang="en"><span><b>The lessons learned for SQL Injections for management:</b></span></span><br /><span lang="en"><span>1. Security scans are mandatory. Companies like <a href="http://www.madison-gurkha.com/en/index.php">Madison Gurkha</a> and <a href="https://www.fox-it.com/">Fox IT</a> can offer this.</span></span><br /><br /><span lang="en"><span>2. Don't only inclue your own services in security scans, but also the </span></span><span lang="en"><span>external services you use.</span></span><br /><br /><span lang="en"><span>3. Make sure that there is a security breach notification requirement in the contracts for security sensitive services.</span></span><br /><br /><span lang="en"><span>4. Make it easy to report security incidents.</span></span><br /><br /><span lang="en"><span>5. Do shutdown the service if needed for security.</span></span><br /><br /><span lang="en"><span>6. Do inform your customers about the security incident.</span></span><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/1135944569112521190-6377298150618640514?l=databaseblog.myname.nl" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33010&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33010&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/04/22/sql-injections-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL DoS</title>
		<link>http://databaseblog.myname.nl/2012/04/mysql-dos.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-dos</link>
		<comments>http://databaseblog.myname.nl/2012/04/mysql-dos.html#comments</comments>
		<pubDate>Sun, 15 Apr 2012 19:13:00 +0000</pubDate>
		<dc:creator>Daniel van Eeden</dc:creator>
				<category><![CDATA[bug]]></category>
		<category><![CDATA[DoS]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=1177233c11cfbf921b9a0aa84393daa7</guid>
		<description><![CDATA[There is a nice demo of&#160; MySQL Bug 13510739 on Eric Romang's blogI've published this blog to make this content available on planet.mysql.com.]]></description>
			<content:encoded><![CDATA[There is a nice demo of&nbsp; MySQL Bug 13510739 on <a href="http://eromang.zataz.com/2012/04/10/oracle-mysql-innodb-bugs-13510739-and-63775-dos-demo/">Eric Romang's blog</a><br /><br /><div></div><div></div><div></div><div></div>I've published this blog to make this content available on planet.mysql.com.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/1135944569112521190-4670643381275294424?l=databaseblog.myname.nl" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32890&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32890&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/04/15/mysql-dos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>McAfee MySQL Audit Plugin</title>
		<link>http://www.jonathanlevin.co.uk/2012/03/mcafee-mysql-audit-plugin.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mcafee-mysql-audit-plugin</link>
		<comments>http://www.jonathanlevin.co.uk/2012/03/mcafee-mysql-audit-plugin.html#comments</comments>
		<pubDate>Fri, 09 Mar 2012 13:33:00 +0000</pubDate>
		<dc:creator>Jonathan Levin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=29f381bcad75fccac1d3fccd88051a5a</guid>
		<description><![CDATA[I'm work at McAfee at the moment and I stumbled across this:

They have a free (GNU General&#160;Public License according to the download) MySQL plugin for auditing MySQL -&#160;https://github.com/mcafee/mysql-audit/downloads
(yay, for using github)

They also have an enterprise-level database security product which of course is not free (no idea how much) and a video explaining what it does can be found here.

Another MySQL security company is, of course,&#160;GreenSQL with their open source and commercial SQL firewall.


I did evaluate GreenSQL once and recommended it to my boss at the time, but his reaction was:
"Well, its your job to secure MySQL, innit?"

Hopefully, other DBAs will have more luck then I had recommending security products where security is important.]]></description>
			<content:encoded><![CDATA[<div>
<a href="http://www.mcafee.com/img/logo-mcafee.png" imageanchor="1"><img border="0" src="http://www.mcafee.com/img/logo-mcafee.png" /></a></div>
<br />
I'm work at McAfee at the moment and I stumbled across this:<br />
<br />
They have a free (GNU General&nbsp;Public License according to the download) MySQL plugin for auditing MySQL -&nbsp;<a href="https://github.com/mcafee/mysql-audit/downloads">https://github.com/mcafee/mysql-audit/downloads</a><br />
(yay, for using github)<br />
<br />
They also have an <a href="http://www.businesswire.com/news/mcafee/20120228005446/en/McAfee-Database-Security-Solution-Offers-Businesses-Sizes">enterprise-level database security product</a> which of course is not free (no idea how much) and a video explaining what it does <a href="http://link.brightcove.com/services/player/bcpid65694806001?bctid=1479401681001">can be found here</a>.<br />
<br />
Another MySQL security company is, of course,&nbsp;<a href="http://www.greensql.net/">GreenSQL</a> with their open source and commercial SQL firewall.
<br />
<br />
I did evaluate GreenSQL once and recommended it to my boss at the time, but his reaction was:<br />
"Well, its your job to secure MySQL, innit?"<br />
<br />
Hopefully, other DBAs will have more luck then I had recommending security products where security is important.<br />
<br />
<br /><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/375697951860081841-4540228551685922958?l=www.jonathanlevin.co.uk" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32280&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32280&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/09/mcafee-mysql-audit-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NIST::NVD CWE development – follow along</title>
		<link>http://wp.colliertech.org/cj/?p=1177&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nistnvd-cwe-development-follow-along</link>
		<comments>http://wp.colliertech.org/cj/?p=1177#comments</comments>
		<pubDate>Thu, 16 Feb 2012 22:12:40 +0000</pubDate>
		<dc:creator>C.J. Collier</dc:creator>
				<category><![CDATA[abuse]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[F5 Networks]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[NIST]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[wheezy]]></category>

		<guid isPermaLink="false">http://wp.colliertech.org/cj/?p=1177</guid>
		<description><![CDATA[I&#8217;m in the process of getting the tests passing for the 0.03 release of NIST::NVD::Store::SQLite3 wherein our hero imports the CWE data and cross-indexes it with CVEs and CPEs.
Follow along and suggest some patches.  I&#8217;m developing on Debian Wheezy, but I would very much like input from devs on other platforms.
http://git.colliertech.org/?p=NIST-NVD-Store-SQLite3.git;a=summary

cjac@foxtrot:/tmp$ time git clone http://git.colliertech.org/git/NIST-NVD-Store-SQLite3.git
Cloning into 'NIST-NVD-Store-SQLite3'...

real	0m32.757s
user	0m0.200s
sys	0m0.088s
cjac@foxtrot:/tmp$ ls NIST-NVD-Store-SQLite3/t/data/
cwec_v2.1.xml  nvdcve-2.0-test.xml

Publish your patches and I&#8217;ll fetch them, or you can submit them in udiff format and I&#8217;ll review/apply.  Thanks for playing along!
[edit 20120216T1456 -0800]
Seems I need to update the NIST::NVD package as well.
cjac@foxtrot:/usr/src/git/f5/NIST-NVD-Store-SQLite3$ rm t/data/*.db *.db ; perl Makefile.PL ; make ; time perl -Iblib/lib /usr/src/git/f5/NIST-NVD-Store-SQLite3/blib/script/convert-nvdcve --nvd /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/nvdcve-2.0-test.xml --cwe /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/cwec_v2.1.xml --store SQLite3
rm: cannot remove `t/data/*.db': No such file or directory
Writing Makefile for NIST::NVD::Store::SQLite3
Writing MYMETA.yml and MYMETA.json
Skip blib/lib/NIST/NVD/Store/SQLite3.pm (unchanged)
cp bin/convert-nvdcve blib/script/convert-nvdcve
/usr/bin/perl -MExtUtils::MY -e 'MY-&#62;fixin(shift)' -- blib/script/convert-nvdcve
Manifying blib/man3/NIST::NVD::Store::SQLite3.3pm
using store [SQLite3]
reading NVDs from file: /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/nvdcve-2.0-test.xml.......................................................................read 68 entries
Processing CWE file...vvvvvvvvvvvvvvvvvvvvvvvvvvvcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeDone.
Writing CPE URNs to disk...Done.
Writing NVD entries to disk....................................................................... Done.
Writing CPE index to disk...Done.
Writing CWE index to disk...Can't locate object method "put_idx_cwe" via package "NIST::NVD::Update" at /usr/src/git/f5/NIST-NVD-Store-SQLite3/blib/script/convert-nvdcve line 77.

real	0m13.072s
user	0m12.421s
sys	0m0.044s


$ time git clone http://git.colliertech.org/git/NIST-NVD.git
Cloning into 'NIST-NVD'...

real	0m2.921s
user	0m0.016s
sys	0m0.024s]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of getting the tests passing for the 0.03 release of NIST::NVD::Store::SQLite3 wherein our hero imports the CWE data and cross-indexes it with CVEs and CPEs.</p>
<p>Follow along and suggest some patches.  I&#8217;m developing on Debian Wheezy, but I would very much like input from devs on other platforms.</p>
<p><a href="http://git.colliertech.org/?p=NIST-NVD-Store-SQLite3.git;a=summary">http://git.colliertech.org/?p=NIST-NVD-Store-SQLite3.git;a=summary</a></p>
<pre>
cjac@foxtrot:/tmp$ time git clone http://git.colliertech.org/git/NIST-NVD-Store-SQLite3.git
Cloning into 'NIST-NVD-Store-SQLite3'...

real	0m32.757s
user	0m0.200s
sys	0m0.088s
cjac@foxtrot:/tmp$ ls NIST-NVD-Store-SQLite3/t/data/
cwec_v2.1.xml  nvdcve-2.0-test.xml
</pre>
<p>Publish your patches and I&#8217;ll fetch them, or you can submit them in udiff format and I&#8217;ll review/apply.  Thanks for playing along!</p>
<p>[edit 20120216T1456 -0800]<br />
Seems I need to update the NIST::NVD package as well.</p>
<pre>cjac@foxtrot:/usr/src/git/f5/NIST-NVD-Store-SQLite3$ rm t/data/*.db *.db ; perl Makefile.PL ; make ; time perl -Iblib/lib /usr/src/git/f5/NIST-NVD-Store-SQLite3/blib/script/convert-nvdcve --nvd /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/nvdcve-2.0-test.xml --cwe /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/cwec_v2.1.xml --store SQLite3
rm: cannot remove `t/data/*.db': No such file or directory
Writing Makefile for NIST::NVD::Store::SQLite3
Writing MYMETA.yml and MYMETA.json
Skip blib/lib/NIST/NVD/Store/SQLite3.pm (unchanged)
cp bin/convert-nvdcve blib/script/convert-nvdcve
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/convert-nvdcve
Manifying blib/man3/NIST::NVD::Store::SQLite3.3pm
using store [SQLite3]
reading NVDs from file: /usr/src/git/f5/NIST-NVD-Store-SQLite3/t/data/nvdcve-2.0-test.xml.......................................................................read 68 entries
Processing CWE file...vvvvvvvvvvvvvvvvvvvvvvvvvvvcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeDone.
Writing CPE URNs to disk...Done.
Writing NVD entries to disk....................................................................... Done.
Writing CPE index to disk...Done.
Writing CWE index to disk...Can't locate object method "put_idx_cwe" via package "NIST::NVD::Update" at /usr/src/git/f5/NIST-NVD-Store-SQLite3/blib/script/convert-nvdcve line 77.

real	0m13.072s
user	0m12.421s
sys	0m0.044s
</pre>
<pre>
$ time git clone http://git.colliertech.org/git/NIST-NVD.git
Cloning into 'NIST-NVD'...

real	0m2.921s
user	0m0.016s
sys	0m0.024s
</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32033&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32033&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/17/nistnvd-cwe-development-follow-along/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Security Essentials Presentation</title>
		<link>http://ronaldbradford.com/blog/mysql-security-essentials-presentation-2012-02-15/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-security-essentials-presentation</link>
		<comments>http://ronaldbradford.com/blog/mysql-security-essentials-presentation-2012-02-15/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 18:16:40 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[rmoug]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=3899</guid>
		<description><![CDATA[Today at the RMOUG Training Days 2012 event I gave an introduction presentation on MySQL Security Essentials covering the following topics:

MySQL Security defaults
MySQL Security Improvements
OS Security
User Privileges
Data Integrity
Installation Practices
Auditing Options
Better Security
Further References

Download slides for MySQL Security Essentials.]]></description>
			<content:encoded><![CDATA[<p><img src="http://ronaldbradford.com/images/blog/RMOUGbutton250.jpg" style="float:right; margin:10px;width:150px" />Today at the <a href="http://rmoug.org/">RMOUG Training Days 2012</a> event I gave an introduction presentation on MySQL Security Essentials covering the following topics:</p>
<ul>
<li>MySQL Security defaults</li>
<li>MySQL Security Improvements</li>
<li>OS Security</li>
<li>User Privileges</li>
<li>Data Integrity</li>
<li>Installation Practices</li>
<li>Auditing Options</li>
<li>Better Security</li>
<li>Further References</li>
</ul>
<p>Download slides for <a href="http://ronaldbradford.com/mysql-presentations/MySQLSecurityEssentials-2012-02.pdf">MySQL Security Essentials</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32021&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32021&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/15/mysql-security-essentials-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some guidelines for MySQL security</title>
		<link>http://feedproxy.google.com/~r/NilInfobin/~3/oAC-pucW2eA/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-guidelines-for-mysql-security</link>
		<comments>http://feedproxy.google.com/~r/NilInfobin/~3/oAC-pucW2eA/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 10:16:19 +0000</pubDate>
		<dc:creator>Nilnandan Joshi</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security in mysql]]></category>

		<guid isPermaLink="false">http://nilinfobin.com/?p=790</guid>
		<description><![CDATA[Don&#8217;t share root user password and mysql.user table acess with anyone till you have full trust on it. Because that encrypted password is real password in MySQL so if anyone knows that than he/she can easily login with any user &#8230; Continue reading &#8594;]]></description>
			<content:encoded><![CDATA[Don&#8217;t share root user password and mysql.user table acess with anyone till you have full trust on it. Because that encrypted password is real password in MySQL so if anyone knows that than he/she can easily login with any user &#8230; <a href="http://nilinfobin.com/2012/01/some-guidelines-for-mysql-security/">Continue reading <span>&#8594;</span></a><div>
<a href="http://feeds.feedburner.com/~ff/NilInfobin?a=oAC-pucW2eA:Fj7uz4IUkNc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/NilInfobin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/NilInfobin?a=oAC-pucW2eA:Fj7uz4IUkNc:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/NilInfobin?i=oAC-pucW2eA:Fj7uz4IUkNc:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/NilInfobin?a=oAC-pucW2eA:Fj7uz4IUkNc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/NilInfobin?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/NilInfobin?a=oAC-pucW2eA:Fj7uz4IUkNc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/NilInfobin?i=oAC-pucW2eA:Fj7uz4IUkNc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/NilInfobin?a=oAC-pucW2eA:Fj7uz4IUkNc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/NilInfobin?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/NilInfobin/~4/oAC-pucW2eA" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31842&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31842&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/30/some-guidelines-for-mysql-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MariaDB: Improve Security with Two-Step Verification</title>
		<link>http://blog.montyprogram.com/security-with-two-step-verification/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mariadb-improve-security-with-two-step-verification</link>
		<comments>http://blog.montyprogram.com/security-with-two-step-verification/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 14:07:17 +0000</pubDate>
		<dc:creator>Monty Program Group Blog</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[two step verification]]></category>

		<guid isPermaLink="false">http://blog.montyprogram.com/?p=754</guid>
		<description><![CDATA[In this primer I will show how to improve the security of your MariaDB installation by using two-step verification and how to use it from your Windows GUI client.
Let&#8217;s suppose you have your data in MariaDB, installed, say, on Ubuntu. And your users connect to it to run ad hoc queries, using some sort of a Windows GUI client. You don&#8217;t want them to write the access password on post-it notes or have it auto-entered by the client. And you don&#8217;t want anyone see the password when one of the salespersons connects to the mother ship from his laptop in the Internet café. So you decide to use the two-step verification, just like Google does, to secure the access to the data.

If you don&#8217;t know what a &#8220;two-step verification&#8221; is, see, for example, this introductory video by Google.
So, 2-step verification looks great, but how can we implement it? Luckily, there is a PAM module in the Google Authenticator project, and we can use it with a MariaDB PAM authentication plugin.
Let me digress for a second. Below we will implement a 2-step verification based on Google Authenticator. But you may want to evaluate other similar solutions before putting this primer in production. There are quite a few PAM modules implementing one-time password approach (and pam_goolge_authenticator is just one of them). In particular, OPIE (and S/Key) look interesting, because they don&#8217;t require a valid Unix account and a home directory for every user. There are also hardware based solutions, where a user is required to have a small password generating device (like, for example, RSA SecurID).
But back to Google Authenticator. First, we need to install the PAM module. On Ubuntu 11.10 it is very simple: one apt-get. On distributions that don&#8217;t include it (and older Ubuntu versions), you can use manual installation instructions.
Either way, we install /lib/security/pam_google_authenticator.so (I don&#8217;t have Ubuntu 11.10, so I had to do it manually). For a 2-step verification we need to require both the normal account password and the one-time code. This can be achieved with the following PAM configuration file:
auth            required        pam_unix.so
auth            required        pam_google_authenticator.so
account         required        pam_unix.so
I had to put it in /etc/pam.d/mysql file, on your system the location may be different. Having done that, let&#8217;s install the MariaDB PAM plugin and create the user account:

Now we need to configure Google Authenticator for an account:

Time to install a password generator application. There are versions for Android, iOS, and Blackberry. Google explains the details. When the installation is finished, start the application and enter the secret key into it — manually or using the QR-code. And we&#8217;re done and can use two-step verification when connecting to MariaDB. But our users use Windows! How will it play along?
The answer depends on the Windows MariaDB client that that your users have. At the moment of writing this article, only HeidiSQL has full support for pluggable authentication. You may already have it installed — HeidiSQL is part of MariaDB Windows distribution. Alternatively, you can download it directly from the official site.
First, we use HeidiSQL session manager to configure the connection parameters. Here, we will connect as the user &#8220;serg&#8221; — the  user, that we have created above to use the PAM authentication plugin. Note that there is no special configuration for pluggable authentication on the client, it is enabled automatically when necessary.

Now we can connect to the server. It uses PAM authentication plugin, that loads Google Authenticator, that asks for a verification code. And we see HeidiSQL asking:

We start the Authenticator application, it generates the verification code:

And we use it to login! Next time the verification code will be different, and nobody looking over the shoulder will be able to steal our precious connection password.]]></description>
			<content:encoded><![CDATA[<p>In this primer I will show how to improve the security of your MariaDB installation by using <strong>two-step verification</strong> and how to use it from your Windows GUI client.</p>
<p>Let&#8217;s suppose you have your data in MariaDB, installed, say, on Ubuntu. And your users connect to it to run ad hoc queries, using some sort of a Windows GUI client. You don&#8217;t want them to write the access password on post-it notes or have it auto-entered by the client. And you don&#8217;t want anyone see the password when one of the salespersons connects to the mother ship from his laptop in the Internet café. So you decide to use the two-step verification, just like Google does, to secure the access to the data.</p>
<p><span></span></p>
<p>If you don&#8217;t know what a &#8220;two-step verification&#8221; is, see, for example, this introductory <a href="http://www.youtube.com/watch?v=zMabEyrtPRg">video</a> by Google.</p>
<p>So, 2-step verification looks great, but how can we implement it? Luckily, there is a PAM module in the <a href="http://code.google.com/p/google-authenticator/">Google Authenticator</a> project, and we can use it with a MariaDB <a title="Writing a MariaDB PAM Authentication Plugin" href="http://blog.montyprogram.com/writing-a-mariadb-pam-authentication-plugin/">PAM authentication plugin</a>.</p>
<p>Let me digress for a second. Below we will implement a 2-step verification based on Google Authenticator. But you may want to evaluate other similar solutions before putting this primer in production. There are quite a few PAM modules implementing one-time password approach (and <em>pam_goolge_authenticator</em> is just one of them). In particular, OPIE (and S/Key) look interesting, because they don&#8217;t require a valid Unix account and a home directory for every user. There are also hardware based solutions, where a user is required to have a small password generating device (like, for example, RSA SecurID).</p>
<p>But back to Google Authenticator. First, we need to install the PAM module. On Ubuntu 11.10 it is very simple: <a href="http://tombuntu.com/index.php/2011/10/16/google-authenticator-pam-available-in-ubuntu-11-10/">one apt-get</a>. On distributions that don&#8217;t include it (and older Ubuntu versions), you can use <a href="http://guides.webbynode.com/articles/security/ubuntu-google-authenticator.html">manual installation instructions</a>.</p>
<p>Either way, we install <code>/lib/security/pam_google_authenticator.so</code> (I don&#8217;t have Ubuntu 11.10, so I had to do it manually). For a 2-step verification we need to require both the <strong></strong>normal account password and the one-time code. This can be achieved with the following PAM configuration file:</p>
<pre>auth            required        pam_unix.so
auth            required        pam_google_authenticator.so
account         required        pam_unix.so</pre>
<p>I had to put it in <code>/etc/pam.d/mysql</code> file, on your system the location may be different. Having done that, let&#8217;s install the MariaDB PAM plugin and create the user account:</p>
<p><img class="size-full wp-image-737 alignnone" style="border: 0pt none;" title="MariaDB PAM setup" src="http://blog.montyprogram.com/wp-content/uploads/2012/01/xterm-1.png" alt="" width="520" height="329" /></p>
<p>Now we need to configure Google Authenticator for an account:</p>
<p><img class="alignnone  wp-image-771" style="border: 0pt none;" title="Google Authenticator Setup" src="http://blog.montyprogram.com/wp-content/uploads/2012/01/xterm-21.png" alt="" width="520" height="686" /></p>
<p>Time to install a password generator application. There are versions for <a href="http://market.android.com/details?id=com.google.android.apps.authenticator">Android</a>, <a href="http://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8">iOS</a>, and Blackberry. Google explains <a title="Installing Google Authenticator " href="http://support.google.com/accounts/bin/answer.py?hl=en&amp;answer=1066447">the details</a>. When the installation is finished, start the application and enter the secret key into it — manually or using the QR-code. And we&#8217;re done and can use two-step verification when connecting to MariaDB. But our users use Windows! How will it play along?</p>
<p>The answer depends on the Windows MariaDB client that that your users have. At the moment of writing this article, only <a title="HeidiSQL in KB" href="http://kb.askmonty.org/en/heidisql">HeidiSQL</a> has full support for pluggable authentication. You may already have it installed — HeidiSQL is part of <a title="Dowload MariaDB 5.3 for Windows" href="http://downloads.askmonty.org/mariadb/5.3/#os_group=windows">MariaDB Windows distribution</a>. Alternatively, you can download it directly from the <a title="Download HeidiSQL" href="http://www.heidisql.com/download.php">official site</a>.</p>
<p>First, we use HeidiSQL session manager to configure the connection parameters. Here, we will connect as the user &#8220;serg&#8221; — the  user, that we have created above to use the PAM authentication plugin. Note that there is no special configuration for pluggable authentication on the client, it is enabled automatically when necessary.</p>
<p><a href="http://blog.montyprogram.com/wp-content/uploads/2012/01/win-1.png"><img class="alignnone size-full wp-image-786" style="border: 0pt none;" title="HeidiSQL Session Manager" src="http://blog.montyprogram.com/wp-content/uploads/2012/01/win-1.png" alt="" width="503" height="378" /></a></p>
<p>Now we can connect to the server. It uses PAM authentication plugin, that loads Google Authenticator, that asks for a verification code. And we see HeidiSQL asking:</p>
<p><img class="alignnone size-full wp-image-734" style="border: 0pt none;" title="Google Authenticator Input Dialog" src="http://blog.montyprogram.com/wp-content/uploads/2012/01/win-2.png" alt="" width="504" height="377" /></p>
<p>We start the Authenticator application, it generates the verification code:</p>
<p><img class="alignnone size-full wp-image-732" style="border: 0pt none;" title="Android Authenticator App" src="http://blog.montyprogram.com/wp-content/uploads/2012/01/handy-2.png" alt="" width="512" height="272" /></p>
<p>And we use it to login! Next time the verification code will be different, and nobody looking over the shoulder will be able to steal our precious connection password.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31627&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31627&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/17/mariadb-improve-security-with-two-step-verification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pam modules for MySQL: What is wrong with these people?</title>
		<link>http://mysqldump.azundris.com/archives/96-pam-modules-for-MySQL-What-is-wrong-with-these-people.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pam-modules-for-mysql-what-is-wrong-with-these-people</link>
		<comments>http://mysqldump.azundris.com/archives/96-pam-modules-for-MySQL-What-is-wrong-with-these-people.html#comments</comments>
		<pubDate>Tue, 06 Dec 2011 12:43:18 +0000</pubDate>
		<dc:creator>Kristian K&#246;hntopp</dc:creator>
				<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mysqldump.azundris.com/archives/96-guid.html</guid>
		<description><![CDATA[Percona just released their MySQL PAM Authentication insanity, just as Oracle did before, for MySQL 5.5 and MariaDB is no better.

The Oracle module requires a module to be loaded into your client, which is done automatically if the module is present and the server supports PAM auth. The module is called ominously "mysql_clear_password" and does what it says on the tin: Your database server access password is henceforth sent from the client to the server in clear, not encrypted, hashed, salted or otherwise protected.

I suppose the Percona module does the same, although it is not being mentioned in the docs at all (or at least I have not been able to find it in there). They also openly suggest to run the database server as root, as that is the only way for an in-process PAM auth module to be able to access /etc/shadow.

*headdesk*

Does any of you know what SASL is and why it has been invented?

I know it's a pain, but it is there for a reason. Many reasons. saslauthd for example will read your authentication secrets instead of your worker process, because you are unable to write and maintain a secure codebase the size of a database server. And by speaking SASL on the wire and then handing off an authenticated connection to your actual worker code you gain access to a number of integrated mechanisms for communicating passwords in a compatible and secure manner, none of which include clear text passwords on the wire.

Can we please bury these plugins, deeply in the Mariana trench, in a CASTOR, put a warning beacon over the site and then start over, doing it right this time?

Thanks. I knew you would see the light eventually.]]></description>
			<content:encoded><![CDATA[<a href="http://mysqldump.azundris.com/exit.php?url_id=651&amp;entry_id=96" title="http://www.percona.com/doc/percona-pam-for-mysql/">Percona</a> just released their MySQL PAM Authentication insanity, just as <a href="http://mysqldump.azundris.com/exit.php?url_id=652&amp;entry_id=96" title="http://docs.oracle.com/cd/E17952_01/refman-5.5-en/pam-authentication-plugin.html">Oracle</a> did before, for MySQL 5.5 and <a href="http://mysqldump.azundris.com/exit.php?url_id=655&amp;entry_id=96" title="http://kb.askmonty.org/en/pam-authentication-plugin">MariaDB</a> is no better.<br />
<br />
The Oracle module requires a module to be loaded into your client, which is done automatically if the module is present and the server supports PAM auth. The module is called ominously "mysql_clear_password" and does what it says on the tin: Your database server access password is henceforth sent from the client to the server in clear, not encrypted, hashed, salted or otherwise protected.<br />
<br />
I suppose the Percona module does the same, although it is not being mentioned in the docs at all (or at least I have not been able to find it in there). They also openly suggest to run the database server as root, as that is the only way for an in-process PAM auth module to be able to access /etc/shadow.<br />
<br />
*headdesk*<br />
<br />
Does any of you know what <a href="http://mysqldump.azundris.com/exit.php?url_id=653&amp;entry_id=96" title="http://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer">SASL</a> is and why it has been invented?<br />
<br />
I know it's a pain, but it is there for a reason. Many reasons. saslauthd for example will read your authentication secrets instead of your worker process, because you are unable to write and maintain a secure codebase the size of a database server. And by speaking SASL on the wire and then handing off an authenticated connection to your actual worker code you gain access to a number of integrated mechanisms for communicating passwords in a compatible and secure manner, none of which include clear text passwords on the wire.<br />
<br />
Can we please bury these plugins, deeply in the Mariana trench, in a <a href="http://mysqldump.azundris.com/exit.php?url_id=654&amp;entry_id=96" title="http://en.wikipedia.org/wiki/CASTOR_(nuclear_waste)">CASTOR</a>, put a warning beacon over the site and then start over, doing it right this time?<br />
<br />
Thanks. I knew you would see the light eventually.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31141&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31141&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/06/pam-modules-for-mysql-what-is-wrong-with-these-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OurSQL Episode 65: Security Blanket &#8212; The Missing Link</title>
		<link>http://technocation.org/content/oursql-episode-65%3A-security-blanket-missing-link?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oursql-episode-65-security-blanket-the-missing-link</link>
		<comments>http://technocation.org/content/oursql-episode-65%3A-security-blanket-missing-link#comments</comments>
		<pubDate>Fri, 11 Nov 2011 14:31:43 +0000</pubDate>
		<dc:creator>Technocation</dc:creator>
				<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=3ce4e9408a52fdf26b306912fd2b79ec</guid>
		<description><![CDATA[This week we have a big announcement about Sarah, 3 hosts and an extra special guest.
News
Call for papers for Percona Live:  MySQL Conference &#38; Expo 2012 is open until Monday, December 5th.  The MySQL Conference &#38; Expo is Tuesday April 10 - Thursday, April 12, 2012 in Santa Clara, CA.
To submit a paper, first register as a speaker at http://www.percona.com/live/mysql-conference-2012/user/register and then go to My Account -&#62; Submit Proposal.
Main content
Previous podcasts about securing MySQL
read more]]></description>
			<content:encoded><![CDATA[<p>This week we have a big announcement about Sarah, 3 hosts and an extra special guest.</p>
<p><strong>News</strong><br />
Call for papers for Percona Live:  MySQL Conference &amp; Expo 2012 is open until Monday, December 5th.  The MySQL Conference &amp; Expo is Tuesday April 10 - Thursday, April 12, 2012 in Santa Clara, CA.</p>
<p>To submit a paper, first register as a speaker at <a href="http://www.percona.com/live/mysql-conference-2012/user/register">http://www.percona.com/live/mysql-conference-2012/user/register</a> and then go to My Account -&gt; Submit Proposal.</p>
<p><strong>Main content</strong><br />
Previous podcasts about securing MySQL</p>
<p><a href="http://technocation.org/content/oursql-episode-65%3A-security-blanket-missing-link">read more</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30921&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30921&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/11/11/oursql-episode-65-security-blanket-the-missing-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

