<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7652481</id><updated>2025-09-23T03:18:10.982-04:00</updated><category term="Sguil"/><category term="NSM"/><category term="Snort"/><category term="WTF?"/><category term="Perl"/><category term="Events"/><category term="Tor"/><category term="OSSEC"/><category term="apt"/><category term="dns"/><category term="management"/><category term="MySQL"/><category term="book review"/><category term="hacking"/><title type='text'>Infosec Potpourri</title><subtitle type='html'>Network Security Monitoring (NSM), general InfoSec commentary and just a hint of cinnamon.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.vorant.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>246</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7652481.post-5731497538227553271</id><published>2010-01-21T15:38:00.000-05:00</published><updated>2010-01-21T15:38:27.672-05:00</updated><title type='text'>Review of &quot;Inside Cyber Warfare&quot; posted</title><content type='html'>Yes, I&#39;ve been on a reading kick lately, and my most recent selection was Jeffrey Carr&#39;s &lt;a href=&quot;http://www.amazon.com/Inside-Cyber-Warfare-Mapping-Underworld/dp/0596802153&quot;&gt;&lt;i&gt;Inside Cyber Warfare: Mapping the Cyber Underworld&lt;/i&gt;&lt;/a&gt;.&amp;nbsp; I&#39;m not really a big fan of using the &lt;i&gt;cyber-&lt;/i&gt; prefix unless you&#39;ve got some kind of bionic implant, but otherwise I really liked this book and gave it the full 5 stars:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&quot;Inside Cyber Warfare: Mapping the Cyber Underworld&quot; is the best book I&#39;ve seen for those of us charged with defending against the highest-end threats to information security. It provides a comprehensive intelligence briefing on actors, capabilities, motivations and possible responses to acts of cyberwar. I highly recommend this for government, military and corporate readers who are responsible for either securing their own networks or for setting security policy. The threat is real, and these groups are active. Inside Cyber Warfare is the guide you need to help you understand the context in which your organization operates on the modern battlefield. &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
You can read the full review &lt;a href=&quot;http://www.amazon.com/gp/cdp/member-reviews/A1DJBCGKWJ2568&quot;&gt;here&lt;/a&gt; if you like.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/5731497538227553271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/5731497538227553271' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5731497538227553271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5731497538227553271'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/review-of-inside-cyber-warfare-posted.html' title='Review of &quot;Inside Cyber Warfare&quot; posted'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-5840712873435681994</id><published>2010-01-14T18:34:00.000-05:00</published><updated>2010-01-14T18:34:57.863-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apt"/><title type='text'>Is active response a valid approach to dealing with APT?</title><content type='html'>I recently picked up a copy of &lt;a href=&quot;http://intelfusion.net/&quot;&gt;Jeffrey Carr&lt;/a&gt;&#39;s &lt;a href=&quot;http://www.amazon.com/Inside-Cyber-Warfare-Mapping-Underworld&quot;&gt;&lt;i&gt;Inside Cyber Warfare:  Mapping the Cyber Underworld&lt;/i&gt;&lt;/a&gt; (review pending, stay tuned!).&amp;nbsp; One of the chapters struck a particular chord with me, and I thought I&#39;d share my views.&lt;br /&gt;
&lt;br /&gt;
Chapter 4, &lt;i&gt;Responding to International Cyber Attacks as Acts of War&lt;/i&gt; (written by guest author Lt. Cmdr. Matthew J. Sklerov) is a fascinating legal analysis of the basis of the legal use of armed force between nation-states.&amp;nbsp; In it, Sklerov proposes that not only do states have the legal right to respond to network intrusions with &quot;active response&quot; (AKA &quot;hack backs&quot;), but that this is a far more effective response than traditional passive defense.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Of course, people have been talking about &quot;active response&quot; for almost as long as I&#39;ve been in the security field.&amp;nbsp; However, most of that talk was oriented towards garden-variety attacks, not the high end attackers referred to in this analysis.&amp;nbsp; Yes, this chapter (in fact, much of the book) is talking about what we refer to as the Advanced Persistent Threat (APT).&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
This chapter talks a lot about whether a cyber attack could be construed as the use of armed force (answer: yes) and if it would be legal for one state to launch a cyber attack on another in order to defend or deter them from such attacks (answer: yes).&amp;nbsp; I think everyone can agree that attacks that are clearly government sponsored would warrant some sort of action by the victim state.&lt;br /&gt;
&lt;br /&gt;
The really interesting argument, though, is whether the attacks have to be clearly &lt;i&gt;attributed&lt;/i&gt; to a state, or whether it is sufficient that they merely be &lt;i&gt;imputed&lt;/i&gt;.&amp;nbsp; In other words, do you have to prove that the state performed the attack directly, or is it sufficient to know that the attack was carried out by non-state actors either under the direction of or with the tacit complicity of the attacking state?&lt;br /&gt;
&lt;br /&gt;
This is a very important question, because states that are known to be actively engaged in cyber conflicts rarely do their own dirty work.&amp;nbsp; Russia and China, for example, are both widely believed to work through their own extensive networks of civilian hacker groups, which &lt;i&gt;somehow&lt;/i&gt; seem to escape prosecution as long as their targets are the enemies of their respective states.&amp;nbsp; If the governments approve of what the hacker groups are doing, they allow them to operate and offer them a large degree of immunity from international investigation.&amp;nbsp; The whole time, the government gets &lt;a href=&quot;http://government.zdnet.com/?p=3858&amp;amp;tag=trunk;content&quot;&gt;plausible deniability&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
According to Sklerov&#39;s argument (which I&#39;m brutally mangling by boiling it down into simplistic terms), states that perform cyber attacks, or through inaction allow cyberattacks to be performed from within their borders, have sacrificed their right to remain unmolested and opened themselves up to hack backs by their victims.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
However, Sklerov&#39;s entire thesis is colored by his military background.&amp;nbsp; His argument is based on the premise that the victim is a nation-state, not a corporation, or even a group or individual.&amp;nbsp; It&#39;s very easy to talk about how a nation-state has the ability to use armed force to protect it&#39;s interests, but the international law that he marshals to support his argument does not apply at all unless you are a government.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Sure, APT is out there targeting governments, but they&#39;re also inside companies as we learned this week with Google&#39;s announcement that it was being hacked by China.&amp;nbsp; My biggest question, then, is &quot;Where does this leave the rest of us?&quot;&amp;nbsp; I very much doubt that any non-governmental organization or individual is prepared to open a cyberwar with a nation-state.&amp;nbsp; If they did, their actions would by definition be illegal and would probably result in criminal charges in their own country.&amp;nbsp; In fact, it would be that country&#39;s positive duty to fully investigate the hack back and enforce the law, or they&#39;d open &lt;b&gt;themselves&lt;/b&gt; up to hack backs by the &lt;b&gt;aggressor nation&lt;/b&gt; due to their inaction.&lt;br /&gt;
&lt;br /&gt;
Sklerov also spends some time discussing technological aspects of active attack: specifically, how to accurately determine the source of the attack in order to target your foes.&amp;nbsp; I admit that I&#39;m a little confused by this:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Automated or administrator-operated trace programs can trace attacks back to their point of origin.&amp;nbsp; These programs can help system administrators classify cyber attacks as armed attacks [...] and evaluate whether attacks originate from a state previously declared a sanctuary state.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
A few pages later, he also writes:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Cyber attacks are frequently conducted through intermediate computer systems to disguise the true identity of the attacker.&amp;nbsp; Although trace programs are capable of penetrating intermediate disguises back to their electronic source, their success rate is not perfect.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Honestly, I have absolutely no idea what he&#39;s talking about here.&amp;nbsp; &quot;Trace programs?&quot;&amp;nbsp; I see those on TV and in the movies, but never in real life.&amp;nbsp; The technology just does not exist.&amp;nbsp; He&#39;s right that APT attacks never come from the attackers&#39; own computers; they compromise other systems and then use those as disposable launch points from which to attack their real targets.&amp;nbsp; When a launch point is &quot;burned&quot;, they discard it and start again somewhere else.&amp;nbsp; You can easily identify these intermediaries, but there&#39;s no way to trace back any farther without contacting the system owners (or hacking back) and performing a manual, time-consuming analysis.&amp;nbsp; This idea of an automated trace just isn&#39;t based in reality.&lt;br /&gt;
&lt;br /&gt;
In my view, these are the two points that really undermine the value of active response as an APT fighting tool:&amp;nbsp; Unless you&#39;re a government it&#39;s still illegal, and it&#39;s not technically feasible to trace the source back to an appropriate target anyway (even if you are a government).&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Having said that, I still think this is a fascinating and compelling legal argument.&amp;nbsp; Governments have the duty to protect the interests of their citizens (and by extension, companies and other organizations based in their country), so perhaps this could serve as a legal basis for allowing the government to take a more active role in helping to defend private networks.&amp;nbsp; In that case, the active response could be performed with the assistance of or under the direction of an authorized federal agency, which might eliminate some of the legal barriers and do some real good in the field.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/5840712873435681994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/5840712873435681994' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5840712873435681994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5840712873435681994'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/is-active-response-valid-approach-to.html' title='Is active response a valid approach to dealing with APT?'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-2029882671551537297</id><published>2010-01-12T23:08:00.000-05:00</published><updated>2010-01-12T23:08:26.939-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apt"/><category scheme="http://www.blogger.com/atom/ns#" term="book review"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><title type='text'>Review of &quot;Hacking: The Next Generation&quot;</title><content type='html'>One of my New Year&#39;s Resolutions for 2010 is to get back into the habit of reading lots of security books.&amp;nbsp; I used to read at least one a month, and often more, but somehow I got out of the habit last year.&amp;nbsp; This year I want to do better!&lt;br /&gt;
&lt;br /&gt;
To start off with, I read &lt;a href=&quot;http://www.amazon.com/Hacking-Next-Generation-Animal-Guide/dp/0596154577&quot;&gt;&lt;i&gt;Hacking: The Next Generation&lt;/i&gt;&lt;/a&gt; by Nitesh Dhanjani, Billy Rios and Brett Hardin.&amp;nbsp; You can find the full 4-star review at &lt;a href=&quot;http://www.amazon.com/gp/cdp/member-reviews/A1DJBCGKWJ2568&quot;&gt;Amazon.com&lt;/a&gt;, but I&#39;ll excerpt it here:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I first saw this book in the store, and a quick glance through the Table of Contents got me pretty excited. I saw topics like mobile security, the phishing underground, targeted attacks against company executives and (the big selling point for me) attacks against cloud computing. In fact, I was so excited to read it that I ordered it from Amazon on the spot, through my phone. After having read this book, I can say that it lived up to most of my expectations.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;I should also mention that the focus of this book is primarily on high-end attackers, some of whom fall under the category of &quot;Advanced Persistent Threat&quot; or &quot;APT&quot;, even though the authors don&#39;t use this term.&amp;nbsp; Although experienced APT fighters might not find a lot new here, I&#39;m very happy to see that some of the new crop of books are starting to address these types of threats.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/2029882671551537297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/2029882671551537297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2029882671551537297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2029882671551537297'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/review-of-hacking-next-generation.html' title='Review of &quot;Hacking: The Next Generation&quot;'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-5252326930235032054</id><published>2010-01-01T18:47:00.000-05:00</published><updated>2010-01-01T18:47:16.036-05:00</updated><title type='text'>Follow me on Twitter</title><content type='html'>Just a note:&amp;nbsp; if you&#39;d like to see the things I felt were too small to blog but interesting enough to point out, &lt;a href=&quot;http://www.twitter.com/DavidJBianco&quot;&gt;follow me&lt;/a&gt; on Twitter.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/5252326930235032054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/5252326930235032054' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5252326930235032054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5252326930235032054'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/follow-me-on-twitter.html' title='Follow me on Twitter'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-2985725561960282139</id><published>2010-01-01T09:49:00.000-05:00</published><updated>2010-01-01T09:49:48.977-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="management"/><title type='text'>Why your CIRT should fail!</title><content type='html'>Ok, you know I don&#39;t mean that literally!&amp;nbsp; However, &quot;FAIL&quot; is the theme of this month&#39;s Wired magazine, specifically, how you can turn losing into winning.&amp;nbsp; As I was reading Jonah Lehrer&#39;s &lt;a href=&quot;http://www.wired.com/magazine/2009/12/fail_accept_defeat/&quot;&gt;&lt;i&gt;Accept Defeat: The Neuroscience of Screwing Up&lt;/i&gt;&lt;/a&gt;, I realized that it had some important implications for CIRTs and other security teams.&lt;br /&gt;
&lt;br /&gt;
In the article, Lehrer writes about how scientists often fail to make the most of their experimental results:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Over the past few decades, psychologists have dismantled the myth of objectivity. The fact is, we carefully edit our reality, searching for evidence that confirms what we already believe. Although we pretend we’re empiricists — our views dictated by nothing but the facts — we’re actually blinkered, especially when it comes to information that contradicts our theories. &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
An intrusion analyst has this problem all the time.&amp;nbsp; While responding to a possible incident, an investigator collects a lot of information and tries to organize it in such a way as to tell a coherent story, the better to judge what happened, whether it was significant, and what to do about it.&amp;nbsp; Creating this story, then, is the equivalent of coming up with a theory about the event.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The problem is that there is often a lot of confusing and/or contradictory evidence in a complex investigation.&amp;nbsp; The investigator comes to the table, though, with a built-in biased based on his previous experience with similar incidents, his knowledge of the local user population, his understanding of the organization&#39;s IT infrastructure and a lot of other factors.&amp;nbsp; Can a biased analyst be relied upon to create an unbiased view of events?&amp;nbsp; Yes, says Lehrer:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;It’s normal to filter out information that contradicts our preconceptions. The only way to avoid that bias is to be aware of it.&lt;/i&gt;&lt;br /&gt;
&lt;div class=&quot;littleBlackBar&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;This is one of the two big take-aways I got from this article:&amp;nbsp; &lt;b&gt;Simply being aware that you have a tendency to create a biased story is the most effective way to keep your investigations objective.&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;The other important point this article makes is that the composition of your research team (or in this case, your CIRT) is crucial, but maybe not in the way you think:&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;i&gt;There are advantages to thinking on the margin. When we look at a problem from the outside, we’re more likely to notice what doesn’t work. Instead of suppressing the unexpected, shunting it aside with our “Oh shit!” circuit and Delete key &lt;/i&gt;[brain functions discussed earlier in the article]&lt;i&gt;, we can take the mistake seriously. A new theory emerges from the ashes of our surprise.&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
In other words, if your CIRT is composed entirely of experts in the fields in which you expect to operate, you may hit some real challenges when an attacker does something unexpected, something contrary to the conventional wisdom.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;To illustrate this point, Lehrer relates a story about two research labs trying to solve the same problem (unwanted proteins sticking to a filter in their equipment).&amp;nbsp; One lab had a team of researchers who were all experts in the same field, while the other was composed of a diverse set of researchers from different scientific disciplines.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;The first team &quot;&lt;i&gt;took a brute-force approach, spending several weeks methodically testing various fixes. &#39;It was extremely inefficient,&#39; Dunbar says. &#39;They eventually solved it, but they wasted a lot of valuable time.&#39;&lt;/i&gt;&quot;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;The second team, composed of experts in many different fields, however, had a different result:&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;i&gt;The diverse lab, in contrast, mulled the problem at a group meeting. None of the scientists were protein experts, so they began a wide-ranging discussion of possible solutions. At first, the conversation seemed rather useless. But then, as the chemists traded ideas with the biologists and the biologists bounced ideas off the med students, potential answers began to emerge. “After another 10 minutes of talking, the protein problem was solved,” Dunbar says. “They made it look easy.”&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;The reason the second team was more successful?&amp;nbsp; They had the &quot;outsider&#39;s&quot; point of view.&amp;nbsp; They were able to examine fresh approaches to the problem, kick them around and come up with a creative solution far more easily than the &quot;expert&quot; team bound by a sense of &quot;this is how we always do it&quot;.&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;It&#39;s pretty easy to see how this could apply to security.&amp;nbsp; We&#39;re constantly called to come up with creative solutions to problems, though our problems are usually called &quot;incidents.&quot;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;b&gt;The key to a successful CIRT is the diversity of the team.&lt;/b&gt;&amp;nbsp; You need intrusion analysts, sure, but you also need specialists in other areas such as incident response, malware reverse engineering, system administration, threat intelligence and as many other relevant disciplines as you can lay your hands on.&amp;nbsp; Put these people together on the same team, give them easy communication and good collaboration tools and watch them go!&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;I&#39;m extremely fortunate that I work in just such an environment, and I can tell you from experience that this approach works.&amp;nbsp; It&#39;s almost shocking how effective it is.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;I never met an analyst that thought she was good enough to deal with everything by herself, nor a CIRT that felt it was able to handle incidents well enough.&amp;nbsp; This is an profession where we have a constant need for improvement and adversaries who are often extremely skilled.&amp;nbsp; To respond well to compromises, it&#39;s important to recognize how you can turn failure into excellence.&amp;nbsp; This article shows how this is possible, for both individuals and teams.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;littleBlackBar&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/2985725561960282139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/2985725561960282139' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2985725561960282139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2985725561960282139'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/why-your-cirt-should-fail.html' title='Why your CIRT should fail!'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-4266328645088659423</id><published>2010-01-01T08:19:00.002-05:00</published><updated>2010-01-01T08:25:03.544-05:00</updated><title type='text'>2010: The Year We Make Contact (with the readers, that is)</title><content type='html'>Hello, and welcome to 2010.  Somehow I&#39;ve managed to go through all of 2009 without making a single blog entry!  I never meant my &lt;a href=&quot;http://blog.vorant.com/2008/11/time-for-change.html&quot;&gt;last post&lt;/a&gt; to be my &lt;span style=&quot;font-weight: bold;&quot;&gt;last&lt;/span&gt; post, so here&#39;s to 2010: The Year I Start Blogging Again.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/4266328645088659423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/4266328645088659423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/4266328645088659423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/4266328645088659423'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2010/01/2010-year-we-make-contact-with-readers.html' title='2010: The Year We Make Contact (with the readers, that is)'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-1370771212262620100</id><published>2008-11-23T21:06:00.002-05:00</published><updated>2008-11-23T21:19:45.023-05:00</updated><title type='text'>Time for a change</title><content type='html'>As most of you probably know, I&#39;ve operated my own security consulting business for the past few years.  What is less widely known is that it was a part time affair, as I kept a full time job working for a US nuclear physics research lab.  I was very happy with the way things were going, but sometimes you just get an offer that&#39;s too good to refuse...&lt;br /&gt;&lt;br /&gt;That&#39;s pretty much how I felt when I started talking to &lt;a href=&quot;http://taosecurity.blogspot.com&quot;&gt;Richard Bejtlich&lt;/a&gt; about coming over to &lt;a href=&quot;http://www.ge.com&quot;&gt;GE&lt;/a&gt; to help them build an enterprise-wide CSIRT.  This is an exceptional chance to help create an incident response capability that could have a very real effect on the security posture of one of the largest companies in the world, and who could turn that down?  To top it off, I know some of the other team members, and I can honestly say that they&#39;re a top-notch group of people.  And in my book, interesting work combined with a high powered team of experts equals an opportunity I just had to take.&lt;br /&gt;&lt;br /&gt;So starting tomorrow, I&#39;ll be an Information Security Incident Handler for GE.  I promise this won&#39;t turn into a GE blog, though.  You&#39;ll still see the same quality technical articles you&#39;ve come to expect.  That is, if my new boss will unshackle me from the oars every now and then.  Heh.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/1370771212262620100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/1370771212262620100' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1370771212262620100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1370771212262620100'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/11/time-for-change.html' title='Time for a change'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-8803772427154600264</id><published>2008-11-03T15:10:00.003-05:00</published><updated>2008-11-06T14:44:43.693-05:00</updated><title type='text'>Detecting outgoing connections from sensitive networks with Bro</title><content type='html'>As I mentioned in &lt;a href=&quot;/2008/11/getting-started-with-bro.html&quot;&gt;my last post&lt;/a&gt;, I&#39;ve been playing with the &lt;a href=&quot;http://www.bro-ids.org&quot;&gt;Bro IDS&lt;/a&gt;.  I wanted to take a stab at creating my own policy, just to see what it&#39;s like to program for Bro.  It turned out to be surprisingly easy.&lt;br /&gt;&lt;br /&gt;I started with the following policy statement: &lt;i&gt;There are certain hosts and subnets on my site which should never initiate connections to the Internet&lt;/i&gt;.  Given that, I want to be notified whenever these forbidden connections happen.  To accomplish this, I created &lt;a href=&quot;http://www.vorant.com/files/restricted-outgoing.bro&quot;&gt;restricted-outgoing.bro&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To use this sample, copy into your $BRO_DIR/site directory, and add &quot;@load restricted-outgoing&quot; to your startup policy (the &lt;i&gt;mybro.bro&lt;/i&gt; script if you&#39;re following my previous example).  &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;##&lt;br /&gt;## Detect unexpected outgoing traffic from restricted subnets&lt;br /&gt;##&lt;br /&gt;@load restricted-outgoing&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now the code is loaded and running, but it must be configured according to your site&#39;s individual list of restricted hosts and subnets.  Following the above lines, you can add something like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;redef RestrictedOutgoing::restricted_outgoing_networks = {&lt;br /&gt;  192.168.4.0/24,  # restricted subnet&lt;br /&gt;  10.0.0.0/8,      # restricted subnet&lt;br /&gt;  192.168.9.43/32, # individual host&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you run Bro now, you should start seeing lines like the following in your &lt;i&gt;$BRO_DIR/logs/alarms.log&lt;/i&gt; file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;1225743661.858791 UnexpectedOutgoingUDPConnection &lt;br /&gt;x.x.x.x/netbios-ns &gt; y.y.y.y/netbios-ns : Restricted &lt;br /&gt;Outgoing UDP Connection&lt;br /&gt;&lt;br /&gt;1225743661.858791 UnexpectedOutgoingTCPConnection &lt;br /&gt;x.x.x.x/netbios-ns &gt; y.y.y.y/netbios-ns : Restricted &lt;br /&gt;Outgoing TCP Connection&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Similar entries will also show up in your &lt;i&gt;$BRO_DIR/logs/restricted-outgoing.file&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;This script considers a connection to be a tuple composed of the following values: (src_ip, dst_ip, dst_port).  When it alerts, that connection is placed on a temporary ignore list to suppress further alerts, and a per-connection timer starts counting down.  Additional identical connections reset the timer.  When the counter finally reaches 0, the connection is removed from the ignore list, so you&#39;ll receive another alert next time it happens.  The default value for this timer is 60 seconds, but you can change it by using the following code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;redef RestrictedOutgoing::restricted_connection_timeout = 120 secs;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Even though your policy may state that outgoing connections are not allowed from these sources, it may be the case that you have certain exceptions.  For example, Microsoft Update servers are useful for Windows systems.  There are three ways to create exceptions for this module:&lt;br /&gt;&lt;br /&gt;First, you can define a list of hosts that &lt;b&gt;any&lt;/b&gt; of the restricted nets is allowed to access:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;redef RestrictedOutgoing::allowed_outgoing_dsts = {&lt;br /&gt;  72.246.0.0/15, # Akamai, usually updates&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Second, you can list services which particular subnets or hosts are allowed to contact:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;redef RestrictedOutgoing::allowed_outgoing_network_service_pairs = {&lt;br /&gt; [192.168.4.7/32, 25/tcp], # SMTP server&lt;br /&gt; [192.168.4.8/32, 80/tcp], # Web proxy&lt;br /&gt; [192.168.4.9/32, 53/udp], # DNS server&lt;br /&gt; [10.0.0.0/8, 123/udp],          # NTP&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Finally, you can list specific pairs of hosts which are allowed to communicate:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;redef RestrictedOutgoing::allowed_outgoing_dst_pairs = {&lt;br /&gt; [myhost.myorg.org, www.google.com],&lt;br /&gt;        [192.168.4.23, www.business-partner.com],&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note that this is the only one of the three options that allow you specify individual IPs without CIDR block notation, or to use hostnames.  The hostnames are especially useful, as Bro automatically knows about all the different IPs that the hostnames resolve to, so the &quot;www.google.com&quot; above would match any of the IPs returned by DNS.  &lt;br /&gt;&lt;br /&gt;Overall, I found the Bro language pretty easy to learn, and very well suited for the types of things a security analyst typically wants to look for.  I was able to bang out a rough draft of this policy script on my second day working with Bro, and I refined it a bit more on the third day.  Of course, I&#39;m sure an actual Bro expert could tell me all sorts of things I did wrong.  If you&#39;re that Bro expert, please leave a comment below!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update 2008-11-06 14:45&lt;/b&gt; I have uploaded a new version of the code with some additional functionality.  Check the comments below for details.  And thanks to Seth for his help!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/8803772427154600264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/8803772427154600264' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8803772427154600264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8803772427154600264'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/11/detecting-outgoing-connections-from.html' title='Detecting outgoing connections from sensitive networks with Bro'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-5543636973217323557</id><published>2008-11-03T14:37:00.002-05:00</published><updated>2008-11-03T15:07:19.206-05:00</updated><title type='text'>Getting started with Bro</title><content type='html'>Lately, I&#39;ve been playing with &lt;a href=&quot;http://bro-ids.org&quot;&gt;Bro&lt;/a&gt;, a very cool policy-based IDS.  I say &quot;policy-based&quot; because, unlike &lt;a href=&quot;http://www.snort.org&quot;&gt;Snort&lt;/a&gt;, Bro doesn&#39;t rely on a database of signatures in order to detect suspicious traffic.  Rather, Bro breaks things down into different types of network events, and Bro analysts write scripts to process these events based on their particular detection policies and emit alarms.&lt;br /&gt;&lt;br /&gt;At first, I was pretty puzzled about how to get started.  The Bro website has some quick start docs, but they direct you to use the &quot;brolite&quot; configuration (a kind of simplified, out-of-the-box configuration).  The bad news for that, however, is two-fold.  First, the configuration is listed as deprecated in the files that come with the source tarball, and second, the brolite installation process doesn&#39;t work right under Linux.  &lt;br /&gt;&lt;br /&gt;So for the record, here&#39;s what you need to get started with Bro.  (Thanks to Bro Guru &lt;a href=&quot;http://www.nersc.gov/~scottc/&quot;&gt;Scott Campbell&lt;/a&gt; for helping me out with this):&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;# ./configure --prefix=/usr/local/bro&lt;br /&gt;&lt;li&gt;# make &amp;&amp; make install&lt;br /&gt;&lt;li&gt;# cp /usr/local/bro/share/bro/mt.bro /usr/local/bro/site/mybro.bro&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;After that, create the file &lt;i&gt;runbro.sh&lt;/i&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;export BROPATH=/usr/local/bro/policy: \&lt;br /&gt;/usr/local/bro/policy/sigs:/usr/local/bro/site&lt;br /&gt;&lt;br /&gt;./bro -i eth1 --use-binpac -W mybro.bro&lt;br /&gt;&lt;/pre&gt;Now you can just run &lt;i&gt;runbro.sh&lt;/i&gt; and it&#39;ll do the right thing.  The new &lt;i&gt;mybro.bro&lt;/i&gt; file will be a very stripped down default set of policies.  It won&#39;t do that much, but you can then add to it as you see fit.  You can find more details about this in the &lt;a href=&quot;http://www.bro-ids.org/wiki/index.php/User_Manual&quot;&gt;Bro User Manual&lt;/a&gt; and &lt;a href=&quot;http://www.bro-ids.org/wiki/index.php/Reference_Manual&quot;&gt;Bro Reference Manual&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;By the way, this example uses the &lt;i&gt;--use-binpac&lt;/i&gt; option to enable some new-style compiled binary detectors.  This caused Bro to crash frequently on my RHEL testbed, so if the same happens to you, you might need to leave that option out.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/5543636973217323557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/5543636973217323557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5543636973217323557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5543636973217323557'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/11/getting-started-with-bro.html' title='Getting started with Bro'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-423281839352222032</id><published>2008-09-10T16:21:00.003-04:00</published><updated>2008-09-10T16:32:41.693-04:00</updated><title type='text'>Catastrophic consequences of running JavaScript</title><content type='html'>Wow, I had no idea simply running JavaScript could be this bad.  I&#39;m really happy now to be running the excellent &lt;a href=&quot;http://noscript.net&quot;&gt;NoScript&lt;/a&gt; Firefox extension.  &lt;br /&gt;&lt;br /&gt;First, take a look at &lt;a href=&quot;http://hasthelargehadroncolliderdestroyedtheworldyet.com/&quot;&gt;HasTheLargeHadronColliderDestroyedTheWordYet.com&lt;/a&gt;. &lt;b&gt;DO NOT VISIT THIS PAGE WITH A JAVASCRIPT-ENABLED BROWSER!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Notice that the page displays a simple &quot;Nope&quot;, indicating that the world has not yet ended.  &lt;span style=&quot;font-style:italic;&quot;&gt;Whew!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, view the source for that page.  You&#39;ll see the following snippet of code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;if (!(typeof worldHasEnded == &quot;undefined&quot;)) {&lt;br /&gt;document.write(&quot;YUP.&quot;);&lt;br /&gt;} else {&lt;br /&gt;document.write(&quot;NOPE.&quot;);&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;noscript&amp;gt;NOPE.&amp;lt;/noscript&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let me walk you through that code... First, if you have JavaScript enabled, everything between &lt;span style=&quot;font-style:italic;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt; and &lt;span style=&quot;font-style:italic;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt; is executed, which comes out to be a single &lt;span style=&quot;font-style:italic;&quot;&gt;if&lt;/span&gt;&lt;/span&gt; statement, where one of the possible outcomes is that the world, in fact, has been destroyed.  &lt;br /&gt;&lt;br /&gt;On the other hand, if your browser doesn&#39;t support JavaScript, the page simply renders whatever is inside the &lt;span style=&quot;font-style:italic;&quot;&gt;&amp;lt;noscript&amp;gt;&lt;/span&gt; stanza, which &lt;span style=&quot;font-weight:bold;&quot;&gt;always&lt;/span&gt; evaluates to &quot;NOPE.&quot;&lt;br /&gt;&lt;br /&gt;In other words, with JavaScript enabled, there&#39;s a small (but finite) chance that the world could end!  However, with no JavaScript, there&#39;s zero chance.  Therefore, JavaScript is demonstrably dangerous!  The risk far outweighs any temporary benefit we could gain from this technology!&lt;br /&gt;&lt;br /&gt;Do not tempt fate!  Disable JavaScript everywhere &lt;span style=&quot;font-weight:bold;&quot;&gt;IMMEDIATELY&lt;/span&gt;!  You have been warned!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/423281839352222032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/423281839352222032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/423281839352222032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/423281839352222032'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/09/catastrophic-consequences-of-running.html' title='Catastrophic consequences of running JavaScript'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-5908694057558726447</id><published>2008-09-08T11:19:00.002-04:00</published><updated>2008-09-08T11:27:08.765-04:00</updated><title type='text'>How those Internets work</title><content type='html'>If you&#39;re a lot of analysts, you probably have a very good grasp of how networks work at the LAN, WAN and maybe even MAN level.  You also probably know that &quot;the Internet&quot; is really just a collection of independent networks that have mutually agreed to talk to each other, but you&#39;re not exactly sure how all that works.  &lt;br /&gt;&lt;br /&gt;If that sounds like you, I highly recommend Rudolph van der Berg&#39;s article &lt;a href=&quot;http://arstechnica.com/guides/other/peering-and-transit.ars/1&quot;&gt;How the &#39;Net works: an introduction to peering and transit&lt;/a&gt;.  It&#39;s a great introduction to peering and transit agreements, which goes into detail about how traffic routes from one network to another without using a lot of technical jargon.  I particularly like the discussion of the economics of choosing peering vs. transiting.  &lt;br /&gt;&lt;br /&gt;Great article.  I have to say, it&#39;s one of the most informative networking articles I&#39;ve read in a while.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/5908694057558726447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/5908694057558726447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5908694057558726447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/5908694057558726447'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/09/how-those-internets-work.html' title='How those Internets work'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-329355502063716124</id><published>2008-07-28T11:26:00.003-04:00</published><updated>2008-07-28T11:28:58.013-04:00</updated><title type='text'>Chinese Hacker Podcast</title><content type='html'>The good folks over at &lt;a href=&quot;http://thedarkvisitor.com&quot;&gt;The Dark Visitor&lt;/a&gt; have just completed their first &lt;a href=&quot;http://www.thedarkvisitor.com/2008/07/podcast-number-one/&quot;&gt;podcast&lt;/a&gt;.  These guys are a great resource for those of us who don&#39;t speak Chinese, and if you&#39;re not reading and listening, you probably should be.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/329355502063716124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/329355502063716124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/329355502063716124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/329355502063716124'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/07/chinese-hacker-podcast.html' title='Chinese Hacker Podcast'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-8166542165997767474</id><published>2008-06-19T10:31:00.004-04:00</published><updated>2008-06-19T12:16:55.522-04:00</updated><title type='text'>Integrating domain reputation search into Firefox 3</title><content type='html'>This happens to me every day.  I find a domain name somewhere, usually through my NSM work, and I wonder, &quot;Is this domain known to be malicious?&quot;  Now, I don&#39;t personally know every domain on the Internet, but I&#39;ve had some success using McAffee&#39;s &lt;a href=&quot;http://www.siteadvisor.com/&quot;&gt;SiteAdvisor&lt;/a&gt;.  You feed it a domain name, and it&#39;ll tell you not only if it thinks it&#39;s suspicious, but also whether or not it offers any sort of downloads, what other sites it&#39;s most closely associated with, and what it&#39;s users have to say about it (if anything).  &lt;br /&gt;&lt;br /&gt;Pretty good stuff, but I&#39;m so lazy.  Opening a new tab and typing in the SiteAdvisor URL is just &lt;b&gt;sooo hard&lt;/b&gt;!  So I decided to add it to my list of search plugins, so I can use the integrated search bar instead.  Here&#39;s how to do it.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Find your &lt;i&gt;searchplugins&lt;/i&gt; directory.  For a typical Unix system, this is &lt;i&gt;~/.mozilla/firefox/XXXXXXXX.default/searchplugins&lt;/i&gt; (where the XXXXXXXX is a random string)&lt;br /&gt;&lt;li&gt;Create a file in this directory called &lt;i&gt;siteadvisor.xml&lt;/i&gt; with the contents below.&lt;br /&gt;&lt;li&gt;Restart Firefox.&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;There you go!  Three simple steps, and now &quot;Siteadvisor&quot; should be listed when you drop down the search menu.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;SearchPlugin xmlns=&quot;http://www.mozilla.org/2006/browser/search/&quot; &lt;br /&gt;xmlns:os=&quot;http://a9.com/-/spec/opensearch/1.1/&quot;&amp;gt;&lt;br /&gt;&amp;lt;os:ShortName&amp;gt;Siteadvisor&amp;lt;/os:ShortName&amp;gt;&lt;br /&gt;&amp;lt;os:Description&amp;gt;Search McAffee Siteadvisor&amp;lt;/os:Description&amp;gt;&lt;br /&gt;&amp;lt;os:InputEncoding&amp;gt;UTF-8&amp;lt;/os:InputEncoding&amp;gt;&lt;br /&gt;&amp;lt;os:Url type=&quot;text/html&quot; &lt;br /&gt;method=&quot;GET&quot; template=&quot;http://siteadvisor.com/lookup/?q={searchTerms}&quot;&amp;gt;&lt;br /&gt;&amp;lt;/os:Url&amp;gt;&lt;br /&gt;&amp;lt;/SearchPlugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, the question of the day:  &lt;b&gt;What other sites do you use to easily check a domain&#39;s reputation?&lt;/b&gt;  Leave a comment and let us know!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/8166542165997767474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/8166542165997767474' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8166542165997767474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8166542165997767474'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/06/integrating-domain-reputation-search.html' title='Integrating domain reputation search into Firefox 3'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-8842254874324884200</id><published>2008-06-16T09:02:00.003-04:00</published><updated>2008-06-16T09:07:27.317-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OSSEC"/><title type='text'>OSSEC Project Acquired</title><content type='html'>Congratulations to Daniel Cid, who&#39;s &lt;a href=&quot;http://www.ossec.net&quot;&gt;OSSEC&lt;/a&gt; project has just been &lt;a href=&quot;http://www.ossec.net/main/ossec-project-acquired&quot;&gt;acquired&lt;/a&gt;.  Now that Daniel will be working on the project full time, I think we can look forward to some great things!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/8842254874324884200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/8842254874324884200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8842254874324884200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8842254874324884200'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/06/ossec-project-acquired.html' title='OSSEC Project Acquired'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-1143391210833344682</id><published>2008-06-11T08:06:00.003-04:00</published><updated>2008-06-11T08:13:10.949-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WTF?"/><title type='text'>Unintentional hilarity</title><content type='html'>I subscribe to the &lt;a href=&quot;http://seclists.org/rss/isn.rss&quot;&gt;Info Security News RSS feed&lt;/a&gt;, which is a pretty nice way to keep up with various goings on in the industry.  &lt;br /&gt;&lt;br /&gt;This morning, the top headline was:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;b&gt;&lt;a href=&quot;http://seclists.org/isn/2008/Jun/0043.html&quot;&gt;Unencrypted AT&amp;amp;T laptop stolen, details of managers pay lost&lt;/a&gt;&lt;/b&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;I have to admit, I don&#39;t really feel too bad about the poor AT&amp;T managers.  However, the really funny part was the &lt;i&gt;very next&lt;/i&gt; headline:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;b&gt;&lt;a href=&quot;http://seclists.org/isn/2008/Jun/0042.html&quot;&gt;AT&amp;amp;T Launches Encryption Services to Help Businesses Secure E-Mail and Data&lt;/a&gt;&lt;/b&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;I can&#39;t make this stuff up, folks!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/1143391210833344682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/1143391210833344682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1143391210833344682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1143391210833344682'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/06/unintentional-hilarity.html' title='Unintentional hilarity'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-7450829605897740787</id><published>2008-06-09T11:26:00.003-04:00</published><updated>2008-12-18T10:20:12.693-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><category scheme="http://www.blogger.com/atom/ns#" term="Tor"/><title type='text'>Tor server lists revisited</title><content type='html'>Way back in 2006, I posted about &lt;a href=&quot;http://blog.vorant.com/2006/08/listing-active-tor-servers.html&quot;&gt;a way to list active Tor servers&lt;/a&gt; by querying the Tor directory.  Since then, the Tor project has updated it&#39;s directory protocol, so that old method no longer works.  Since I had someone ask me about it today, I thought this would be a great time to go ahead and update that post.&lt;br /&gt;&lt;br /&gt;The principle is still basically the same:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Identify an authoritative Tor server&lt;br /&gt;&lt;li&gt;Connect to it via HTTP and ask for the router list&lt;br /&gt;&lt;li&gt;Parse the list to get the info you want.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Here&#39;s an updated script you can use to dump the information about active routers.  The output contains 5 columns, separated by pipe characters (&#39;|&#39;).  The columns are :&lt;br /&gt;&lt;pre&gt;server name|IP address|onion routing port| \&lt;br /&gt;directory services port|last update timestamp&lt;/pre&gt;&lt;br /&gt;Now, the first two fields are fairly self-explanatory.  The onion routing port (sometimes referred to as the &lt;i&gt;OR port&lt;/i&gt;) carries the actual data in a Tor session.  The directory services port carries directory traffic (the sort of thing this script does).  Not all Tor routers offer directory services, so you will often see a &lt;i&gt;0&lt;/i&gt; in this column.  Finally, the last column simply shows the time the router last updated it&#39;s status in the directory.  &lt;br /&gt;&lt;br /&gt;Here&#39;s the script:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;#&lt;br /&gt;# Fetch the list of known Tor servers (from an existing Tor server) and&lt;br /&gt;# display some of the basic info for each router.&lt;br /&gt;&lt;br /&gt;use LWP::Simple;&lt;br /&gt;&lt;br /&gt;# Hostname of an existing Tor router.  We use one of the directory authorities&lt;br /&gt;# since that&#39;s pretty much what they&#39;re for.&lt;br /&gt;$INITIAL_TOR_SERVER = &quot;128.31.0.34&quot;;   # peacetime/moria1/moria2&lt;br /&gt;$DIR_PORT = 9031;&lt;br /&gt;&lt;br /&gt;# Fetch the list of servers&lt;br /&gt;$content = get(&quot;http://$INITIAL_TOR_SERVER:$DIR_PORT/tor/status/all&quot;);&lt;br /&gt;@lines = split /\n/,$content;&lt;br /&gt;&lt;br /&gt;foreach $router (@lines) {&lt;br /&gt;    if($router =~ m/^r\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\s+(\S+)\s+(\d+)\s+(\d+)$/) {&lt;br /&gt;        ($name, $address, $or_port, $directory_port, $update_time) =&lt;br /&gt;            ($1, $5, $6, $7, $4);&lt;br /&gt;        print &quot;$name | $address | $or_port | $directory_port | $update_time\n&quot;;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Of course, there is much more information in the directory than this script shows.  As a NSM analyist, I&#39;m more concerned with IPs and port numbers, but if you poke around, you can also find what OS and Tor software versions are running, what capabilities the routers offer, their default exit policies, and other cool stuff.  This is all left as an exercise for the reader.  If you&#39;re interested, &lt;a href=&quot;https://www.torproject.org/doc/spec/dir-spec-v2.txt&quot;&gt;read the spec&lt;/a&gt;.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/7450829605897740787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/7450829605897740787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/7450829605897740787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/7450829605897740787'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/06/tor-server-lists-revisited.html' title='Tor server lists revisited'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-3207576328334394365</id><published>2008-05-16T14:04:00.002-04:00</published><updated>2008-05-16T14:15:07.933-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sguil"/><category scheme="http://www.blogger.com/atom/ns#" term="Snort"/><title type='text'>Alternative PCAP subsystems for Sguil</title><content type='html'>If you read my &lt;a href=&quot;http://blog.vorant.com/2008/04/pcap-indexing.html&quot;&gt;previous post on pcap indexing&lt;/a&gt;, you&#39;ll know that I&#39;ve been playing around with some alternatives to the packet capture and retrieval subsystem in Sguil.  I&#39;m happy to announce that I&#39;ve just committed two replacement subsystems to Sguil&#39;s CVS HEAD, one for &lt;a href=&quot;http://nsmwiki.org/DaemonLogger&quot;&gt;daemonlogger&lt;/a&gt; and one for &lt;a href=&quot;http://nsmwiki.org/SANCP&quot;&gt;SANCP&lt;/a&gt;.  &lt;br /&gt;&lt;br /&gt;The daemonlogger subsystem should be fairly stable, as I&#39;ve been running it in production for some time.  It&#39;s basically a direct replacement for the snort packet logging instance.  It&#39;s probably a bit more efficient, and has a smaller memory footprint, but it&#39;s still substantially similar.  &lt;br /&gt;&lt;br /&gt;The SANCP system, on the other hand, is &lt;b&gt;very&lt;/b&gt; experimental.  It uses the pcap indexing functions of SANCP 1.6.2C6 (and above) to dramatically speed up the retrieval of pcap data from huge captures.  If your capture files are routinely over 2GB or 3GB, you might benefit from this.  However, it does come at a cost, which is that the index files can consume 25% - 35% more disk space than the pcaps alone.  Break out the RAID!&lt;br /&gt;&lt;br /&gt;Of course, these are simply alternatives to the existing Snort-based packet logging system.  That&#39;s not going anyway, we&#39;re simply offering choices for advanced users.  &lt;br /&gt;&lt;br /&gt;Also, even though I&#39;ve been a member of the Sguil project for some time now, these are my first commits into the source tree.  I&#39;m officially a Sguil developer!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/3207576328334394365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/3207576328334394365' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/3207576328334394365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/3207576328334394365'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/05/alternative-pcap-subsystems-for-sguil.html' title='Alternative PCAP subsystems for Sguil'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-2815671107554118342</id><published>2008-04-03T15:54:00.005-04:00</published><updated>2008-04-03T20:20:54.995-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sguil"/><title type='text'>PCAP Indexing</title><content type='html'>There&#39;s been some talk inside the Sguil project lately of improving the performance of PCAP data retrieval.  That is, when you&#39;re trying to fetch the PCAP data for a single session out of a file that contains all the data your sensor saw during that time period, things can get pretty slow.  &lt;br /&gt;&lt;br /&gt;Our current method involves simply identifying which file probably (note the strategic use of that word) contains the data you&#39;re looking for, then using tcpdump with a BPF filter to find it.  This usually works well, but it&#39;s often very slow, especially if the PCAP file you&#39;re searching through is large, say a few GB.&lt;br /&gt;&lt;br /&gt;We&#39;ve discussed a few approaches we could take to improve the performance of these retrievals.  One promising way involves creating an index of the sessions inside each PCAP file.  It turns out that the tool we&#39;re using to collect network session data, &lt;a href=&quot;http://www.metre.net/sancp.html&quot;&gt;SANCP&lt;/a&gt; is actually a pretty decent packet logger, even though we&#39;re not using it in that manner.  The newest 1.6.2 release candidate includes support for PCAP indexing, so I thought I&#39;d take it for a spin and see just what kind of performance improvement we could expect, if any.&lt;br /&gt;&lt;br /&gt;My good friend &lt;a href=&quot;http://geek00l.blogspot.com/&quot;&gt;Geek00L&lt;/a&gt; recently &lt;a href=&quot;http://geek00l.blogspot.com/2008/03/sancp-pcap-index.html&quot;&gt;blogged his experience&lt;/a&gt; with SANCP&#39;s indexing feature, but he didn&#39;t get into the performance, he just wrote about how it worked.  You probably should read that, as well as &lt;a href=&quot;http://metre.net/getpcapfromsancpindex.html&quot;&gt;the official docs&lt;/a&gt;, if you&#39;re interested in this subject.&lt;br /&gt;&lt;br /&gt;Another thing I was interested in was figuring out how to use SANCP to index existing PCAP files, as Sguil is already capturing these with Snort.  By default, SANCP will only index PCAP files that it creates, usually by sniffing the network interface.  I prefer to keep my data collection processes separate if I can, and the existing PCAP collection is working well enough for now.  So my first goal was to see if I could convince SANCP to create an index without creating an entirely new PCAP file.&lt;br /&gt;&lt;br /&gt;It turns out that this is possible, though kinda kludgey.   I was able to use the following &#39;&#39;sancp-pcapindex.conf&#39;&#39; file to create an index:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;default index log&lt;br /&gt;default pcap filename /dev/null&lt;br /&gt;format index delimiter=| sancp_id,output_filename,\&lt;br /&gt;  start_pos,stop_pos,src_ip_dotted,\&lt;br /&gt;  dst_ip_dotted,ip_proto,src_port,dst_port&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is pretty close to the version listed in SANCP&#39;s docs, except that I added the &#39;&#39;default pcap filename /dev/null&#39;&#39; line in there.  So SANCP will still create a PCAP file, but it&#39;ll be written to /dev/null so I&#39;ll never see it.  &lt;br /&gt;&lt;br /&gt;I also had to use two additional command-line options to turn off the &quot;realtime&quot; and &quot;stats&quot; output SANCP likes to generate by default.  so in the final analysis, here&#39;s the command line I ended up using:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sancp -r snort.log.12347263 -c sancp-pcapindex.conf -d sancp-output -R -S&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ok, so on to the actual indexing tests!  I was curious about several things:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;How long does it take to create an index?&lt;br /&gt;&lt;li&gt;How large is the index, compared to the size of the PCAP file itself?&lt;br /&gt;&lt;li&gt;Is there a performance increase by using the index, and if so, how much?&lt;br /&gt;&lt;li&gt;Does extracting PCAP by index return different data than extracting it by tcpdump and a BPF?&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;I decided that I would choose two PCAP files of different sizes for my tests.  One file was 2.9GB, and the other was 9.5GB.  For each file, I tested index creation speed and retrieval speed using tcpdump compared to retrieval speed using the index and SANCP&#39;s &#39;&#39;getpcapfromsancpindex.pl&#39;&#39; tool.  Each of these tests was conducted three times, and the results averaged to form the final result.  In addition, I examined the size of the index file once (the last time), under the assumption that a properly-created index would be the same each time it was generated.&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot;&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;  &lt;td&gt;PCAP size&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;Index size&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;Index Creation&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;Tcpdump extraction&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;Indexed extraction&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;  &lt;td&gt;&lt;b&gt;2.9GB&lt;/b&gt;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;446M&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;7m58s&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;39s&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;5s&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;  &lt;td&gt;&lt;b&gt;9.5GB&lt;/b&gt;&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;1300MB&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;23m20s&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;2m21s&lt;/td&gt;&lt;br /&gt;  &lt;td&gt;11s&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;The larger file is roughly (&lt;b&gt;very&lt;/b&gt; roughly) three times the size of the smaller file.  As this data suggests, the index size and the index creation time are linear, as the larger of each value is about 3x the size of the smaller.  The same is true of the time necessary to extract the data with Tcpdump, though not to quite the same extent (it&#39;s just a bit over 3x).  &lt;br /&gt;&lt;br /&gt;However, the interesting part is that the time required to extract the data using the indices is &lt;b&gt;not&lt;/b&gt; linear.  It only took a little over 2x as long, though to be honest, it could easily be a matter of the amount of data that was contained in the individual network session or something.  Still, using the index was about 87% faster in the small file, and about 92% faster with the larger file.  &lt;br /&gt;&lt;br /&gt;I think it&#39;s pretty clear that these indices speed up PCAP retrieval &lt;b&gt;substantially&lt;/b&gt;.  I think the drawbacks are that the index files are fairly large, and that they take a long time to generate. &lt;br /&gt;&lt;br /&gt;As for the index file size, the indices look like they are about 13% - 15% of the size of the original file.  For the drastic performance improvement they provide, this could be worth it.  What&#39;s one more drive in the RAID array?  Also, it&#39;s possible that they could be compressed, with maybe only a relatively small impact on retrieval speed.  I&#39;ll have to try that out.  &lt;br /&gt;&lt;br /&gt;Index generation time is potentially more serious.  Obviously, it&#39;d be nicer to generate the index at the same time the PCAP is originally written, but as I&#39;m unwilling to do that (for the moment, at least), I think the obvious speed-up would be to somehow allow SANCP to generate the indices without trying to write a new PCAP file.  Even when I&#39;ve directed it to /dev/null, there has to be some performance overhead here, and any time spent writing PCAP we&#39;re throwing away is just time wasted.  This would be my first choice for future work: make a good, quick index for an existing PCAP file.&lt;br /&gt;&lt;br /&gt;All in all, I&#39;m impressed with the retrieval speed of SANCP&#39;s indexed PCAP.  Now, if we can get the index creation issue sorted out, this could be a really great addition to Sguil!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update 2008-04-03 20:15&lt;/b&gt;:  I was in such a rush to complete this post, that I accidentally forgot to answer my question #4!  It turns out that the data returned by both extraction methods is exactly the same.  Even the MD5 checksums of the PCAP files match.  Great!&lt;br /&gt;&lt;br /&gt;Also, note that I edited the above to add details on the command line I used to generate the indices.  Another stupid rush mistake on my part.  Sorry!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/2815671107554118342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/2815671107554118342' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2815671107554118342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2815671107554118342'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/04/pcap-indexing.html' title='PCAP Indexing'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-6832032900287966771</id><published>2008-04-02T14:56:00.002-04:00</published><updated>2008-04-02T15:14:24.946-04:00</updated><title type='text'>Automating malware analysis with Truman</title><content type='html'>Let me start by saying, I&#39;m no malware analyst.  I&#39;ve done a little reversing with IDA Pro, but really only in class.  However, during an incident investigation, I frequently come across an unknown Windows binary that is likely to be some sort of malware, and would really, &lt;b&gt;really&lt;/b&gt; like to know what it does, and stat!  I can do a few basic tests on the binary myself, like examining the strings for clues as to it&#39;s purpose, or maybe unpacking it if it&#39;s using some standard packer.  For the most part, though, modern malware is too hard to get a good handle on quickly unless you&#39;re aces with a debugger.&lt;br /&gt;&lt;br /&gt;A couple of years ago, though, Joe Stewart from LURQH (now SecureWorks) released an analysis framework just for folks like me.  The Reusable Unknown Malware Analysis Net (TRUMAN) is a sandnet environment that allows the malware to run on a real Windows system attached to a protected network with a bunch of fake services, then collects data about the program&#39;s network traffic, files and registry entries created, and even captures RAM dumps of the infected system.  The great thing about TRUMAN is that it not only makes it easy to collect this information, it automates most of the process of creating a secure baseline, analyzing changes against that, and restoring the baseline to the Windows system when it&#39;s all over.&lt;br /&gt;&lt;br /&gt;The terrible thing about Truman though, is that it is quite a complex system, with a lot of moving parts.  Which would be OK, except that it comes with almost no documentation.  Seriously.  None.  There&#39;s an INSTALL file that gives a brief overview, but leaves out most of the important steps.  Frankly, except for &lt;a href=&quot;http://www.shmoocon.org/2006/videos/Stewart-Malware.mp4Shmoocon&quot;&gt; one Shmoocon presentation video&lt;/a&gt;, there&#39;s nothing on the Internet that really tells you what Truman is, how it works or how to go about installing and using it.&lt;br /&gt;&lt;br /&gt;Until now!&lt;br /&gt;&lt;br /&gt;I just added a &lt;a href=&quot;http://www.vorant.com/nsmwiki/Truman&quot;&gt;TRUMAN page&lt;/a&gt; to the &lt;a href=&quot;http://www.vorant.com/nsmwiki&quot;&gt;NSMWiki&lt;/a&gt;.  This contains a lot of information, much more than would comfortably fit into a blog post.  Most importantly, it contains a detailed step-by-step process for getting TRUMAN up and running with RHEL5 and Windows XP.&lt;br /&gt;&lt;br /&gt;Using Truman, I can collect a substantial amount of information about how a suspicious binary acts when it runs, and do it in a matter of 20 or 30 minutes, rather than hours.  Admittedly, it&#39;s not foolproof, but it should come in &lt;i&gt;extremely&lt;/i&gt; handy next time I run across an unknown Trojan.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/6832032900287966771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/6832032900287966771' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/6832032900287966771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/6832032900287966771'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/04/automating-malware-analysis-with-truman.html' title='Automating malware analysis with Truman'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-6777771618290011673</id><published>2008-03-31T15:33:00.004-04:00</published><updated>2008-04-01T06:57:45.731-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sguil"/><category scheme="http://www.blogger.com/atom/ns#" term="WTF?"/><title type='text'>Switching to Sguil:  A whole new meaning</title><content type='html'>Many of you may have wondered why I haven&#39;t yet blogged about the &lt;a href=&quot;http://article.gmane.org/gmane.comp.security.sguil.general/1561&quot;&gt;recent release of Sguil 0.7.0&lt;/a&gt;.  Did I forget?  No.  Am I disappointed with it?  Not at all!  Am I just lazy?  Yes, but that&#39;s not why.&lt;br /&gt;&lt;br /&gt;The truth is, I&#39;ve held off blogging about that because there&#39;s some even bigger news with the Sguil project!&lt;br /&gt;&lt;br /&gt;You probably didn&#39;t know this, as we&#39;ve tried hard to keep it under wraps until it could be formally announced, but the Sguil project has just received an extremely large vote of confidence, in the form of it being acquired lock, stock and barrel by Cisco!&lt;br /&gt;&lt;br /&gt;Yes, you read that right!  From the press release:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Under terms of the transaction, Cisco has acquired the Sguil™ project and related trademarks, as well as the copyrights held by the five principal members of the Sguil™ team, including project founder Robert &quot;Bamm&quot; Visscher. Cisco will assume control of the open source Sguil™ project including the Sguil.net domain, web site and web site content and the Sguil™ Sourceforge project page. In addition, the Sguil™ team will remain dedicated to the project as Cisco employees, continuing their management of the project on a day-to-day basis.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Really, I didn&#39;t blog about Sguil 0.7.0 yet because I didn&#39;t want to do say anything that could have interfered with this deal.  &lt;br /&gt;&lt;br /&gt;The great thing about this is that both Cisco and Sguil have made significant investments in Tcl, as it&#39;s already found in the OS on many Cisco products.  Of course, Sguil is written almost entirely in Tcl, so this should provide for some great synergy going forward.  You should start seeing Sguil being pushed out into the carrier-grade Cisco gear by 3Q08, with the rest of the Cisco-branded products following in phases through 4Q09.  Linksys-branded gear will be supported too, though there&#39;s not an official timetable for that yet.&lt;br /&gt;&lt;br /&gt;On a personal note, I would like to congraluate Bamm (AKA &quot;qru&quot;), Sguil&#39;s lead developer.  He&#39;s put a lot of time into this project over the years, and is finally going to reap some rewards:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Although the financial details of the agreement have not been announced, Sguil™ developer Robert Visscher will become the new VP of Cisco Rapid Analysis Products for Security. “This deal means a lot to the Sguil™ project and to me personally,” Visscher explains. “Previously, we had to be content with simply being the best technical solution to enable intrusion analysts to collect and analyze large amounts of data in an extraordinarily efficient manner. But now, we’ll have the additional advantage of the world’s largest manufacturer of networking gear shoving it down their customers’ throats!  We will no longer have to concern ourselves with mere technical excellence. Instead, I can worry more about which tropical island to visit next, and which flavor daiquiri to order. You know, the important things.”&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I know that many of you will have questions about this major evolution in the Sguil project and our continuing roles as Cisco employees, so please feel free to leave them here as comments, or ask in freenode IRC&#39;s #snort-gui channel.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/6777771618290011673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/6777771618290011673' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/6777771618290011673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/6777771618290011673'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/03/switching-to-sguil-whole-new-meaning.html' title='Switching to Sguil:  A whole new meaning'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-2445128862159251915</id><published>2008-03-25T09:14:00.003-04:00</published><updated>2008-03-25T11:29:41.050-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sguil"/><title type='text'>Temporarily speed up SANCP insertions in Sguil</title><content type='html'>It&#39;s Monday morning, you&#39;re half asleep, you haven&#39;t finished your first diet soda yet, and -- oh no!  Sguild has been down all weekend!  Worse yet, SANCP inserts are backed up, to the tune of 17,000+ files in the queue!&lt;br /&gt;&lt;br /&gt;As you know, the Sguil sensors are pretty much independent of the actual Sguil server.  They&#39;ll happily continue collecting data, even when sguild has been down for a while.  When the server comes back up, the sensors will automagically reconnect and send all the queued data.  This is by design, of course.  You don&#39;t want to lose all that data due to a failure of the central server.&lt;br /&gt;&lt;br /&gt;Even after an extended outage, most of the data collected by the Sguil sensors poses no real problem.  There are relatively few Snort alerts (maybe a few thousand), and probably even fewer PADS events, and these get added to the database in no time.  Network session records collected by SANCP, however, can pose a bigger problem. &lt;br /&gt;&lt;br /&gt;If you recall, SANCP works by keeping an in-memory list of active network &quot;sessions&quot; (including psuedo-sessions created from UDP and ICMP traffic).  By default, it will dump these to a file every minute or so (or more often, on a busy network).  The Sguil sensor contains a SANCP agent process that monitors the filesystem for these files, and sends them to Sguild as they are created, deleting them from the sensor.  &lt;br /&gt;&lt;br /&gt;Now here&#39;s the problem:  there are just so many darned network sessions on a busy network that even a short outage can result in a few hundred files waiting to be queued, especially if you have multiple sensors.  Longer outages, though, can be disastrous.  Let&#39;s say that you have six sensors, and your Sguil server has been down for the weekend (48 hours).  How many files is that?&lt;br /&gt;&lt;center&gt;&lt;pre&gt;60 * 48 * 6 = 17,280&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;Now, at an average rate of about 5 seconds to insert each file, how many hours would that take to catch up?&lt;br /&gt;&lt;center&gt;&lt;pre&gt;17,280 / (60 * 60) = 24&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;That&#39;s right!  It&#39;d take a full 24 hours to catch up!  In the meantime, you&#39;re missing a few days of valuable network data (probably the few days you&#39;re most likely to want to query on Monday morning) and your MySQL database is spending all it&#39;s time inserting, which means not only that it&#39;s slower to respond to your analyst console, but also slower to process incoming events.  In fact, it can easily get caught in a sharp downward spiral, where the incoming data gets even further backed up.&lt;br /&gt;&lt;br /&gt;So what can you do about this?  Actually, it&#39;s quite simple.  If you find that you&#39;re getting behind while processing your backlock of SANCP records, you can &lt;b&gt;dramatically&lt;/b&gt; speed things up by temporarily disabling the indices on your SANCP files.&lt;br /&gt;&lt;br /&gt;First, figure out which days you have to catch up on.  If you know your server crashed on Friday the 8th, and it&#39;s now Monday the 11th, you probably want to go through all SANCP tables from Friday - Monday.  &lt;br /&gt;&lt;br /&gt;Second, determine what the table names will be.  Remember that Sguil creates one SANCP table per day, per sensor.  These are all merged into a single virtual table, but for indexing purposes, ignore that one and concentrate on the individual tables.  They will be named something like:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;sancp_$SENSORNAME_$DATE&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;So for example, if you have two sensors named &quot;external&quot; and &quot;internal&quot;, you&#39;d have the following tables:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;sancp_external_20080208&lt;br /&gt;sancp_internal_20080208&lt;br /&gt;&lt;br /&gt;sancp_external_20080209&lt;br /&gt;sancp_internal_20080209&lt;br /&gt;&lt;br /&gt;sancp_external_20080210&lt;br /&gt;sancp_internal_20080210&lt;br /&gt;&lt;br /&gt;sancp_external_20080211&lt;br /&gt;sancp_internal_20080211&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Next, you simply issue the SQL command to disable indexing for each table:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;ALTER TABLE sancp_external_20080208 DISABLE KEYS;&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;MySQL will perform a quick table check before returning to the prompt.  This may take a minute, and I personally find it annoying to wait after each table, so I usually just create a text file with all the commands in it, one per line, and run it batch mode:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;mysql -u sguil -p sguildb &lt; DISABLE-KEYS.txt&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;Based on my experience, I&#39;ve seen the indexing speed go from 5 seconds per file to about 5 files per second, which is quite significant!  At that rate, it would take less than an hour to insert everything!&lt;br /&gt;&lt;center&gt;&lt;pre&gt;17,280 / (5 * 60 * 60) = 0.96&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;Of course, you have to be extra careful to re-enable indices on all those tables.  You can run a similar set of SQL commands to turn indices back on for a table:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;ALTER TABLE sancp_external_20080208 ENABLE KEYS;&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;Again, I usually run this as a batch job.  &lt;br /&gt;&lt;br /&gt;The act of disabling and then later re-enabling indices does take a little while, but usually not more than a few minutes for each.  Even given this overhead, it is still significantly faster to process a bunch of SANCP files without indices, then reindex them after you&#39;re all caught up.&lt;br /&gt;&lt;br /&gt;Sure wish I didn&#39;t need to know this... 8-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update 2008-03-25 11:27&lt;/b&gt;:  After you re-enable keys, you may need to also do a quick db check to make everything sane again:&lt;br /&gt;&lt;center&gt;&lt;pre&gt;mysqlcheck -o -a -u sguil -p sguildb&lt;/pre&gt;&lt;/center&gt;&lt;br /&gt;This will recheck all your tables and make sure they&#39;re still consistent.  I&#39;ve had a few situations where Sguil has been returning error messages like &quot;ERROR 1030 (HY000): Got error 124 from storage engine&quot; until I did this.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/2445128862159251915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/2445128862159251915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2445128862159251915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2445128862159251915'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/03/temporarily-speed-up-sancp-insertions.html' title='Temporarily speed up SANCP insertions in Sguil'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-1245920769923586845</id><published>2008-03-21T11:01:00.002-04:00</published><updated>2008-03-21T11:18:40.403-04:00</updated><title type='text'>In which I attempt a metaphor</title><content type='html'>So I was explaining the &lt;a href=&quot;http://blog.vorant.com/2008/03/new-zlob-spreads-through-poisoned.html&quot;&gt;poisoned search results&lt;/a&gt; threat to several people yesterday, and I hit upon a good metaphor to explain why this is particularly serious: it increases the attacker&#39;s &quot;shots on goal&quot;.  &lt;br /&gt;&lt;br /&gt;If you know Hockey at all (which I don&#39;t, but I&#39;ve been to a few games), you know that the scoreboard typically lists &quot;Shots on Goal&quot; right beside each team&#39;s score.  Why?  Because you can&#39;t score if you don&#39;t shoot!  &lt;br /&gt;&lt;br /&gt;The more times you get to try to score, the more likely it is that you will do so, and it&#39;s the same with security.  Tracking the number of exploit attempts, even if they are unsuccessful, is just like reporting shots on goal.  &lt;br /&gt;&lt;br /&gt;It happens that poisoned search results are a great way to increase your shots on goal with very little effort, and if the analogy holds, that means this will prove to be an extremely effective strategy for the attackers.  I believe current events are proving this to be true.&lt;br /&gt;&lt;br /&gt;Of course, now that I have not only made &lt;a href=&quot;http://taosecurity.blogspot.com/2008/03/how-many-burning-homes.html&quot;&gt;metaphor linking digital security to real life&lt;/a&gt;, but a &lt;a href=&quot;http://taosecurity.blogspot.com/2006/11/digital-security-lessons-from-ice.html&quot;&gt;hockey metaphor&lt;/a&gt;, at that, I expect that I have invoked The Bejtlich, and he will no doubt be forced to appear shortly and leave an insightful comment.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/1245920769923586845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/1245920769923586845' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1245920769923586845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/1245920769923586845'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/03/in-which-i-attempt-metaphor.html' title='In which I attempt a metaphor'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-2643460687052458962</id><published>2008-03-21T09:44:00.003-04:00</published><updated>2008-03-21T10:59:40.869-04:00</updated><title type='text'>New ZLob spreads through poisoned search results</title><content type='html'>You may have &lt;a href=&quot;www.theregister.co.uk/2007/11/30/google_poisoning_update/&quot;&gt;seen&lt;/a&gt; this &lt;a href=&quot;www.vnunet.com/vnunet/news/2126935/hackers-poison-search-engine-results&quot;&gt;technique&lt;/a&gt; before, but in the last few days, it seems that the creators of the &lt;a href=&quot;http://www.symantec.com/security_response/writeup.jsp?docid=2005-042316-2917-99&quot;&gt;ZLob trojan&lt;/a&gt; have found an effective way to spread their malware:  poisoned search results.  &lt;br /&gt;&lt;br /&gt;In case you&#39;re wondering how this works, it goes something like this:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The attackers identify a set of &quot;hot&quot; search terms that users are most likely to be looking for.  Popular products, current events, celebrities, scandals, you name it.  I don&#39;t know for sure where they come up with these terms, but if it were me, I&#39;d get them from &lt;a href=&quot;http://www.google.com/trends/hottrends&quot;&gt;Google Trends&lt;/a&gt; or some place like that.  To really be effective, the attackers need to gather as many of these terms as possible, perhaps several thousand.  They need to be updated frequently, too.&lt;br /&gt;&lt;li&gt;The attackers identify an otherwise legitimate website that happens to be vulnerable to some sort of file upload attack.&lt;br /&gt;&lt;li&gt;The attackers create a set of HTML files, one per search term they&#39;re targeting.  The HTML is crafted to look highly relevant for that term, with what looks to me like snippets of text from other legitimate web pages on that subject.  In addition, each of the files links to each of the other files, artificially inflating their number of incoming links in an attempt to fool the search engine into placing them nearer to the top of the result list.&lt;br /&gt;&lt;li&gt;When a user searches on one of the terms, they will see poisoned results interspersed with legitimate ones.  If they click on the poisoned link, obfuscated Javascript in the page will redirect them to a site that claims to have a relevant video.  It shows a static GIF that looks like the YouTube video interface, but then pops up a dialog telling the user they need a new CODEC to view the clip.&lt;br /&gt;&lt;li&gt;Of course, you know where this is going... The &quot;CODEC&quot; is an EXE file containing the ZLob trojan.  SCORE!&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;It used to be that if you avoided browsing pr0n, gambling sites and similar shady sites, you were less likely to come into contact with this sort of thing.  But now, legitimate users doing regular, every day searches are being exposed a lot more often.  This is kinda scary.&lt;br /&gt;&lt;br /&gt;So what can you do to protect your users against this type of attack?  On a technical level, not that much.  You can&#39;t really get much done on the Internet without a search engine, and it&#39;s going to be up to them to improve their ability to vet the pages they index.  Individually, something like the &lt;a href=&quot;http://noscript.net/&quot;&gt;NoScript Firefox plugin&lt;/a&gt; would be effective, but that&#39;s difficult to impose on an entire user community.&lt;br /&gt;&lt;br /&gt;However, the most effective security is not technical.  Get the message out to your users, &quot;There are malicious web pages out there; you&#39;re likely to find some of them inside the search engine results; be careful what you click on, and never download things you weren&#39;t expecting to download.&quot;&lt;br /&gt;&lt;br /&gt;Of course, I can&#39;t let this go by without at least some sort of NSM advice.  Here&#39;s a quick Snort rule I wrote to detect these trojan CODEC downloads:&lt;br /&gt;&lt;br /&gt;alert tcp $HOME_NET any -&gt; $EXTERNAL_NET $HTTP_PORTS (msg:&quot;WATCHLIST Possible ZLob Codec Download&quot;; uricontent:&quot;.exe&quot;; nocase; pcre:&quot;/.*codec.*\.exe/smi&quot;; flow:to_server,established; classtype:trojan-activity; sid:10000000; rev:1;)&lt;br /&gt;&lt;br /&gt;This looks for HTTP downloads of files that machine &quot;*codec*.exe&quot; (case insensitive, of course).  A simple file name change or something would evade this, but it&#39;s not too hard to see how to customize this to look for other things.  And if your version of Snort is compiled with flexible response support, you can even add &quot;resp: rst_all;&quot; to try to block the download attempts by sending spoofed RST packets, which should provide some extra security.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/2643460687052458962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/2643460687052458962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2643460687052458962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/2643460687052458962'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/03/new-zlob-spreads-through-poisoned.html' title='New ZLob spreads through poisoned search results'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-8088158271468776060</id><published>2008-02-29T13:37:00.003-05:00</published><updated>2008-02-29T13:59:38.815-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NSM"/><title type='text'>NSM and VLANs</title><content type='html'>Sometimes I run across a pcap-aware utility that does something very cool, but just doesn&#39;t work right when it encounters 802.1Q VLAN tags in traffic.  Most commonly, it fails to recognize these packets as IP.&lt;br /&gt;&lt;br /&gt;To see why, take a look at &lt;a href=&quot;http://en.wikipedia.org/wiki/Image:Ethernet_Type_II_Frame_format.svg&quot;&gt;this diagram&lt;/a&gt; of a sample Ethernet II frame.  Most simple-minded code simply checks bytes 12 &amp;amp; 13 (the &lt;i&gt;EtherType&lt;/i&gt; field) to see if they contain 0x08 0x00, which is the code for IPv4 traffic.&lt;br /&gt;&lt;br /&gt;However, 802.1Q tags throw things off a bit.  If present, the tag occupies an additional 4 bytes between the source address and the EtherType field.  The first two bytes are a standard code for VLAN tags, 0x81 0x00.  Then the following two bytes are an arbitrary numeric value identifying which VLAN the traffic belongs to.  &lt;br /&gt;&lt;br /&gt;The code is often something like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if(etherframe[12] == 0x08 &amp;&amp; etherframe[13] == 0x00) {&lt;br /&gt;  &lt;i&gt;/* Process an IP packet */&lt;/i&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Adding VLAN support simply involves an extra check.  For a quick and dirty solution, if the VLAN tag is present, I usually just adjust the pointer to the beginning of the frame&#39;s data (&lt;i&gt;etherframe&lt;/i&gt;, in the above case) by 4 bytes, then proceed as usual.  &lt;br /&gt;&lt;br /&gt;In most cases, this has the desired effect, but it does mean that I&#39;m throwing away all VLAN tag information.  In my experience, this has only been a problem once, on Shmoocon&#39;s &quot;hack or halo&quot; network, where each participant&#39;s computers were on a unique VLAN but had identical IPs.  In the real world, I have never seen this, but I&#39;m certain it exists somewhere.&lt;br /&gt;&lt;br /&gt;In the meantime, if you can live with this restriction, you can try out &lt;a href=&quot;http://www.vorant.com/downloads.html&quot;&gt;some VLAN patches&lt;/a&gt; I wrote for PADS, tcpflow and tcpxtract.  You may also want to check out &lt;a href=&quot;http://www.vorant.com/nsmwiki/NSM_and_VLANs&quot;&gt;this wiki page&lt;/a&gt; which tracks VLAN support in various libpcap-based analysis tools.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/8088158271468776060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/8088158271468776060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8088158271468776060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/8088158271468776060'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/02/nsm-and-vlans.html' title='NSM and VLANs'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7652481.post-4119409060278381162</id><published>2008-02-27T15:28:00.002-05:00</published><updated>2008-02-29T13:59:59.122-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WTF?"/><title type='text'>The awesomest</title><content type='html'>This is the awesomest thing I&#39;ve ever heard on the Internet.  Some guy &lt;a href=&quot;http://consumerist.com/360921/man-records-phishing-call&quot;&gt;recorded a 10 minute phone call with a phisher&lt;/a&gt;.  My favorites are the wife, the FBI and the 357.  &lt;br /&gt;&lt;br /&gt;This is SFW, though there are two or three things bleeped out.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script src=&quot;http://www.google-analytics.com/urchin.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
_uacct = &quot;UA-2051604-1&quot;;
urchinTracker();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vorant.com/feeds/4119409060278381162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7652481/4119409060278381162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/4119409060278381162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7652481/posts/default/4119409060278381162'/><link rel='alternate' type='text/html' href='http://blog.vorant.com/2008/02/awesomest.html' title='The awesomest'/><author><name>DavidJBianco</name><uri>http://www.blogger.com/profile/09760835714791462863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>