<?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>Runtux Blog</title>
	<atom:link href="http://blog.runtux.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.runtux.com</link>
	<description>Neues, Interessantes, Skurriles</description>
	<lastBuildDate>Fri, 23 Sep 2011 08:09:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>SIGALRM blocked forever &#8212; by init</title>
		<link>http://blog.runtux.com/2011/09/23/194/</link>
		<comments>http://blog.runtux.com/2011/09/23/194/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 08:09:43 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[skurril]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=194</guid>
		<description><![CDATA[I&#8217;m working on an embedded Linux system which allows to chose the root filesystem to boot from (flash card or NAND flash) early in the boot process. Now I was trying to get ppp (for a GSM/GPRS connection) working. But the chat-script hangs forever, it does not get a timeout. Turns out, chat uses alarm(2) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on an embedded Linux system which allows to chose the root filesystem to boot from (flash card or NAND flash) early in the boot process. Now I was trying to get ppp (for a GSM/GPRS connection) working. But the chat-script hangs forever, it does not get a timeout. Turns out, chat uses alarm(2) to wait for a timeout. After quite some time of debugging I found out that SIGALRM is blocked (look for <code>SigBlk</code> in <code>/proc/pid/status</code>, this is the mask of blocked signals for process with <code>pid</code>).</p>
<p>After some googling I came across a <a href="http://www.landley.net/notes.html">blog entry</a> (look for September 5, 2011) that describes a bug in bash: Bash, when calling &#8220;read&#8221; with a timeout, will install a signal handler for SIGALRM and <em>longjump out of the signal handler</em>, leaving SIGALRM blocked forever.</p>
<p>The boot-script runs as init (with pid 1) and therefore will leave SIGALRM blocked for all children. My immediate workaround is to read the filesystem to boot in a sub-shell&#8230;seems the bug is fixed with newer versions of bash.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2011/09/23/194/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype Compression Now Published</title>
		<link>http://blog.runtux.com/2011/06/09/191/</link>
		<comments>http://blog.runtux.com/2011/06/09/191/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 08:54:20 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=191</guid>
		<description><![CDATA[A while ago I blogged about the first published information about reverse-engineering of Skype (Skypes Flux Capacitor has been released, Skypes Flux Capacitor: UDP). A missing piece in the puzzle was the arithmetic compression algorithm used by Skype, details about which were first published in Silver Needle in the Skype. Meanwhile I&#8217;ve seen source code [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I blogged about the first published information about reverse-engineering of Skype (<a href="http://blog.runtux.com/2010/08/25/167/">Skypes Flux Capacitor has been released</a>, <a href="http://blog.runtux.com/2010/10/06/176/">Skypes Flux Capacitor: UDP</a>). A missing piece in the puzzle was the arithmetic compression algorithm used by Skype, details about which were first published in <a href="http://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-biondi/bh-eu-06-biondi-up.pdf">Silver Needle in the Skype</a>. Meanwhile I&#8217;ve seen source code of the compression algorithm from two different sources &#8212; one of them on a blog on <a href="http://skype-open-source.blogspot.com/">Open Source Skype</a>, although that version doesn&#8217;t seem to be available any longer on that page, try the usual sources to find &#8220;removed&#8221; internet-information. The code is both versions is different. I&#8217;ve not yet had the time to further look into this (and try out the code on actual Skype packets) but from what I&#8217;ve seen the code looks genuine. There are some questions, though, if the code works with later versions of Skype, it seems the protocol was <a href="http://skype-open-source.blogspot.com/2011/06/some-words-about-how-to-test-this.html">slightly changed recently</a>.<br />
There is also some press coverage from the interview with Efim Bushmanov, the author of the menioned blog:
<ul class="simple">
<li><a href="http://www.ewdn.com/2011/06/04/skype-reverse-engineered-by-russian-geek/">Skype reverse-engineered by Russian geek</a></li>
<li><a href="http://www.ewdn.com/2011/06/05/ewdn-exclusive-an-interview-with-efim-bushmanov/">Efim Bushmanov: &#8220;Good products can&#8217;t stay proprietary for long&#8221;</a></li>
<li><a href="http://www.eweekeurope.co.uk/interview/russian-reverse-engineer-praises-skype-30956">Russian Reverse Engineer Praises Skype</a></li>
</ul>
<p>So we now have alle the pieces of the puzzle to start writing a plugin for <a href="http://www.wireshark.org/">Wireshark</a> to give us a tool to further analyze the network traffic produced by Skype. Maybe an open source client is on the horizon now (there&#8217;s still a long way to go since we don&#8217;t know the binary formats used by the voice and video codecs in Skype, but maybe keyboard-chat is within reach now). Shameless Plug: If you have resources (money or time) to help writing a <a href="http://www.wireshark.org/">Wireshark</a> plugin for Skype, please <a href="mailto:rsc@runtux.com">contact me</a>, I&#8217;m trying to coordinate efforts in this direction.<br />
That said, there are rumors that (one of) the Skype Certificate-Authority-Key (the Root key in a certificate chain) <a href="http://skype-open-source.blogspot.com/2011/06/some-thoughts.html">was leaked</a>. Lets see what comes from this&#8230; leaking the key could make communications available to third parties or forge identities. But be aware that the makers of Skype probably already <em>do</em> have the mechanisms in place to listen into the contents of Skype traffic as was first hinted at by the <a href="http://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-biondi/bh-eu-06-biondi-up.pdf">Silver Needle in the Skype</a> presentation and which I&#8217;ve mentioned in my talks on Skype (presentation material linked from my <a href="http://runtux.com/">home page</a>).<br />
Looks like Microsoft has aquired a piece of software here that perfectly fits its security record so far &#8212; this could be helped by letting independent researchers look at the Skype protocol design, but may well uncover further problems down the road. We again see here that secrecy won&#8217;t help security in the long run, we may view this as a generalisation of <a href="http://en.wikipedia.org/wiki/Kerckhoffs%27s_Principle">Kerckhoffs&#8217; Principle</a>. Opening the procotol like speculated in the article <a href="http://www.ewdn.com/2011/06/04/skype-reverse-engineered-by-russian-geek/">Skype reverse-engineered by Russian geek</a> is still a very unlikely move by Microsoft, in my view&#8230; but I would certainly welcome this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2011/06/09/191/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LILO &#8220;junk in compressed archive&#8221; and Grub2 &#8220;out of disk&#8221; error</title>
		<link>http://blog.runtux.com/2011/01/10/186/</link>
		<comments>http://blog.runtux.com/2011/01/10/186/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 09:44:52 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=186</guid>
		<description><![CDATA[I&#8217;ve recently upgraded a Debian/Asterisk Installation on an older Soekris Net 4501 embedded hardware. After the upgrade the device didn&#8217;t boot anymore. The installed LILO bootloader produced the error message: Initramfs unpacking failed: junk in compressed archive and later failed with a kernel panic VFS: Unable to mount root fs on unknown-block(0,0) Googling for the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently upgraded a Debian/Asterisk Installation on an older Soekris <a href="http://soekris.com/net4501.htm">Net 4501</a> embedded hardware. After the upgrade the device didn&#8217;t boot anymore. The installed LILO bootloader produced the error message:</p>
<pre>
Initramfs unpacking failed: junk in compressed archive
</pre>
<p>and later failed with a kernel panic
<pre>

VFS: Unable to mount root fs on unknown-block(0,0)
</pre>
<p>Googling for the error message found a <a href="http://alien.slackbook.org/blog/initramfs-unpacking-failed-junk-in-compressed-archive/">blog entry</a> that indicated a missing LILO option &#8220;large-memory&#8221; &#8212; which wasn&#8217;t the problem in my case, the option was already present.<br />
So I booted into <a href="http://grml.org/">GRML</a> and installed grub2 instead of LILO. After a reboot, Grub2 ended up in rescue mode with the error message:</p>
<pre>
error: out of disk.
grub rescue&gt;
</pre>
<p>I could display the partitions with ls and also get a listing from my root partition but trying to list other directories produces the &#8220;out of disk&#8221; error again:
<pre>

grub rescue&gt; ls
(hd0) (hd0,msdos1) (hd1) (hd2) (hd3)
...
grub rescue&gt; ls (hd0,msdos1)/
./ ../ lost+found/ var/ etc/ media/ initrd.img usr/
...

grub rescue&gt; ls (hd0,msdos1)/boot

error: out of disk.
</pre>
<p>So my diagnosis was that the BIOS of the Soekris box is unable to address the whole (in this case 60GB) harddisk. The install had only worked before because the kernel and the /boot directory where within the BIOS-accessible area on the disk. So there are still BIOSes out there that don&#8217;t support large harddisks &#8212; I didn&#8217;t find out until now what the limit of the Soekris BIOS is. The fix after this diagnosis was easy: Shrink the root filesystem using resize2fs, create a new root partition and copy the shrunken filesystem there, resize2fs to the new partition size. Create a new small /boot partition at the start of the disk and copy the contents of the old /boot directory there. Of course this is only possible with a working rescue system, my rescue system of choice is a <a href="http://grml.org/">GRML</a> netboot setup which enables me to quickly boot any x86-based system that supports network boot.<br />
Lesson learned: For small X86 embedded hardware it still makes sense to have a small /boot partition.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2011/01/10/186/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thomas Greco in Vienna</title>
		<link>http://blog.runtux.com/2010/11/10/183/</link>
		<comments>http://blog.runtux.com/2010/11/10/183/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 12:43:34 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[money]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=183</guid>
		<description><![CDATA[Yesterday evening Thomas Greco was in Vienna. We were a mixed audience coming from different fields all interested in the money problem. Thomas started by introducing himself and his history. He has an engineering background and worked as a college professor. Got &#8220;yanked out of the matrix in 1974&#8243;, seeing that not everything we see [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening Thomas Greco was in Vienna. We were a mixed audience coming from different fields all interested in the money problem.<br />
Thomas started by introducing himself and his history. He has an engineering background and worked as a college professor. Got &#8220;yanked out of the matrix in 1974&#8243;, seeing that not everything we see is as it appears. Started asking questions about problems like war, poverty, exploitation and how to solve these problems.<br />
One day he had a book in the mail &#8220;In the Wake of Inflation Can the Church Remain Silent?&#8221;, he checked the few references and found (some of) them sound. The question why they allow the money-system to exist kept gnawing at him and he got in touch with the author, they eventually became good friends. He helped put out a second edition of the book. His questions were why the church doesn&#8217;t mention usury and why social justice if not part of their program.<br />
He participated in several land-trust, school of living and other projects and his focus narrowed down to money and banking. Over the time he helped starting several local currency projects and wrote several books which document what was learned (a joke was that much was learned from failed projects). The first two books can be downloaded from <a href="http://reinventingmoney.com/library.html">reinventingmoney.com</a>, the third is available as an <a href="http://reinventingmoney.com/documents/MoneyEbook.pdf">EBook</a>-Excerpt, for the fourth there is an excerpt at <a href="http://books.google.com/books?id=lUdPcDWQv90C&amp;printsec=frontcover&amp;dq=end+of+money&amp;hl=en&amp;ei=oGbaTPCjCIP4sga6y6SuCw&amp;sa=X&amp;oi=book_result&amp;ct=book-thumbnail&amp;resnum=1&amp;ved=0CCsQ6wEwAA#v=onepage&amp;q&amp;f=false">google books</a>. I&#8217;ve read the fourth and can recommend it as one of the most systematic treatments of our current money system problem I know. Books are:</p>
<ul class="simple">
<li><a href="http://circ2.home.mindspring.com/money_and_debt.htm">Money and Dept</a>: A Solution to the Global Crisis (2nd ed. 1990)</li>
<li><a href="http://www.ratical.org/many_worlds/cc/NMfHC/NMfHC.html">New Money</a> for Healthy Communities 1994</li>
<li><a href="http://www.chelseagreen.com/bookstore/item/money">Money</a> &#8212; Understanding and Creating Alternatives to Legal Tender 2001</li>
<li>The End of Money and the Future of Civilization 2009</li>
</ul>
<p>Tom then proceed to outline the history of money: It started out with barter exchange, the first form of money was commodity-money, various commodities like tobacco (cigarettes), flour or grain, nails and precious metals like silver and gold (highly valued in small amounts, portable, durable) served as money. What follows is symbolic money: the first bankers were goldsmiths depositing gold for their customers, the receipt from the bank about the deposit of gold served as a place-holder for the gold. When goldsmiths discovered that they could give receipts not only to people depositing gold, but also to people who came to borrow it, credit money (the 3rd form) was born. The last form is credit clearing where we keep only an account for each member and incoming money is added while outgoing money is subtracted. The main problem of credit is interest which exploits people.<br />
Then a discussion where Franz Nahrada claimed that money is always an alienation ensued. Thomas explained that the farther the relationships among people are, the higher the need for money: In the family we don&#8217;t need (and don&#8217;t want) money. With a close neighbor we expect some reciprocity (we keep in mind if the other person is always taking). For dealing with people you don&#8217;t know we need some kind of formalized structure. But he agreed that a closer community relationship is a good goal. It was mentioned that experiences without money (where you lose your wallet and have to find your way without money for some time) can be a lasting positive experience, on the other hand money may cut through relationships&#8230;<br />
In the discussion I asked about Toms view about demurrage, a negative interest rate on money. He answered that demurrage is an unnecessary &#8220;stamp scrip&#8221; (so called because some demurrage currencies use stamps that have to be bought and affixed to the banknotes) first introduced by <a href="http://en.wikipedia.org/wiki/Silvio_Gesell">Silvio Gesell</a> and that it&#8217;s unfortunate that demurrage is the only one of his proposals that is generally remembered. Demurrage currencies where successful in a time where any kind of exchange medium would have been successful. The problem demurrage tries to solve, the prevention of hording (mainly of paper currencies) could be solved by reallocating excess money to (new) businesses. I noted that Gesell also had this in mind when he argues that when depositing excess money in a bank for re-lending, he proposes that there should be no demurrage. (I&#8217;m still not fully convinced that demurrage might not be a good tool at times) We agreed that a shortcoming of Gesell is that he can only envision a central banking system while Thomas recommends the separation of money and state (I also think this currently is our best option). There is also a blog post on <a href="http://beyondmoney.net/monographs/demurrage-is-it-a-good-idea-for-a-local-currency-or-exchange-system/">demurrage</a> by Tom.<br />
During the discussion Tom remarked that due to the &#8220;Bubble and Bust Cycle&#8221; of our current money system, banks always have to find new ways to indept the people. When he studied, there were no student loans. This is a new idea that came up in the 60s. In the 90s we had the dot com bubble and the recent crisis in 2008 added a lot more dept to the private sector. He thinks we reached the end of the line, the dollar will probably be inflated out of existence. One of the outcomes of a hyper-inflation like Weimar in the 1920s is that the middle class gets wiped out. They still have savings but these won&#8217;t buy anything. Maybe the plan for after the inflation is a global currency. A question about the timeframe for these predicted events was answered that it&#8217;s hard to say, but China already has satisfied its appetite on US government bonds now buying gold. Maybe an America-wide new currency (Amero) or a global currency will be the plan. This would wipe out everyones savings and re-start the game, hopefully not everybody will go along with this.<br />
In the later discussion I asked &#8212; when Tom had talked about the Government and the central banks cooperating &#8212; that up until now I had seen the private banking as the problem and the state more in the role of a victim. Tom replied that they are cooperating and that this cooperation was introduced in the early days of the <a href="http://en.wikipedia.org/wiki/Bank_of_England">Bank of England</a> (when the king needed money for war). In a blog post <a href="http://beyondmoney.net/2010/10/28/when-will-the-dollar-die/">When will the dollar die?</a> Greco also outlines a facet of that cooperation: &#8220;National governments are unique in being able to play this role [of borrower of last resort] because of their collusive arrangement with the banking cartel.&#8221;<br />
We also had some discussions on emerging trends, barter exchanges (which aren&#8217;t really barter in the original sense of the word). Tom said that if businesses are not involved early on in an alternative currency project, it is bound to fail. Barter exchanges that only involve retailers can work to a certain degree of circulation. But for a robust system, manufacturers, employess are needed to close the circle. Not all suppliers are within a region, so we have to get regions to cooperate. Mistakes that have been made by some local exchanges (which is detrimental to their own business and the whole &#8220;industry&#8221;) are:
<ul class="simple">
<li>competition with members (taking the best things for themselves)</li>
<li>too much credit for themselves (debasing their own currency)</li>
</ul>
<p>Tom also mentioned Argentina during the discussion which had a strong social currency movement in the early 2000s with dozens of trade exchanges. The system (nearly) collapsed due to mis-managed, my question if this was induced by outsiders was answered that there were accusations of counterfeiting by the central government or other authorities but it is unclear if this is true. When he visited Argentina, there already was counterfeiting in some of the largest exchanges and they didn&#8217;t do anything about it. Now they have better safeguards.<br />
The following links are taken from the discussions (no particular order, Tom is not affiliated with any of them as far a I know but knows some of the creators as &#8220;cooperatively minded entrepreneurs&#8221;), during the discussion I noted that we would need a common protocol among different barter and community currency enterprises, so that not everybody builds his own &#8220;walled garden&#8221; which was agreed&#8230; I&#8217;ve written about that problem before when writing about <a href="http://blog.runtux.com/2009/08/04/106/">cloud computing</a>.</p>
<ul class="simple">
<li><a href="http://project.cyclos.org/">Cyclos</a>, a system for manageing lets trading circles</li>
<li><a href="http://zacle.com">zacle.com</a> an newly started web-based exchange (this takes ages to load for me with layers upon layers of javascript, that by default isn&#8217;t enabled when I surf with noscript, so not a site I&#8217;d ever use)</li>
<li><a href="http://poiu.com">poiu.com</a> , another trading system</li>
<li>community exchange network <a href="http://www.ces.org.za/">www.ces.org.za</a></li>
<li><a href="http://getsplus.com">getsplus.com</a>: a proprietary platform where a lot of money was invested, it&#8217;s a cashless trading platform which might eventually become open source</li>
<li><a href="http://virtualbarter.net">virtualbarter.net</a> an online barter exchange</li>
<li><a href="http://imsbarter.com">imsbarter.com</a> one of the biggest US barter companies</li>
<li><a href="http://www.favors.org">www.favors.org</a> a social network by Sergio Lub</li>
<li><cite>www.livingdirectory.org</cite> one of the first social networks with 60.000 people worldwide participating, has levels &#8220;identified&#8221; (a real person), &#8220;sponsor&#8221; (trust someone to sponsor other people) and &#8220;networker&#8221; (full access to the system).</li>
</ul>
<p>At the end we watched the short film <a href="http://www.youtube.com/watch?v=qBX-jaxMneo">The Essence of Money</a> (4:13) that outlines how money works. In my opinion it&#8217;s also a good illustration how a distributed money system &#8212; where every player in the game can issue his/her own money &#8212; could work. With todays electronic systems we maybe can come up with a solution that is distributed: compare this to file-sharing systems that started out as centralized systems like <a href="http://en.wikipedia.org/wiki/Napster">Napster</a> and evolved into distributed systems like <a href="http://en.wikipedia.org/wiki/Gnutella">Gnutella</a> today. The film <a href="http://www.moneyasdebt.net/">Money as Dept</a> was recommended, there seems to be a sequel, the original seems to be available in several places on the net.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/11/10/183/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Domain Sockets</title>
		<link>http://blog.runtux.com/2010/11/09/179/</link>
		<comments>http://blog.runtux.com/2010/11/09/179/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 10:13:42 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=179</guid>
		<description><![CDATA[I recently had to find a solution for a communication problem: An application running on a web-server should update configuration files that are only readable by a privileged user and these should not be directly writeable by the web-server user. So the idea was to write an update-server running under the privileged account which receives [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to find a solution for a communication problem: An application running on a web-server should update configuration files that are only readable by a privileged user and these should not be directly writeable by the web-server user.<br />
So the idea was to write an update-server running under the privileged account which receives update requests (and can perform additional checks) from the unprivileged web server user.<br />
One of the checks I wanted to make was that only the web-server user (www-data on debian) should be able to send update requests. So I had to find out the user sending a request via the Unix-domain socket. Google found a nice socket howto on <a href="http://blog.henning.makholm.net/2008/06/unix-domain-socket-woes.html">Henning Makholm&#8217;s blog</a> which told me most of what I needed to know: &#8220;so I ended up just checking the EUID of the client process after the connection has been accept()ed. For your reference, the way to do this is getsockopt() with SO_PEERCRED for Linux&#8221;.<br />
But one issue was remaining: I didn&#8217;t need a SOCK_STREAM socket but wanted to send datagrams to the other side (and didn&#8217;t want to fiddle with implementing my own datagram layer on top of a stream socket). With normal SOCK_DGRAM datagram sockets there is no connection &#8212; and therefore I can&#8217;t determine the user sending the datagram from the other side of the socket.<br />
Looking further I discovered that Linux has connection-oriented datagram sockets for quite some time under the name SOCK_SEQPACKET. With this type of socket you first connect() to the other side and then you send a datagram. Since now there is a connection the trick with SO_PEERCRED as described above works, too.<br />
Code for Server (python):
<pre>

from socket import socket, SOCK_SEQPACKET, AF_UNIX, SOL_SOCKET
from struct import unpack
try :
    # Not implemented in python 2.6, maybe higher
    from socket import SO_PEERCRED
except ImportError :
    SO_PEERCRED = 17 # Linux
sock = socket (AF_UNIX, SOCK_SEQPACKET)
path = '/path/to/socket'
try :
    os.remove (path)
except OSError :
    pass
sock.bind (path)
conn, adr = self.sock.accept ()
ucred = conn.getsockopt (SOL_SOCKET, SO_PEERCRED, 12)
pid, uid, gid = unpack ('LLL', ucred)
if uid... check uid:
    error...
    conn.close ()

data = conn.recv (4096)
</pre>
<p>Code for client (python):
<pre>

from socket import socket, SOCK_SEQPACKET, AF_UNIX
s = socket (AF_UNIX, SOCK_SEQPACKET)
s.connect ('path/to/socket')
s.send (.....)
s.close ()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/11/09/179/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skypes Flux Capacitor: UDP</title>
		<link>http://blog.runtux.com/2010/10/06/176/</link>
		<comments>http://blog.runtux.com/2010/10/06/176/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 17:20:13 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[documentation]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=176</guid>
		<description><![CDATA[I recently wrote about the broken network obfuscation code (aka Flux Capacitor) of Skype published by Sean O&#8217;Neil. At the time I wasn&#8217;t able to decrypt UDP packets. Now I&#8217;ve looked a little more closely into the Vanilla Skype documentation &#8212; which also includes some code to decrypt Skype credentials on harddisk. This code contains [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wrote about the <a href="http://blog.runtux.com/2010/08/25/167/">broken network obfuscation</a> code (aka Flux Capacitor) of Skype <a href="http://www.enrupt.com/index.php/2010/07/07/skype-biggest-secret-revealed">published by Sean O&#8217;Neil</a>. At the time I wasn&#8217;t able to decrypt UDP packets. Now I&#8217;ve looked a little more closely into the Vanilla Skype documentation &#8212; which also includes some code to decrypt Skype credentials on harddisk. This code contains a CRC implementation called CRC32. I had wrongly asumed that CRC32 of Skype would be the same as the crc32 implementation of pkzip, Ethernet, png, the POSIX cksum command etc. which is listed as &#8220;crc32&#8243; in the <a href="http://en.wikipedia.org/wiki/Cyclic_redundancy_check">CRC article on Wikipedia</a> and which is standardized in e.g. IEEE 802.3.<br />
The crc32 from the standards above inverts all the bits of the seed before using it (it uses an XOR mask of 0xFFFFFFFF) and does this again before returning the result of the CRC computation to the caller. But it uses the same polynomial as skype. So we can use an existing standard CRC implementation (e.g from the <a href="http://www.zlib.net/">zlib</a> library) as follows for computing the skype CRC:</p>
<pre>
def skype_crc (s, seed = 0xFFFFFFFF) :
    return (crc32 (s, seed ^ 0xFFFFFFFF)) ^ 0xFFFFFFFF
</pre>
<p>With this crc implementation I&#8217;m now able to also decrypt UDP (see <a href="http://project.runtux.com/skype/skype_deobfuscate.py">updated code</a>) packets. I&#8217;ve shown this some days ago at my <a href="http://linuxwochenende2010.luga.at/">talk @linuxwochenende</a>, for slides see my <a href="http://runtux.com/events.html">events page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/10/06/176/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Linuxwochenende 2010</title>
		<link>http://blog.runtux.com/2010/09/21/170/</link>
		<comments>http://blog.runtux.com/2010/09/21/170/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 07:47:13 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[deutsch]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=170</guid>
		<description><![CDATA[Dieses Wochenende ist wieder Linuxwochenende im metalab, ich werde einen Vortrag zu Skype und dem vor kurzem veröffentlichten Flux Capacitor code und einen zweiten zu Traffic Shaping unter Linux halten.]]></description>
			<content:encoded><![CDATA[<p>Dieses Wochenende ist wieder <a href="http://linuxwochenende2010.luga.at/">Linuxwochenende</a> im <a href="http://metalab.at/">metalab</a>, ich werde einen Vortrag zu Skype und dem vor kurzem veröffentlichten <a href="http://blog.runtux.com/2010/08/25/167/">Flux Capacitor code</a> und einen zweiten zu Traffic Shaping unter Linux halten.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/09/21/170/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skypes Flux Capacitor has been released</title>
		<link>http://blog.runtux.com/2010/08/25/167/</link>
		<comments>http://blog.runtux.com/2010/08/25/167/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 16:55:38 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=167</guid>
		<description><![CDATA[Skype uses an obfuscation layer for making it harder for others to analyze the Skype network traffic. This obfuscation layer has been called &#8220;Flux Capacitor&#8221; by the authors of the 2006 publications &#8220;Silver Needle in the Skype&#8221; and &#8220;Vanilla Skype&#8221;, Philippe Biondi, Fabrice Desclaux, and Kostya Kortchinsky, see the Wikipedia article on Skype for references [...]]]></description>
			<content:encoded><![CDATA[<p>Skype uses an obfuscation layer for making it harder for others to analyze the Skype network traffic. This <a href="http://en.wikipedia.org/wiki/Skype_protocol#Obfuscation_Layer">obfuscation layer</a> has been called &#8220;Flux Capacitor&#8221; by the authors of the 2006 publications &#8220;Silver Needle in the Skype&#8221; and &#8220;Vanilla Skype&#8221;, Philippe Biondi, Fabrice Desclaux, and Kostya Kortchinsky, see the <a href="http://en.wikipedia.org/wiki/Skype_protocol">Wikipedia article</a> on Skype for references about their publications. They discovered this flux capacitor code when reverse engineering the Skype binary program but didn&#8217;t dare to publish it for fear of others attacking the Skype network. They hinted at all sorts of bad things that were possible when knowing the Skype prototocol, the least of which is scanning networks behind firewalls (Skype is well known to be able to connect to the internet even in the presence of firewalls).<br />
Now this <a href="http://cryptolib.com/ciphers/skype/">Flux Capacitor code</a> has been released by a group called &#8220;Skype Reverse Engineering Team&#8221; in a blog post <a href="http://www.enrupt.com/index.php/2010/07/07/skype-biggest-secret-revealed">Skype&#8217;s Biggest Secret Revealed</a> by Sean O&#8217;Neil claiming that the code was already leaked and used by spammers. But they didn&#8217;t tell us how to use that code and defer further information to the next <a href="http://events.ccc.de/2010/07/30/27c3-we-come-in-peace-call-for-participation/">Chaos Communication Congress 27C3</a>.<br />
I certainly hope that the security holes in Skype are not that bad as feared by others. Some good can come out of it: maybe we&#8217;ll see a free Skype client in the not-too-far future. A good plan now would be to write a <a href="http://www.wireshark.org/">Wireshark</a> dissector for Skype so that we can analyze the network traffic. Unfortunately the authors didn&#8217;t tell us yet how to call that code to de-obfuscate Skype traffic. But there is plenty of information in the aforementioned publications. So I&#8217;ve written a <a href="http://project.runtux.com/skype/Makefile">Makefile</a> to create a shared library from the now released code and a <a href="http://project.runtux.com/skype/skype_deobfuscate.py">Python wrapper</a> that decrypts a single packet from a Skype network dump called <a href="http://wiki.wireshark.org/SampleCaptures?action=AttachFile&amp;do=view&amp;target=SkypeIRC.cap">SkypeIRC.cap</a> published on the <a href="http://www.wireshark.org/">Wireshark</a> page. This at least proves that the code works &#8212; the first several bytes of a Skype TCP stream decrypt to a known value.<br />
Maybe others want to use this as a starting point before more is released by the authors at the <a href="http://events.ccc.de/2010/07/30/27c3-we-come-in-peace-call-for-participation/">Chaos Communication Congress 27C3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/08/25/167/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ning eliminates free networks</title>
		<link>http://blog.runtux.com/2010/04/19/163/</link>
		<comments>http://blog.runtux.com/2010/04/19/163/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 15:21:23 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[licensing]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=163</guid>
		<description><![CDATA[That Ning now no longer supports free networks has been compared to blackmailing by some. I also think so. But to be blackmailed there are two factors: somebody who wants to blackmail others a willing victim to go into the trap You have the choice: Only use a service which at least provides a way [...]]]></description>
			<content:encoded><![CDATA[<p>That <a href="http://www.ning.com/">Ning</a> now <a href="http://blog.ning.com/2010/04/an-update-from-ning.html">no longer supports free networks</a> has been compared to blackmailing by some.<br />
I also think so. But to be blackmailed there are two factors:
<ul class="simple">
<li>somebody who wants to blackmail others</li>
<li>a willing victim to go into the trap</li>
</ul>
<p>You have the choice: Only use a service which at least provides a way to get your data out. (To be fair, it seems Ning will be offering this according to the blog entry cited above, but the details are still unclear)<br />
But: The data alone is nothing without the software. So you need a service where you can export the data <em>and</em> have open source software available to do something with the extracted data. But the first part is the crucial one: If you have only the data, software can be written&#8230;<br />
I&#8217;ve written <a href="http://blog.runtux.com/2009/08/04/106/">earlier</a> in this blog (and talked <a href="http://blog.runtux.com/2009/11/03/148/">@Manchester</a>) about the problem of vendor lock-in in &#8220;cloud computing&#8221; which is almost the same as &#8220;web 2.0 services&#8221;, namely <a href="http://en.wikipedia.org/wiki/Software_as_a_service">software as a service</a> (SAAS). Ning falls into that category as do other social network services like facebook or Xing.<br />
This boils down to what the <a href="http://www.opencloudinitiative.org/">open cloud initiative</a> has defined as <a href="http://www.opencloudinitiative.org/node/27">cloud computing openness</a>: For open content you ideally want to go for a free cloud with open APIs, open formats, open source (software), and open data.<br />
Note that facebook is no alternative to ning: People have been thrown off facebook for retrieving their data, cited in <a href="http://blogs.sun.com/bblfish/entry/scoble_gets_thrown_off_facebook">these</a> <a href="http://blogs.sun.com/bblfish/entry/data_portability_scoble_explains">two</a> entries on Henry Story&#8217;s blog.<br />
But the choice has to be made by customers (or non-paying users) of these services: Don&#8217;t use something where you lock in your data. Or your data might be at risk, or locked in, or dead.<br />
Doc Searls, co-Author of Cluetrain Manifesto and Editor of Linux Journal has written about this in a blog entry called <a href="http://blogs.law.harvard.edu/doc/2009/05/01/silos-end/">Silos End</a>: &#8220;These problems cannot be solved by the companies themselves. Companies make silos. It&#8217;s as simple as that. Left to their own devices, that&#8217;s what they do. Over and over and over again.&#8221;<br />
Ideally there would be a standardized service and hosters agree to use the same software (maybe customized in the appearance) to host services for users. A hosting standard for collaboration software. Starting with the services Facebook, Xing, etc. are offering today. We want an interchange format that everybody can use, export, import.<br />
I think a standard for these types of services will leave us with a network of hosters. This &#8212; in comparison to the status quo today &#8212; will be a distributed system, maybe a peer-to-peer system, not some big players locking in users. A common standard will hopefully keep the players honest.<br />
To get there: Lets try to evaluate replacement software for Ning. Work on interchange formats. A suitable format for contact information is the <a href="http://en.wikipedia.org/wiki/FOAF_(software)">Friend of a Friend</a> (FOAF) format endorsed by the <a href="http://www.w3.org/">W3C</a>, this is part of the <a href="http://www.w3.org/standards/semanticweb/">semantic web</a> effort.<br />
One software that comes close to this goal might be <a href="http://elgg.org/">elgg</a> &#8212; I&#8217;ve not tried it myself, but there is already a group of <a href="http://elgg.org/services.php">Elgg Service Providers</a> which comes close to the goal of a support infrastructure built around an open source project.<br />
I&#8217;ve two points of critique, one of them being more personal taste, the other related to the license. The first is that the software is in PHP. The license is the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License</a> which offers no protection against a service provider making own modifications to the hosted software and <em>not</em> releasing these modifications as open source software. Details are in my <a href="http://blog.runtux.com/2009/08/04/106/">earlier</a> article on the subject. So far, the team of elgg seems to play the game very open. The Source code with (yet) unrelease modifications to the software is freely accessible as a <a href="http://subversion.tigris.org/">subversion</a> software repository. Furthermore they offer <a href="http://elgg.org/download/nightly/">nightly builds</a> for download.<br />
There are many other good points, too: It offers syndication with RSS and JSON, and has an API to interconnect with software running elsewhere &#8212; which are the basic ingredients for a distributed system. The API is <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Representational State Transfer</a> (REST) that happens to be the same mechanism on which the semantic web can be built.<br />
So lets take some steps in the direction of a system built on standardized components where no vendor can lock us in.<br />
When we get there, we&#8217;ve left Web 2.0 behind. The future is a distributed system, lets call it Web 3.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/04/19/163/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OE3RSU</title>
		<link>http://blog.runtux.com/2010/02/17/157/</link>
		<comments>http://blog.runtux.com/2010/02/17/157/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 09:39:23 +0000</pubDate>
		<dc:creator>Ralf Schlatterbeck</dc:creator>
				<category><![CDATA[deutsch]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[neu]]></category>

		<guid isPermaLink="false">http://blog.runtux.com/?p=157</guid>
		<description><![CDATA[Two weeks ago I&#8217;ve finally &#8212; wanted to do this forever &#8212; passed the ham exam and got a callsign for austria. I had done some SWL (short wave listening) quite some time ago &#8212; including digital modes like RTTY. Now I can explore the sending side, too&#8230;Thanks to the Metafunk group @Metalab and to [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I&#8217;ve finally &#8212; wanted to do this forever &#8212; passed the ham exam and got a callsign for austria. I had done some SWL (short wave listening) quite some time ago &#8212; including digital modes like RTTY. Now I can explore the sending side, too&#8230;Thanks to the <a href="http://metalab.at/wiki/MetaFunk">Metafunk</a> group <a href="http://metalab.at/">@Metalab</a> and to Mike, OE3MZC and Gerhard, OE3GSU for supporting our joint preparation.</p>
<p>Vor zwei Wochen habe ich endlich die Amateurfunkprüfung gemacht &#8212; ich wollte das eigentlich schon immer tun &#8212; und habe jetzt ein Rufzeichen für Österreich. Schon früher habe ich ein bisschen SWL (Kurzwellen-Hören) betrieben, inklusive digitaler Modi wie RTTY (Funkfernschreiben). Jetzt kann ich auch die Sendeseite ausprobieren&#8230; Danke an die <a href="http://metalab.at/wiki/MetaFunk">Metafunk</a> Gruppe im <a href="http://metalab.at/">Metalab</a> und an Mike, OE3MZC und Gerhard, OE3GSU für die Unterstützung unserer gemeinsame Vorbereitung.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.runtux.com/2010/02/17/157/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

