<?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>.crashsource &#187; PC</title>
	<atom:link href="http://crashsource.de/kategorie/pc/feed/" rel="self" type="application/rss+xml" />
	<link>http://crashsource.de</link>
	<description>... des Ursprungs Quelle</description>
	<lastBuildDate>Thu, 26 Jan 2012 22:18:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu: Werbung aussperren mit eigenem DNS-Server</title>
		<link>http://crashsource.de/738-ubuntu-werbung-aussperren-mit-eigenem-dns-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-werbung-aussperren-mit-eigenem-dns-server</link>
		<comments>http://crashsource.de/738-ubuntu-werbung-aussperren-mit-eigenem-dns-server/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 13:15:39 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=738</guid>
		<description><![CDATA[Irgendwann geht einem die Werbung auf den Keks. Vor allem dann, wenn nervige Overlay-Werbung den Webseitencontent ueberdeckt oder man von Werbung angeschrien wird. Zeit damit Schluss zu [...]]]></description>
			<content:encoded><![CDATA[<p>Irgendwann geht einem die Werbung auf den Keks. Vor allem dann, wenn nervige Overlay-Werbung den Webseitencontent ueberdeckt oder man von Werbung angeschrien wird. Zeit damit Schluss zu machen? Hier steht, wie es geht!</p>
<p>Es gibt unterschiedliche Ansaetze Werbung zu blockieren. Beliebt sind beispielsweise Werbeblocker in Browsern, wie <a href="https://chrome.google.com/extensions/detail/gighmmpiobklfepjocnamgkkbiglidom?hl=de">Adblock fuer Chrome</a>. Doch ich will einen Ansatz vorstellen, der viel weiter unten im System ansetzt und die nicht auf einen Browser beschraenkt ist. Meine Methode soll schon beim <a href="http://de.wikipedia.org/wiki/Domain_Name_System">DNS</a>-Request ansetzen.</p>
<p>Fuer die technisch weniger versierten Leser moechte ich kurz erklaeren was beim DNS-Request passiert. Der Browser weiss mit einer Adresse wie "example.org" erstmal nichts anzufangen. Was ein Browser braucht um die Webseite aufzurufen ist dessen IP-Adresse. Um diese in Erfahrung zu bringen fraegt er beim System nach, und dieses wiederrum fraegt beim sogeannten DNS-Server nach. Die IP-Adresse vom DNS-Server ist dem System bekannt, so dass dieses dort nachfragen kann. Die DNS-Server selbst wissen ueber "alle" Adressen bescheid und koennen dem System so sagen an welche IP die Anfrage zu richten ist. Diesen Aufruf nennt man DNS-Request.</p>
<p>Genau hier soll mein Verfahren ansetzen. <span id="more-738"></span>Wenn ich also wuesste, welche Domains von Werbeunternehmen kommen, dann muesste ich nur noch die DNS-Requests umbiegen und schon wird keine Anwendung mehr Werbung laden koennen. Genau dies macht mein Ansatz.<br />
Im Folgenden beschreibe ich, wie man einen DNS-Server aufsetzt, der lokal auf dem Rechner laeuft. Dieser wird vom System zuerst genutzt und beinhaltet eine Liste von Werbeserveradressen, dessen Aufruf er umbiegt. Fuer alle anderen Adressen gibt er die Anfrage einfach an einen anderen DNS-Server weiter, so dass wir sozusagen eine Art Blacklist anlegen koennen, in der wir die Adressen der Werbeseiten speichern.</p>
<p>Im Internet existieren zahlreiche Listen, die viele Adressen von Werbeseiten beinhalten und brav gepfelgt werden. Eine solche Liste findet sich beispielsweise <a href="http://pgl.yoyo.org/adservers/serverlist.php">hier</a>.<br />
Auf diese Liste werden wir zurueckgreifen, wenn wir spaeter unserem eigenen DNS-Server sagen, welche Adressen er umzubiegen hat.</p>
<p>Zunaechst einmal brauchen wir dazu <a href="http://wiki.ubuntuusers.de/dnsmasq">dnsmasq</a>. Dieses Programm ist unser DNS-Server, dem wir unsere Blacklist geben wollen.<br />
Mittels </p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showPlainTxt('code-20'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apt-get install dnsmasq </div>
</li>
</ol>
</div>
</div>
</div>
<p> holen wir uns das Programm auf die Platte. Anschliessend bearbeiten wir mittels
<div class="igBar"><span id="lcode-21"><a href="#" onclick="javascript:showPlainTxt('code-21'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-21">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">gedit /etc/dnsmasq.<span style="">conf</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> die Datei <code>/etc/dnsmasq.conf</code> und fuegen ans Ende der Datei folgende Zeile hinzu: <code>conf-file=/etc/dnsmasq.ads.conf</code>. </p>
<p>Diese Zeile weist dnsmasq an die Datei <code>/etc/dnsmasq.ads.conf</code> zu beruecksichtigen, in der wir unsere Blacklist ablegen werden. In der Konfigurationsdatei muessen wir ausserdem dafuer sorgen, dass unser DNS-Server richtig eingerichtet ist.<br />
Im folgenden ein Auszug der Datei mit den Stellen, bei denen das Kommentarzeichen (#) entfernt werden muss (Zeile 2,4 und 11 in meinem Auszug).</p>
<div class="igBar"><span id="lcode-22"><a href="#" onclick="javascript:showPlainTxt('code-22'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-22">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Never forward plain names <span style="color:#006600; font-weight:bold;">&#40;</span>without a dot or domain part<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">domain-needed</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Never forward addresses in the non-routed address spaces.</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">bogus</span>-priv</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># By&nbsp; default,&nbsp; dnsmasq&nbsp; will&nbsp; send queries to any of the upstream</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># servers it knows about and tries to favour servers to are&nbsp; known</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># to&nbsp; be&nbsp; up.&nbsp; <span style="">Uncommenting</span> this forces dnsmasq to try each query</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># with&nbsp; each&nbsp; server&nbsp; strictly&nbsp; in&nbsp; the&nbsp; order&nbsp; they&nbsp; &nbsp;appear&nbsp; &nbsp;in</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /etc/resolv.<span style="">conf</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">strict-order </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nachdem wir die Datei bearbeitet haben legen wir noch unsere Blackliste als zunaechst leere Datei an:
<div class="igBar"><span id="lcode-23"><a href="#" onclick="javascript:showPlainTxt('code-23'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-23">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">touch /etc/dnsmasq.<span style="">ads</span>.<span style="">conf</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Drueben bei <a href="http://www.debian-administration.org/article/Blocking_ad_servers_with_dnsmasq">debian-adminstration.org</a> gibt es ein tolles Script, welches es uns erlaubt automatisiert die Blackliste aus oben genannter Quelle zu laden. Mein Dank geht an dieser Stelle an den Autor, die Rechte des Scripts liegen natuerlich beim Autor selbst!</p>
<p>Das Script lautet (ein wenig abgeaendert um unseren Beduerfnissen gerecht zu werden):</p>
<div class="igBar"><span id="lcode-24"><a href="#" onclick="javascript:showPlainTxt('code-24'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-24">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#!/bin/sh</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">### short script that downloads a list of ad servers for use with</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">### dnsmasq to block ads.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">###</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># the ipaddress where we want to send the requests to, instead of the</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># bannerservers</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">addcatcherip=<span style="color:#CC0000;">'127.0.0.2'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">configfile=/etc/dnsmasq.<span style="">ads</span>.<span style="">conf</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># the args to add to the request to the yoyo server, to tell it that we want</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># a hosts file and that we want to redirect to the addcatcher</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">listurlargs=<span style="color:#CC0000;">"hostformat=nohtml&amp;showintro=0&amp;mimetype=plaintext"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># URL of the ad server list to download</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">listurl=<span style="color:#CC0000;">"http://pgl.yoyo.org/adservers/serverlist.php?${listurlargs}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># location of a file where hostnames not listed can be added</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">extrasfile=<span style="color:#CC0000;">'/etc/banner_add_hosts.manual'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">## command to reload dnsmasq - change according to your system</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">## not sure if we need this for dnsmasq</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">reloadcmd=<span style="color:#CC0000;">'/etc/init.d/dnsmasq restart'</span>&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># temp files to use</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tmpfile=<span style="color:#CC0000;">"/tmp/.adlist.$$"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tmpconffile=<span style="color:#CC0000;">"/tmp/.dnsmasq.conf.$$"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># command to fetch the list <span style="color:#006600; font-weight:bold;">&#40;</span>alternatives commented out<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fetchcmd=<span style="color:#CC0000;">"/usr/bin/wget -q -O $tmpfile $listurl"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$fetchcmd </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># add the extras</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#91;</span> -f <span style="color:#CC0000;">"$extrasfile"</span> <span style="color:#006600; font-weight:bold;">&#93;</span>&nbsp; &amp;&amp; cat $extrasfile&gt;&gt; $tmpfile</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># check the temp file exists OK before overwriting the existing list</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if&nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span> ! -s $tmpfile <span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">then</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo <span style="color:#CC0000;">"temp file '$tmpfile' either doesn't exist or is empty; quitting"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fi</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># get a fresh list of ad server addresses for dnsmasq to refuse</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cat $configfile | grep -v <span style="color:#CC0000;">"address="</span>&gt; $tmpconffile</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">while read line; do</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ADDRESS=<span style="color:#CC0000;">"/${line}/${addcatcherip}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; echo <span style="color:#CC0000;">"address=<span style="color:#000099; font-weight:bold;">\"</span>${ADDRESS}<span style="color:#000099; font-weight:bold;">\"</span>"</span>&gt;&gt; $tmpconffile</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">done &lt;$tmpfile </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mv $tmpconffile $configfile</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$reloadcmd</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rm $tmpfile</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Dieses Script speichern wir unter <code>/usr/local/bin/update_adserver_list</code> ab.<br />
Mittels</p>
<div class="igBar"><span id="lcode-25"><a href="#" onclick="javascript:showPlainTxt('code-25'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-25">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chown root.<span style="">root</span> /usr/local/bin/update_adserver_list</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod <span style="color:#800000;color:#800000;">700</span> /usr/local/bin/update_adserver_list</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/usr/local/bin/update_adserver_list </div>
</li>
</ol>
</div>
</div>
</div>
<p>
passen wir die Rechte des Scripts an und machen es ausfuehrbar. Die letzte Zeile sollte mit der Meldung <em>Restarting DNS forwarder and DHCP server: dnsmasq.</em> quittiert werden. Wenn dies der Fall ist funktioniert alles so weit in der Datei <code>/etc/dnsmasq.ads.conf</code> sollten jetzt eine Menge Eintraege stehen.</p>
<p>Jetzt sind wir schon relativ fortgeschritten und muessen nur noch ein paar Kleinigkeiten anpassen. Zunaechst muessen wir auf der IP 127.0.0.2, die wir im Script oben definiert haben, einen Dienst laufen lassen, der uns bei jedem Aufruf nur ein leeres Pixel ausgibt. Dieser Teil ist drueben bei <a href="http://wiki.flexion.org/SettingUpDNSMasq.html#1.3">flexion.org</a> schoen erklaert. Vielen Dank dafuer! :)</p>
<p>Zunaechst holen wir uns den Pixelserver mittels</p>
<div class="igBar"><span id="lcode-26"><a href="#" onclick="javascript:showPlainTxt('code-26'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-26">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//proxytunnel.sourceforge.net/files/pixelserv.pl.txt -O /usr/local/bin/pixelserv.pl</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod <span style="color:#800000;color:#800000;">755</span> /usr/local/bin/pixelserv.<span style="">pl</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Im Anschluss daran muessen wir dem Pixelserver noch sagen auf welche IP er ansprechen soll. Dazu oeffnen wir die Datei im Editor
<div class="igBar"><span id="lcode-27"><a href="#" onclick="javascript:showPlainTxt('code-27'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-27">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">gedit /usr/local/bin/pixelserv.<span style="">pl</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> und aendern die den Teil
<div class="igBar"><span id="lcode-28"><a href="#" onclick="javascript:showPlainTxt('code-28'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-28">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$sock = new IO::<span style="">Socket</span>::<span style="">INET</span> <span style="color:#006600; font-weight:bold;">&#40;</span>&nbsp; LocalHost =&gt; <span style="color:#CC0000;">'0.0.0.0'</span>, </div>
</li>
</ol>
</div>
</div>
</div>
<p> ab in
<div class="igBar"><span id="lcode-29"><a href="#" onclick="javascript:showPlainTxt('code-29'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-29">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$sock = new IO::<span style="">Socket</span>::<span style="">INET</span> <span style="color:#006600; font-weight:bold;">&#40;</span>&nbsp; LocalHost =&gt; <span style="color:#CC0000;">'127.0.0.2'</span>, </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Es folgt der Befehl
<div class="igBar"><span id="lcode-30"><a href="#" onclick="javascript:showPlainTxt('code-30'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-30">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">gedit /etc/init.<span style="">d</span>/pixelserv </div>
</li>
</ol>
</div>
</div>
</div>
<p> wobei wir dort das folgende Script hineinkopieren:</p>
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showPlainTxt('code-31'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#! /bin/sh</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /etc/init.<span style="">d</span>/pixelserv</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Carry out specific functions when asked to by the system</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">case <span style="color:#CC0000;">"$1"</span> in</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;start<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;echo <span style="color:#CC0000;">"Starting pixelserv "</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;/usr/local/bin/pixelserv.<span style="">pl</span> &amp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;stop<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;echo <span style="color:#CC0000;">"Stopping script pixelserv"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;killall pixelserv.<span style="">pl</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;*<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;echo <span style="color:#CC0000;">"Usage: /etc/init.d/pixelserv {start|stop}"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;exit <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">esac</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">exit <span style="color:#800000;color:#800000;">0</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Im Anschluss daran passen wir noch die Rechte an</p>
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showPlainTxt('code-32'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod <span style="color:#800000;color:#800000;">755</span> /etc/init.<span style="">d</span>/pixelserv </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Jetzt kann mittels
<div class="igBar"><span id="lcode-33"><a href="#" onclick="javascript:showPlainTxt('code-33'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-33">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/pixelserv start </div>
</li>
</ol>
</div>
</div>
</div>
<p> und
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showPlainTxt('code-34'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/pixelserv stop </div>
</li>
</ol>
</div>
</div>
</div>
<p> getestet werden ob das Script erfolgreich startet und beendet. Wenn alles passt, dann uebernehmen wir es mittels
<div class="igBar"><span id="lcode-35"><a href="#" onclick="javascript:showPlainTxt('code-35'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-35">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">update-rc.<span style="">d</span> pixelserv defaults </div>
</li>
</ol>
</div>
</div>
</div>
<p> in den Autostart.</p>
<p>Jetzt muessen wir noch dem System mitteilen, dass unser DNS-Server genutzt werden soll. Dazu passen wir die aktuelle Internetverbindung im <a href="http://wiki.ubuntuusers.de/NetworkManager">NetworkManager</a> an und fuegen unseren Rechner mit der IP 127.0.0.1 als DNS-Server hinzu. Weiterhin muessen wir noch einen alternativen DNS-Server angeben, der die normalen Anfragen abarbeitet, die unser DNS-Server nicht verwaltet. In meinem Fall ist das die IP 8.8.8.8, welche den <a href="http://code.google.com/speed/public-dns/">DNS-Server von Google</a> adressiert.</p>

<a href="http://crashsource.de/wp-content/gallery/blogeintraege/configure-networkmanager-dns.png" title="" class="thickbox" rel="singlepic120" >
	<img class="ngg-singlepic" src="http://crashsource.de/wp-content/gallery/cache/120__x_configure-networkmanager-dns.png" alt="configure-networkmanager-dns" title="configure-networkmanager-dns" />
</a>

<p>Anschliessend koennen wir testen ob unsere Arbeit Fruechte traegt und in der Konsole folgendes ausprobieren:
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showPlainTxt('code-36'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">nslookup doubleclick.<span style="">net</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> Das Ergebnis sollte dann so aussehen:
<div class="igBar"><span id="lcode-37"><a href="#" onclick="javascript:showPlainTxt('code-37'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-37">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Server:&nbsp;&nbsp;<span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Address:&nbsp; &nbsp; <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>#53</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Name:&nbsp; &nbsp;doubleclick.<span style="">net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Address: <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">2</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Jetzt haben wir alles erfolgreich konfiguriert. Allerdings muessen wir unsere Blacklist auch immer aktuell halten. Dazu legen wir noch die Datei <code>/etc/cron.d/update_adserver_list</code> an. Diese Datei bearbeiten wir und fuegen folgenden Inhalt hinzu
<div class="igBar"><span id="lcode-38"><a href="#" onclick="javascript:showPlainTxt('code-38'); return false;"> TEXTANSICHT UMSCHALTEN</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-38">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#Update the banner hosts...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">0</span> <span style="color:#800000;color:#800000;">0</span>,<span style="color:#800000;color:#800000;">4</span>,<span style="color:#800000;color:#800000;">8</span>,<span style="color:#800000;color:#800000;">12</span>,<span style="color:#800000;color:#800000;">16</span>,<span style="color:#800000;color:#800000;">18</span>,<span style="color:#800000;color:#800000;">20</span> * * * root /usr/local/bin/update_adserver_list </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Mittels diesem Cronjob wird die Liste alle 4 Stunden neu geladen und so immer aktuell gehalten. Damit brauchen wir uns um nichts mehr kuemmern, sondern haben alles automatisiert.</p>
<p>Zum Testen reicht es ein paar werbeverseuchte Webseiten anzusurfen. Von Werbung sollte jetzt nichts mehr zu sehen sein - ausgenommen der Werbeserver ist nicht in der Blackliste eingetragen ;)<br />
Viel Spass damit!</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/738-ubuntu-werbung-aussperren-mit-eigenem-dns-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>APK &#8211; Reverse Engineering</title>
		<link>http://crashsource.de/729-apk-reverse-engineering/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apk-reverse-engineering</link>
		<comments>http://crashsource.de/729-apk-reverse-engineering/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 13:24:30 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Programmieren]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=729</guid>
		<description><![CDATA[Google verpackt Anwendungen fuer Android ins APK-Format. Manchmal moechte man gerne in eine APK-Datei hineinschauen. Gerade, wenn man selbst programmiert interessiert einen vielleicht wie ein anderer Autor [...]]]></description>
			<content:encoded><![CDATA[<p>Google verpackt Anwendungen fuer Android ins APK-Format. Manchmal moechte man gerne in eine APK-Datei hineinschauen. Gerade, wenn man selbst programmiert interessiert einen vielleicht wie ein anderer Autor bestimmte Dinge programmiert hat. Vielleicht will man aber in Sicherheitsfragen anderen Programmierern auch nur auf die Finger schauen.<br />
Es gibt also zahlreiche Gruende warum man sogenanntes "Reverse Engineering" betreiben will.</p>
<p>Fuer APK-Dateien gibt es dabei unterschiedliche Ansaetze. Ein Ansatz, der sehr viel ueber den Quellcode verraet, sich aber nicht gut zum Manipulieren von APKs eignet will ich im Folgenden kurz beschreiben.<span id="more-729"></span></p>
<p>Zunaechst liegt uns also eine <a href="http://en.wikipedia.org/wiki/APK_(file_format)">APK-Datei</a> vor. Bei dieser Datei handelt es sich um ein zip-Archiv, welches zusaetzlich noch signiert worden ist. Diese Signatur weist den Autor der APK-Datei aus und ist sicherheitsrelevant fuer Android. Will man eine APK-Datei manipulieren, dann kann man dies zwar tun, kann die neue Datei aber nicht mit der gleichen Signatur versehen - es sei denn man verfuegt ueber den privaten Schluessel des Autors. Dies ist in der Regel nicht der Fall und das ist auch gut so!</p>
<p>Die Signatur braucht uns aber nicht weiter interessieren, wenn wir uns lediglich den Quellcode anschauen und keine manipulierte APK-Datei erstellen wollen.</p>
<p>Der Quelltext wird beim Erstellen einer APK-Datei kompiliert, so dass wir diesen Schritt zunaechst wieder rueckgaengig machen muessen. Mittels dem Programm <a href="http://code.google.com/p/dex2jar/">dex2jar</a> ist dies moeglich.<br />
Nehmen wir an unsere APK-Datei heisst "Test.apk", dann koennen rufen wir unter Linux dex2jar wie folgt auf: <code>sh /path/to/dex2jar.sh /path/to/Test.apk</code><br />
Unter Windows und Mac OSX sind die Aufrufe aehnlich und koennen der Webseite des Programmierers entnommen werden.</p>
<p>Der Befehl erzeugt eine jar-Datei, die dann lautet "Test.apk.dex2jar.jar". In dieser Datei finden sich nun die class-Dateien, welche jedoch zunaechst ebenfalls nicht zu lesen sind. Um diese Dateien lesen zu koennen brauchen wir noch einen Java Decompiler, wie beispielsweise <a href="http://java.decompiler.free.fr/">JD</a>. Mittels diesem koennen wir uns den Quellcode ansehen.</p>
<p>Auf der oben verlinkten Seite gibt es beispielsweise <a href="http://java.decompiler.free.fr/?q=jdgui">JD-Gui</a>, welches gleich eine komplette Oberflaeche mitbringt. Damit koennen wir nun das jar-Archiv einlesen und bekommen sogleich die Anwendung in leserlichem Code. Abstriche muessen wir bei den Kommentaren und einigen Variablennamen machen, welche beim Kompilieren automatisch verloren gehen. Alles in allem sollte der Code dennoch recht leserlich sein, so dass wir diesen benutzen koennen um die APK-Dateien zu analysieren.</p>
<p>Beispielseweise koennte eine APK-Datei, die damit wieder leserlich gemacht wurde dann im Programm JD-Gui so aussehen:<br />

<a href="http://crashsource.de/wp-content/gallery/blogeintraege/jd-gui-apk-reverse-engineering.png" title="" class="thickbox" rel="singlepic119" >
	<img class="ngg-singlepic" src="http://crashsource.de/wp-content/gallery/cache/119__400x_jd-gui-apk-reverse-engineering.png" alt="jd-gui-apk-reverse-engineering" title="jd-gui-apk-reverse-engineering" />
</a>
</p>
<p>Damit ist es nun moeglich die Struktur des Programms zu untersuchen und Algorithmen nachzuvollziehen.</p>
<p>Vielleicht noch ein Hinweis an dieser Stelle: Diese Anleitung dient nicht dazu irgendwelchen Schabernack zu treiben! Es geht hier einzig um die Moeglichkeit APKs auf deren Sicherheit zu untersuchen und ggfs. schaedliche Anwendungen ausfindig zu machen.</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/729-apk-reverse-engineering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Webcamaufloesung in Skype erhoehen</title>
		<link>http://crashsource.de/198-ubuntu-webcamaufloesung-in-skype-erhoehen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-webcamaufloesung-in-skype-erhoehen</link>
		<comments>http://crashsource.de/198-ubuntu-webcamaufloesung-in-skype-erhoehen/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 17:12:40 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=198</guid>
		<description><![CDATA[Um die Webcamaufloesung in Skype zu erhoehen ist es notwendig die Datei ~/.Skype/[skype-username]/config.xml zu bearbeiten. Im Zweig "Lib" muessen folgende Zeilen ergaenzt werden: [CaptureHeight]480[CaptureHeight] [CaptureWidth]640[CaptureWidth] Achtung: Im [...]]]></description>
			<content:encoded><![CDATA[<p>Um die Webcamaufloesung in Skype zu erhoehen ist es notwendig die Datei <code>~/.Skype/[skype-username]/config.xml</code> zu bearbeiten. Im Zweig "Lib" muessen folgende Zeilen ergaenzt werden:</p>
<p><codeblock>[CaptureHeight]480[CaptureHeight]<br />
[CaptureWidth]640[CaptureWidth]</codeblock></p>
<p><strong>Achtung:</strong><br />
Im Code muessen die eckigen Klammern "[", "]" durch spitze Klammern "<", ">" ersetzt werden.</p>
<p>In obrigem Beispiel wird die Aufloesung der Webcam dabei auf 640x480 Pixel festgelegt. Ein Neustart von Skype sorgt dafuer, dass die Aenderungen uebernommen werden.</p>
<p>Ueber die GUI habe ich keine Moeglichkeit gefunden die Einstellungen zu taetigen. Sollte ich etwas uebersehen haben, so bin ich ueber jeden Hinweis dankbar.</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/198-ubuntu-webcamaufloesung-in-skype-erhoehen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pidgin &#8211; Dateiversand via ICQ</title>
		<link>http://crashsource.de/131-pidgin-dateiversand-via-icq/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pidgin-dateiversand-via-icq</link>
		<comments>http://crashsource.de/131-pidgin-dateiversand-via-icq/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 14:33:33 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=131</guid>
		<description><![CDATA[Der Dateiversand von einem ICQ-Account (via Pidgin betrieben) zu einem anderen ICQ-Account (mit der ICQ-Software betrieben) funktioniert dann, wenn man die Einstellung Konten -> Verwalten -> ICQ [...]]]></description>
			<content:encoded><![CDATA[<p>Der Dateiversand von einem ICQ-Account (via Pidgin betrieben) zu einem anderen ICQ-Account (mit der ICQ-Software betrieben) funktioniert dann, wenn man die Einstellung <strong>Konten -> Verwalten -> ICQ -> Bearbeiten -> Erweitert -> Benutzer immer den AIM/ICQ Proxyserver f&#252;r Dateiuebertragungen und Direkt-IM (langsamer, aber zeigt Ihre IP-Adresse nicht)</strong> aktiviert.</p>

<a href="http://crashsource.de/wp-content/gallery/blogeintraege/pigdin-icq-einstellungen.png" title="" class="thickbox" rel="singlepic15" >
	<img class="ngg-singlepic" src="http://crashsource.de/wp-content/gallery/cache/15__x400_pigdin-icq-einstellungen.png" alt="pigdin-icq-einstellungen.png" title="pigdin-icq-einstellungen.png" />
</a>

<p>Getestet mit der Pidgin-Version: 2.5.2 (unter Ubuntu 8.10 Intrepid Ibex)</p>
<p>(via <a href="http://www.ubuntu-forum.de/post/214289/pidgin-versendet-keine-dateien-%C3%BCber-icq-protokoll.html#post214289">ubuntu-forum.de</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/131-pidgin-dateiversand-via-icq/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Brother HL-2030 unter Ubuntu 8.10 Intrepid Ibex installieren</title>
		<link>http://crashsource.de/119-brother-hl-2030-unter-ubuntu-810-intrepid-ibex-installieren/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=brother-hl-2030-unter-ubuntu-810-intrepid-ibex-installieren</link>
		<comments>http://crashsource.de/119-brother-hl-2030-unter-ubuntu-810-intrepid-ibex-installieren/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 14:02:22 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=119</guid>
		<description><![CDATA[Meinen Brother HL-2030 Drucker hatte ich in Ubuntu 8.10 Hardy Heron mit dem Druckertreiber "hl1250" als HL-2060 installiert. Dort lief der Drucker wunderbar und es gab keine [...]]]></description>
			<content:encoded><![CDATA[<p>Meinen Brother HL-2030 Drucker hatte ich in Ubuntu 8.10 Hardy Heron mit dem Druckertreiber "hl1250" als HL-2060 installiert. Dort lief der Drucker wunderbar und es gab keine nennenswerten Probleme. Nach dem Wechsel auf Ubuntu 8.10 Intrepix Ibex trat jedoch ploetzlich das Problem auf, dass der Drucker bei einem Druckauftrag, welcher sich ueber mehr als eine Seite belief, nach jeder Seite eine kurze Pause (ca. 2-3 Sekunden) machte.</p>
<p>Im Netz habe ich jetzt die Loesung des Problems gefunden. Dazu laed man sich die passenden <a href="http://solutions.brother.com/linux/sol/printer/linux/lpr_drivers.html">LPR</a>- und <a href="http://solutions.brother.com/linux/sol/printer/linux/cups_drivers.html">CUPS</a>-Treiber aus dem Netz herunter. In der Konsole wechselt man anschliessend in das Verzeichnis in dem die beiden Dateien liegen und fuehrt nacheinander folgende Schritte aus:</p>
<p><code>sudo apt-get install lpr<br />
sudo dpkg -i --force-all brhl2030lpr-2.0.1-1.i386.deb<br />
sudo dpkg -i --force-all cupswrapperHL2030-2.0.1-2.i386.deb</code></p>

<a href="http://crashsource.de/wp-content/gallery/blogeintraege/drucker-eigenschaften-hl2030_1.png" title="" class="thickbox" rel="singlepic12" >
	<img class="ngg-singlepic" src="http://crashsource.de/wp-content/gallery/cache/12__450x300_drucker-eigenschaften-hl2030_1.png" alt="drucker-eigenschaften-hl2030_1.png" title="drucker-eigenschaften-hl2030_1.png" />
</a>

<p>Danach findet man in den Druckerkonfigurationen (Systemverwaltung -> Drucken) einen neuen Drucker mit dem Namen "HL2030" (laeuft intern als Typ "Brother HL2030 for CUPS"). Dieser druckt nun ohne stoerende Pausen.</p>
<p>Hinweis:<br />
Bei meinem System musste ich die Geraete-URI in <strong>usb://Brother/HL-2030%20series</strong> aendern (davor: usb:/dev/usb/lp0), da sich der Drucker sonst nicht angesprochen fuehlte. Nach dieser Aenderung klappt aber alles wunderbar.</p>
<p>(via <a href="http://forum.ubuntuusers.de/topic/brother-hl2030-drucker-macht-pause/">ubuntuusers.de</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/119-brother-hl-2030-unter-ubuntu-810-intrepid-ibex-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acer: InsydeH2O-BIOS &#8211; Kaltstart friert Bootvorgang ein</title>
		<link>http://crashsource.de/114-acer-insydeh2o-bios-kaltstart-friert-bootvorgang-ein/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=acer-insydeh2o-bios-kaltstart-friert-bootvorgang-ein</link>
		<comments>http://crashsource.de/114-acer-insydeh2o-bios-kaltstart-friert-bootvorgang-ein/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 19:51:34 +0000</pubDate>
		<dc:creator>Fabi</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[abschalten]]></category>
		<category><![CDATA[Acer]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[doppelt]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[einfrieren]]></category>
		<category><![CDATA[freeze]]></category>
		<category><![CDATA[InsydeH2O]]></category>
		<category><![CDATA[turn off]]></category>
		<category><![CDATA[twice]]></category>

		<guid isPermaLink="false">http://crashsource.de/?p=114</guid>
		<description><![CDATA[-> For an english version please scroll down Vor ein paar Monaten kaufte ich mir ein Acer Aspire 7720G (benutztes BIOS: InsydeH2O V1.35), welches ich auch gleich [...]]]></description>
			<content:encoded><![CDATA[<h3>-> For an english version please scroll down</h3>
<p>Vor ein paar Monaten kaufte ich mir ein Acer Aspire 7720G (benutztes BIOS: InsydeH2O V1.35), welches ich auch gleich in Betrieb nahm. Anfangs ging alles wunderbar und das Notebook bootete genau so wie es sein sollte. Einen guten Monat spaeter trat zum ersten Mal das Problem auf, dass das Notebook beim Kaltstart (sprich: es war zuvor laenger als 5 Minuten von jedlicher Stromversorgnung getrennt) einfror und nicht starten wollte. Ich musste das Notebook ausschalten und wieder anschalten und erneut booten. Beim zweiten Booten klappte es dann und das Betriebsystem wurde geladen.</p>
<p>Dieser Fehler trat zunaechst nur ein einziges Mal auf, wurde aber mit der Zeit immer haeufiger. Das Notebook blieb beim Booten einfach haengen und egal wie lange man wartete, es passierte nichts.<br />
Interessanterweise blieb das Notebook nicht immer an der gleichen Stelle haengen, sondern die Stelle variierte. Im Ganzen gab es drei Stellen, an welchen das Notebook haengen bleiben konnte.</p>
<ol>
<li><strong>Vor</strong> dem Laden des Acer-Logos und damit eigentlich auch vor dem jeglichem Output des BIOS. Zu sehen war dann nur ein blinkender Unterstrich, welcher immer brav vor sich hin blinkte.</li>
<li>Beim Laden des Bios.</li>
<li>Bei der Meldung "Prepare to Boot to OS". Das BIOS ist hier zwar scheinbar schon vollstaendig geladen und es erschien zwar die Meldung, dass das Betriebsystem geladen werden soll - passiert ist dennoch nichts!</li>
</ol>
<p>Obwohl ich zunaechst von einem Hardwaredefekt ausgegangen war und auch schon den Support angeschrieben hatte, habe ich es mir nicht nehmen lassen ein wenig das BIOS zu durchforsten. Besonders ist mir dabei die Option <strong>Main -> Quiet Boot</strong> aufgefallen. Ich liess es darauf ankommen und deaktivierte diese Option (<strong>Disabled</strong>). Das Ergebnis war beeindruckend! Bei inzwischen mindestens 20 mal Booten ist der Fehler nicht mehr aufgetreten. Diese Option scheint schuld daran zu sein, dass das Notebook nicht mehr starten wollte.</p>
<p>Die Funktion legt fest ob das Logo des Notebookherstellers, in meinem Fall also Acer, angezeigt werden soll, oder nicht. Warum genau das Anzeigen des Logos zu Problemen fuehrt ist mir leider nicht bekannt.</p>
<p>Ich bin jedenfalls gluecklich, dass der Rechner wieder aufs erste Mal bootet und bin zuversichtlich, dass das ab jetzt auch so bleibt.</p>
<p><strong>Nachtrag</strong><br />
Nachdem das gleiche Problem nach kurzer Zeit wieder aufgetreten ist, habe ich mich dazu entschlossen das Notebook einzuschicken und reparieren zu lassen. Dort wurde die CPU als defekt ausfindig gemacht und gewechselt. Seit dem habe ich keine Probleme mehr - auch nicht bei Kaltstarts. Daher bleibt jedem, der das selbe Problem wie ich hat, vermutlich ebenfalls nur das Acer Repair Center als Ausweg.</p>
<p>-------------------------------------------------------</p>
<h2>English short version:</h2>
<p>I've had some problems with my BIOS (InsydeH2O V1.35) running on an Acer-notebook. I was not able to boot my system when the notebook was more than five minutes out of electricity. Sometimes it loaded the Acer boot-screen and sometimes not - but everytime the system freezes and needed to be turned off and booted up again. I first blamed the hardware but later on I recognized that one single setting at the BIOS was responsible for the malfunction.<br />
To fix the problem go to <strong>Main -> Quiet Boot</strong>. If you <strong>disable</strong> this setting (it is enabled by default) the notebook will boot up normally and the problem will be gone.</p>
<p><strong>Edit:</strong><br />
After a short period of time the same problem occured again and so I decided to deliver my notebook to the Acer Repair Center. They blamed the CPU for the error and substituted it. From then on my notebook worked fine and i'm happy again.</p>
]]></content:encoded>
			<wfw:commentRss>http://crashsource.de/114-acer-insydeh2o-bios-kaltstart-friert-bootvorgang-ein/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

