<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>blueblog - by Christian J. Dietrich</title>
    <link>http://blog.cj2s.de/</link>
    <description>on malware, botnets and security by Christian J. Dietrich</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.6.2 - http://www.s9y.org/</generator>
    <pubDate>Mon, 08 Apr 2013 20:30:36 GMT</pubDate>

    <image>
        <url>http://blog.cj2s.de/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: blueblog - by Christian J. Dietrich - on malware, botnets and security by Christian J. Dietrich</title>
        <link>http://blog.cj2s.de/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Performance Profiling Analysis using perf</title>
    <link>http://blog.cj2s.de/archives/33-Performance-Profiling-Analysis-using-perf.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/33-Performance-Profiling-Analysis-using-perf.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=33</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=33</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    While most of the stuff we analyze is Windows malware, when it comes to implementing detection or analysis approaches, we surely turn to GNU/Linux. One of the best tools I stumbled upon when it comes to profiling, i.e. analyzing the execution performance of C code under Linux is &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/perf.wiki.kernel.org/index.php/Main_Page&#039;]);&quot;  href=&quot;https://perf.wiki.kernel.org/index.php/Main_Page&quot; target=&quot;_blank&quot;&gt;perf&lt;/a&gt;. Since most of the time we have to develop code that has to run &lt;strong&gt;fast&lt;/strong&gt;, especially when dealing with carrier-grade network links of 10 GbE, profiling is inevitable. perf is extremely useful as it barely adds any overhead, is easy to use and precise. For example, in order to measure while running a userspace application, perf is called as easy as:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
perf record -g ./application [params and args for the application]&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
On a multicore system, the performance overhead induced by perf while monitoring a single-threaded application is hardly noticeable. But the real magic lies within the simple yet powerful result reporing. In order to get a histogram of time spent in each function, it is as simple as&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
perf report&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;Output of perf report&quot; href=&#039;http://blog.cj2s.de/uploads/perf-report-subset2.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:36 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;514&quot; height=&quot;485&quot;  src=&quot;http://blog.cj2s.de/uploads/perf-report-subset2.png&quot; title=&quot;Output of perf report&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The first column shows the relative amount of time spent in the respective function. At the top, the functions where most computing time is consumed are displayed. This provides the developer with a quick view on the functions which potentially profit most from code optimizations. Thus, as shown in the example screenshot above I would dig into the libmagic stuff first. The console user interface is interactive and allows to navigate and dig down tree-structured call chains. In addition, it can annotate the assembly using the surrounding C source code, as shown here (simply press &#039;a&#039;):&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;Annotated perf report assembly view&quot; href=&#039;http://blog.cj2s.de/uploads/perf-report-annotate2.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:37 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;659&quot; height=&quot;368&quot;  src=&quot;http://blog.cj2s.de/uploads/perf-report-annotate2.png&quot; title=&quot;Annotated perf report assembly view&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Finally, perf can print an annotated call graph snippet using &lt;pre&gt;perf report -g&lt;/pre&gt;&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;perf call graph output snippet&quot; href=&#039;http://blog.cj2s.de/uploads/perf-graph2.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:38 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;466&quot; height=&quot;521&quot;  src=&quot;http://blog.cj2s.de/uploads/perf-graph2.png&quot; title=&quot;perf call graph output snippet&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Note that the code should be compiled with -fno-omit-frame-pointer and -ggdb. To me, one of the results clearly indicated to use tcmalloc instead of the standard glibc malloc. I can really recommend profiling with perf. 
    </content:encoded>

    <pubDate>Mon, 08 Apr 2013 22:22:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/33-guid.html</guid>
    
</item>
<item>
    <title>Tracking the Command and Control Activity of Botnets</title>
    <link>http://blog.cj2s.de/archives/32-Tracking-the-Command-and-Control-Activity-of-Botnets.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/32-Tracking-the-Command-and-Control-Activity-of-Botnets.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=32</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=32</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    As part of our research on botnets, we developed recognition techniques for botnet command and control flows, such as &lt;a href=&quot;http://blog.cj2s.de/archives/30-CoCoSpot-Recognizing-Botnet-CC-Channels-using-Traffic-Analysis.html&quot;&gt;CoCoSpot&lt;/a&gt;. Obviously, we use these techniques to track C&amp;C channels and their activities. Throughout our analysis period of more than three years, we have seen several botnets come and go. Some botnets have faced dedicated takedowns, such as Rustock, Mariposa, Mega-D, Kelihos and Pushdo, while others cease without further ado. &lt;br /&gt;
&lt;br /&gt;
By help of our tracking means, we are able to classify the activity of C&amp;C channels. The following figure graphs the activity of some 25+ prevalent botnets in terms of consecutive C&amp;C activity by family, as seen and covered by our tracking means, as well as public attention. The x-axis reflects the time period since February, 1st, 2010 until February, 13th, 2013, while the y-axis lists botnet families. A star depicts a dedicated takedown action. Note that, in case of Mariposa and Mega-D, the takedown actions have taken place before the beginning of the time period in this graph. The &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.net-security.org/secworld.php?id=8962&#039;]);&quot;  href=&quot;http://www.net-security.org/secworld.php?id=8962&quot; target=&quot;_blank&quot;&gt;Mariposa takedown&lt;/a&gt; has occurred on December 23rd, 2009, and Mega-D has been &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/blog.fireeye.com/research/2009/11/smashing-the-ozdok.html&#039;]);&quot;  href=&quot;http://blog.fireeye.com/research/2009/11/smashing-the-ozdok.html&quot; target=&quot;_blank&quot;&gt;taken down&lt;/a&gt; in November 2009. In these cases, the stars are placed on the start of the time period in order to visualize the preceding takedown. A thin black line with black markers represents the time period where new binaries are distributed, but none of the binaries exhibit an &lt;strong&gt;active&lt;/strong&gt; C&amp;C channel. Inactive C&amp;C channels are caused, for example, by outdated binaries, unreachable C&amp;C servers or sinkholing (possibly after successful takedowns). The &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/blogs.technet.com/b/mmpc/archive/2011/03/18/operation-b107-rustock-botnet-takedown.aspx&#039;]);&quot;  href=&quot;http://blogs.technet.com/b/mmpc/archive/2011/03/18/operation-b107-rustock-botnet-takedown.aspx&quot; target=&quot;_blank&quot;&gt;Rustock takedown operation b107 by Microsoft&#039;s DCU&lt;/a&gt; is an example of such a successful takedown. Similarly, the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/blog.fireeye.com/research/2011/03/a-retreating-army.html&#039;]);&quot;  href=&quot;http://blog.fireeye.com/research/2011/03/a-retreating-army.html&quot; target=&quot;_blank&quot;&gt;Harnig botnet&lt;/a&gt;, which is believed to have been the main distributor of Rustock (most likely via pay-per-install), exhibits inactive C&amp;C since March, 2011. This correlates to the time of the Rustock takedown operation. Coincidence?&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;C&amp;C activity of botnets over time&quot; href=&#039;http://blog.cj2s.de/uploads/BotnetFamiliesOverTime.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:34 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;257&quot;  src=&quot;http://blog.cj2s.de/uploads/BotnetFamiliesOverTime.serendipityThumb.png&quot; title=&quot;C&amp;C activity of botnets over time&quot; alt=&quot;C&amp;C activity of botnets over time&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;C&amp;C activity of botnets over time&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In contrast to inactive C&amp;C, a thick red bar represents the time periods where active C&amp;C communication has been observed, and this is where things get really interesting. Every time I look at this graph, I am astonished by the fact that some botnets manage to operate successfully since &lt;strong&gt;several years&lt;/strong&gt;. Cutwail, Virut, Sality, Palevo and Lethic are mere examples for such long-living botnets. However, their strategies for continued operation differ. While Sality has had a builtin peer-to-peer (P2P) component for years, Virut has experienced the comfort of using just a handful of domains in order to contact the C&amp;C server. In case the domains cannot be resolved, a domain generation algorithm (DGA) kicks in. However, only recently, a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/krebsonsecurity.com/2013/01/polish-takedown-targets-virut-botnet/&#039;]);&quot;  href=&quot;http://krebsonsecurity.com/2013/01/polish-takedown-targets-virut-botnet/&quot; target=&quot;_blank&quot;&gt;takedown&lt;/a&gt; &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.spamhaus.org/news/article/690/cooperative-efforts-to-shut-down-virut-botnet&#039;]);&quot;  href=&quot;http://www.spamhaus.org/news/article/690/cooperative-efforts-to-shut-down-virut-botnet&quot; target=&quot;_blank&quot;&gt;operation&lt;/a&gt; addressed &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.scmagazineuk.com/virut-botnet-takedown-sinkholes-23-domains/article/276813/&#039;]);&quot;  href=&quot;http://www.scmagazineuk.com/virut-botnet-takedown-sinkholes-23-domains/article/276813/&quot; target=&quot;_blank&quot;&gt;Virut&lt;/a&gt;. Palevo seems to keep it simple, neither P2P nor DGA nor significantly low TTLs on the DNS responses (which could indicate fast flux). Instead Palevo seems to rely on new and migrating domains. Similar to Palevo, Lethic manages to bootstrap its C&amp;C by plain old DNS resolution. These are just some examples of long-lasting botnets with active C&amp;C, most of which have a centralized primary C&amp;C architecture. In contrast to botnets with centralized C&amp;C, several peer-to-peer botnets have emerged. Storm, Miner, ZeroAccess, Kelihos and Zeus P2P exhibit a primary C&amp;C which is based on a P2P network, probably motivated by increased resilience. While Storm and Miner ceased, ZeroAccess, Kelihos and Zeus P2P show significant C&amp;C activity &amp;mdash; an observation also covered in &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.christian-rossow.de/publications.php&#039;]);&quot;  href=&quot;http://www.christian-rossow.de/publications.php&quot; target=&quot;_blank&quot;&gt;our yet-to-be-published research paper on P2P botnet resilience&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;On the sustain of botnet takedowns&lt;/strong&gt;&lt;br /&gt;
What do we learn from this? On the one hand, as can be seen in the figure, the takedowns of the Bredolab as well as the Rustock botnet have a long-lasting effect. Although for Bredolab and Mega-D we witness active C&amp;C during up to several months after the takedowns, none of these botnets manage to achieve active C&amp;C communication in the long run. On the other hand, we have seen quite a few botnet families resurrect from takedowns. For example, researchers initiated a takedown of the Pushdo botnet in August 2010. However, even two years after the takedown, we still observe active executions of Pushdo. The Mariposa botnet is believed to have been taken down in December 2009, but we have seen active Mariposa command and control traffic ever since. Similarly, although the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/blogs.technet.com/b/microsoft_blog/archive/2012/09/13/microsoft-disrupts-the-emerging-nitol-botnet-being-spread-through-an-unsecure-supply-chain.aspx&#039;]);&quot;  href=&quot;http://blogs.technet.com/b/microsoft_blog/archive/2012/09/13/microsoft-disrupts-the-emerging-nitol-botnet-being-spread-through-an-unsecure-supply-chain.aspx&quot; target=&quot;_blank&quot;&gt;Nitol botnets&lt;/a&gt; have been taken down in September 2012, many Nitol binaries manage to successfully bootstrap and reach a viable C&amp;C server, because they do not rely on the suspended domains such as 3322.org. In addition, the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/blog.fireeye.com/research/2012/07/grum-botnet-no-longer-safe-havens.html&#039;]);&quot;  href=&quot;http://blog.fireeye.com/research/2012/07/grum-botnet-no-longer-safe-havens.html&quot; target=&quot;_blank&quot;&gt;Tedroo botnet&lt;/a&gt; has been addressed in a takedown action in July, 2012. However, again, we observed active C&amp;C communication of the same botnet family just within days after the takedown, continuing for at least three months. Thus, from an observational point of view, the challenge of botnet family takedowns lies in their sustain.&lt;br /&gt;
&lt;br /&gt;
Some botnets even cease without a dedicated (publicly known) takedown of the C&amp;C infrastructure. For example, the Miner botnet has not been addressed in a dedicated takedown operation of its peer-to-peer-based C&amp;C, but its activity diminished significantly after October 2011. Similarly, the Renos botnet has ceased its operation, although possibly after removal signatures of the Renos binaries have been distributed by Microsoft as part of its Removal Tool MSRT. It is an open question as to whether the criminals behind these botnets just moved on to the next botnet. Most notably, the authors of &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.kaspersky.com/about/news/virus/2012/How_Kaspersky_Lab_and_CrowdStrike_Dismantled_the_Second_Hlux_Kelihos_Botnet_Success_Story&#039;]);&quot;  href=&quot;http://www.kaspersky.com/about/news/virus/2012/How_Kaspersky_Lab_and_CrowdStrike_Dismantled_the_Second_Hlux_Kelihos_Botnet_Success_Story&quot; target=&quot;_blank&quot;&gt;Kelihos/Hlux&lt;/a&gt; (some consider Kelihos the successor of Waledac) stick to their botnet and &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.securelist.com/en/blog/208193431/Botnet_Shutdown_Success_Story_again_Disabling_the_new_Hlux_Kelihos_Botnet&#039;]);&quot;  href=&quot;http://www.securelist.com/en/blog/208193431/Botnet_Shutdown_Success_Story_again_Disabling_the_new_Hlux_Kelihos_Botnet&quot; target=&quot;_blank&quot;&gt;change aspects such as the C&amp;C encryption&lt;/a&gt; when faced with a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.securelist.com/en/blog/208193137/Botnet_Shutdown_Success_Story_How_Kaspersky_Lab_Disabled_the_Hlux_Kelihos_Botnet&#039;]);&quot;  href=&quot;https://www.securelist.com/en/blog/208193137/Botnet_Shutdown_Success_Story_How_Kaspersky_Lab_Disabled_the_Hlux_Kelihos_Botnet&quot; target=&quot;_blank&quot;&gt;takedown&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
While many of the botnets mentioned above have been subject to takedown or sinkholing, it becomes obvious that a successful takedown is by far not an easy process. Bot masters distribute their infrastructure so that a takedown operation requires many different parties to cooperate &amp;mdash; a challenging task. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Remarks&lt;/strong&gt;&lt;br /&gt;
Finally, just a couple of remarks: Note that the monitoring time period has been interrupted by maintenance periods, from mid-February to mid-March 2011 as well as end-May to mid-July 2012. Furthermore, the per-family perspective does not always reflect &lt;strong&gt;all&lt;/strong&gt; activity of the correspondings botnets; however, it can be considered a lower estimate. Especially since some families exhibit (lots of) distinct botnets, we certainly do not cover every unique botnet of that particular family. For example, in case of toolkit-based families such as Zeus and SpyEye, several distinct botnets may be formed. In our C&amp;C activity tracking, we restrict ourselves to whole families instead of individual botnets on purpose. 
    </content:encoded>

    <pubDate>Wed, 13 Feb 2013 22:22:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/32-guid.html</guid>
    
</item>
<item>
    <title>Exploiting Visual Appearance to Cluster and Detect Rogue Software</title>
    <link>http://blog.cj2s.de/archives/31-Exploiting-Visual-Appearance-to-Cluster-and-Detect-Rogue-Software.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/31-Exploiting-Visual-Appearance-to-Cluster-and-Detect-Rogue-Software.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=31</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=31</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    While malware comes in many different flavors, e.g., spam bots, banking trojans or denial-of-service bots, one important monetization technique of recent years is rogue software, such as fake antivirus software (Fake A/V). In this case, the user is tricked into spending money for a rogue software which, in fact, does not aim at fulfilling the promised task. Instead, the rogue software is malicious, might not even have any legitimate functionality at all, and entices the user to pay. However, all rogue software has in common to provide a user interface, e.g., be it to scare the user, or in order to ask for banking credentials, or to carry out the payment process. The following figures show example screenshots of two typical rogue software flavors. &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;Fake A/V screenshot of the Winwebsec family&quot; href=&#039;http://blog.cj2s.de/uploads/Winwebsec1.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/Winwebsec1.png&#039;,&#039;Zoom&#039;,&#039;height=615,width=815,top=225,left=440,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:29 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;338&quot;  src=&quot;http://blog.cj2s.de/uploads/Winwebsec1.serendipityThumb.png&quot; title=&quot;Fake A/V screenshot of the Winwebsec family&quot; alt=&quot;Fake A/V screenshot of the Winwebsec family&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;Ransomware asking the user to pay (in German)&quot; href=&#039;http://blog.cj2s.de/uploads/Ransom1.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/Ransom1.png&#039;,&#039;Zoom&#039;,&#039;height=615,width=815,top=225,left=440,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:30 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;338&quot;  src=&quot;http://blog.cj2s.de/uploads/Ransom1.serendipityThumb.png&quot; title=&quot;Ransomware asking the user to pay (in German)&quot; alt=&quot;Ransomware asking the user to pay (in German)&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The first displays a Fake A/V user interface, mimicking a benign antivirus application, while the second exhibits a ransom screen (in German), asking the user to pay before the computer is unlocked (in fact the computer appears just visually locked). Especially the later category, ransomware, is considered an increasing threat with more than 120,000 new ransomware binaries in the second quarter of 2012. In addition, referring to the C&amp;C tracking of Fake A/V and ransomware botnets, we observe a significant increase in activity since June 2011.&lt;br /&gt;
&lt;br /&gt;
As rogue software is required to provide a user interface, we aim at exploiting its visual appearance in order to cluster and classify rogue software. We motivate our efforts by the relatively low A/V detection rates of such rogue software, and we aim to complement existing techniques to strive for better detection rates. In particular, we observed that the structure of the user interfaces of rogue software remains constant and can be used to recognize a rogue software family or campaign. Using a perceptual hash function and a hierarchical clustering approach, Christian Rossow and I, we propose a scalable and effective approach to cluster associated screenshot images of malware samples.&lt;br /&gt;
In short, the main contributions of our work are threefold:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;We provide a scalable method to cluster and classify rogue software based on its user interface, an inherent property of rogue visual malware.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;We applied our method to a corpus of more than 187,560 malware samples of more than 2,000 distinct families (based on Microsoft A/V labels) and revealed 25 distinct types of rogue software user interfaces. Our method successfully reduces the amount of more than 187,560 malware samples and their associated screenshot images down to a set of human-manageable size, which assists a human analyst in understanding and combating Fake A/V and ransomware.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;We provide insights into Fake A/V and ransomware campaigns as well as their payment means. More specifically, we show a clear distinction of payment methods between Fake A/V and ransomware campaigns.&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
As an example and in order to underline the usefulness of our approach, we used the our visual clustering to enumerate the campaigns that can be attributed to the Winwebsec family. Note the visual similarity among the different campaigns, sometimes it is even difficult to spot the difference. Typically, the campaigns differ in names as well as logos.&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; title=&quot;Campaigns of the Winwebsec Fake A/V malware family&quot; href=&#039;http://blog.cj2s.de/uploads/winwebsec-overview.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/winwebsec-overview.png&#039;,&#039;Zoom&#039;,&#039;height=979,width=620,top=43,left=537.5,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:31 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;282&quot; height=&quot;450&quot;  src=&quot;http://blog.cj2s.de/uploads/winwebsec-overview.serendipityThumb.png&quot; title=&quot;Campaigns of the Winwebsec Fake A/V malware family&quot; alt=&quot;Campaigns of the Winwebsec Fake A/V malware family&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- s9ymdb:32 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;210&quot; height=&quot;50&quot;  src=&quot;http://blog.cj2s.de/uploads/acm-sigapp.png&quot; title=&quot;ACM&quot; alt=&quot;ACM&quot; /&gt;I am delighted to announce that our paper was accepted for the security track of ACM&#039;s 28th Symposium On Applied Computing 2013. A preprint of our manuscript for ACM SAC 2013 is available here &lt;a href=&quot;http://blog.cj2s.de/rogue-visual-malware-dietrich-rossow.pdf&quot; target=&quot;_blank&quot;&gt;&quot;Exploiting Visual Appearance to Cluster and Detect Rogue Software&quot;&lt;/a&gt;.  
    </content:encoded>

    <pubDate>Fri, 07 Dec 2012 13:37:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/31-guid.html</guid>
    
</item>
<item>
    <title>CoCoSpot - Recognizing Botnet C&amp;C Channels using Traffic Analysis</title>
    <link>http://blog.cj2s.de/archives/30-CoCoSpot-Recognizing-Botnet-CC-Channels-using-Traffic-Analysis.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/30-CoCoSpot-Recognizing-Botnet-CC-Channels-using-Traffic-Analysis.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=30</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=30</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    A defining characteristic of a bot is its ability to be remote-controlled by way of command and control (C&amp;C). Typically, a bot receives commands from its master, performs tasks and reports back on the execution results. All communication between a C&amp;C server and a bot is performed using a specific C&amp;C protocol over a certain C&amp;C channel. Consequently, in order to instruct and control their bots, bot masters &amp;dash; knowingly or not &amp;dash; have to define and use a certain command and control protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;cocospot-plaintext-cnc.png&quot; href=&#039;http://blog.cj2s.de/uploads/cocospot-plaintext-cnc.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/cocospot-plaintext-cnc.png&#039;,&#039;Zoom&#039;,&#039;height=260,width=981,top=402.5,left=357,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:23 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;114&quot;  src=&quot;http://blog.cj2s.de/uploads/cocospot-plaintext-cnc.serendipityThumb.png&quot; title=&quot;cocospot-plaintext-cnc.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Plaintext C&amp;C&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Historically, bots used cleartext C&amp;C protocols, such as plaintext messages transmitted using IRC or HTTP, as shown in the Rbot C&amp;C example above. However, a C&amp;C channel relying on a plaintext protocol can easily be detected. Methods such as payload byte signatures or heuristics on common C&amp;C message elements such as IRC nicknames are examples for such detection techniques. To evade payload-based detection, botnets have evolved and often employ C&amp;C protocols with obfuscated or encrypted messages as is the case with Waledac, Zeus, Hlux, TDSS/Alureon, Palevo, Renos, Virut and Feederbot, to name but a few. In fact, pretty much all recent botnets employ some kind of encryption in their C&amp;C protocol. The following two images show an encrypted Virut C&amp;C message and its decrypted plaintext. This reveals that the underlying carrier protocol is still IRC, or IRC-like. The encryption is basically a four-byte XOR with a random bot-chosen key.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;cocospot-encrypted-cnc.png&quot; href=&#039;http://blog.cj2s.de/uploads/cocospot-encrypted-cnc.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/cocospot-encrypted-cnc.png&#039;,&#039;Zoom&#039;,&#039;height=171,width=978,top=447,left=358.5,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:24 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;73&quot;  src=&quot;http://blog.cj2s.de/uploads/cocospot-encrypted-cnc.serendipityThumb.png&quot; title=&quot;cocospot-encrypted-cnc.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Encrypted Virut C&amp;C&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;cocospot-encrypted-cnc-decrypted.png&quot; href=&#039;http://blog.cj2s.de/uploads/cocospot-encrypted-cnc-decrypted.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/cocospot-encrypted-cnc-decrypted.png&#039;,&#039;Zoom&#039;,&#039;height=164,width=978,top=450.5,left=358.5,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:25 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;70&quot;  src=&quot;http://blog.cj2s.de/uploads/cocospot-encrypted-cnc-decrypted.serendipityThumb.png&quot; title=&quot;cocospot-encrypted-cnc-decrypted.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Decrypted Virut C&amp;C message&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The change towards encrypted or obfuscated C&amp;C messages effectively prevents detection approaches that rely on plaintext C&amp;C message contents. Lately, we take a different approach to recognize C&amp;C channels of botnets and fingerprint botnet C&amp;C channels based on traffic analysis properties. The rationale behind our methodology is that for a variety of botnets, characteristics of their C&amp;C protocol manifest in the C&amp;C communication behavior. For this reason, our recognition approach is solely based on traffic analysis.&lt;br /&gt;
&lt;br /&gt;
As an example, consider a C&amp;C protocol that defines a specific handshake – e.g., for mutual authentication – to be performed in the beginning of each C&amp;C connection. Each request and response exchanged during this handshake procedure conforms to a predefined structure and length, which in turn leads to a characteristic sequence of message lengths. In fact, we found that in the context of botnet C&amp;C, the sequence of message lengths is a well-working example for traffic analysis features. The following figure shows the sequence of the first 8 messages in four Virut C&amp;C flows and two Palevo/Rimecud/Pilleuz C&amp;C flows. Whereas Virut exhibits similar message lengths for the first message (in the range 60-69) and a typical sequence of message lengths at positions five to eight, for Palevo, the first three message lengths provide a characteristic fingerprint.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;cocospot-msglens.png&quot; href=&#039;http://blog.cj2s.de/uploads/cocospot-msglens.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/cocospot-msglens.png&#039;,&#039;Zoom&#039;,&#039;height=281,width=743,top=392,left=476,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:26 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;164&quot;  src=&quot;http://blog.cj2s.de/uploads/cocospot-msglens.serendipityThumb.png&quot; title=&quot;cocospot-msglens.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Examples of message length sequences for Virut and Palevo C&amp;C flows&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Leveraging statistical protocol analysis and hierarchical clustering analysis, we develop CoCoSpot, a method to group similar botnet C&amp;C channels and derive fingerprints of C&amp;C channels based on the message length sequence, the underlying carrier protocol and encoding properties. The huge benefit of our approach is to be independent from payload byte signatures which enables the detection of C&amp;C protocols with obfuscated and encrypted message contents. In addition, our C&amp;C flow fingerprints complement existing detection approaches while allowing for finer granularity compared to IP address or domain blacklists. As a side-effect, our C&amp;C flow clustering can be used to discover relationships between malware families, based on the distance of their C&amp;C protocols. Experiments with more than 87,000 C&amp;C flows as well as over 1.2 million Non-C&amp;C flows have shown that our classification method can reliably detect C&amp;C flows for a variety of recent botnets with very few false positives.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 450px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&quot;serendipity_image_link&quot; title=&quot;cocospot-evaluation.png&quot; href=&#039;http://blog.cj2s.de/uploads/cocospot-evaluation.png&#039; onclick=&quot;F1 = window.open(&#039;/uploads/cocospot-evaluation.png&#039;,&#039;Zoom&#039;,&#039;height=433,width=795,top=316,left=450,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:28 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;241&quot;  src=&quot;http://blog.cj2s.de/uploads/cocospot-evaluation.serendipityThumb.png&quot; title=&quot;cocospot-evaluation.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;CoCoSpot classification evaluation results&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The figure above shows the results of the CoCoSpot classification as a cumulative distribution function for all families that were included in both, true positive and false positive analysis. Note that the true positive rate values are given on the left y-axis, the false positive rate values on the right y-axis. More than half of all families have a true positive rate of over 95.6%. A small fraction of seven C&amp;C families had true positives rates lower than 50%, which was caused by too specific cluster centroids. In most of these cases, we had too little training data to learn representative message length variations of a particular active C&amp;C protocol, which could be improved by adding more training data for this family. For 88% of the families, the false positive rate is below 0.1%, and 23 cluster families do not exhibit any false positive at all. For the few families that cause false positives, we observed that the corresponding cluster centroids have high variation coefficients on many message length positions, effectively rendering the centroids being too generic and possibly matching random flow patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- s9ymdb:27 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;120&quot; height=&quot;164&quot;  src=&quot;http://blog.cj2s.de/uploads/computer-networks.gif&quot; title=&quot;computer-networks.gif&quot; alt=&quot;&quot; /&gt;I am happy to announce that the &lt;a href=&quot;http://blog.cj2s.de/cocospot-dietrich-rossow-pohlmann.pdf&quot; target=&quot;_blank&quot;&gt;manuscript of our journal article on CoCoSpot&lt;/a&gt; has been accepted by Elsevier&#039;s Computer Networks journal in the special issue on Botnets. The published version of our manuscript is available from &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.sciencedirect.com/science/article/pii/S1389128612002472&#039;]);&quot;  href=&quot;http://www.sciencedirect.com/science/article/pii/S1389128612002472&quot; target=&quot;_blank&quot;&gt;Sciencedirect&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Wed, 24 Oct 2012 15:48:22 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/30-guid.html</guid>
    
</item>
<item>
    <title>Preventing ARP flux on Linux</title>
    <link>http://blog.cj2s.de/archives/29-Preventing-ARP-flux-on-Linux.html</link>
            <category>Securing Linux</category>
    
    <comments>http://blog.cj2s.de/archives/29-Preventing-ARP-flux-on-Linux.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=29</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=29</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    ARP, the address resolution protocol, is used on an Ethernet network to map IP addresses to hardware (MAC) addresses. By default, a Linux box with several network interfaces will respond to ARP requests received on any interface for any of the IP addresses of its interfaces. Here is an example: Let&#039;s assume we have a box which is connected with two interfaces A (MAC 00:00:00:AA:AA:AA) and B (MAC 00:00:00:BB:BB:BB). Interface A is configured to the IP address 172.16.0.1 and B to 172.16.0.2. Thus, both interfaces point to the same segment.&lt;br /&gt;
&lt;br /&gt;
We use arping to query for the hardware address of the IP address 172.16.0.1 and expect to get the MAC address 00:00:00:AA:AA:AA of interface A in return.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
[root@nugger]# arping -I eth0 172.16.0.1&lt;br /&gt;
ARPING 172.16.0.1 from 172.16.0.99 eth0&lt;br /&gt;
Unicast reply from 172.16.0.1 [00:00:00:AA:AA:AA]  7.889ms&lt;br /&gt;
Unicast reply from 172.16.0.1 [00:00:00:BB:BB:BB]  8.014ms&lt;br /&gt;
&lt;br /&gt;
[root@nugger]# arping -I eth0 172.16.0.2&lt;br /&gt;
ARPING 172.16.0.2 from 172.16.0.99 eth0&lt;br /&gt;
Unicast reply from 172.16.0.2 [00:00:00:AA:AA:AA]  6.612ms&lt;br /&gt;
Unicast reply from 172.16.0.2 [00:00:00:BB:BB:BB]  8.991ms&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Instead, we get the MACs of A and B alternating. You can tune this behavior using arp_ignore and arp_announce sysctl properties:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
arp_ignore - INTEGER&lt;br /&gt;
Define different modes for sending replies in response to&lt;br /&gt;
received ARP requests that resolve local target IP addresses:&lt;br /&gt;
0 - (default): reply for any local target IP address, configured&lt;br /&gt;
on any interface&lt;br /&gt;
1 - reply only if the target IP address is local address&lt;br /&gt;
configured on the incoming interface&lt;br /&gt;
2 - reply only if the target IP address is local address&lt;br /&gt;
configured on the incoming interface and both with the&lt;br /&gt;
sender&#039;s IP address are part from same subnet on this interface&lt;br /&gt;
3 - do not reply for local addresses configured with scope host,&lt;br /&gt;
only resolutions for global and link addresses are replied&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arp_announce - INTEGER&lt;br /&gt;
Define different restriction levels for announcing the local&lt;br /&gt;
source IP address from IP packets in ARP requests sent on&lt;br /&gt;
interface:&lt;br /&gt;
0 - (default) Use any local address, configured on any interface&lt;br /&gt;
...&lt;br /&gt;
2 - Always use the best local address for this target.&lt;br /&gt;
In this mode we ignore the source address in the IP packet&lt;br /&gt;
and try to select local address that we prefer for talks with&lt;br /&gt;
the target host. Such local address is selected by looking&lt;br /&gt;
for primary IP addresses on all our subnets on the outgoing&lt;br /&gt;
interface that include the target IP address. If no suitable&lt;br /&gt;
local address is found we select the first local address&lt;br /&gt;
we have on the outgoing interface or on all other interfaces,&lt;br /&gt;
with the hope we will receive reply for our request and&lt;br /&gt;
even sometimes no matter the source IP address we announce.&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Setting net.ipv4.conf.all.arp_ignore=1 and net.ipv4.conf.all.arp_announce=2 in /etc/sysctl.conf provides adequate settings. However, you should check whether these settings work in your network environment, especially if you depend on reaching an IP address from any other than the interface that it is configured on.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
net.ipv4.conf.all.arp_ignore=1&lt;br /&gt;
net.ipv4.conf.all.arp_announce=2&lt;br /&gt;
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Tue, 13 Mar 2012 09:05:11 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/29-guid.html</guid>
    
</item>
<item>
    <title>Feederbot - a bot using DNS as carrier for its C&amp;C</title>
    <link>http://blog.cj2s.de/archives/28-Feederbot-a-bot-using-DNS-as-carrier-for-its-CC.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/28-Feederbot-a-bot-using-DNS-as-carrier-for-its-CC.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=28</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=28</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    DNS as carrier for botnet C&amp;C seems to be getting popular. Concerning its usage as botnet C&amp;C, DNS has not been seen so far. Additionally, in typical network environments, DNS (at least when destined for the preconfigured DNS resolvers) is usually one of the few protocols – if not the only one – that is allowed to pass without further ado. Thus, botnets using DNS as C&amp;C benefit from the fact that currently there is no specifically tailored detection mechanism, which in turn, raises the probability for the botnet to remain undetected. &lt;br /&gt;
&lt;br /&gt;
During our &lt;a href=&quot;http://blog.cj2s.de/archives/27-DNS-as-carrier-for-botnet-CC.html&quot; target=&quot;_blank&quot;&gt;work on covert communication of botnet command and control channels&lt;/a&gt;, we analyzed Feederbot in some detail and monitored it over the last year. In this post, I will provide some insight on the C&amp;C. &lt;br /&gt;
Not only Feederbot, but also &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.symantec.com/connect/blogs/morto-worm-sets-dns-record&#039;]);&quot;  href=&quot;http://www.symantec.com/connect/blogs/morto-worm-sets-dns-record&quot; target=&quot;_blank&quot;&gt;Morto&lt;/a&gt; seems to be using DNS as carrier for its command and control channel.&lt;br /&gt;
&lt;br /&gt;
But let us focus on Feederbot for now. Feederbot uses valid DNS syntax for its DNS messages. Messages from the C&amp;C server to the bot are transmitted in the rdata field of a TXT resource record. The DNS requests have the several different schemes for the question domain name (qname), similar to the following where [CHUNK-ID] is an int &gt;= 0, incremented by 1:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
[50 bytes].[CHUNK-ID].[qdparam].0.f2.[TLD].   IN   TXT&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The DNS responses typically carry one TXT RR in the answer section (sometimes repeated in the authority section) with a 220 byte string that is base64 encoded. Here is an example:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
xMtwHYRyZu/z4QbhBKZIVWvPBfiuGn+jb1WQxtZN7PR9Wf0sfnAqxDOJD9LgmwfFaU&lt;br /&gt;
Go6fdtgZ0lIQyAx1VWJw+vzdHdxMpHu6xfMRq8sVSfqwPvI9TEIV8pkXw4P4TCSH05&lt;br /&gt;
BAO1LGPMQ+XD+TYLY2woxM1j06mCMhrNjWzI8WbmCBlj2/dpR73KBnDl/DRmheKWMJ&lt;br /&gt;
x2dUTp4iFMH4N9kXjeOYis&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Once base64 decoded, the messages are still no real plaintext, because they are encrypted with RC4. Feederbot uses a variety of different RC4 encryption keys and even stacks RC4 encryption. A specific part of the DNS query domain name is used to transmit parameters for key derivation. As an example, one such parametrized key derivation function takes as input a substring of the query domain name, denoted as &#039;qdparam&#039; in the example above. The value of the substring &#039;qdparam&#039; is then RC4-encrypted with the (constant) string “feedme” (hence the name of the bot) and the result is used to initialize the RC4 decryption of the actual C&amp;C message chunks. The stream cipher is used in a stateful manner, so that if a message chunk gets lost, decryption of all subsequent message chunks will fail. In addition, Feederbot’s C&amp;C message chunks make use of cyclic redundancy checks to verify the decryption result. The CRC32 checksum preceeds message chunk payload and is not encrypted.&lt;br /&gt;
&lt;!-- s9ymdb:20 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;400&quot; height=&quot;172&quot;  src=&quot;http://blog.cj2s.de/uploads/feederbot-message-chunks.png&quot;  alt=&quot;Feederbot DNS message chunk&quot; /&gt;&lt;br /&gt;
The fact that CRC32 checksums are used makes it comfortable to know whether decryption works or not. Interestingly, we have seen ANY as resource record type in some of the queries, too. In order to perform the DNS requests, the bot relies on Windows DNSAPI.dll::DnsQuery_W.&lt;br /&gt;
&lt;br /&gt;
The following figure shows an important part of the disassembled RC4 initialization routine:&lt;br /&gt;
&lt;!-- s9ymdb:21 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;1122&quot; height=&quot;278&quot;  src=&quot;http://blog.cj2s.de/uploads/rc4init.assembler.png&quot;  alt=&quot;RC4 initialization routine&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Well, the drawback of encryption is that you need a key and you better choose one that is easy to remember, such as:&lt;br /&gt;
&lt;!-- s9ymdb:22 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;658&quot; height=&quot;207&quot;  src=&quot;http://blog.cj2s.de/uploads/beefdead.png&quot;  alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
So, what is the lesson we learn from Feederbot? Watch your DNS traffic!&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 02 Sep 2011 18:05:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/28-guid.html</guid>
    
</item>
<item>
    <title>DNS as carrier for botnet C&amp;C</title>
    <link>http://blog.cj2s.de/archives/27-DNS-as-carrier-for-botnet-CC.html</link>
            <category>Botnets</category>
    
    <comments>http://blog.cj2s.de/archives/27-DNS-as-carrier-for-botnet-CC.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=27</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=27</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    Botnets have become one of the biggest security issues on the Internet imposing a variety of threats to Internet users. Advances in malware research have challenged botnet operators to improve the resilience of their C&amp;C traffic. Partly, this has been achieved by moving towards decentralized structures (like P2P) or by otherwise obfuscating and even encrypting communication. &lt;br /&gt;
&lt;br /&gt;
Recently, &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.christian-rossow.de&#039;]);&quot;  href=&quot;http://www.christian-rossow.de&quot; target=&quot;_blank&quot;&gt;Christian Rossow&lt;/a&gt; and me, we looked into what we term covert communication, that is command and control communication which is hidden in what seems to be regular Internet traffic. We discovered and reverse engineered Feederbot, a botnet that uses DNS as carrier for its command and control. Using k-Means clustering and a Euclidean Distance based classifier, we correctly classified more than 14 million DNS transactions of 42,143 malware samples concerning DNS C&amp;C usage. Interestingly, this analysis revealed yet another bot family with DNS C&amp;C. In addition, we correctly detected DNS C&amp;C in mixed office workstation network traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;table style=&quot;margin-top:0px&quot; border=&quot;0&quot;&gt;&lt;br /&gt;
&lt;tr&gt;&lt;td&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/2011.ec2nd.org/program/&#039;]);&quot;  href=&quot;http://2011.ec2nd.org/program/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://2011.ec2nd.org/static/ec2nd.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;
&lt;td&gt;Our paper dealing with &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.cj2s.de/On-Botnets-that-use-DNS-for-Command-and-Control.pdf&#039;]);&quot;  href=&quot;http://www.cj2s.de/On-Botnets-that-use-DNS-for-Command-and-Control.pdf&quot; target=&quot;_blank&quot;&gt;DNS as carrier for botnet command and control channels&lt;/a&gt; got accepted at &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/2011.ec2nd.org/program/&#039;]);&quot;  href=&quot;http://2011.ec2nd.org/program/&quot; target=&quot;_blank&quot;&gt;this year&#039;s EC2ND conference&lt;/a&gt;. I will be presenting the results at EC2ND which is going to take place in Gothenburg, Sweden, September 6-7 at Chalmers University.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;
&lt;/table&gt;&lt;br /&gt;
&lt;br/&gt;&lt;br /&gt;
&lt;br/&gt; 
    </content:encoded>

    <pubDate>Mon, 22 Aug 2011 17:49:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/27-guid.html</guid>
    
</item>
<item>
    <title>Best practice: chrooted BIND on CentOS 5.6+ with DNSSEC aware resolution</title>
    <link>http://blog.cj2s.de/archives/25-Best-practice-chrooted-BIND-on-CentOS-5.6+-with-DNSSEC-aware-resolution.html</link>
            <category>Securing Linux</category>
    
    <comments>http://blog.cj2s.de/archives/25-Best-practice-chrooted-BIND-on-CentOS-5.6+-with-DNSSEC-aware-resolution.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=25</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=25</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    BIND is the most prevalent DNS server software. Since CentOS 5.6, BIND is readily available in the more recent version 9.7.0 in the packages bind97*. Among others, a preconfigured chroot environment is provided. In order to use chrooted BIND, install the package bind97-chroot and make sure that ROOTDIR is correct in /etc/sysconfig/named:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
[us@ns ~]# grep ROOTDIR /etc/sysconfig/named&lt;br /&gt;
ROOTDIR=/var/named/chroot&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Note that a service named restart is required in case BIND was running beforehand. &lt;br /&gt;
In order to provide the chroot environment, certain files and directories are (re)mounted under /var/named/chroot&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
/etc/named on /var/named/chroot/etc/named type none (rw,bind)&lt;br /&gt;
/var/named on /var/named/chroot/var/named type none (rw,bind)&lt;br /&gt;
/etc/named.conf on /var/named/chroot/etc/named.conf type none (rw,bind)&lt;br /&gt;
/etc/named.rfc1912.zones on /var/named/chroot/etc/named.rfc1912.zones type none (rw,bind)&lt;br /&gt;
/etc/rndc.conf on /var/named/chroot/etc/rndc.conf type none (rw,bind)&lt;br /&gt;
/etc/rndc.key on /var/named/chroot/etc/rndc.key type none (rw,bind)&lt;br /&gt;
/usr/lib/bind on /var/named/chroot/usr/lib/bind type none (rw,bind)&lt;br /&gt;
/etc/named.iscdlv.key on /var/named/chroot/etc/named.iscdlv.key type none (rw,bind)&lt;br /&gt;
/etc/named.root.key on /var/named/chroot/etc/named.root.key type none (rw,bind)&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Thus, for example /etc/named.conf is actually made available to the chrooted BIND and you as the admin just have to take care of one file. Previously, there used to be two named.confs, one inside the chroot environment and one outside. If you do not have a named.conf yet, I suggest you start using the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.cymru.com/Documents/secure-bind-template.html&#039;]);&quot;  href=&quot;http://www.cymru.com/Documents/secure-bind-template.html&quot;&gt;named.conf template by Rob Thomas of Team Cymru&lt;/a&gt;.&lt;br /&gt;
Heading for DNSSEC validating resolution, the most important settings in named.conf are the following:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
    // ****** DNSSEC relevant settings ****** //&lt;br /&gt;
    // Since 9.5 the default value is dnssec-enable yes;.&lt;br /&gt;
    // This statement may be used in a view or global options clause.&lt;br /&gt;
    dnssec-enable yes;&lt;br /&gt;
    // indicates that a resolver (a caching or caching-only name server)&lt;br /&gt;
    // will attempt to validate replies from DNSSEC enabled (signed) zones.&lt;br /&gt;
    // To perform this task the server also needs either a valid trusted-&lt;br /&gt;
    // keys clause (containing one or more trusted-anchors or a managed-keys&lt;br /&gt;
    // clause. Since 9.5 the default value is dnssec-validation yes;&lt;br /&gt;
    dnssec-validation yes;&lt;br /&gt;
    dnssec-lookaside auto;&lt;br /&gt;
    /&lt;strong&gt; Path to ISC DLV key &lt;/strong&gt;/&lt;br /&gt;
    //bindkeys-file &quot;/etc/named.iscdlv.key&quot;;&lt;br /&gt;
    /&lt;strong&gt; Path to root DNSSEC key &lt;/strong&gt;/&lt;br /&gt;
    bindkeys-file &quot;/etc/named.root.key&quot;;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
As shown above, I changed the bindkeys-file statement to point to the root DNSSEC key instead of ISC&#039;s DLV root key. This is fine because by now there is a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.isc.org/community/blog/201007/using-root-dnssec-key-bind-9-resolvers&#039;]);&quot;  href=&quot;http://www.isc.org/community/blog/201007/using-root-dnssec-key-bind-9-resolvers&quot; target=&quot;_blank&quot;&gt;verifiable path to validate ISC&#039;s DLV root key&lt;/a&gt; (signed root, signed .ORG and signed isc.org and dlv.isc.org zones). Thus, ISC&#039;s DLV key does not need to be included any longer.&lt;br /&gt;
&lt;br /&gt;
Please note that as of now (bind97-9.7.0-6.P2.el5_6.3), there is &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/bugzilla.redhat.com/show_bug.cgi?id=719855&#039;]);&quot;  href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=719855&quot; target=&quot;_blank&quot;&gt;a bug in the init script of bind97&lt;/a&gt; which has been acknowleged upstream. Basically, the root DNSSEC key is not mounted in the chroot environment. Until the bug will be fixed in the package, you should apply the fix (I also provided in the bug report):&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
# A possible fix is to include /etc/named.root.key in /etc/init.d/named, i.e.&lt;br /&gt;
# change the contents of the ROOTDIR_MOUNT variable in /etc/init.d/named from&lt;br /&gt;
&lt;br /&gt;
ROOTDIR_MOUNT=&#039;/etc/named /etc/pki/dnssec-keys /var/named /etc/named.conf&lt;br /&gt;
/etc/named.dnssec.keys /etc/named.rfc1912.zones /etc/rndc.conf /etc/rndc.key&lt;br /&gt;
/usr/lib64/bind /usr/lib/bind /etc/named.iscdlv.key&#039;&lt;br /&gt;
&lt;br /&gt;
# to&lt;br /&gt;
&lt;br /&gt;
ROOTDIR_MOUNT=&#039;/etc/named /etc/pki/dnssec-keys /var/named /etc/named.conf&lt;br /&gt;
/etc/named.dnssec.keys /etc/named.rfc1912.zones /etc/rndc.conf /etc/rndc.key&lt;br /&gt;
/usr/lib64/bind /usr/lib/bind /etc/named.iscdlv.key /etc/named.root.key&#039;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Finally you should test with a domain that has authoritative DNSSEC information. The answer must contain the AD flag.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
[us@ns ~]# dig +dnssec @127.0.0.1 gov. ns&lt;br /&gt;
; &lt;&lt;&gt;&gt; DiG 9.7.0-P2-RedHat-9.7.0-6.P2.el5_6.2 &lt;&lt;&gt;&gt; +dnssec @127.0.0.1 gov. ns&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 14572&lt;br /&gt;
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags: do; udp: 4096&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;gov.                           IN      NS&lt;br /&gt;
&lt;br /&gt;
;; ANSWER SECTION:&lt;br /&gt;
gov.                    172800  IN      NS      b.gov-servers.net.&lt;br /&gt;
gov.                    172800  IN      NS      a.gov-servers.net.&lt;br /&gt;
gov.                    172800  IN      RRSIG   NS 7 1 172800 20110609040023 &lt;br /&gt;
20110604040023 43879 gov. FnygljkPqlL9Q08CX5lixJ7O5bB6ysM...&lt;br /&gt;
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Sat, 02 Jul 2011 21:50:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/25-guid.html</guid>
    
</item>
<item>
    <title>Delegating IN-ADDR.ARPA domains for reverse DNS resolution (PTR: IP to hostname)</title>
    <link>http://blog.cj2s.de/archives/24-Delegating-IN-ADDR.ARPA-domains-for-reverse-DNS-resolution-PTR-IP-to-hostname.html</link>
            <category>Linux Hints</category>
    
    <comments>http://blog.cj2s.de/archives/24-Delegating-IN-ADDR.ARPA-domains-for-reverse-DNS-resolution-PTR-IP-to-hostname.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=24</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=24</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    Part of a clean DNS configuration is to maintain a mapping from IP addresses to hostnames. Especially in email exchange, many mail servers require that the sender&#039;s IP address can be looked up in DNS and e.g. maps to a hostname. You can easily test this using the tool dig which is usually part of bind-utils:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
$  dig  -x 80.67.18.126&lt;br /&gt;
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 19989&lt;br /&gt;
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0&lt;br /&gt;
&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;126.18.67.80.in-addr.arpa.     IN      PTR&lt;br /&gt;
&lt;br /&gt;
;; ANSWER SECTION:&lt;br /&gt;
126.18.67.80.in-addr.arpa. 86400 IN     PTR     mxlb.ispgateway.de.&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The listing shows the lookup for a PTR record of (one of) the mail server&#039;s IP address(es) of my domain. dig provides the -x flag which behind the scenes makes a query for 126.18.67.80.in-addr.arpa. of resource record type PTR. Equivalently, you can issue &#039;dig 126.18.67.80.in-addr.arpa. PTR&#039;. As we can see from the output above, the IP address &lt;strong&gt;80.67.18.126&lt;/strong&gt; maps to the hostname &lt;strong&gt;mxlb.ispgateway.de.&lt;/strong&gt; (which in turn maps to 80.67.18.126 when querying for an A RR type).&lt;br /&gt;
&lt;br /&gt;
In order to be able to provide reverse mappings for a set of IP addresses that have been assigned, there should be a delegation (or referral) from the authoritative entity which assigned the IP addresses. Usually you will want to have CIDR ranges of IPv4 addresses delegated. Thus, let&#039;s assume the upstream ISP takes care of the whole /24 network &lt;strong&gt;1.2.3.0/24&lt;/strong&gt; (i.e. 1.2.3.0-1.2.3.255) and the subnet IP address range &lt;strong&gt;1.2.3.32/27&lt;/strong&gt; (i.e. 1.2.3.32-1.2.3.63) should be delegated from the authoritative (upstream ISP) nameserver A to (your) nameserver B. The following configuration snippets provide an example configuration for BIND and illustrate the required steps.&lt;br /&gt;
&lt;br /&gt;
Thus, A needs to be configured to delegate the DNS entries concerning the IP addresses 1.2.3.32/27 to the nameserver B as follows:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
; depending on your style of zone files, you might not have an $ORIGIN in them at all&lt;br /&gt;
$ORIGIN 3.2.1.IN-ADDR.ARPA.&lt;br /&gt;
@            IN  SOA   ns1.A.com. dnsadmin.A.com. (&lt;br /&gt;
                              2011052501; serial number&lt;br /&gt;
                              1h             ; refresh after&lt;br /&gt;
                              1h             ; retry update after&lt;br /&gt;
                              2w             ; expire after&lt;br /&gt;
                              1h             ; negative caching TTL)&lt;br /&gt;
              IN  NS      ns1.A.com.&lt;br /&gt;
              IN  NS      ns2.A.com.&lt;br /&gt;
&lt;br /&gt;
; here go PTR records for the IP address range 1.2.3.0-.31 which is not delegated to B&lt;br /&gt;
1            IN  PTR   some.absolute.hostname.example.com.&lt;br /&gt;
...&lt;br /&gt;
31           IN  PTR   note.that.relative.names.dont.make.sense.here.&lt;br /&gt;
&lt;br /&gt;
; here goes the referral for the subnet 1.2.3.32/27 to B&#039;s name server(s)&lt;br /&gt;
32/27         IN  NS  ns1.B.com.&lt;br /&gt;
32/27         IN  NS  ns2.B.com.    ; in case B has a second NS&lt;br /&gt;
&lt;br /&gt;
; Now comes an important part. the above statement does not suffice to refer queries to B&#039;s name server.&lt;br /&gt;
; In addition, we also have to define CNAMEs for ALL IP addresses in the subnet and map them to&lt;br /&gt;
; the referred domain 32/27.&lt;br /&gt;
32            IN  CNAME   32.32/27.3.2.1.IN-ADDR.ARPA.&lt;br /&gt;
; or alternatively&lt;br /&gt;
32            IN  CNAME   32.32/27&lt;br /&gt;
....&lt;br /&gt;
63            IN  CNAME   63.32/27  ; keep going from 32 to 63...&lt;br /&gt;
; ...or alternatively use the $GENERATE macro of BIND 8.2+&lt;br /&gt;
$GENERATE 32-63 $ CNAME $.32/27&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Note that we could have chosen ANY arbitrary name instead of 32/27 for the CNAME targets as well as the referral (one could even refer outside the in-addr.arpa tree). However, &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/tools.ietf.org/html/rfc2317&#039;]);&quot;  href=&quot;http://tools.ietf.org/html/rfc2317&quot; target=&quot;_blank&quot;&gt;RFC 2317&lt;/a&gt; recommends the above scheme (for good reason).&lt;br /&gt;
&lt;br /&gt;
On the &quot;target&quot; nameserver B, the zone looks similar to:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
$ORIGIN 32/27.3.2.1.IN-ADDR.ARPA.&lt;br /&gt;
@            IN  SOA   ns1.B.com. dnsadmin.B.com. ( ... )&lt;br /&gt;
              IN  NS      ns1.B.com.&lt;br /&gt;
              IN  NS      ns2.B.com.&lt;br /&gt;
&lt;br /&gt;
; provide the PTR mapping for the IP addresses 1.2.3.32-.63 (maybe omit first and &lt;br /&gt;
; last as they are network and broadcast addresses).&lt;br /&gt;
32            IN  PTR   some-net.b.example.com.&lt;br /&gt;
33            IN  PTR   host33.b.example.com.&lt;br /&gt;
....&lt;br /&gt;
62            IN  PTR   web.example.com.&lt;br /&gt;
63            IN  PTR   host63.example.com.&lt;br /&gt;
&lt;br /&gt;
; alternatively use the $GENERATE macro of BIND 8.2+&lt;br /&gt;
$GENERATE 32-63 $ PTR host$.b.example.com.&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The configuration of the zone on the nameserver B is something like:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
...&lt;br /&gt;
    zone &quot;32/27.3.2.1.in-addr.arpa&quot; in {&lt;br /&gt;
      type master;&lt;br /&gt;
      file &quot;data/1.2.3.32_27.reverse.zone&quot;;&lt;br /&gt;
    };&lt;br /&gt;
...&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Testing the configuration&lt;/strong&gt;&lt;br /&gt;
Here are some commands using dig in order to test the configuration:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
; query one of the PTRs at B&#039;s nameserver&lt;br /&gt;
dig +norecurse  @[nameserver-of-B]  33.32/27.3.2.1.in-addr.arpa  PTR&lt;br /&gt;
&lt;br /&gt;
; query A&#039;s nameserver for the exact referral&lt;br /&gt;
dig +norecurse  @[nameserver-of-A]  32/27.3.2.1.in-addr.arpa  ANY&lt;br /&gt;
&lt;br /&gt;
; query A&#039;s nameserver for one of the PTRs&lt;br /&gt;
dig +norecurse  @[nameserver-of-A]  33.32/27.3.2.1.in-addr.arpa  PTR&lt;br /&gt;
dig +norecurse  @[nameserver-of-A]  33.3.2.1.in-addr.arpa  PTR&lt;br /&gt;
&lt;br /&gt;
; query one of the PTRs starting at the root&lt;br /&gt;
dig -x 1.2.3.33&lt;br /&gt;
dig +trace -x 1.2.3.33&lt;br /&gt;
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Wed, 01 Jun 2011 19:03:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/24-guid.html</guid>
    
</item>
<item>
    <title>Kryptotag - Transport Layer Security with RSA-PSK</title>
    <link>http://blog.cj2s.de/archives/23-Kryptotag-Transport-Layer-Security-with-RSA-PSK.html</link>
            <category>German ID card / nPA</category>
    
    <comments>http://blog.cj2s.de/archives/23-Kryptotag-Transport-Layer-Security-with-RSA-PSK.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=23</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=23</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    Last week, &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www1.hgi.rub.de/kryptotag/&#039;]);&quot;  href=&quot;http://www1.hgi.rub.de/kryptotag/&quot; target=&quot;_blank&quot;&gt;Kryptotag&lt;/a&gt; and &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www1.hgi.rub.de/spring/&#039;]);&quot;  href=&quot;http://www1.hgi.rub.de/spring/&quot; target=&quot;_blank&quot;&gt;SPRING&lt;/a&gt; took place at &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.hgi.rub.de/&#039;]);&quot;  href=&quot;http://www.hgi.rub.de/&quot; target=&quot;_blank&quot;&gt;HGI&lt;/a&gt; in Bochum. It turned out to be a very interesting event, although unfortunately, I could not stay very long. My talk dealt with how Transport Layer Security with RSA-secured Pre-Shared Keys is used in the eID Online Authentication of the new German ID card. I provided a short recap on the default RSA key exchange and the plain Pre-Shared Key variant before outlining the difference to the RSA-PSK variant. My slides are available &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.cj2s.de/2011-11-21%20CJD%20-%20TLS-RSA-PSK.pdf&#039;]);&quot;  href=&quot;http://www.cj2s.de/2011-11-21%20CJD%20-%20TLS-RSA-PSK.pdf&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Tue, 29 Mar 2011 21:35:00 +0200</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/23-guid.html</guid>
    
</item>
<item>
    <title>TLS-RSA-PSK Cipher Suites for OpenSSL</title>
    <link>http://blog.cj2s.de/archives/21-TLS-RSA-PSK-Cipher-Suites-for-OpenSSL.html</link>
            <category>German ID card / nPA</category>
    
    <comments>http://blog.cj2s.de/archives/21-TLS-RSA-PSK-Cipher-Suites-for-OpenSSL.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=21</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=21</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    Since November 2010, the new German electronic ID card provides a facility to perform an online remote authentication of the ID card holder. This method is called eID online authentication and is defined in the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.bsi.bund.de/cln_165/ContentBSI/Publikationen/TechnischeRichtlinien/tr03110/index_htm.html&#039;]);&quot;  href=&quot;https://www.bsi.bund.de/cln_165/ContentBSI/Publikationen/TechnischeRichtlinien/tr03110/index_htm.html&quot; target=&quot;_blank&quot;&gt;Technical Guideline TR-03110&lt;/a&gt; of the Federal Office for Information Security. As part of the eID online authentication, personal data can be transmitted from the electronic ID card to its counterpart, the eID server. All data transmitted between the eletronic ID card and the eID server is supposed to be subject to secure messaging.&lt;br /&gt;
&lt;br /&gt;
As the eID online authentication is specifically tailored to be used in web applications, the secure messaging channel between the eID card and the eID server is mapped to the Security Assertion Markup Language (SAML) and uses several &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/tools.ietf.org/pdf/rfc5246.pdf&#039;]);&quot;  href=&quot;http://tools.ietf.org/pdf/rfc5246.pdf&quot; target=&quot;_blank&quot;&gt;TLS&lt;/a&gt; channels (&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/tools.ietf.org/pdf/rfc5246.pdf&#039;]);&quot;  href=&quot;http://tools.ietf.org/pdf/rfc5246.pdf&quot; target=&quot;_blank&quot;&gt;Transport Layer Security, RFC 5246&lt;/a&gt;). In order to prevent man-in-the-middle attacks, the TLS channels are intertwined with the Terminal Authentication. This binding is realized by two aspects, one of them being the fact that special cipher suites are used which combine X.509 certificate based peer authentication with pre-shared keys. These cipher suites are termed &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/tools.ietf.org/pdf/rfc4279.pdf&#039;]);&quot;  href=&quot;http://tools.ietf.org/pdf/rfc4279.pdf&quot; target=&quot;_blank&quot;&gt;TLS-RSA-PSK and defined in RFC 4279&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I implemented one of the &lt;a href=&quot;http://blog.cj2s.de/openssl-1.0.0c.tls-rsa-psk.tar&quot; target=&quot;_blank&quot;&gt;TLS-RSA-PSK cipher suites as a patch&lt;/a&gt; to &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.openssl.org&#039;]);&quot;  href=&quot;http://www.openssl.org&quot; target=&quot;_blank&quot;&gt;openssl-1.0.0c&lt;/a&gt;. &lt;strong&gt;This patch is EXPERIMENTAL.&lt;/strong&gt; Apply it like so:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
tar xvzf openssl-1.0.0c.tar.gz&lt;br /&gt;
cd openssl-1.0.0c&lt;br /&gt;
patch -p1 -i ../openssl-1.0.0c.tls-rsa-psk.patch&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;strong&gt;IMPORTANT NOTE: This patch is provided &quot;as is&quot;. See LICENSE.txt for details.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Testing TLS-RSA-PSK&lt;/strong&gt;&lt;br /&gt;
You can test locally whether your openssl with TLS-RSA-PSK works as follows. Make sure that you actually call the currently generated openssl binary (in the apps directory):&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
# launching the server&lt;br /&gt;
openssl s_server \&lt;br /&gt;
    -psk c033f52671c61c8128f7f8a40be88038bcf2b07a6eb3095c36e3759f0cf40837 \&lt;br /&gt;
    -key privkey.pem \&lt;br /&gt;
    -cipher RSA-PSK-AES256-CBC-SHA \&lt;br /&gt;
    -debug -state&lt;br /&gt;
&lt;br /&gt;
# launch the client&lt;br /&gt;
openssl s_client -connect localhost:4433 \&lt;br /&gt;
    -psk c033f52671c61c8128f7f8a40be88038bcf2b07a6eb3095c36e3759f0cf40837 \&lt;br /&gt;
    -cipher RSA-PSK-AES256-CBC-SHA \&lt;br /&gt;
    -debug -state&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
You should then be able to pass data back and forth between the server and the client. Additionally, I have provided transscripts of what it looks like if it works. There is a &lt;a href=&quot;http://blog.cj2s.de/server.RSAPSK.log&quot; target=&quot;_blank&quot;&gt;server log&lt;/a&gt; and a &lt;a href=&quot;http://blog.cj2s.de/client.RSAPSK.log&quot; target=&quot;_blank&quot;&gt;client log&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Fri, 25 Feb 2011 19:38:20 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/21-guid.html</guid>
    
</item>
<item>
    <title>Expert Comments on Possible Web Fraud</title>
    <link>http://blog.cj2s.de/archives/22-Expert-Comments-on-Possible-Web-Fraud.html</link>
            <category>TV</category>
    
    <comments>http://blog.cj2s.de/archives/22-Expert-Comments-on-Possible-Web-Fraud.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=22</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=22</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    I gave a short interview to Sat.1 today about the technical skills needed in order to implement a system for online bets. The interview was broadcast as part of a short report on a case where maybe online fraud was involved, though this is still to be clarified.&lt;br /&gt;
&lt;!-- The video interview can no longer be found online here: &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.sat1nrw.de/Archiv/Illegales-Gluecksspiel/441d2794/&#039;]);&quot;  href=&quot;http://www.sat1nrw.de/Archiv/Illegales-Gluecksspiel/441d2794/&quot; target=&quot;_blank&quot;&gt;http://www.sat1nrw.de/Archiv/Illegales-Gluecksspiel/441d2794/&lt;/a&gt;. --&gt;&lt;br /&gt;
&lt;!-- s9ymdb:19 --&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.sat1nrw.de/Archiv/Illegales-Gluecksspiel/441d2794/&#039;]);&quot;  href=&quot;http://www.sat1nrw.de/Archiv/Illegales-Gluecksspiel/441d2794/&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;450&quot; height=&quot;253&quot;  src=&quot;http://blog.cj2s.de/uploads/2011-02-christian-j.-dietrich.sat1.serendipityThumb.png&quot; title=&quot;2011-02-christian-j.-dietrich.sat1.png&quot; alt=&quot;Christian J. Dietrich, SAT.1 interview&quot; /&gt;&lt;/a&gt; 
    </content:encoded>

    <pubDate>Mon, 14 Feb 2011 16:19:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/22-guid.html</guid>
    
</item>
<item>
    <title>LaTeX Editing on Windows</title>
    <link>http://blog.cj2s.de/archives/20-LaTeX-Editing-on-Windows.html</link>
    
    <comments>http://blog.cj2s.de/archives/20-LaTeX-Editing-on-Windows.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=20</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=20</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    Yes, Windows is far from being an enjoyable LaTeX editing base. However, every once in a while, you will find yourself urged to edit LaTeX under Windows. Thus, I compiled a few steps in order to have a somewhat usable LaTeX editing environment. I use &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.miktex.org/&#039;]);&quot;  href=&quot;http://www.miktex.org/&quot;&gt;MiKTEX&lt;/a&gt; in combination with &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.xm1math.net/texmaker/&#039;]);&quot;  href=&quot;http://www.xm1math.net/texmaker/&quot;&gt;Texmaker&lt;/a&gt; (both free). Texmaker has a builtin PDF viewer and an IDE-style builtin compile initiator. As often, it is the small details that make the difference. I dislike using an external program as PDF viewer that locks the .pdf-file and prevents from successful re-compilation. As a consequence you have to close the PDF viewer manually before each and every compile. Texmaker&#039;s builtin PDF viewer does not lock the pdf-file and thus re-compilation works like a charm. Furthermore, the -synctex=1 option to pdflatex enables the PDF viewer to jump to the right position in the LaTeX source upon a right-click. Even if you have your own special series of commands for compilation, you can recreate them in the options of Texmaker. I use the following user-defined quick build command in the options (remove line breaks, leave the pipes):&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
bibtex %|&lt;br /&gt;
pdflatex -synctex=1 -interaction=nonstopmode %.tex|&lt;br /&gt;
pdflatex -synctex=1 -interaction=nonstopmode %.tex|&lt;br /&gt;
&quot;C:/Program Files/Adobe/Reader 9.0/Reader/AcroRd32.exe&quot; %.pdf&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Note that Texmaker uses the internal PDF viewer even though Acrobat&#039;s Reader is supposed to be called as last step (bug? feature?). All in all, in my eyes, Texmaker is a great LaTeX editor. 
    </content:encoded>

    <pubDate>Sat, 05 Feb 2011 15:09:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/20-guid.html</guid>
    
</item>
<item>
    <title>Compiling Gnuplot 4.4.2 on CentOS 5.5</title>
    <link>http://blog.cj2s.de/archives/19-Compiling-Gnuplot-4.4.2-on-CentOS-5.5.html</link>
            <category>Linux Hints</category>
    
    <comments>http://blog.cj2s.de/archives/19-Compiling-Gnuplot-4.4.2-on-CentOS-5.5.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=19</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=19</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    CentOS is a really fine platform for professional Linux servers which is - among others - characterized by stable software releases. However, especially in a research environment every once in a while you need a recent version of a software. CentOS ships with Gnuplot 4.0.0 but I need Gnuplot &gt;=4.4. In case others need this, too, here are my compile instructions:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
# make sure your system is uptodate&lt;br /&gt;
yum clean all&lt;br /&gt;
yum check-update&lt;br /&gt;
yum update&lt;br /&gt;
&lt;br /&gt;
# based on a minimal installation, you need some packages in order to compile, I suggest&lt;br /&gt;
yum install gcc gcc-c++ make libX11 xauth&lt;br /&gt;
yum install cairo-devel pango-devel freetype-devel gd-devel&lt;br /&gt;
&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.2/gnuplot-4.4.2.tar.gz/download&lt;br /&gt;
tar xzf gnuplot-4.4.2.tar.gz &lt;br /&gt;
cd gnuplot-4.4.2&lt;br /&gt;
less INSTALL&lt;br /&gt;
&lt;br /&gt;
# start compiling. I usually install self-compiled stuff at /opt/[PKG-NAME]&lt;br /&gt;
./configure --prefix=/opt/gnuplot442&lt;br /&gt;
make&lt;br /&gt;
# make sure the shipped version of gnuplot is removed (this is probably not necessary but prevents version mix-up)&lt;br /&gt;
yum remove gnuplot&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
# you might want to add a symlink&lt;br /&gt;
ln -s /opt/gnuplot442/bin/gnuplot /usr/bin/gnuplot&lt;br /&gt;
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Wed, 01 Dec 2010 19:25:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/19-guid.html</guid>
    
</item>
<item>
    <title>neuer Personalausweis (nPA) - analysis of remaining risks</title>
    <link>http://blog.cj2s.de/archives/18-neuer-Personalausweis-nPA-analysis-of-remaining-risks.html</link>
            <category>German ID card / nPA</category>
    
    <comments>http://blog.cj2s.de/archives/18-neuer-Personalausweis-nPA-analysis-of-remaining-risks.html#comments</comments>
    <wfw:comment>http://blog.cj2s.de/wfwcomment.php?cid=18</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.cj2s.de/rss.php?version=2.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    

    <author>nospam@example.com (Christian J. Dietrich)</author>
    <content:encoded>
    As posted before, we have done an analysis of the remaining risks of the new German ID card (neuer Personalausweis, nPA) conducted by the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.bmi.bund.de/cln_174/SharedDocs/Pressemitteilungen/DE/2010/mitMarginalspalte/10/npa.html&#039;]);&quot;  href=&quot;http://www.bmi.bund.de/cln_174/SharedDocs/Pressemitteilungen/DE/2010/mitMarginalspalte/10/npa.html&quot; target=&quot;_blank&quot;&gt;German Federal Ministry of the Interior (Bundesinnenministerium)&lt;/a&gt;. In mid October 2010, we published &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.internet-sicherheit.de/fileadmin/docs/elektronischer-personalausweis/Studie-Restrisiken%20eID-Funktion%20nPA%20AusweisApp.2010.pdf&#039;]);&quot;  href=&quot;http://www.internet-sicherheit.de/fileadmin/docs/elektronischer-personalausweis/Studie-Restrisiken%20eID-Funktion%20nPA%20AusweisApp.2010.pdf&quot; target=&quot;_blank&quot;&gt;the summary of our study&lt;/a&gt;, presenting the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.internet-sicherheit.de/aktuelles/mitteilungen/nachricht/nachricht-detail/restrisiken-der-eid-funktion-des-neuen-personalaus/&#039;]);&quot;  href=&quot;http://www.internet-sicherheit.de/aktuelles/mitteilungen/nachricht/nachricht-detail/restrisiken-der-eid-funktion-des-neuen-personalaus/&quot; target=&quot;_blank&quot;&gt;key findings of the remaining risks (in German)&lt;/a&gt; when using the eID functionality via the Internet. &lt;br /&gt;
&lt;br /&gt;
As the summary is only available in German, I will try to sum up the key findings in English here. First of all, we have to state that we analyzed the eID functionality only (neither the sovereign identification with biometry etc. nor the signature function). Thus, you may compare the target of the eID function to what usually is achieved using username and password authentication today. However, the eID function has mutual authentication builtin. This is one of the biggest advantages compared to &quot;classic&quot; username/password authentication where the server side is - if at all - only authenticated by its SSL/TLS certificate (ever heard of phishing?). Furthermore, the nPA requires a secret PIN before it can be used which effectively turns it into a two-factor-authentication mechanism. Thus, the security level of the eID function can be regarded much higher than classic username/password authentication.&lt;br /&gt;
&lt;br /&gt;
There is always two faces of the same coin, so what ARE the remaining risks? We found that the card reader category B (Basisleser) poses a certain threat: Malware on the user&#039;s computer may - under certain circumstances - misuse the eID function of an nPA. As the secret PIN must be entered via the computer&#039;s keyboard when using Cat-B card readers, a keylogger may easily catch the PIN. Note that this only works with Cat-B card readers, not with the higher class card readers Cat-S (Standardleser) or Cat-K (Komfortleser). For more details, see our &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.internet-sicherheit.de/fileadmin/docs/elektronischer-personalausweis/Studie-Restrisiken%20eID-Funktion%20nPA%20AusweisApp.2010.pdf&#039;]);&quot;  href=&quot;http://www.internet-sicherheit.de/fileadmin/docs/elektronischer-personalausweis/Studie-Restrisiken%20eID-Funktion%20nPA%20AusweisApp.2010.pdf&quot; target=&quot;_blank&quot;&gt;summary&lt;/a&gt;. A &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.ccepa.de/public/kartenleser.htm&#039;]);&quot;  href=&quot;http://www.ccepa.de/public/kartenleser.htm&quot; target=&quot;_blank&quot;&gt;list of certified card readers&lt;/a&gt; is available online. 
    </content:encoded>

    <pubDate>Tue, 02 Nov 2010 22:22:00 +0100</pubDate>
    <guid isPermaLink="false">http://blog.cj2s.de/archives/18-guid.html</guid>
    
</item>

</channel>
</rss>