<?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>Miloslav Trmač</title>
	<atom:link href="http://carolina.mff.cuni.cz/~trmac/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://carolina.mff.cuni.cz/~trmac/blog</link>
	<description></description>
	<lastBuildDate>Sun, 18 Oct 2009 01:53:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Zkušenost s duchodovepojisteni.cz: nebrat!</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2009/zkusenost-duchodovepojisteni-cz-nebrat/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2009/zkusenost-duchodovepojisteni-cz-nebrat/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 22:44:49 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=44</guid>
		<description><![CDATA[Kdybyste jako já hledali relativně výhodného agenta pro penzijní připojištění, jděte někam jinam.

Uzavření penzijního připojištění na http://duchodovepripojisteni.cz/ (Jupiter Praha s.r.o.) tehdy fungovalo v pořádku.  Posledního čtvrt roku ale byl na infolince jen záznamník, e-mailový kontakt je přesměrovaný na neexistující doménu, jednatel společnosti (podle adresy z whois) také nereaguje.

Na inzerovaných 110% měsíčního příspěvku můžete samozřejmě [...]]]></description>
			<content:encoded><![CDATA[<p>Kdybyste jako já hledali relativně výhodného agenta pro penzijní připojištění, jděte někam jinam.</p>

<p>Uzavření penzijního připojištění na <a href="http://duchodovepripojisteni.cz/" rel="nofollow">http://duchodovepripojisteni.cz/</a> (Jupiter Praha s.r.o.) tehdy fungovalo v pořádku.  Posledního čtvrt roku ale byl na infolince jen záznamník, e-mailový kontakt je přesměrovaný na neexistující doménu, jednatel společnosti (podle adresy z whois) také nereaguje.</p>

<p>Na inzerovaných 110% měsíčního příspěvku můžete samozřejmě zapomenout&mdash;kromě výše uvedeného také proto, že účetní závěrka v obchodním rejstříku uvádí k 31. 12. 2008 závazky po splatnosti ve výši 197 tisíc Kč.</p>

<p>Zkrátka, nebrat&#8230;</p>
<!-- Easy AdSense V2.79 -->
<!-- Post[count: 2] -->
<div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:0px; "><script type="text/javascript"><!--
google_ad_client = "pub-6046180595278099";
//blog
google_ad_slot = "7100959247";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2009/zkusenost-duchodovepojisteni-cz-nebrat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Power of story telling: Test-driven Development by Example</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2009/test-driven-development-story-telling/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2009/test-driven-development-story-telling/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 00:38:24 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=40</guid>
		<description><![CDATA[I generally prefer reference books to introductory tests, so when I got the opportunity to read Kent Beck&#8217;s Test Driven Development By Example, I was really surprised how easy to read&#8212;dare I say fun?&#8212;it was.  It seems human brain is really set up to handle stories better than pure facts, and to enjoy them [...]]]></description>
			<content:encoded><![CDATA[<p>I generally prefer reference books to introductory tests, so when I got the opportunity to read Kent Beck&#8217;s <a href="http://www.amazon.com/gp/product/0321146530?ie=UTF8&#038;tag=miltrm-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321146530">Test Driven Development By Example</a><img src="http://www.assoc-amazon.com/e/ir?t=miltrm-20&#038;l=as2&#038;o=1&#038;a=0321146530" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, I was really surprised how easy to read&mdash;dare I say fun?&mdash;it was.  It seems human brain is really set up to handle stories better than pure facts, and to enjoy them more&mdash;the book propels the reader through the text in no time, using the &#8220;what&#8217;s happening next?&#8221; feeling usually experienced only when reading fiction.</p>

<p>Taken from a very high level, most of the book is unsurprising: the basic idea of test-driven development can be explained in roughly five sentences, and the rest of the book follows naturally.  The book does show quite a few techniques and tips on using the test-driven methodology, and it&#8217;s useful to read them all in one place, although most programmers would eventually discover most of them independently&mdash;but did I mention reading the book was fun?</p>

<p>The third part of the book, titled &#8220;Patterns for Test-Driven Development&#8221;, deviates from the &#8220;telling a story&#8221; format, and the difference is quite noticeable.  Although the section is still interesting and useful, it tends a bit closer to the &#8220;patterns are so important the text must be repetitive and boring&#8221; style (of which <a href="http://www.amazon.com/gp/product/0201633612?ie=UTF8&#038;tag=miltrm-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0201633612">The Gang of Four book</a><img src="http://www.assoc-amazon.com/e/ir?t=miltrm-20&#038;l=as2&#038;o=1&#038;a=0201633612" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> is an instructive example) than I&#8217;d like.  One particular section, which describes a very nice way to replace an internal data representation without breaking anything (this single section is a good enough reason for me to recommend the book!), contains two five-step recipes in a &#8220;How&#8221; subsection, and a detailed description in the &#8220;Why&#8221; subsection. The immediately following sections use the same &#8220;How&#8221;/&#8221;Why&#8221; pattern, in most cases unnecessarily&mdash;culminating with a completely ridiculous &#8220;How do you add a parameter to a method?&#8221; three-step program.  Fortunately the &#8220;How&#8221;/&#8221;Why&#8221; pattern is gone in the next chapter.</p>

<p>I really missed a larger-scale example in the book; the examples provided very rarely contained a method longer than 10 lines, with roughly 3 lines being the average method size.  Splitting a real-world program in so many small pieces of code seems to me rather impractical&mdash;it requires introducing too many helper objects to hold variables, and holding too many additional concepts (e.g. method names, object relationships) in one&#8217;s head at a time to be able to think about the overall algorithm spanning perhaps 100 or 200 lines.  A larger-scale example that demonstrated how real-world code written using the test-driven development methodology could look like would be quite useful to evaluate the methodology in other terms than achieving outstanding test code coverage.</p>

<p>In any case, the book is interesting and fun to read &#8211; even if you &#8220;never have time to write tests&#8221;, don&#8217;t hesitate to read it if you get the opportunity.</p>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2009/test-driven-development-story-telling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The real competition in payment card interchange</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2009/the-real-competition-in-payment-card-interchange/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2009/the-real-competition-in-payment-card-interchange/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 14:24:09 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Economics]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=35</guid>
		<description><![CDATA[More competition brings consumers better products for lower prices &#8211; but be careful who the customers are.  Aneace Haddad points out that the competition in payment cards schemes is not for merchants, who will accept all major schemes anyway, and not for customers, who know their card will be accepted, but for banks &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>More competition brings consumers better products for lower prices &#8211; but be careful who the customers are.  <a href="http://aneace.blogspot.com/2007/05/will-sepa-unleash-genie-of-spiralling.html">Aneace Haddad</a> points out that the competition in payment cards schemes is not for merchants, who will accept all major schemes anyway, and not for customers, who know their card will be accepted, but for banks &#8211; and banks prefer the <em>highest</em> interchange fee, not <em>lowest</em>.</p>

<p>One more fact about interchange fees that should have been obvious &#8211; <a href="http://aneace.blogspot.com/2008/05/will-merchants-pass-interchange-fee.html">will merchants pass lower interchange fee to customers if their lobbying succeeds?</a>:</p>

<blockquote>If merchants pass along reductions to consumers, then their margins would be the same &#8211; so why all the cost and effort of lobbying the government to cut interchange? It doesn&#8217;t make sense. Of course they will keep the savings.</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2009/the-real-competition-in-payment-card-interchange/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes from CCC 2008</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2009/notes-from-ccc-2008/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2009/notes-from-ccc-2008/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 15:17:17 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=34</guid>
		<description><![CDATA[While attending CCC 2008, I was making notes, as usual (see DIMVA, DeepSec). Slides for some talks are available on talk pages in the Fahrplan, or try to find a recorded video.  I hope the notes are useful.



&#8220;Nothing to hide&#8221;


&#8220;Nothing to hide&#8221; does not make sense:


Where are the conference organizers keeping the money?
Who knows [...]]]></description>
			<content:encoded><![CDATA[<p>While attending <a href="http://events.ccc.de/congress/2008/">CCC 2008</a>, I was making notes, as usual (see <a href="http://carolina.mff.cuni.cz/~trmac/blog/2008/notes-from-dimva-2008/">DIMVA</a>, <a href="http://carolina.mff.cuni.cz/~trmac/blog/2007/notes-from-deepsec-2007/">DeepSec</a>). Slides for some talks are available on talk pages in the <a href="http://events.ccc.de/congress/2008/wiki/Fahrplan">Fahrplan</a>, or try to find a <a href="http://events.ccc.de/congress/2008/wiki/Documentation#Conference_Recording">recorded video</a>.  I hope the notes are useful.</p>

<p><span id="more-34"></span></p>

<h3>&#8220;Nothing to hide&#8221;</h3>

<ul>
<li>&#8220;Nothing to hide&#8221; does not make sense:

<ul>
<li>Where are the conference organizers keeping the money?</li>
<li>Who knows the passwords?</li>
</ul></li>
<li>We are somewhat &#8220;lucky&#8221;: weak WiFi cryptography allows &#8220;anonymous&#8221; internet connections</li>
<li>OLPC might be in violation of GPL because it does not give source code to children</li>
</ul>

<h3>The Trust Situation</h3>

<ul>
<li>Germany: if you don&#8217;t know what others know about you, you might adjust your
behavior (fear what they know), which is considered in conflict with being a
&#8220;free person&#8221;.</li>
<li>surveillance unaviodable => data protection law instead</li>
<li>people&#8217;s decisions are irrational heuristics, reduced number of hear-say &#8220;facts&#8221;,
bias towards own values / group values

<ul>
<li>people fear data isn&#8217;t protected, hide information pre-emptively</li>
<li>permanent databases: people hide illnesses, students with bad records give
up completely</li>
</ul></li>
<li>to make surveillance/data protection understandable, make it simpler, make data protection more
drastic/visible</li>
<li>that&#8217;s impractical => either allow people to avoid surveillance, or give up the
pretense of determining who keeps the data</li>
</ul>

<h3>Security Failures in Smart Card Payment systems</h3>

<ul>
<li>UK process:

<ul>
<li>card reports account #, &#8230;, magnetic strip data copy</li>
<li>receives transaction description, PIN</li>
<li>returns PIN verification result (handles incorrect PIN counter internally), authorization code</li>
</ul></li>
<li>magnetic strip data copy + PIN can be used for a fall-back transaction with
a cloned card</li>
<li>=> PIN entry device should be temper-proof, are certified (Visa, EMV, PCI, &#8230;);
VISA certification requirement: tampering requires >10 hours or >$25,000 per device</li>
<li>tamper resistance protects bank&#8217;s keys, not the PIN &#8211; which is transferred unencrypted</li>
<li>Dione Xtreme tamper-resistance:

<ul>
<li>tamper switch that wipes keys when device is opened, but easy to drill through in other places</li>
<li>CPU in epoxy, no tamper detection</li>
</ul></li>
<li>Ingenico:

<ul>
<li>tamper switch, protected by a steel plate with a sensor mesh around it</li>
<li>&#8220;buttons&#8221; that wipe the battery when the front panel is removed</li>
<li>meshes that detect PCB corruption</li>
<li>CPU wrapped in a sensor mesh</li>
<li>contains place for expansion cards, which can be used to hide a device;</li>
<li>screw holes for fastening the expansion cards are a hole in the mesh,  which can be used to tap the communication line</li>
</ul></li>
<li>or double-swipe => copy the mag stripe, then watch the PIN</li>
<li>or relay the communication from a &#8220;restaurant&#8221; to e.g. a diamond shop</li>
<li>possible improvements:

<ul>
<li>no copy of magnetic strip on chip</li>
<li>encrypted PIN communication &#8211; even if magnetic strip copy is already prohibited</li>
</ul></li>
<li>customer considered liable for PIN fraud per voluntary banking code =>incorrect incentives</li>
<li>certification contracted for by the manufacturer => incorrect incentives</li>
<li><a href="http://www.cl.cam.ac.uk/research/security/banking/ped/">More about this research</a></li>
</ul>

<h3>Hacking the iPhone</h3>

<ul>
<li>&#8220;application processor&#8221;, &#8220;baseband modem&#8221;: separate security system for each</li>
<li>application CPU:

<ul>
<li>OS: lobotomized OS X (<code>launchd</code>, system libs); shell is &#8220;SpringBoard&#8221;</li>
<li><code>lockdownd</code> = bridge for connecting between computer and iPhone sockets</li>
<li><code>/</code> &#8220;read-only&#8221;; <code>/private/var</code> read-write: only a logical distinction by FS</li>
<li>protection:

<ul>
<li>3rd party apps on user partition, signature necessary (verified by <code>execve()</code>), run as user <code>mobility</code> => cannot overwrite the system</li>
<li>kernel signed, writable only by <code>root</code></li>
</ul></li>
<li>boot process:

<ul>
<li>boot RPM loads &#8220;LLB&#8221; from a NOR flash</li>
<li>LLB loads image list, next stage, checks signature, runs iBoot</li>
<li>iBoot: populates device tree, loads kernel, executes it; checks signatures on everything</li>
</ul></li>
<li>LLB is not signature checked</li>
<li>boot abort:

<ul>
<li>downloads root &amp; kernel to ramdisk, uses it to reflash boot/kernel</li>
<li>more signatures, hashes, encryption&#8230;</li>
<li>when checking a recovery ramdisk signature, the  boot ROM contains a buffer overflow => can be exploited to load any ramdisk => patch anything</li>
</ul></li>
<li>mistakes: gradual roll-out that allowed learning about the system (old versions unencrypted, trusting the PC, running as <code>root</code>&#8230;)</li>
</ul></li>
<li>baseband:

<ul>
<li>boot: ROM=>boot loader => firmware; &#8220;Nucleus&#8221; kernel</li>
<li>no recovery mode => can be bricked</li>
<li>boot loader: allows serial payload if ROM is &#8220;blank&#8221;, there is a signature check</li>
<li>ROM checks boot loader&#8217;s signature</li>
<li>3 entry points: normal/service/trusted module</li>
<li>bugs in v1:

<ul>
<li>address computation bugs allowing overwriting &#8220;protected&#8221; areas</li>
<li>RSA implementaiton vulnerable to Bleichenbacher attack => can fake signatures</li>
</ul></li>
<li>v2: protected => patch loaded firmware in RAM instead of modifying the flash</li>
</ul></li>
</ul>

<h3>Advanced memory forensics: The Cold Boot Attacks</h3>

<ul>
<li><a href="http://citp.princeton.edu/memory/">Research homepage</a></li>
<li>RAM is not designed to erase on power off &#8211; there&#8217;s only a &#8220;noticeable probability&#8221; of bit flips</li>
<li>cold boot attacks:

<ul>
<li>deliberately crash a PC, then restore power to RAM and dump it</li>
<li>wake a sleeping/hibernated laptop (to a password prompt), then crash and restore power to RAM</li>
</ul></li>
<li>tools to dump after a reboot:

<ul>
<li>USB stick or network boot &#8211; to dump memory data</li>
<li>PXE is untrusted => PXE may be used to boot a dumper, which sends it to a broadcast address => the receiver of the dump is not necessarily identifiable</li>
</ul></li>
<li>detecting key schedules, correcting bit errors:

<ul>
<li>look at 8-byte aligned bits in memory, try to guess if it is a key; this can detect AES keys, supposedly regardless of implementation</li>
<li>RSA: even if only 70..75% bits are preserved, the rest can be recovered</li>
</ul></li>
<li>cooling:

<ul>
<li>only necessary when physically removing RAM from a PC (necessary if BIOS is &#8220;unfriendly&#8221; &#8211; e.g. clears RAM)</li>
<li>simply restarting at room temperature never lost enough data to prevent key reconstruction</li>
<li>even when moving RAM, cool canned air was enough, liquid nitrogen not necessary <img src='http://carolina.mff.cuni.cz/~trmac/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul></li>
<li>=> bugs:

<ul>
<li>BitLocker: basic mode writes key information to disk! => fully automated live CD</li>
<li>BitLocker with TPM: does not use TPM for all encryption, key is still in memory</li>
</ul></li>
<li>countermeasures:

<ul>
<li>turn laptops completely off when computer might get out of owner&#8217;s control (when going through US customs <img src='http://carolina.mff.cuni.cz/~trmac/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</li>
<li>require a password to boot external media (but chips can be simply moved to other computer)</li>
<li>destroy all key material at screen lock, suspend, hibernate &mdash; this can require significant software changes</li>
<li>ECC RAM: supposed to be cleared by a memory controller on boot, but that can be bypassed/reprogrammed to make the parity bits available => even more data available</li>
<li>encrypted memory (for DRM&#8230;, storing keys in tamper-proof HW)</li>
</ul></li>
<li>film script writers clueless: removing DIMM modules with tweezers, cold boot attack a SIM card</li>
</ul>

<h3>Why were we so vulnerable to the DNS vulnerability?</h3>

<ul>
<li>flaw history:

<ul>
<li>1999: DJB: 16b is not enough => response: if the TTL is ~1day, there won&#8217;t be enough opportunities to try guessing an ID</li>
<li>there are many ways to get around the TTL defense</li>
<li>if the attacker controls when the query happens, they can send the reply before the genuine one</li>
</ul></li>
<li>&#8220;in theory should not matter&#8221;</li>
<li>practice:

<ul>
<li>most web not encrypted</li>
<li>e-mail</li>
<li>other applications</li>
<li>41% of SSL certs self-signed</li>
<li>most non-browser network clients don&#8217;t even want a signed SSL certificate</li>
<li>automatic updates assume DNS is safe</li>
<li>SSL uses e-mail to authenticate certificate receivers</li>
<li>&#8220;forgot my password&#8221; systems bypass SSL authentication entirely</li>
</ul></li>
<li>attack method:

<ul>
<li>send an e-mail => DNS lookup for the receiver&#8217;s domain, attacker knows domain IP and port used by the DNS server, poisons it</li>
<li>&#8220;forgot my password&#8221; will send mail, poisoned => I&#8217;m an authenticated user => can insert PHP code => can own the box</li>
<li>(connection to database host poisoned as well)</li>
<li>not a bug in Drupal, &#8230;, anywhere &#8211; only DNS</li>
</ul></li>
<li>=> &#8220;need to stop using passwords and only use SSL client certificates&#8221;

<ul>
<li>sucks, expensive to manage, fail in some use cases</li>
<li>simply: passwords scale => they WILL be used</li>
<li>analogically: DNS scales => it WILL be used</li>
</ul></li>
<li>DNS is a good at &#8220;federation&#8221; &#8211; managing a shared name space without conflicts and without trust between users/participants (competing companies)</li>
<li>everything uses DNS to federate:

<ul>
<li>e-mail&#8217;s MX</li>
<li>web&#8217;s same origin policy</li>
<li>SSL/x.509: supposedly distributed, federated, &#8230;

<ul>
<li>how do you know which root CA to trust?</li>
<li>wildcard certificates difficult to acquire</li>
<li>not actually independent on DNS: CN=dns.name</li>
</ul></li>
<li>password reset e-mails</li>
<li>OpenID: uses same origin policy</li>
<li>SSL: uses e-mail to check user owns a domain</li>
</ul></li>
<li>DNS is reasonably secure as such and on input, but not on output (replies are not authenticated)</li>
<li>in practice: used for security ~everywhere because there&#8217;s no alternative</li>
<li>other problems in 2008:

<ul>
<li>VPN software uses SSL, but does not validate the certs</li>
<li>cookies received from <code>https://</code> are by default sent to <code>http://</code>, and almost nobody changes that</li>
<li>almost nobody authenticates downloaded code (Java, OpenOffice, iTunes, &#8230;)</li>
<li>Debian RNGs</li>
<li>SNPv3 flaw (Wes Hardakar): challenge-response protocol to authenticate users only verifies the first byte of the response!</li>
<li>unifying traits:

<ul>
<li>authentication problems</li>
<li>all simple bugs</li>
<li>fixes are hard to manage (dependencies, other customers, &#8230;; &#8220;I love buffer overflows&#8221; because the fix is always local)</li>
<li>the bugs &#8220;blend&#8221;:

<ul>
<li>DNS + SNMPv3 = MItM by reconfiguring a router to get the data to MItM</li>
<li>bad DNS works around Java socket connection restrictions => can use Java applets to attack SNMPv3</li>
</ul></li>
<li>all are very old problems, age does NOT predict quality</li>
<li>very slow and expensive to repair (DNS: nobody depends on the bug, 2 days to find, 8 months to fix; ~75% patched after a month)</li>
</ul></li>
</ul></li>
<li>theory: if DNS was completely secure, some of the design bugs wouldn&#8217;t matter

<ul>
<li>VPN software: software must be possible to ship as a test gear, when customers don&#8217;t have a SSL certificate, which would require communication between customer, vendor and certificate &#8211; too expensive and complex; but if DNS were secure, it could store an authentication hash</li>
<li>DNS cannot tell you that a site is HTTPS-only, so you must place a redirect on <code>http://</code> &#8211; which can be MItM attacked</li>
<li>automatic upgrades: would Just Work, but SSL is slow and does not scale => people use HTTP and screw up the authentication of the update (certificates&#8230;); DNS could be used to distribute hashes of new code</li>
<li>storing PGP in DNS => secure e-mail</li>
</ul></li>
<li>don&#8217;t blame business guys for poor design caused by needing to work-around DNS</li>
<li>&#8220;DNS was not designed for putting things in DNS&#8221;

<ul>
<li>DNS is already used for security &#8211; without secure DNS</li>
<li>federation: nobody can prohibit putting these things in DNS</li>
</ul></li>
<li>=> to do:

<ul>
<li>figure out how to make DNSSEC scale</li>
<li>migrate applications to use it</li>
</ul></li>
<li>how the fix was done:

<ul>
<li>identify critical players &#8211; Paul Vixie contacted them&#8230;</li>
<li>met in person &#8211; to force making a decision: Paul brought in engineers with decision-making capability</li>
<li>agreed to synchronize the release to avoid attacks on slow fixers</li>
<li>ground rules:

<ul>
<li>must secure &#8220;all names&#8221;</li>
<li>must secure all authoritative name servers, even if they don&#8217;t do anything => must be done in the recursive name server</li>
<li>must not alter DNS semantics (break anything): if only 1% fails, the patch will be rolled back</li>
</ul></li>
<li>easiest fix: DJB: source port randomization: slow, port conflicts when there are other services, problems with firewalls, some kernels don&#8217;t handle too many sockets open</li>
<li>alternatives:

<ul>
<li>TTL &#8211; but there are >=15 variants of TTL bypass, not comprehensive and won&#8217;t be (e.g.: query for unknown record type, flood with NXDOMAIN => DNS server must drop all caches => TTL bypassed)</li>
<li>use TCP: very bad performance</li>
<li>deploy &#8220;defense&#8221; only when an attack is observed &#8211; but DNS requests can be spoofed => defense becomes a DoS</li>
<li>resolve 2 or 3 times &#8211; breaks akamai</li>
<li>vary case in request, verify the reply is the same => extra bits &#8211; but a1.11111111 gives only 1 bit</li>
</ul></li>
</ul></li>
<li>should there be a midpoint between transition to DNS? somebody working on it</li>
<li>release handling:

<ul>
<li>talk to personal e-mail providers, the most expected attack targets</li>
<li>notified SSL CAs because they verify ownership using DNS</li>
<li>autoupdaters: underestimated how many were broken</li>
</ul></li>
<li>testing tool:

<ul>
<li>testing the DNS server used for HTTP, and for SMTP</li>
<li>letting clients test without cross-side scripting: for images loaded from a foreign domain, the image size is available => a side channel for cross-domain information retrieval.</li>
</ul></li>
<li>current state:

<ul>
<li>~75% name servers updated, probably won&#8217;t get much better</li>
<li>don&#8217;t know how many users are protected by this</li>
</ul></li>
<li>other bugs in trusting a gateway, there will be more?</li>
<li>thoughts on DNSSEC:

<ul>
<li>to be meaningful, root MUST be signed</li>
<li>how to make key signing scale? DNSSEC requires a lot of manual manipulation</li>
<li>registries and registrars must be able to do this without too much cost / &#8220;load&#8221;</li>
<li>DNSCurve (DJB)

<ul>
<li>requires on-line key signing (key available on DNS server), unline DNSSEC</li>
<li>registrars don&#8217;t have to do much</li>
<li>no code</li>
<li>new crypto: the proposed ECC is optimized for speed and non-standard</li>
<li>not proven, not specified</li>
<li>patent-encumbred</li>
<li>per-query crypto (not required by DNSSEC) => 100% CPU at 1/3 load of current systems</li>
<li>does not provide end-to-end trust:: secure only if directly talking to authority servers, not cachable => 100x load</li>
</ul></li>
</ul></li>
</ul>

<h3>Lightning talks (Tuesday)</h3>

<ul>
<li>lxde.org</li>
<li>anomos.info ~ encrypted, pseudonymous BitTorrent (assuming a trusted tracker)</li>
<li>privacyfoundation.de:

<ul>
<li>german privacy foundation: caused by investigations against Tor admins,</li>
<li>&#8220;Tor partnership program&#8221;: foundation legally owns and runs the server (needs root password)</li>
<li>training of police investigators</li>
</ul></li>
<li>openpgp card, with smart card reader required => &#8220;crypto stick&#8221; on USB; will release HW/SW as open source;
pre-order info@privacyfoundation.de, €30..40</li>
<li>OLSR-ng: mesh routing daemon</li>
<li>hacking botnets and stealing back stolen data

<ul>
<li>&#8220;fresh&#8221; USB stick contains a bot</li>
<li>~0.95M infected IPs, ~145k users online at one time</li>
</ul></li>
<li>hackable1.org: hackable:1: OS for OpenMoko</li>
</ul>

<script type="text/javascript"><!--
google_ad_client = "pub-6046180595278099";
//intra_content
google_ad_slot = "8173943729";
google_ad_width = 336;
google_ad_height = 280;
//--></script>

<p><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<h3>Climate Change &#8211; State of the Science (Stefan Rahmstorf)</h3>

<ul>
<li>simple energy balance (long-term): solar radiation &#8211; reflection of solar radiation = back radiation (= earth&#8217;s radiation out) => change incoming radiation, change reflectivity, or change back radiation</li>
<li>orbital cycles:

<ul>
<li>CO2 cyclically between 190..290 ppm in the past 4k years</li>
<li>currently we&#8217;re at >350ppm</li>
<li>orbit changes => glacial cycles</li>
<li>CO2 concentration rise caused by humans: we know how much we have emitted, the rise is only ~.5 of human emissions &#8211; the rest is mostly in the ocean, which is becoming acidic</li>
</ul></li>
<li>effects other than global mean temperature:

<ul>
<li>more frequent heat waves</li>
<li>precipitation changes (S Europe drying out)</li>
<li>sea level higher by ~.5..1m</li>
<li>cyclone strength possibly increasing</li>
</ul></li>
<li>what we want to do:

<ul>
<li>target 2° increase &#8211; still supposed to be practical &#8211; by reducing emissions to ~50% by 2050</li>
<li>a proposed plan for Europe, supposed to cost no more than now</li>
</ul></li>
</ul>

<h3>Attacking Rich Internet Applications</h3>

<ul>
<li>DOM-based XSS:

<ul>
<li>use values of DOM objects that can be influenced by the attacker, output them somewhere or <code>eval()</code> => XSS</li>
<li><code>document.URL</code>, <code>location</code>, <code>referrer</code>&#8230;</li>
<li>&#8220;sinks&#8221;: <code>javascript:</code> URIs, &#8230;</li>
<li>new &#8220;sinks&#8221;: CSS 3 selectors can read data from the page, will be able to read data from other pages in HTML5; <code>&lt;input&gt;</code> prefilling, style changes</li>
<li><code>document[</code>user_input<code>]</code> can access <code>document.cookie</code> (=> cookie stealing, session fixation); <code>[]</code> notation common in &#8220;packed&#8221; javascript</li>
<li>IE8 XSS filter: stops injections into JavaScript strings, but assignments are still allowed</li>
<li>injection into &#8220;nice&#8221; URLs: /path/to/my/Nice<em>name?&#8230; where $Nice</em>name = ../../../something</li>
<li><code>document.domain</code> controlling same-order policy</li>
<li>client-side SQL injection on client SQL storage</li>
<li>HTML injection inputs: facebook/myspace/IM/webmail, &#8230;:</li>
<li><code>document.getElementById()</code> uses <code>name=</code> as well in IE; returns the first matching object if >1 is there</li>
<li><code>document.getElementsBy</code>{<code>Tag</code>,<code>ClassName</code>} in IE[67] accepts <code>id=</code>, <code>name=</code></li>
</ul></li>
<li>control flow problems: unexpected condition evaluation (&#8221;is undefined&#8221; vs. &#8220;is 0&#8243;, etc.)</li>
<li>concurrency bugs: 1 thread per page, no support for locking; usually no shared state, but that might change</li>
<li>browser-based DOM XSS:

<ul>
<li>examining what cross-domain iframe can access in parent</li>
<li>Fx 2.0:

<ul>
<li><code>frame.history.go()</code> overridable</li>
<li>prohibited attempt to set frame.variable deletes it in the frame => can affect frame&#8217;s javascript variables/control flow</li>
<li><code>window.</code>{<code>top</code>,<code>opener</code>,<code>parent</code>,<code>frames</code>} overwritable</li>
</ul></li>
<li>IE7:

<ul>
<li>frame<code>.opener</code> can be overwritten, used e.g. by tinymce</li>
</ul></li>
<li>WebKit/Safari/Air:

<ul>
<li><code>__defineGetter__</code> on <code>history.</code>$something</li>
</ul></li>
<li>Opera: <code>window.top</code></li>
</ul></li>
<li>RIA to subvert html5: &#8220;too much accessibility&#8221;

<ul>
<li><code>&lt;input type=uri&gt;</code>, <code>&lt;input type=email&gt;</code>

<ul>
<li>stealing it: set <code>window.onkeydown</code>, on <code>enterKey</code> read value</li>
<li>force user to press &#8220;down&#8221; and Enter to get a value from user&#8217;s history: JavaScript game using arrow keys and Enter</li>
</ul></li>
</ul></li>
<li>CSS3: [attr^=val], [attr$=val], [attr*=val] matches parts of an attribute value, can be used to read attributes if we can control CSS</li>
<li>Google Gears:

<ul>
<li>user-controllable cache => allows cache poisoning, affects anything that caches the same data as soon as 1 page is XSSed</li>
<li>e.g. <code>google-analytics.com</code> affects &#8220;most of the web&#8221;</li>
<li>can run JS &#8220;threads&#8221; that load data from other domains => hosting user&#8217;s plain text, or even correctly marked XML lets them run in your domain&#8217;s context</li>
</ul></li>
<li>attacking Fx extensions: common vulnerabilities: <code>eval()</code> for JSON => network control implies code execution</li>
<li><code>opera:</code> scheme: all <code>opera:</code>* URLs have the same &#8220;origin&#8221;</li>
</ul>

<h3>Vulnerability discovery in encrypted closed source PHP applications</h3>

<ul>
<li>PHP bytecode: opcode, result, 2 operands, &#8220;extension&#8221;, source code line #</li>
<li>most bytecode encryptors don&#8217;t remove the line #</li>
<li>newer encryptors don&#8217;t decrypt &amp; pass to original executor, they contain a copy of the executor instead &#8211; but it still has the same structure &amp; same dispatch tables

<ul>
<li>find opcode table, patch it to record the opcodes, then reproduce the byte code</li>
<li>encrypt all op codes => have recorded versions; guess &#8220;optimized op codes&#8221; defined in the encryption</li>
</ul></li>
<li>checking byte code is sometimes simpler than grep &amp; inspect, more can be automated (including data flow analysis to find potentially dangerous constructs)</li>
</ul>

<h3>TCP Denial of Service Vulnerabilities</h3>

<ul>
<li>(originally wanted to find out what outfrost 24(?) found)</li>
<li>original design: end-to-end intelligence, attacks within the network unlikely</li>
<li>Paul Watson: TCP reset attacks: reset needs to guess a seq# within a window, which is quite easy with large windows

<ul>
<li>countermeasure: random seq# and source port</li>
</ul></li>
<li>connection backlog: to limit kernel memory usage

<ul>
<li>2 separate queues: SYN, ESTABLISHED (waiting for <code>accept()</code>)</li>
</ul></li>
<li>connection flooding (not SYN flooding) depends on application behavior => applications must:

<ul>
<li><code>accept()</code> fast enough</li>
<li>limit number of total connections &#8211; kernel doesn&#8217;t! &#8211; should be based onactual (kernel&#8217;s) memory consumption</li>
</ul></li>
<li>FIN_WAIT1: in kernel, can&#8217;t be controlled from user space, timeout is >= 7 min

<ul>
<li>timeout depends on round-trip time, which can e artificially enlarged => up to 16 min!</li>
</ul></li>
<li>peer can make sure the kernel&#8217;s send queue is very large => very large kernel memory consumption

<ul>
<li>if window size is 0, window probes are repeatedly sent, connection is never timed out!</li>
</ul></li>
<li>kernel: TCP<em>DEFER</em>ACCEPT in Linux: <code>accept()</code> only after data is available => if no data ever sent, stays in kernel queue</li>
<li>congestion control: can trick a high-banswidth host into exhausting their bandwidth:

<ul>
<li>send ACKs to prevent congestion detection</li>
<li>&#8230; even before receiving the packet to fake small RTT</li>
<li>fixes:

<ul>
<li>change TCP to prove the packets were received</li>
<li>drop a segment from time to time to check if peer is truthful</li>
</ul></li>
</ul></li>
<li>new possibilities:

<ul>
<li>open a connection, reach optimal connection window; set window to 0 (this does not change the congestion window!)</li>
<li>repeat N times</li>
<li>open all windows at once</li>
</ul></li>
<li>a burst can indicate full queue, but not really congestion => &#8220;shrew DoS&#8221;: can DoS by periodic bursts</li>
</ul>

<h3>Banking Malware 101</h3>

<ul>
<li>classical attack: only one credential per victim</li>
<li>banking trojan: &#8220;somehow&#8221; get a keylogger to victims, collect many credentials per victim</li>
<li>Nethell/Limbo trojan:

<ul>
<li>IE &#8220;Browser helper object&#8221; using COM</li>
<li>stores typed passwords, passwords stored &#8220;in the browser&#8221;, cookies</li>
<li>handles visual keyboards by sending screenshots around mouse click locations</li>
</ul></li>
<li>ZeuS/Wsnpoem/Zbot

<ul>
<li>injects itself into various system processes (services.exe, &#8230;)</li>
<li>grabs form field contents, injects arbitrary HTML code (e.g. to store some fields in forms, to ask for more personal information)</li>
<li>detection: uses specific mutex names</li>
</ul></li>
<li>others:

<ul>
<li>MBR modification</li>
</ul></li>
<li>finding drop zones:

<ul>
<li>honeypots, client-side honeypots: deliberately browsing the web to try to encounter malware</li>
<li>malware analysis: cwsandbox: execute in controlled environment, observe</li>
<li>some keyloggers only submit data after interesting data is collected or after IE is started => emulate human behavior</li>
</ul></li>
<li>statistics:

<ul>
<li>gigabytes of collected data, 1.5GB the largest one</li>
<li>drop zone lifetime ~2 months</li>
<li>German targets: Volks- und Reisenbanken, OSMP, Stantander, Fiducia, ABN AmroBank</li>
<li>underground prices: bank account: $10..$1k; credit cards: $.4&#8230;$20; full identities: $1..$15;, &#8230;</li>
</ul></li>
<li>protecting oneself:

<ul>
<li>patch quickly

<ul>
<li>do not click on suspicious links, open suspicious attachments</li>
</ul></li>
<li>anti-virus</li>
<li>Germany: mobile TAN (SMS with transaction description and TAN)</li>
<li>indexed TANs vulnerable to MitM &#8211; seen in the wild</li>
<li>in general, 2 factor auth helps</li>
</ul></li>
<li><a href="http://honeyblog.org/">honeyblog.org</a></li>
</ul>

<h3>Tricks: makes you smile</h3>

<ul>
<li>SQL injection &#8211; reading data by using an expression that returns an ID:
<code>select * ... where id =</code>(injectable):
collect a set of valid IDs, inject (i<em>want</em>to<em>know &amp; mask){1:id</em>1,2:id<em>2,3:id</em>3}</li>
<li>TIOCSTI: when root runs untrusted binary via sudo as a local user, it can inject commands run as root</li>
<li>copy&amp;paste of commands from HTML: visible commands may contain &#8220;invisible&#8221; text pasted into plain-text; this is browser-dependent</li>
<li>lazy DNS admin: if <code>local.</code>domain is 127.0.0.1, the same-origin policy can be circumvented</li>
<li>interesting targets for local file inclusion attacks:

<ul>
<li><code>/var/log/</code>*, <code>/tmp/sme_session_file</code>, <code>/proc/</code>..<code>./fd/</code>&#8230; (used if you don&#8217;t know file path), <code>/proc/</code>&#8230;<code>/environ</code> (affected by CGI headers), both especially with <code>/proc/self</code></li>
<li>some of that can have controlled content, which turns PHP inclusion into PHP execution</li>
</ul></li>
</ul>

<h3>Running your own GSM network</h3>

<ul>
<li>network authenticates a mobile device, but the device does not authenticate a network</li>
<li>don&#8217;t try this: GSM in licensed spectrum <img src='http://carolina.mff.cuni.cz/~trmac/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>network architecture:

<ul>
<li>intelligence in the network, not end nodes</li>
<li>GSM: TDMA => data sender/destination identified only by time slot</li>
<li>MS = mobile station (phone)</li>
<li>BTS = base transciever station &#8211; only a transciever, not &#8220;intelligent&#8221;; L1, parts of L2 &#8211; frame scheduling, &#8230;; slave to BSC</li>
<li>BSC = base station controller: most of decision making, controls BTSs, handles call handover between BSCs</li>
<li>MSC = mobile switching center: call switching, &#8220;interworking&#8221; with ISDN/POTS, inter-BSC call handover</li>
<li>HLR/VLR = home/visitor location register</li>
<li>BSC< ->BTS interface: A-bis: control E1 line, encoded voice data on other E1 lines (E1 = European ISDN primary rate interface: 32 TDM multiplex channels of 64 kbits)</li>
<li>speech/data: 64kb/s split into 4 16kb/s subchannels</li>
<li>speech: &#8220;full rate&#8221; 13kb/s (260b/20ms),  &#8220;half rate&#8221;, &#8220;enhanced speech codec&#8221;, &#8230;</li>
<li>&#8220;full rate&#8221; packeted into 16kb/s (320b/20ms) stream of &#8220;TRAU packets&#8221;</li>
<li>radio link layer: call control, mobility mgmt (roaming, handover, &#8230;), radio resoure mgmt, SMS</li>
</ul></li>
<li>Siemens BS-11 microBTS: 2G; documentation under NDA, but 99.9% of A-bis is standard</li>
<li>IMSI/IMEI skimming:

<ul>
<li>phone will pick strongest network &#8211; not home network!</li>
<li>can ask it for IMSI/IMEI, then reject them => they connect to their home network</li>
<li>=> can observe statistics of owner country, phone manufacturer</li>
</ul></li>
<li>&#8220;Egypt detection&#8221;: GPS is illegal in Egypt

<ul>
<li>=> if a phone sees an Egypt BTS, it disables GPS</li>
<li>=> if a BTS identifies as an Egyptian provider, it disables GPS on phones!</li>
</ul></li>
<li>MITM attack: can get an incoming call &#8211; but where do you route it?

<ul>
<li>for a &#8220;real&#8221; MITM you need very good control of a &#8220;mobile phone&#8221; component</li>
<li>routing through e.g. ISDN fairly easy &#8211; but easier to trace back</li>
</ul></li>
</ul>

<script type="text/javascript"><!--
google_ad_client = "pub-6046180595278099";
//intra_content
google_ad_slot = "8173943729";
google_ad_width = 336;
google_ad_height = 280;
//--></script>

<p><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<h3>eVoting after Nedap and Digital Pen</h3>

<ul>
<li>should be free, fair, general => need to be verifiable, transparent, secret:

<ul>
<li>secret => free, no vote selling</li>
<li>auditable => fair and honest</li>
<li>transparent => does not rely on authorities to ensure fairness, adds legitimacy</li>
</ul></li>
<li>transparency supposed to be mandatory (OCSE), approaches:

<ul>
<li>Germany: anyboty can observe election and counting (not necessary a citizen, &#8230;) &#8211; only restricted for safety and public order</li>
<li>Austria: parties can nominate 2 election witnesses per polling station</li>
<li>UK: parties can nominate witnesses, others can register for observation</li>
</ul></li>
<li>paper voting &#8220;white box&#8221; &#8211; does not do any processing;</li>
<li>e-voting: processing not observable, input is secret => output unauditable</li>
<li>reasons for e-voting:

<ul>
<li>cheaper</li>
<li>&#8220;already spent the money on equipment&#8221;</li>
<li>saves 1 hour of counting</li>
<li>more complex systems (cumulative voting, preferential, &#8230;) practical to implement</li>
</ul></li>
<li>fix suggestion: physical copies (paper trail, digital pen &#8230;):

<ul>
<li>what triggers recount, who decides what to audit, who has the copies? => fixes auditability, not transparency</li>
<li>to ensure correctness, # of audited stations may be very large when results are close (Hesse 2008: difference of ~1 vote / station)</li>
<li>what if they don&#8217;t match? which one is binding?</li>
<li>TEMPEST-proof printers impractical => problems with secrecy</li>
<li>printer reliability, vendors object</li>
</ul></li>
<li>=> suggest cryptography:

<ul>
<li>voter can verify his vote was correctly counted, but can&#8217;t prove his selection to others</li>
<li>all ballots have unique ID, all encrypted votes are published, voter can verify his vote is on list</li>
<li>does not protect against ballot stuffing</li>
<li>does not allow external observers</li>
<li>how many voters need to cooperate to prove fraud?</li>
<li>if I know somebody won&#8217;t check (e.g. by adding a trash and collecting receipts), can I change the vote?</li>
<li>can the system be decrypted? by whom?</li>
<li>what if vote ID actually identifies something about voter?</li>
<li>what if multiple voters receive the same receipt? then there are free IDs for vote stuffing</li>
</ul></li>
<li>ThreeBallot:

<ul>
<li>3 columns per candidate, mark chosen twice, the others once</li>
<li>machine verifies the ballot is valid</li>
<li>get copy of 1 column chosen by the voter => each voter can verify 1/3 of their vote is correctly counted, we assume the counter does not know which 1/3 will be verified</li>
<li>not coercion free: vote buyer can ask for a specific pattern, then verify the pattern was published</li>
<li>serial #</li>
<li>checker/copy mechanism is trusted</li>
<li>user-unfriendly</li>
</ul></li>
<li>randomized partial checking:

<ul>
<li>permute votes/&#8221;connection&#8221;/result:</li>
<li>for each connection, publish one side of the connection => 50% chance of uncovering a vote flip for each vote => 2**(-n) probability of vote flipping</li>
<li>[commitment protocol: can commit to a secret, publish a "verification", then can prove the secret]</li>
</ul></li>
<li>punchscan:

<ul>
<li>individual vote sheets: random # for each candidate on top sheet + holes, random number in different order on bottom sheet => mark both top and bottom sheet, take 1 home, vote with the other &#8211; connected by serial #</li>
<li>neither sheet allows proving a vote</li>
<li>does not prevent coercion: with 2 candidates, can require voting for 1 with only 33% probability of successful opposite vote</li>
</ul></li>
<li>scantegrety 1,2</li>
<li>bingo voting:

<ul>
<li>prepare a random number for each (voter,candidate), commit to the selection</li>
<li>voter selects candidate, trusted RNG generates a random #</li>
<li>receipt with fresh random # for chosen candidate, # from committed list for others => can count unused random #s</li>
<li>publish results, all receipts, unused dummy votes, randomized proof that ..[sommething]</li>
<li>votes can be stolen if a RNG is controlled: can return two identical receipts for two votes with same candidate, then vote in any way instead => have to trust the RNG</li>
<li>commitments must be shared, can observe where they were not downloaded&#8230;</li>
</ul></li>
<li>risk of insecure implementation</li>
<li>if later discovered insecure, can&#8217;t un-publish records => secrecy risk</li>
<li>can&#8217;t verify a system runs the code, &#8230;</li>
<li>voting authority can publish manipulated data => vote will be considered tampering</li>
<li>too many different candidates in practice, implementation difficulties: mark 1836 rows once, 93 twice <img src='http://carolina.mff.cuni.cz/~trmac/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , similar for other cases&#8230; => unusable exactly where e-voting is useful</li>
<li>who actually understands the math and challenge/evaluate a challenge of the system?</li>
</ul>

<h3>An introduction to new stream cipher designs</h3>

<ul>
<li>stream cipher = something that generates a keystream (a sequence of random-looking data), which is used to XOR the cleartext

<ul>
<li>input = key, IV</li>
</ul></li>
<li>security assumptions: attacker can choose IVs, knows algorithm</li>
<li>main attacks:

<ul>
<li>distinguishing: distinguishing keystream from true random source</li>
<li>recover internal state of the cipher &#8211; or even the secret key</li>
</ul></li>
<li>RC4

<ul>
<li>very fast, simple</li>
<li>output can be distinguished from random, </li>
<li>hard to use correctly,</li>
<li>large state, not suitable for HW</li>
<li>unspecified IV handling</li>
<li>&#8220;don&#8217;t use, there are better options&#8221;</li>
</ul></li>
<li>AES-CTR: &#8220;AES in counter mode&#8221;:

<ul>
<li>standard, reasonable resource requirements</li>
<li>everyone tries to attack it</li>
</ul></li>
<li>rest:

<ul>
<li>lots of bad poprietary ciphers:</li>
<li>A5/[12] in GSM: broken</li>
<li>E0 in bluetooth: broken</li>
<li>MIFARE classic, LEELOQ: broken</li>
<li>EU NESSIE: all broken</li>
</ul></li>
<li>eSTREAM: EU-funded research, to create something demonstrably superior to AES at least in 1 aspect

<ul>
<li>34 submitted ciphers, about half broken</li>
</ul></li>
<li>profile 1: for SW implementation: key >=128b, IV 64 or 128b

<ul>
<li>HC-128: resembles RC4, reuses SHA-256, fast (2-4 cycles/byte, AES has 15-30), very slow for small inputs

<ul>
<li>Rabbit: had patent issues, now public domain; RFC 4503, fast on long streams</li>
<li>Salsa20/12: by djb</li>
<li>SOSEMANUK: reuses SNOW 2 and SERPENT</li>
</ul></li>
</ul></li>
<li>profile 2: for HW implementation in small embedded devices

<ul>
<li>Grain v1: compact, can be unrolled X &#8220;tight security margin&#8221;</li>
<li>MICEKY 2: slow, large</li>
<li>Trivium: fast, large state, simple</li>
<li>(F-FCSR-H: broken)</li>
</ul></li>
<li>NIST SHA-3 competition:

<ul>
<li>17/51 in the first round broken&#8230;</li>
</ul></li>
</ul>

<h3>Analyzing RFID Security</h3>

<ul>
<li>challenge-response authentication:

<ul>
<li>card->reader: ID, Random_c</li>
<li>reader->card: Encrypt(Random<em>c), Random</em>r # authenticates reader</li>
<li>card->reader: Encrypt(Random<em>c, Random</em>r) # authenticates card</li>
</ul></li>
<li>proxy/relay attack:

<ul>
<li>MITM: emulate a reader for a card, and a card for a reader</li>
<li>by measuring travel time one can limit attack distance to ~30m, but that&#8217;s expensive and not implemented</li>
<li>&#8220;always possible&#8221;</li>
</ul></li>
<li>emulation: spoof &#8220;unique&#8221; data such as card ID

<ul>
<li>some &#8220;authentication&#8221; systems only use card ID, do not do any card auth!</li>
</ul></li>
<li>replay: if we can force a known challenge

<ul>
<li>generating random numbers in RFID is rather difficult &#8211; no state, no memory</li>
<li>Mifare: completely predictable random numbers (known LSFR)</li>
</ul></li>
<li>crypto attacks:

<ul>
<li>brute force, try many keys at once, the same with SAT solvers</li>
<li>Mifare: FPGA cluster brute forces key in 50 minutes!</li>
<li>rainbow tables: trade off space vs. time: 48 bit (mifare) is very doable; anything below 64 bits possible</li>
<li>algebraic attack: describe weak parts as equations, brute-force complex parts, solve the result using a SAT solver (MiniSAT) to get the key [e.g. guess a few bits of the key - most guesses will be unsatisfiable, then we can continue or just solve the equations]</li>
</ul></li>
<li>market overview &#8211; insufficient security: Mifare Classic, Hitag2, some Legic, some HID, Atmel CryptoRF, Atmel CryptoMemory</li>
<li>proposed mitigation for Mifare Classic:

<ul>
<li>signing: strongly authenticate data</li>
<li>radio fingerprinting to detect emulation</li>
</ul></li>
<li>#1 enemy of RFID: vandalism (supposedly by people forced to use it?)</li>
</ul>

<h3>DECT</h3>

<ul>
<li>cordless phones, wireless ISDN access, baby phones, remotely controlled door openers, traffic lights(!); ~30m base stations in Germany</li>
<li>FP = fixed part, PP = portable part; RFPI = radio FP identity, IPUI = international portable users identity; DSC = DECT standard cipher, DSAA = DECT standard authentication agorithm; UAK = user authentication key (shared between handset and base station)</li>
<li>DECT: digital, 10 channels in EU, 5 in US, 24 time slots per channel (12 up, 12 down)</li>
<li>scrambling: &#8220;data&#8221; xored with a LSFR output; LSFR public</li>
<li>encryption: both control and data XORed with a DSC stream</li>
<li>FP is broadcasting network info, scanning for PP activity</li>
<li>PP: list of carriers, select beset carrier/slot, open connection,&#8230;</li>
<li>sniffing: stations not synchronized, no packet source/destination, don&#8217;t know on which channel/slot is used by PP to open connection, frame # must be known for descrambling => ~2GHz CPU required, €1000

<ul>
<li>PCMCIA card ComOnAir: €23, low CPU requirements</li>
</ul></li>
<li>DECT security:

<ul>
<li>phone authentication based on UAK, challenge, FP&#8217;s challenge (to handle roaming)</li>
<li>network authentication based on UAK, challenge, &#8230;</li>
<li>hardwired in phone (not chip card)</li>
<li>encryption uses phone authentication data + IV</li>
<li>all algorithms in DSAA hardwired, secret</li>
<li>sometimes no authentication, no encryption at all</li>
<li>sometimes network does not authenticate to phone</li>
<li>sometimes authentication OK, but no encryption</li>
</ul></li>
<li>passive voice sniffing when no encryption is used: €23 total cost</li>
<li>voice sniffing when encryption is used:

<ul>
<li>impersonate a base station &#8211; most phones won&#8217;t abort connection if the base station does not abort!</li>
<li>need to know the base station&#8217;s and phone&#8217;s ID;</li>
</ul></li>
<li>DSAA algorithm: uses for authentication, key generation, UAK generation

<ul>
<li>secret, reverse engineered: A12,A21,A22 simple wrappers around A11,</li>
<li>A11: 4 different block cipher invocations</li>
<li>&#8220;cassable&#8221; block cipher:

<ul>
<li>6 rounds, last does not use key => 5 effective rounds</li>
<li>differential attack: with 16 chosen input-output pairs, 2^37 invocations (and other attacks)</li>
</ul></li>
</ul></li>
<li>DSC: secret &#8211; but parts patented => public &#8230; and mostly reverse-engineered</li>
<li>UAK: 4-digit PIN, depends on RNG, &#8230;; some implementations use very low-entropy RNG => impersonate handsets, decrypt calls, &#8230;

<ul>
<li>few DECT stacks actually used, equipment manufacturer&#8217;s code can be used to identify</li>
<li>prepaired phones: can read UAK from EEPROM? most have test contacts in battery case&#8230;</li>
</ul></li>
</ul>

<h3>Attacking NFC mobile phones</h3>

<ul>
<li>RFID, modes:

<ul>
<li>reader/writer; most often used</li>
<li>card emulation</li>
<li>peer-to-peer (two NFC devices)</li>
</ul></li>
<li>range: ~4 cm, data transfer up to 424 kb/s</li>
<li>usage: touch tag with phone=> launch web browser, initiate voice call, send SMS, store vCard/vCal/note, set alarm, &#8230;, launch custom application</li>
<li>no link security (unecrypted wireless)</li>
<li>NFC data exchange format:

<ul>
<li>new subformat: SmartPoster = uri with title and optional icon, recommended action (execute, save for later, open for editing), &#8230;</li>
</ul></li>
<li>Nokia xxx:

<ul>
<li>reader always active unless phone in standby</li>
<li>NFC tag handled by running application, or by phone</li>
<li>application can register for specific data types (if not reserved type)</li>
</ul></li>
<li>NFC phones are typically not smart phones => limited SW, attacks mostly based on social engineering</li>
<li>Mifare classic tag: 720 or 3408 bytes of payload

<ul>
<li>per-sector configurable R/W mode, controlled by 48-bit keys</li>
<li>attempts to write to sectors, brute-force keys: 10 keys/s</li>
</ul></li>
<li>Nokia: browser fetches the URL &#8211; ignores &#8220;action&#8221;</li>
<li>URI spoofing: GUI mixes informational text and control data => can trick the user to open unintended URLs by storing a fake URL in the informational text, then padding it to hide the original URL.

<ul>
<li>URL not displayed in the browser => easy to run a proxy that captures account info; only part displayed => can do &#8230;@&#8230; (produces a broken HTTP request, but that can be worked around; can not use / in username@, need to use &#41;</li>
<li>same for spoofing 0900 phone #</li>
<li>sending SMS same, but the SMS URL and text is shown => can be noticed</li>
<li>actually documented in the spec!</li>
<li>most fixed in recent phones</li>
</ul></li>
<li>application can register for an URI => can intercept all tag read events for URI tags</li>
<li>use writable tags to install MIDlets (JARs): no security warning on install, only on execution</li>
<li>fuzzing:

<ul>
<li>need manual moving the tag between writer and reader&#8230;</li>
<li>phone switches off after 4 crashes in a row</li>
</ul></li>
<li>&#8220;survey&#8221;:

<ul>
<li>most services don&#8217;t require an extra application, all use Mifare Classic 1k</li>
<li>Wiener Linien: send a SMS to buy a ticket; tag read-only, but can stick a tag over it to send to other #</li>
<li>Selecta vending machine: sending a SMS to pay: can take tag from other machine, copy it and put it on other machines, then wait for a snack paid for by other people <img src='http://carolina.mff.cuni.cz/~trmac/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>OBB-Handy ticket (trains): station encoded into URL => by replacing a tag can track users</li>
<li>RMV Handy (Frankfurt): requires application install, NFC is non-essential; use custom record for station ID and name, public signature X signature only protects data, can copy the tag and put it elsewhere; URI for time table only visible if application is not installed</li>
</ul></li>
<li>ConTag tags are not &#8220;truly&#8221; read only

<ul>
<li>can overwrite data if key B is broken</li>
<li>unused sectors left unlocked => can change keys for these sectors, then store my data</li>
</ul></li>
<li>tag attacks: stick an attacker&#8217;s tag over the original tag (shield the original off, or &#8220;fry&#8221; it); tag costs €1.2 in small quantities</li>
<li>when storing a new value to a tag via a phone, old data is not cleared?</li>
<li>DoS / discredit the system: write &#8220;problematic&#8221; content (phone crashers) on tags, stick them around</li>
<li>Nokia Bluetooth imaging: send selected picture from phone to a Bluetooth device specified in the tag

<ul>
<li>activates Bluetooth if disabled!</li>
<li>simple MitM by replacing a tag with my bluetooth MAC, then forwarding the data to original</li>
</ul></li>
<li>Java/Nokia allow quite low-level access, even for talking to smartcards</li>
</ul>

<h3>Why technology sucks</h3>

<ul>
<li>&#8220;technology cannot solve problems created by politicians/accountants/&#8230;&#8221;</li>
<li>&#8220;technology does not create problems, only make them more urgent&#8221;</li>
<li>&#8220;ov-chipkaart&#8221;: public transport in Netherlands

<ul>
<li>paper tickets: revenue distribution does not reflect usage, nobody knows how many tickets are left unused, people afraid on the train (fare dodgers?)</li>
<li>=> chip card, works as an e-ticket: check in on entry, check out when leaving</li>
<li>can observe each user traveling; supposedly have to keep records for tax reasons for 7 years => available to prosecutors</li>
</ul></li>
<li>logging of internet accesses&#8230;</li>
<li>&#8220;smallmail&#8221;: &#8220;e-mail replacement&#8221;, connecting using TLS over Tor

<ul>
<li>anonymous servers, accounts &#8211; using Tor</li>
<li>suggestion: use more mailboxes (1 for each &#8220;group&#8221;) on different servers to make correlation attacks more difficult</li>
</ul></li>
<li>smallsister.org</li>
</ul>

<h3>Predictable RNG in the vulnerable Debian OpenSSL package</h3>

<ul>
<li>predictable for 2 years</li>
<li>can brute force:

<ul>
<li>challenge-response auth (server depends on client&#8217;s RNG security!):

<ul>
<li>countermeasures: detect weak keys, remove them; Debian&#8217;s ssh can reject them automatically</li>
</ul></li>
<li>MitM: if the server&#8217;s cert is weak

<ul>
<li>survey: ~3% of CA-signed certs are weak</li>
<li>most browsers don&#8217;t check for cert revocaiton (only IE in Vista)</li>
</ul></li>
<li>DH

<ul>
<li>attacking Apache: each connection has a different state => need to capture <em>all</em> connections in order to recover state</li>
</ul></li>
<li>DSA: depends on RNG security of <em>all</em> signature operations</li>
</ul></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2009/notes-from-ccc-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Management-speak</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/management-speak/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/management-speak/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 05:07:35 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=33</guid>
		<description><![CDATA[Just saw this: &#8220;Leverage use of &#8230;&#8221;.

I fully expect to see &#8220;Leverage leverage of &#8230;&#8221; within a year.
]]></description>
			<content:encoded><![CDATA[<p>Just saw this: &#8220;Leverage use of &hellip;&#8221;.</p>

<p>I fully expect to see &#8220;Leverage leverage of &hellip;&#8221; within a year.</p>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/management-speak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes from DIMVA 2008</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/notes-from-dimva-2008/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/notes-from-dimva-2008/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 13:53:19 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/?p=32</guid>
		<description><![CDATA[While attending DIMVA 2008, I was making notes, like when attending DeepSec last year.  Slides from the talks are currently not available, the web site only lets you buy the proceedings.  I hope the notes are useful.



Dynamic Binary Instrumentation-based Framework for Malware Defense

Presents a mechanism of running untrusted programs using dynamic binary instrumentation [...]]]></description>
			<content:encoded><![CDATA[<p>While attending <a href="http://www.dimva2008.org/">DIMVA 2008</a>, I was making notes, like when attending <a href="http://carolina.mff.cuni.cz/~trmac/blog/2007/notes-from-deepsec-2007/">DeepSec</a> last year.  Slides from the talks are currently not available, the web site only lets you buy the proceedings.  I hope the notes are useful.</p>

<p><span id="more-32"></span></p>

<h3>Dynamic Binary Instrumentation-based Framework for Malware Defense</h3>

<p>Presents a mechanism of running untrusted programs using dynamic binary instrumentation (using <a href="http://rogue.colorado.edu/pin/">Pin</a>).  Two separate Xen domains / VMWare hosts are used: a testing environment, in which the program is instrumented to collect information about execution traces and basic blocks, and a production environment, which uses a generated policy to make sure the program does not deviate from previously observed behavior.</p>

<p>The program is run in the testing environment (using automatically-generated and manually-prepared inputs), and execution traces (information about basic blocks and input data, e.g. system call arguments) are generated.  These traces are searched for specified malicious behavior, and a &#8220;policy&#8221; that describes allowed traces is generated.  Execution in the testing environment is roughly 26× slower, but it was implied this step can be performed in the background or perhaps by a trusted server.</p>

<p>In the production environment, the instrumentation is much lighter, and verifies the program is using only the allowed traces (traces that were not observed in the testing environment cause stopping the program).  The overhead is roughly 20%.</p>

<p>The main drawback is that unexpected traces in the production environment were observed in 6.8% of executions, which is way too high.  The paper also does not mention anything about the size of the policy, I guess this might be a problem for multi-megabyte executables.  Overall, I don&#8217;t know what this achieves compared to running the application in some kind of sandbox&mdash;a sandbox that has less than 20% overhead sounds very plausible.  Some concerns were also presented about the possibility of malware detecting that it is being instrumented.</p>

<h3>Learning and classification of malware behavior</h3>

<p>Attempts to classify malware by their observed behavior (e.g. names of open files or created registry keys).  Automatic clustering of observed behavior does not give very good results, so attempt to &#8220;machine learn&#8221; labels assigned to the malware by COTS anti-virus products.  When learning, generalize some operations (e.g. recognize <code>open("\\windows\\system\*")</code> each time <code>open("\\windows\\system\\abcdef")</code> is recognized) to capture common patterns.</p>

<p>The model created by machine learning can be used to extract the common features of the malware family (e.g. mutex name used by the worm).  The model can identify new variants of existing family of malware with 69% accuracy; when fed benign Windows binaries, all were correctly categorized as &#8220;unknown&#8221;.</p>

<h3>Data space randomization</h3>

<p>A source-to-source transformation that encrypts almost all data by XORing it with a random mask, using different masks for different objects if they do not alias through pointers, so an overflow of one buffer does not give the attacker control of other data.  Execution overhead is 15% on average, up to 30%.</p>

<p>Only &#8220;overflow candidates&#8221; are XORed, the rest (scalars of which address is not taken) is physically separated using PROT_NONE pages (I&#8217;m worried what this would do to stack requirements, and the cost of mprotect() might be higher than the cost of encryption in some cases).</p>

<p>Currently does not handle shared libraries (a common aliasing model would have to be computed when loading the library, which might result in replacing several distinct masks by a single mask&mdash;especially difficult when loading the libraries at run-time and the distict masks were already used).  It is also likely that with <code>void *</code> or <code>char *</code> pointers and very large-scale software, especially if no source code is available for some libraries, eventually all or almost all data would alias and the protection caused by using different masks for different variables would vanish.</p>

<h3>XSS-GUARD: Precise Dynamic Prevention of Cross-Site Scripting Attacks</h3>

<p>A transformation of Java <code>.class</code> files of web applications to create a &#8220;shadow&#8221; web page while creating the &#8220;real&#8221; output page.  The shadow page contains the same literal strings as the real page, and safe data (<code>aaaa</code>) instead of any variables.  Thus the shadow page has the same general structure as the real page, but it does not contain any successful XSS attacks&mdash;and because the safe data has the same length as the variable string written to the real page, matching document structure between the shadow and real pages is easy.</p>

<p>A Firefox parser is then used to search for scripts (in all the possible places) on the real page.  If the corresponding script is not found on the shadow page, an XSS attack was detected.  If a script was found, but it is not literally the same (e.g. when generating JavaScript data), the script is parsed and its syntactic structure is compared to detect XSS attacks.</p>

<p>The performance overhead is up to 14% when comparing strings, up to 42% when parsing JavaScript is necessary; considering this eliminates all XSS attacks (unless the target browser is parsing HTML differently and detect scripts in more places), this might very well be worth it.</p>

<h3>VeriKey: A Dynamic Certificate Verification System for Public Key Exchanges</h3>

<p>A policy that doesn&#8217;t show the user an &#8220;unknown SSL certificate&#8221; dialog.</p>

<p>If the server provides a certificate signed by a trusted CA, accept it if its hostname has the same TLD (solving the <code>https://paypal.com/</code> vs. <code>https://www.paypal.com/</code> problem), reject it if the hostname has a different TLD.  There&#8217;s a risk of crossing trust boundaries if the TLD has subdomains with separate owners&mdash;the classic &#8220;<code>.co.uk</code> is not a TLD&#8221; problem.</p>

<p>If the certificate is not signed by a trusted CA, use a trusted set of verification servers to connect to the SSL server, and compare the certificate returned by each.  If the verification servers are located worldwide, and selected to share as little common routes with the client and each other as possible, this prevents a MITM near the client (e.g. by the WiFi network provider), and makes a large-scale MITM difficult to implement because it would have to attack many distinct paths &#8211; unless the MITM happens very near the server (e.g. on the router of the server&#8217;s LAN), in which case no attack is detected.</p>

<p>Overall, this is less secure than ideal SSL, probably more secure than how SSL is used in practice even by IT-savvy people, and much more secure than how SSL is used by barely-knowledgeable computer users.  Sending names of SSL servers to the verification servers has privacy implications, and it&#8217;s not clear who would build such an extremely-trusted verification server network &#8211; perhaps some global companies for internal use.  The technique can be implemented in a browser, or at a LAN proxy by installing the proxy&#8217;s CA certificate on clients and letting the proxy &#8220;perform a MITM&#8221; and give clients connections signed by the proxy&#8217;s CA instead of the original connections with self-signed certificates; I&#8217;m not sure whether this would work with client certificates.</p>

<script type="text/javascript"><!--
google_ad_client = "pub-6046180595278099";
//intra_content
google_ad_slot = "8173943729";
google_ad_width = 336;
google_ad_height = 280;
//--></script>

<p><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<h3>Keynote talk: &#8220;The Future of Network Security Monitoring&#8221;</h3>

<p>Various observation from the speaker&#8217;s job at GE.</p>

<ul>
<li>In the real world, security is not a 100% requirement, only a trade-off: &#8220;Is it acceptable that x% of your laptops is under remote control?&#8221; &mdash; &#8220;What&#8217;s the cost?&#8221;  It is therefore important to have hard data on security.</li>
<li>Companies focus on easy-to-measure but irrelevant &#8220;input&#8221; metrics (such as unpatched systems or systems with latest anti-virus update installed) instead of the &#8220;ouput&#8221; metrics (intrusions detected) and metrics that truly affect outputs.</li>
<li>Anti-virus software is &#8220;very&#8221; vulnerable, and widely installed, so it might be worth it not to install any&mdash;it is certainly not obvious that it should be installed.  (&#8221;If one AV is good, why not two or three?&#8221;)</li>
<li>The saying that &#8220;80% of intrusions is caused by insiders&#8221; is not backed by any hard data, the last reference is a 1986 study.</li>
<li>BGP hijacking is very common, IP addresses are not always reliable.</li>
<li>Windows OS security is getting better recently, the biggest problem is currently third-party Windows applications.</li>
<li>&#8220;Where else do victims investigate their own crime scene?&#8221;</li>
<li>(&#8221;Eating carrots improves night vision&#8221; is marginally true, but not significant;  It is a popular knowledge because it was published by UK war propaganda to divert attention from the fact they have invented a radar.)</li>
</ul>

<h3>On Race Vulnerabilities in Web Applications</h3>

<p>Common race conditions (&#8221;x = read(A); write(A, X + 1)&#8221; without any locking) are quite common in web applications because programmers don&#8217;t think about them as parallel programs.  PHP does not support any locking mechanism, depends on locks in the database.</p>

<p>The authors have written a tool that logs SQL queries performed in PHP and analyzes them off-line to discover interdependencies (write after a read of the same attribute).  Heuristics are used to avoid false positives caused by disjoint WHERE clauses (a constraint solver can be used to check whether WHERE clauses are disjoint, but not in the general case&mdash;it cannot handle nested queries).  The tool does not support database synchronization primitives and does not examine anything but SQL.</p>

<p>The tool has detected around 40 race conditions in common software (WordPress, phpBB), a few of them are security vulnerabilities.</p>

<h3>On the Limits of Information Flow Techniques for Malware Analysis and Containment</h3>

<p>&#8220;Information flow technique&#8221; means observing how values are copied between variables, and determining whether a security-sensitive variable can be modified by untrusted data.  The article argues that the tools to detect information flow might be useful for &#8220;regular&#8221; programs, but are very easy to defeat by malware&mdash;e.g. using control flow to transfer data instead of copying variable values explicitly.</p>

<h3>Embedded Malware Detection using Markov n-grams</h3>

<p>&#8220;Embedded malware&#8221; = malware in &#8220;data&#8221; files; anti-virus software searches only some portions of files because searching them thoroughly would be too slow.  Signature-based techniques are not even sufficient in some formats because the data might be split in several chunks in the file.  (I guess the typical embedded malware would be based on an exploit of the data format decoder.)  A detector that can quickly scan the whole file to suggest likely malware locations is proposed.</p>

<p>The detector is based on comparing the probability of 2-byte sequences with their conditional probability based on 1-byte probability; it produces very significant distinguishing values for malware (with a cutoff at 5σ).</p>

<p>(The best results were on data formats that are mainly used for compression, such as MP3 or JPEG.  It seems to me that the detector is basically searching the compressed data, which should be fairly similar to white noise, and looking for structured data.)</p>

<h3>Keynote talk: &#8220;From Virtual Machines to Virtual Infrastructure: How Virtualization is Reshaping the Enterprise and What this Means for Security&#8221;</h3>

<p>A large part was an introduction to/advertisement for virtualization.  Security-related observations:</p>

<ul>
<li>The increased flexibility removes some obstacles that previously prevented increases of system/network complexity.</li>
<li>It is easy to keep running old software versions in VMs</li>
<li>Many &#8220;transient&#8221;, currently unnecessary VMs may be kept suspended and only running from time to time, so one-time infections may reappear, patches/anti-virus updates are applied late, and remote vulnerability scans do not find the suspended VMs.  VM suspension also makes it difficult to expire passwords and keys.</li>
<li>It is now possible to place VMs in a separate virtual network while installing patches&mdash;or install them &#8220;off-line&#8221; on the VM image.</li>
<li>Machine owner might not be as clear as in the physical world, people may clone VMs and give them to each other; in the extreme it might be necessary to disconnect a physical machine if the VM administrator can not be found.</li>
<li>Stateful firewalls might have problems with VM mobility</li>
<li>VM data may be left behind on hosts after migration, even if it is security-sensitive&mdash;and the VM can not control this.</li>
<li>VM rollback may interfere with external state (e.g. Windows machine passwords)</li>
<li>VM rollback allows &#8220;impossible&#8221; replay attacks (e.g. S/Key authentication can be replayed after rollback)</li>
<li>A VM may generate the same random numbers after rollback, which might be used to generate all sorts of keys.</li>
<li>Inter-VM traffic is not observable on the internal LAN, so IDS must be on the network edge</li>
<li>Plans to move IDS/anti-virus outside the VM to make it less vulnerable to attacks from within the VM</li>
<li>Encrypted inter-VM communication can be observed by reading the internal state from the VM (can be used to observe encrypted malware communication)</li>
<li>Recording/replaying VMs is quite cheap (56 Kb/s + 5&ndash;15%CPU), can be used for foresics</li>
</ul>

<h3>Expanding Malware Defense by Securing Software Installations</h3>

<p>Installation is attractive because it is run as administrator.</p>

<p>The system runs installation in a sandbox, checks the results using a policy (e.g. &#8220;does not overwrite files owned by other packages&#8221;), then copies the installed files over from the sandbox and modifies the executables to execute in another sandbox.</p>

<p>(IMHO malware running as an user can do enough harm, and is much simpler to install, making the total risk at least comparable to installing software as an administrator.  Especially in the chosen Linux distribution platform, vast majority of system-wide installed software probably is either present in the distribution (thus implicitly trusted) or business-critical (e.g. Oracle), and there&#8217;s comparatively little demand for permanently running installed software in a sandbox.)</p>

<script type="text/javascript"><!--
google_ad_client = "pub-6046180595278099";
//intra_content
google_ad_slot = "8173943729";
google_ad_width = 336;
google_ad_height = 280;
//--></script>

<p><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<h3>FluXOR: detecting and monitoring fast-flux service networks</h3>

<p>(A fast-flux network is a set of zombies that proxy HTTP requests to the real server, hiding the location of the server.  A domain under attacker&#8217;s control is used to direct clients to the zombies.)  Describes the result of their network monitoring, searching first for malicious hostnames, then for domains that contain these hostnames, and enumerating zombies available from the domain.</p>

<p>Around 160 new domains are found daily.  A commenter said that a total of less than 25, probably around 10 bot nets are using DNS redirection.</p>

<h3>Traffic Aggregation for Malware Detection</h3>

<p>Observes network traffic on the border, wants to find malware on the LAN by clustering data about hosts (destination, start of payload, host platform) and finding unusual clusters (using AI techniques).</p>

<p>Host platform is identified using TTL data and seeing whether the host contacts the MS time server.  The system identifies usually 2-3 clusters per hour of traffic, and the authors suggest the clusters can be examined manually.</p>

<h3>Rump session</h3>

<p>Lots of small presentations, some random notes:</p>

<ul>
<li>There is an EU-funded project to develop a safe OS for the internet (with a 2-year evaluation period).  One of the projects is SPACLik, based on SELinux and a &#8220;high-level security policy language&#8221;.  (Won&#8217;t the system be too obsolete after it is developed and evaluated?)</li>
<li>MS patch Tuesday is quite noticeable on statistics of zombie availability</li>
<li>Hyperjacking (using HW virtualization for hiding malware) is detectable because running in a VM is detectable.  Researcher (from IBM) suggests always running a &#8220;preventive virtualizator&#8221; that prevents installing another, but allows running trusted &#8220;nested&#8221; virtualizators.</li>
<li>It was argued that the obsession with small, trusted code that will &#8220;solve all security problems&#8221; is misguided: Microkernel&#8217;s don&#8217;t help because exploiting one of the basic trusted servers is quite sufficent&mdash;and Linux demonstrates a large monolithic kernel has a quite small attack surface.  &#8220;Solving security&#8221; by slowing systems down by tens of percent simply doesn&#8217;t pay, security breaches are too rare to make it worth it.  Hardware appliances are not secure because they are simple (millions of lines of Verilog actually), but because it has a small attack surface.</li>
</ul>

<h3>The Contact Surface: A Technique for Exploring Internet Scale Emergent Behaviors</h3>

<p>Describes a graph grouping TCP flow data, and graphing log(number of source IPs) vs. log(number of destination IPs).  The graph has showed large anomalies that abruptly stopped, caused by SYN-only flows.  A hypothesis (consistent with the graph trace) is that the anomaly is caused by randomized scanning of the whole internet, and is observable only in such a large scale (several /8 networks); on smaller scales there would be nothing noticeable on the graph.</p>

<h3>The Quest for Multi-headed Worms</h3>

<p>Describes using correlation and other techniques to detect that distinct attacks are caused by a single worm that randomly switches between attack modes.</p>

<h3>A Tool for Offline and Live Testing of Evasion Resilience in Network Intrusion Detection Systems</h3>

<p>Creates traces of ambiguous packet data, and feeds them to IDS to compare them.  The results show snort reports many useless messages, and misses real attempts at evasion.</p>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/notes-from-dimva-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing audit-viewer</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/introducing-audit-viewer/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/introducing-audit-viewer/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 09:17:27 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/2008/introducing-audit-viewer/</guid>
		<description><![CDATA[I have been working on a GUI tool for simple viewing, searching and summarizing of Linux audit logs.

The first release is now available at fedorahosted.org.  Test it, break it, tell me what you miss!




]]></description>
			<content:encoded><![CDATA[<p>I have been working on a GUI tool for simple viewing, searching and summarizing of Linux audit logs.</p>

<p>The first release is now available at <a href="https://fedorahosted.org/audit-viewer/"><code>fedorahosted.org</code></a>.  Test it, break it, tell me what you miss!</p>

<div style="width: 100%; overflow:hidden">
<img src="https://fedorahosted.org/audit-viewer/attachment/wiki/WikiStart/failed-logins.png?format=raw" alt="audit-viewer screenshot" style="width=494px; max-width=494px;" width="494" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/introducing-audit-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mlocate at fedorahosted.org</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/mlocate-at-fedorahostedorg/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/mlocate-at-fedorahostedorg/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 06:10:59 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/2008/mlocate-at-fedorahostedorg/</guid>
		<description><![CDATA[mlocate is now hosted at fedoraproject.org as well.

This makes an upstream bug tracker and a public Mercurial repository available.
Hopefully it will be possible to submit mlocate translations using Transifex at translate.fedoraproject.org in a few days.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://carolina.mff.cuni.cz/~trmac/blog/mlocate/"><code>mlocate</code></a> is now hosted <a href="https://fedorahosted.org/mlocate/">at <code>fedoraproject.org</code></a> as well.</p>

<p>This makes an upstream bug tracker and a public Mercurial repository available.
Hopefully it will be possible to submit <code>mlocate</code> translations using Transifex at <a href="http://translate.fedoraproject.org"><code>translate.fedoraproject.org</code></a> in a few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/mlocate-at-fedorahostedorg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Packages moving out…</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/packages-moving-out%e2%80%a6/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/packages-moving-out%e2%80%a6/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 00:29:32 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/2008/packages-moving-out%e2%80%a6/</guid>
		<description><![CDATA[libuser, tmpwatch and usermode were previously only published as SRPMS in rawhide, with a somewhat-public CVS at elvis.redhat.com.

Thanks to the cool Fedora administrators, all three packages now have a proper upstream home at fedorahosted.org:


libuser
tmpwatch
usermode

]]></description>
			<content:encoded><![CDATA[<p><code>libuser</code>, <code>tmpwatch</code> and <code>usermode</code> were previously only published as SRPMS in rawhide, with a somewhat-public CVS at <code>elvis.redhat.com</code>.</p>

<p>Thanks to the cool Fedora administrators, all three packages now have a proper upstream home at <a href="https://fedorahosted.org/"><code>fedorahosted.org</code></a>:</p>

<ul>
<li><a href="https://fedorahosted.org/libuser/"><code>libuser</code></a></li>
<li><a href="https://fedorahosted.org/tmpwatch/"><code>tmpwatch</code></a></li>
<li><a href="https://fedorahosted.org/usermode/"><code>usermode</code></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/packages-moving-out%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A security lesson learned</title>
		<link>http://carolina.mff.cuni.cz/~trmac/blog/2008/a-security-lesson-learned/</link>
		<comments>http://carolina.mff.cuni.cz/~trmac/blog/2008/a-security-lesson-learned/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 02:15:25 +0000</pubDate>
		<dc:creator>mitr</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://carolina.mff.cuni.cz/~trmac/blog/2008/a-security-lesson-learned/</guid>
		<description><![CDATA[Before deciding to leave the default password on a WiFi router unchanged (to avoid the hassle of remember the password later), be extremely sure the router&#8217;s administration web server is only available from the wired interface.
]]></description>
			<content:encoded><![CDATA[<p>Before deciding to leave the default password on a WiFi router unchanged (to avoid the hassle of remember the password later), be <em>extremely</em> sure the router&#8217;s administration web server is only available from the wired interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://carolina.mff.cuni.cz/~trmac/blog/2008/a-security-lesson-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
