<?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>Julius Beckmann &#187; Security</title>
	<atom:link href="http://juliusbeckmann.de/blog/category/security/feed" rel="self" type="application/rss+xml" />
	<link>http://juliusbeckmann.de/blog</link>
	<description>Ich bin nicht verrückt, nur technisch begabt ...</description>
	<lastBuildDate>Wed, 05 Jun 2013 11:02:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP: Everything you need to know about secure password hashing</title>
		<link>http://juliusbeckmann.de/blog/php-everything-you-need-to-know-about-secure-password-hashing.html</link>
		<comments>http://juliusbeckmann.de/blog/php-everything-you-need-to-know-about-secure-password-hashing.html#comments</comments>
		<pubDate>Sun, 03 Apr 2011 14:17:10 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Hashing]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[SHA1]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=414</guid>
		<description><![CDATA[On each site you need to register, your password has to be saved. This is typically done in a database. There are several ways to do this and some of them are good practice, other a very bad idea. Lets start with the baaad examples: The user we have is named "Bob", he likes to [...]]]></description>
			<content:encoded><![CDATA[<p>On each site you need to register, your password has to be saved. This is typically done in a database. There are several ways to do this and some of them are good practice, other a very bad idea.<br />
<span id="more-414"></span></p>
<p>Lets start with the baaad examples:</p>
<p>The user we have is named "Bob", he likes to use his password "donuts".</p>
<h2>Force users to use secure passwords</h2>
<p>This is the first point where we have to interact. It does not matter how good our system will encrypt or hash Bobs password, with a simple one like this it does not make sense at all. We need to force Bob to use a more secure password. Good password contain of upper and lowercase letters, numbers and maybe even special chars. But this is not the subject of this article, so we continue with our bad examples.</p>
<p>We forced Bob to use a more secure password like "IlikeD0nuts".</p>
<h2>Plain text passwords</h2>
<p>The simplest way to store and validate Bobs password would be saving it "as is". The only good thing about this method is, we can send him his password back in case he forgot it. (Hint: If you ever use a "Remember password" function and they send your plain password back, the used some kind of this bad technique.)<br />
The bad thing about this is, if a attacker gets read access to the database, he can read out Bobs password. The attacker is now able to login as Bob and do whatever he wants with Bobs account. If Bob has used the password also for his Email account or anything else the attacker can find out, Bob might get in serious trouble.<br />
As you can see, storing plain text passwords is very bad and should NOT be done.</p>
<h2>MD5 / SHA1 passwords</h2>
<p>The next better way to store a password, is NOT to store the password. Yes, do NOT store the password, store something that is equivalent to the password but cant be reconverted to the password again.<br />
This one way encryption method is called "hashing". Most famous and versatile hashing methods are <a href="http://en.wikipedia.org/wiki/MD5">MD5</a> and <a href="http://en.wikipedia.org/wiki/SHA_hash_functions">SHA1</a>. Both can do a one way encryption like this: The MD5 of the string "abc" is: md5('abc') = 900150983cd24fb0d6963f7d28e17f72. The MD5 of "abc" will <strong>always</strong> be 900150983cd24fb0d6963f7d28e17f72. But if only one char changes, the MD5 will also change. md5('abd') = 4911e516e5aa21d327512e0c8b197616. So this function can create a hash out of a string which is "unique" for this string. But there is NO function like this: unmd5('4911e516e5aa21d327512e0c8b197616') = "abd" because it is a one way encryption. Like a one way flight, you cant get back home when you are at your destination.<br />
You can play around a little bit with these function on: <a href="http://php-functions.com/">http://php-functions.com/</a><br />
This feature of a hash can be used to validate a password. So if Bob registers his new account, we do NOT save his password "donuts" in our database, we save md5('donuts') = 6c493f3632cf8c85348ebd89d1e3cafa. A attacker cant see directly what 6c493f3632cf8c85348ebd89d1e3cafa means. If Bob wants to login, we just have to check if md5($password_bob_entered) = 6c493f3632cf8c85348ebd89d1e3cafa. When it is true, Bob must have entered "donuts".<br />
This way of saving password is the first step in the right direction, but still no good practice. The problem is, that a MD5 will always be the same for a specific string, this hole is used by several online pages and programs to reverse a md5. Just search for "md5 cracker" and you will find tons of ways for cracking MD5 or SHA1 hashes. This plus the fatal use of simple passwords like "donuts" (<a href="http://www.google.com/search?q=6c493f3632cf8c85348ebd89d1e3cafa">Google: "donuts"</a>) will make cracking only a matter of time. So once again, storing simple MD5 or SHA1 hashes is NOT secure.</p>
<h2>MD5 / SHA1 hashes with salt</h2>
<p>This technique is similar to the previous, with one difference, store something additionally called "salt". Like salt in a soup this extra string will make cracking password catchier. The procedure goes like this:<br />
Bob registers with his password "donuts". We generate a random(!) salt, like "8ft$U3", and will hash his password like this:  md5("donuts"."8ft$U3") = 9aaa94551048442a835f5ae875687714. Now we save his name, the salt and the salted password hash in our database. The clever ones of you might have noticed, we just made a secure password out of the simple "donuts". This technique is popular today and sometimes called "good practice". But this is dead wrong. In times of multicore CPUs and incredible fast graphic cards, breaking such a salted hash needs, if the password is not too complex, only a few hours. Current highend graphic cards are able to calculate billions of md5 per second, so breaking thousands of hashes is only a matter of time before a attacker can start his raid against all the cracked user account. So do NOT use simple salted hashes.</p>
<h2>MD5 / SHA1 hashes with salt hashed multiple times</h2>
<p>As we learned from the previous technique, cracking hashes is only a matter of time. So what takes cracking hashes longer? It is complexity. We can add these complexity by rehashing the hash again and again till we reached a level where cracking such a hash will take ages.<br />
I wrote this PHP class for demonstration, you can use it wherever you want, but keep the copyright header:</p>
<p><a href="/classes/secure_hash/_secure_hash---secure_hash.class.php.html">PHP Secure Hash Class</a></p>
<p>The class is using everything what makes a hash complex enough to save it from being cracked. Salts are completely generated from special chars. Salts are random. Hashes are rehashed random multiple times. The whole hash is stored in a special format which can be saved easily in a database. The format looks like this: <strong>$method$salt$iterations$hash$</strong>.</p>
<h2>Ideas for even more secure hashes</h2>
<p>I wrote about storing hashes in a database. The common way nowadays for an attacker is to find a SQL injection to read out your database. This is a major hole in security of websites. The whole password verification data is stored inside a database. My idea is to add another vector to this data which is not saved inside the database. Something like a global salt for all password hashes. This way, a attacker needs access to the database <strong>and</strong> to the source of the config files.<br />
This idea is also implemented in my secure_hash php class.</p>
<h2>Pitfalls of password hashing</h2>
<p>There a a few pitfalls you have to care about when using hashes.</p>
<p>First, the charset of the password string is important. You have to understand how a hashing function works. It is not just randomizing a string and producing some chars. A hashing function does NOT work with chars, it works with their byte interpretation. It is also possible to create a <a href="http://php.net/md5_file">MD5 from a file</a>. So if your website is using the LATIN charset, your passwords will be hashed with the LATIN byte interpretation of these chars. If you use UTF8, these hashes can be completely different! A example: the umlaut 'ä' is in LATIN "961fa22f61a56e19f3f5f8867901ac8cf5e6d11f" but in UTF8 is is "89d39ea0600180286a2f794d8b2c4d5b02450ed9". Keep this in mind if you want to change the charset of your site.</p>
<p>Check for system chars! If i say system chars, i mean things like blanks, tabs, newlines and carriage returns. For example the string 'a' will be this SHA1: "89d39ea0600180286a2f794d8b2c4d5b02450ed9", but the string 'a ' will be "9384a39d69d104db5d1db7ccceae2ce0cb6c01c2".<br />
To reduce this risk use the <a href="http://php.net/trim">trim() function</a> to remove this chars from the passwords.</p>
<h2>Other Algorithms than MD5 or SHA1 (Update)</h2>
<p><em>Jani Hartikainen</em> mentioned in his <a href="#comment-856">comment</a>, that there are more algorithms than just md5 and sha1 and some of them are very slow compared to md5.<br />
That is a good point, which has some up and downsides.</p>
<p>Using a uncommon algorithm brings more security, because a attacker might not know the algorithm or have a tool for cracking it. Also is a slower hashing routine a problem for the attacker.</p>
<p>There might be a problem with uncommon algorithms, if you want to move to an other hoster, he might not support your hashing routine.</p>
<p>If you want to use something else then MD5 or SHA1, just have a look at <a href="http://www.php.net/manual/en/mhash.constants.php">MHash</a> or <a href="http://www.php.net/manual/en/function.hash-algos.php">Hash</a> PHP modules.</p>
<p>If you want to use your own hashing method, my <a href="/classes/secure_hash/_secure_hash---secure_hash.class.php.html">PHP Secure Hash Class</a> supports it. Just have a look at the example class "secure_hash_example".</p>
<p>Personally, i would not use something like whirlpool, tiger or haval, because they create dependencies which make the whole system more complex. I would let the simplicty win here.</p>
<p>I hope you learned how to store passwords secure and will make the Internet a safer place.<br />
<br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-everything-you-need-to-know-about-secure-password-hashing.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: Easy and secure password hashing class</title>
		<link>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html</link>
		<comments>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:26:06 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Hash]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[SHA1]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=526</guid>
		<description><![CDATA[Everybody talks about security but most of the people still save md5(password) in their databases. This is not funny. Reversing a simple and even a average password is not that hard. I once wrote this tiny class that generates secure enough password hashes. I build in salt and variable interations. License is GPL so everybody [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody talks about security but most of the people still save md5(password) in their databases. This is not funny. Reversing a simple and even a average password is not that hard.<br />
I once wrote this tiny class that generates secure enough password hashes.<br />
<span id="more-526"></span><br />
I build in salt and variable interations.<br />
License is GPL so everybody can use it :D</p>
<h2>Download / Source</h2>
<p><a href="http://juliusbeckmann.de/code/class.password.phps">http://juliusbeckmann.de/code/class.password.phps</a><br />
<a href="http://juliusbeckmann.de/code/class.password.php.txt">http://juliusbeckmann.de/code/class.password.php.txt</a></p>
<h2>Usage / Example</h2>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$pass</span> <span class="sy0">=</span> <span class="st_h">'MyPassword'</span><span class="sy0">;</span><br />
<span class="kw1">echo</span> <span class="re0">$pass</span><span class="sy0">,</span> <span class="st_h">' =&gt; '</span><span class="sy0">,</span> password<span class="sy0">::</span><a href="http://www.php.net/hash"><span class="kw3">hash</span></a><span class="br0">&#40;</span><span class="re0">$pass</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<h2>Background</h2>
<p><strong>What is a "salt" good for?</strong><br />
A salt adds a pretty random string so passwords to make the hash more secure.<br />
The saltless password <strong>grandma becomes a5d19cdd5fd1a8f664c0ee2b5e293167</strong>.<br />
If you use the salt="!24sf+fs5SDG65-54" then <strong>grandma!24sf+fs5SDG65-54 becomes bab9015f430ad28f420581f069f5736f</strong><br />
And nobody would know that bab9015f430ad28f420581f069f5736f was "grandma"</p>
<p>Check it yourself:<br />
<a href="http://www.google.com/search?q=a5d19cdd5fd1a8f664c0ee2b5e293167">Google a5d19cdd5fd1a8f664c0ee2b5e293167 = "grandma"</a><br />
<a href="http://www.google.com/search?q=bab9015f430ad28f420581f069f5736f">Google bab9015f430ad28f420581f069f5736f = "grandma!24sf+fs5SDG65-54"</a><br />
You can clearly see yourself the salted password hash is not known by Google.</p>
<p><strong>What are iterations good for?</strong><br />
Iterations mean you make a hash from a hash.<br />
Again the "grandma" example:<br />
md5(grandma) = a5d19cdd5fd1a8f664c0ee2b5e293167<br />
md5(a5d19cdd5fd1a8f664c0ee2b5e293167) = ce807f095fa160ccce736e007fe74ff1<br />
md5(ce807f095fa160ccce736e007fe74ff1) = e720fe3e6cc002a0eaabf5300283bd56<br />
md5(e720fe3e6cc002a0eaabf5300283bd56) = ...<br />
But be carefull, plain rehashing is not more secure than single hashing.<br />
What makes rehashing more secure is using the salt again what makes the new hash dependent from the previous hash AND the salt.</p>
]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wordpress: Remote Admin Reset Password Exploit &#124; Wie es dazu kommen konnte</title>
		<link>http://juliusbeckmann.de/blog/wordpress-remote-admin-reset-password-exploit-wie-es-dazu-kommen-konnte.html</link>
		<comments>http://juliusbeckmann.de/blog/wordpress-remote-admin-reset-password-exploit-wie-es-dazu-kommen-konnte.html#comments</comments>
		<pubDate>Tue, 11 Aug 2009 15:53:21 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Password]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=360</guid>
		<description><![CDATA[Wieder einmal eine Lücke in Wordpress. Ich mach mir mal die Mühe und zeige die Umstände wie es dazu kommen konnte. In der wp-login.php gibt es die Möglichkeit mit den Paramatern: ?action=rp&#38;key=LANGER_KEY ein Passwort zurücksetzten zu lassen. Bedingung hierfür ist jedoch dass der key in der Datenbank gefunden wurde. Code: Schauen wir uns mal den [...]]]></description>
			<content:encoded><![CDATA[<p>Wieder einmal eine Lücke in Wordpress. Ich mach mir mal die Mühe und zeige die Umstände wie es dazu kommen konnte.<br />
<span id="more-360"></span></p>
<p>In der wp-login.php gibt es die Möglichkeit mit den Paramatern: ?action=rp&amp;key=LANGER_KEY ein Passwort zurücksetzten zu lassen. Bedingung hierfür ist jedoch dass der key in der Datenbank gefunden wurde.</p>
<h2>Code:</h2>
<p>Schauen wir uns mal den Code genauer an:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw2">function</span> reset_password<span class="br0">&#40;</span><span class="re0">$key</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="kw2">global</span> <span class="re0">$wpdb</span><span class="sy0">;</span></p>
<p><span class="re0">$key</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st_h">'/[^a-z0-9]/i'</span><span class="sy0">,</span> <span class="st_h">''</span><span class="sy0">,</span> <span class="re0">$key</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span> <span class="re0">$key</span> <span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="kw1">return</span> <span class="kw2">new</span> WP_Error<span class="br0">&#40;</span><span class="st_h">'invalid_key'</span><span class="sy0">,</span> __<span class="br0">&#40;</span><span class="st_h">'Invalid key'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="re0">$user</span> <span class="sy0">=</span> <span class="re0">$wpdb</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>get_row<span class="br0">&#40;</span><span class="re0">$wpdb</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>prepare<span class="br0">&#40;</span><span class="st0">&quot;SELECT * FROM <span class="es4">$wpdb</span>-&amp;gt;users WHERE user_activation_key = <span class="es6">%s</span>&quot;</span><span class="sy0">,</span> <span class="re0">$key</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span> <span class="re0">$user</span> <span class="br0">&#41;</span> <span class="br0">&#41;</span><br />
<span class="kw1">return</span> <span class="kw2">new</span> WP_Error<span class="br0">&#40;</span><span class="st_h">'invalid_key'</span><span class="sy0">,</span> __<span class="br0">&#40;</span><span class="st_h">'Invalid key'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="co1">// Generate something random for a password...</span><br />
<span class="re0">$new_pass</span> <span class="sy0">=</span> wp_generate_password<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>do_action<span class="br0">&#40;</span><span class="st_h">'password_reset'</span><span class="sy0">,</span> <span class="re0">$user</span><span class="sy0">,</span> <span class="re0">$new_pass</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="sy0">...</span></div>
</div>
<h2>Erklärung:</h2>
<p>Der Parameter $key kommt direkt von $_GET['key']. Dieser wird jetzt mit preg_replace() aller Zeichen ausser a-zA-Z0-9 bereinigt. Und hier liegt auch schon das Problem. Dummerweise akzeptiert preg_replace() auch Arrays als Parameter wo dann jeder einzelne Eintrag des Arrays abgearbeitet wird. Link zur PHP Doku: <a href="http://de.php.net/manual/en/function.preg-replace.php">http://de.php.net/manual/en/function.preg-replace.php</a>.</p>
<p>Was manche nicht wissen, es ist möglich auch ein Array per GET zu übergeben. Man müsste dazu in der URL schreiben: &amp;key[]=eintrag.</p>
<p>Wenn man dies nun macht wird nach dem preg_replace $key ein Array sein mit genau einem Element drin. Da aber Arrays mit mindestens einem Element drin als true gewertet werden liefert empty($key) hier false und es wird KEINE Fehlermeldung ausgespuckt.<br />
Was danach passiert ist teils auch nicht so ganz offensichtlich. Im Aufruf von $wpdb-&gt;prepare wird $key benutzt welches, da es ein Array und kein String ist nicht korrekt geparsed welches zu folgender Query führt: "SELECT * FROM jb_v1_users WHERE user_activation_key = ''". Es steht jetzt am Schluss = '' - diese Query findet also den ersten Datensatz in der user Tabelle wo die Spalte user_activation_key leer ist. Dies ist meistens der Admin. Im Nachfolgenden Code wird jetzt das Passwort des Admins geändert was auch schon den ganzen Exploit ausmacht. Der Admin kann sich vorerst nicht mehr einloggen.</p>
<p>Beheben lässt sich das ganze indem der Admin einfach seinen Passwort Hash in der Datenbank ändert und sich so wieder einloggen kann.</p>
<h2>Fix:</h2>
<p>Um diese Lücke zu fixen gibt es mehrere Möglichkeiten:</p>
<p>Wir machen aus:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$key</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st_h">'/[^a-z0-9]/i'</span><span class="sy0">,</span> <span class="st_h">''</span><span class="sy0">,</span> <span class="re0">$key</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$key</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st_h">'/[^a-z0-9]/i'</span><span class="sy0">,</span> <span class="st_h">''</span><span class="sy0">,</span> <span class="br0">&#40;</span>string<span class="br0">&#41;</span><span class="re0">$key</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>was uns dann immer einen String zurückliefern wird. Zwar würde im Fall dass $key ein Array ist nachher "Array" drin stehen, aber diesen Key wird bestimmt keiner als user_activation_key  haben.</p>
<p>Oder wir machen aus:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span> <span class="re0">$key</span> <span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="kw1">return</span> <span class="kw2">new</span> WP_Error<span class="br0">&#40;</span><span class="st_h">'invalid_key'</span><span class="sy0">,</span> __<span class="br0">&#40;</span><span class="st_h">'Invalid key'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span> <span class="re0">$key</span> <span class="br0">&#41;</span> <span class="sy0">||</span> <a href="http://www.php.net/is_array"><span class="kw3">is_array</span></a><span class="br0">&#40;</span><span class="re0">$key</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="kw1">return</span> <span class="kw2">new</span> WP_Error<span class="br0">&#40;</span><span class="st_h">'invalid_key'</span><span class="sy0">,</span> __<span class="br0">&#40;</span><span class="st_h">'Invalid key'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>welches die Fehlermeldung ausgeben wird wenn $key fälschlicherweise ein Array ist.</p>
<p>Der Bug ist echt nicht auf den ersten Blick zu sehen, daher auch keine Schande über die Wordpress Programmierer. Mein Rat an dieser Stelle, lieber ein paar mal mehr casten als zu wenig.</p>
]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/wordpress-remote-admin-reset-password-exploit-wie-es-dazu-kommen-konnte.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin 3 und ein leeres root Passwort</title>
		<link>http://juliusbeckmann.de/blog/phpmyadmin-3-und-ein-leeres-root-passwort.html</link>
		<comments>http://juliusbeckmann.de/blog/phpmyadmin-3-und-ein-leeres-root-passwort.html#comments</comments>
		<pubDate>Mon, 23 Feb 2009 22:21:40 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Config]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[phpMyadmin]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=201</guid>
		<description><![CDATA[Heute hatte ich mal wieder die Ehre einen Debian Etch Webserver aufzusetzten. Standardmäßig mit apt-get install mysql-server-5.0 Mysql installiert, das neueste stabile phpMyadmin in /var/www entpackt und eingerichtet. Da Mysql5 unter Etch bei der Installation standardmäßig kein root Passwort abfragt wollte ich das schnell per phpMyAdmin machen musste jedoch feststellen dass dies nicht ging. In [...]]]></description>
			<content:encoded><![CDATA[<p>Heute hatte ich mal wieder die Ehre einen Debian Etch Webserver aufzusetzten. Standardmäßig mit<em> apt-get install mysql-server-5.0</em> Mysql installiert, das neueste stabile phpMyadmin in /var/www entpackt und eingerichtet. Da Mysql5 unter Etch bei der Installation standardmäßig kein root Passwort abfragt wollte ich das schnell per phpMyAdmin machen musste jedoch feststellen dass dies nicht ging.</p>
<p>In der phpMyAdmin Dokumentation fand sich den auch der Grund, der Login mit leeren Passwörtern ist ab Version 3 per default nicht gestattet:</p>
<p><a href="http://www.phpmyadmin.net/documentation/#config" target="_blank">http://www.phpmyadmin.net/documentation/#config<br />
</a></p>
<p>Die Einstellung um dies zu deaktivieren lautet:</p>
<div class="codesnip-container" >$cfg['Servers'][$i]['nopassword'] = true;</div>
<blockquote><p>Allow attempt to log in without password when a login with password fails. This can be used together with http authentication, when authentication is done some other way and phpMyAdmin gets user name from auth and uses empty password for connecting to MySQL. Password         login is still tried first, but as fallback, no password method is tried.</p></blockquote>
<p>Ich finde diese Einstellung macht Sinn da es sonst bei einer unbewussten Installation von Mysql einem möglichen Angreifer ein unnötiges Tor öffnet.</p>
]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/phpmyadmin-3-und-ein-leeres-root-passwort.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sicherheit: Kritische OpenSSL Lücke in Ubuntu</title>
		<link>http://juliusbeckmann.de/blog/sicherheit-kritische-openssl-lucke-in-ubuntu.html</link>
		<comments>http://juliusbeckmann.de/blog/sicherheit-kritische-openssl-lucke-in-ubuntu.html#comments</comments>
		<pubDate>Fri, 27 Jun 2008 10:43:36 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=30</guid>
		<description><![CDATA[Es wurde ein Sicherheitslücke im neuen Ubuntu Linux 8.04 LTS System gefunden welche durch präparierte Pakete eine Denial of Service Attacke in Programmen die gegen OpenSSL gelinkt sind verursachen kann. Es können aber auch Ruby Scripte genutzt werden um die Attacke durchzuführen. Es ist sowohl ein Denial of Service Angriff möglich, als auch das Einschleusen [...]]]></description>
			<content:encoded><![CDATA[<p>Es wurde ein Sicherheitslücke im neuen <a title="http://de.wikipedia.org/wiki/Ubuntu" href="http://de.wikipedia.org/wiki/Ubuntu" target="_blank">Ubuntu</a> Linux 8.04 LTS System gefunden welche durch präparierte Pakete eine <a title="http://de.wikipedia.org/wiki/Denial_of_Service" href="http://de.wikipedia.org/wiki/Denial_of_Service" target="_blank">Denial of Service</a> Attacke in Programmen die gegen <a title="http://de.wikipedia.org/wiki/OpenSSL" href="http://de.wikipedia.org/wiki/OpenSSL" target="_blank">OpenSSL</a> gelinkt sind verursachen kann. Es können aber auch Ruby Scripte genutzt werden um die Attacke durchzuführen. Es ist sowohl ein Denial of Service Angriff möglich, als auch das Einschleusen von Fremdcode welcher dann mit den aktuellen User Rechten ausgeführt wird.</p>
<p>Es wird empfohlen alle betroffenen Systeme mit der OpenSSL Schwachstelle upzudaten: Ubuntu Linux LTS 8.04 und Kubuntu, Edubuntu, and Xubuntu.</p>
<p>Das Updaten geht so:</p>
<div class="codesnip-container" >apt-get update<br />
apt-get upgrade</div>
<p>Damit die Änderungen auch übernommen werden ein Neustart:</p>
<div class="codesnip-container" >sudo reboot</div>
<p>Quelle:<br />
http://www.linuxsecurity.com/content/view/139127?rdf</p>
]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/sicherheit-kritische-openssl-lucke-in-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
