<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security Advancements at the Monastery &#187; XQilla</title>
	<atom:link href="http://blog.securitymonks.com/category/xqilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.securitymonks.com</link>
	<description>Information about developments at the Monastery</description>
	<lastBuildDate>Fri, 03 Sep 2010 05:41:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Bro IDS 1.4</title>
		<link>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/</link>
		<comments>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 05:11:34 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Bro]]></category>
		<category><![CDATA[GeoIP]]></category>
		<category><![CDATA[IDS]]></category>
		<category><![CDATA[Perftools]]></category>
		<category><![CDATA[XQilla]]></category>
		<category><![CDATA[Xerces-C++]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=657</guid>
		<description><![CDATA[

Joseph Campbell, an American mythology professor, writer, and lecturer, wrote “Computers are like Old Testament gods; lots of rules and no mercy.”  In the security world, signatures would be the rules that computers follow.  While signatures can be very useful, they also are very limiting.  In a previous post, titled simply &#8220;IDS&#8220;, [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://www.k-slug.org/wp-content/uploads/2007/01/dilbert200718326601251.gif" class="alignnone" width="500" height="156" /></p>
<p>
<a href="http://en.wikipedia.org/wiki/Joseph_Campbell">Joseph Campbell</a>, an American mythology professor, writer, and lecturer, wrote “Computers are like Old Testament gods; lots of rules and no mercy.”  In the security world, signatures would be the rules that computers follow.  While signatures can be very useful, they also are very limiting.  In a previous post, titled simply &#8220;<a href="http://blog.securitymonks.com/2007/06/17/ids/">IDS</a>&#8220;, we discussed how Intrusion Detection System/Intrusion Prevention System (IDS/IPS) technology is moving away from being solely signature based to a blend of signature based, anomaly detection, and activity based methodologies.
</p>
<p>
This is not surprising when we examine other areas of security.  Liam Tung, writer for ZDnet, has written an article titled, “<a href="http://www.zdnet.com.au/news/security/soa/Signature-based-antivirus-is-dead-get-over-it/0,130061744,339288527,00.htm">Signature-based antivirus is dead: Get over it</a>&#8220;.  In the article, Simon Clausen, founder &#038; CEO at PC Tools, reports that the security industry has been looking beyond blacklists. “I would very much disagree that AV is dead. Really, traditional signature-based AV is going to be dead in a few years, but what every antivirus company is evolving towards, like us, is behavioural AV technology, so AV will be alive.”
</p>
<p>
Bro is not signature based.  Instead, it was developed to be activity based with some support for anomaly detection.  From the beginning, Bro has always been focused on connections instead of just packets.  The Bro development team continues to advance the software, as demonstrated with the extensive changes in version 1.4.  Below are a few of the new features:
<ul>
<li>Can import Netflow version 5 data.</li>
<li>A BitTorrent analyzer is now available.</li>
<li>The &#8220;Bro Lite&#8221; configuration is now deprecated and will not in<br />
  general be supported.</li>
<li>Substantial updates to Broccoli, a Bro client library.</li>
<li>Extensive changes to allow Bro to process packets captured in the past intermingled with those captured in real-time.</li>
<li>scan.bro has been heavily modified to better support distributed scan analysis.</li>
<li>The new policy script targeted-scan.bro looks for repeated access from the same source to the same server, to detect things like SSH password-guessing attacks.</li>
<li>GeoIP information now includes latitude and longitude.</li>
<li>ssh.bro now supports the variable skip_processing_after_handshake which directs the event engine to omit any further processing of an SSH connection after its initial handshake.</li>
<li>Google&#8217;s perftools have replaced mpatrol for leak-checking and   heap-profiling.</li>
</ul>
<h3>Additional Information</h3>
<p>For additional information on Bro, below is a list of a few good site.</p>
<ul>
<li><a href="http://www.bro-ids.org/Bro-quick-start/">Bro Quick Start Guide</a> &#8211; contains info on installing, configuring, and running Bro.</li>
<li><a href="http://bro-ids.org/wiki/index.php/Main_Page">Bro Wiki</a> &#8211; intended for users and developers of Bro.</li>
<li><a href="http://mailman.icsi.berkeley.edu/pipermail/bro/">The Bro Archives</a> &#8211; mailing list archive.</li>
<li><a href="http://www.emergingthreats.net/index.php/component/content/article/1-latest/80-bro.html">Emerging Bro</a> &#8211; Bro signatures repository.</li>
<li><a href="http://blog.icir.org/">The ICSI Networking Group Blog</a> &#8211; the Blog for the Network Research at the International Computer Science Institute in Berkeley, CA.  These are the folks that develop Bro.</li>
<li><a href="http://a-bro-blog.blogspot.com/">A Bro Blo</a>g &#8211; A blog by Seth Hall, a Bro master and contributor.</li>
<li>C.S.Lee (geek00L) blog <a href="http://geek00l.blogspot.com/search/label/BRO">When {Puffy} Meets ^RedDevil^</a> .</li>
<li><a href="http://taosecurity.blogspot.com/search?q=Bro">TaoSecurity</a> &#8211; Richard Bejtlich has some good posts on Bro.</li>
<li>Last Bro <a href="http://www.bro-ids.org/wiki/index.php/WorkshopMaterial">Workshop Material</a>.</li>
</ul>
<h3>Supporting Software</h3>
<p>Bro offers many configuration options, depending on how you will use the software.  Below are a few libraries and software packages required by Bro:
</p>
<table border=1 width="90%">
<tr>
<th width=100 align=left>Package</th>
<th width=300 align=left>Description</th>
</tr>
<tr>
<td><a href="http://www.tcpdump.org/#latest">Libpcap</a></td>
<td>Most OSs will have libpcap installed by default.  It is the packet capture library.</td>
</tr>
<tr>
<td><a href="http://flex.sourceforge.net/">Flex</a></td>
<td>Most OSs will have flex installed by default. Flex is a tool for generating scanners. A scanner, sometimes called a tokenizer, is a program which recognizes lexical patterns in text.</td>
</tr>
<tr>
<td><a href="http://www.gnu.org/software/bison/">Bison </a>or byacc</td>
<td>Most OSs will have bison installed by default.  Bison is a general-purpose parser generator that converts an annotated context-free grammar into an LALR(1) or GLR parser for that grammar.</td>
</tr>
<tr>
<td><a href="http://www.isc.org/sw/bind/index.php">BIND8</a> headers and libraries</td>
<td>Most OSs will have BIND installed by default.  BIND (Berkeley Internet Name Domain) is an implementation of the Domain Name System (DNS) protocols.</td>
</tr>
<tr>
<td><a href="http://sources.redhat.com/autobook/">Autotools</a></td>
<td>The &#8220;autotools&#8221; consist of autoconf, automake, and libtool.  These will likely be installed on your system.  You need the autotools if you will be using source from the Bro&#8217;s Subversion repository.  You will need to run autogen.sh after you check out the code.  We will go through the steps below.
</td>
</tr>
</table>
<p>
Below are a few libraries and software packages that are not required, but you should consider installing.  The packages, except GeoIP and Google Perftools, should have binaries available for your OS.  Use these ports to install the packages and save yourself the trouble of having to keep the software updated.  We will go through through the installation of GeoIP and Google Perftools from source code.
</p>
<table border=1 width="90%">
<tr>
<th width=100 align=left>Package</th>
<th width=300 align=left>Description</th>
</tr>
<tr>
<td><a href="http://www.openssl.org/">OpenSSL</a></td>
<td>Tough to image a system not having OpenSSL installed.  It is needed to analyze ssh certificates by the HTTP analyzer and for encrypted Bro to Bro communication.</td>
</tr>
<tr>
<td>Libmagic</td>
<td>Add ability to determine file types, as with the ftp analyzer.</td>
</tr>
<tr>
<td><a href="http://www.zlib.net/">Libz</a></td>
<td>Libz is a compression library. It is used for decompressing HTTP bodies by the HTTP analyzer, and for compressed Bro-to-Bro communication.</td>
</tr>
<tr>
<td><a href="http://www.gnupg.org">GnuPG</a></td>
<td>Free implementation of the OpenPGP standard. </td>
</tr>
<tr>
<td><a href="http://www.maxmind.com/app/ip-lo">LibGeoIP</a></td>
<td>ability to determine the location of IP addresses.</td>
</tr>
<tr>
<td><a href="http://code.google.com/p/google-perftools/">Google Perftools</a></td>
<td>Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler.</td>
</tr>
</table>
<p><h3>GeoIP Installation and Configuration</h3>
<p><a href="http://www.maxmind.com/app/ip-lo">MaxMind GeoIP</a> is a collection of APIs for looking up the location of an IP address.  There is a collection of <a href="http://www.maxmind.com/app/geolitecity">free GeoLite databases</a>, which are not as accurate as the GeoIP databases, but will do for starting out and testing with Bro.  To setup GeoIP for use with Bro, please follow the commands below.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

 /usr/local/src root# gunzip GeoLiteCity.dat.gz
 /usr/local/src root# mkdir -p /usr/local/share/GeoIP
 /usr/local/src root# mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat
 /usr/local/src root# wget \

http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

 /usr/local/src root# tar xzf GeoIP.tar.gz
 /usr/local/src root# cd  GeoIP-1.4.5
 /usr/local/src/GeoIP-1.4.5 root# ./configure
 /usr/local/src/GeoIP-1.4.5 root# make
 /usr/local/src/GeoIP-1.4.5 root# make check
 /usr/local/src/GeoIP-1.4.5 root# make install
</pre>
</td>
</table>
<p>
Make sure <strong>/usr/local/lib</strong> is placed into your library path.</p>
<h3>Google Perftools Installation and Configuration</h3>
<p>Google&#8217;s perftools is a collection of a high-performance multi-threaded malloc() implementation and some performance analysis tools.  Google&#8217;s perftools have replaced mpatrol for leak-checking and heap-profiling.  We will compile Bro with <strong>&#8211;enable-perftools</strong>.  By default, perftools will install under /usr/local directory.  With perftools compiled into Bro, there are two command-line options made available:
</p>
<table border=1 width="90%">
<tr>
<th width=40 align=left>Option</th>
<th width=360 align=left>What the option controls</th>
</tr>
<tr>
<td>-m</td>
<td>turns on leak checking of the main packet loop, with some uninteresting leaks are suppressed.  Currently, with one exception (the RPC analyzer; problem not yet found), it reports no leaks when running the test suite.</td>
</tr>
<tr>
<td>-M</td>
<td>turns on heap profiling: Bro will take a snapshot of the heap before starting the main packet loop and another one when finished.</td>
</tr>
</table>
<p>
To help with the installation of Google&#8217;s perftool, the ICSI Networking Group has written a post &#8220;<a href="http://blog.icir.org/2008/02/making-sure-your-bro-code-does-not-leak.html">Making Sure Your Bro Code Does Not Leak</a>.&#8221;  The post will provide additional information.  The basic steps to install perftools are:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://google-perftools.googlecode.com/files/google-perftools-0.99.2.tar.gz

 /usr/local/src root# tar xzf google-perftools-0.99.2.tar.gz
 /usr/local/src root# cd google-perftools-0.99.2
 /usr/local/src/google-perftools-0.99.2 root# ./configure
 /usr/local/src/google-perftools-0.99.2 root# make
 /usr/local/src/google-perftools-0.99.2 root# make check
 /usr/local/src/google-perftools-0.99.2 root# make install
 /usr/local/src/google-perftools-0.99.2 root# export LDFLAGS=-L/usr/local/lib
 /usr/local/src/google-perftools-0.99.2 root# export CFLAGS=-I/usr/local/include
 /usr/local/src/google-perftools-0.99.2 root# export CPPFLAGS=-I/usr/local/include
 /usr/local/src/google-perftools-0.99.2 root# export LD_LIBRARY_PATH=/usr/local/lib
</pre>
</td>
</table>
<p><h3>XML Analyzer</h3>
<p>The XML analyzer is highly-experimental code written by Tobias Kiesling.  Installation of Xerces-C++ and XQilla is required to use the <a href="http://www.bro-ids.org/wiki/index.php/XML_Analyzer">XML analyzer</a>.  The code allows you to be able to easily adjust analysis capabilities to specific XML data formats. Xerces-C++ is a validating XML parser written in a portable subset of C++.  XQilla is an XQuery and XPath 2 library and command line utility written in C++.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget \

http://downloads.sourceforge.net/xqilla/XQilla-2.1.3.tar.gz

 /usr/local/src root# wget \

http://mirror.its.uidaho.edu/pub/apache/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz

 /usr/local/src root# md5sum xerces-c-src_2_8_0.tar.gz
5daf514b73f3e0de9e3fce704387c0d2  xerces-c-src_2_8_0.tar.gz
 /usr/local/src root# tar xzf xerces-c-src_2_8_0.tar.gz
 /usr/local/src root# tar xzf XQilla-2.1.3.tar.gz
 /usr/local/src root# ln -s XQilla-2.1.3 xqilla
 /usr/local/src root# cd xerces-c-src_2_8_0
 /usr/local/src/xerces-c-src_2_8_0 root# patch -p1 < ../xqilla/src/xercesc_content_type.patch
 /usr/local/src/xerces-c-src_2_8_0 root# patch -p1 <../xqilla/src/xercesc_regex.patch
 /usr/local/src/xerces-c-src_2_8_0 root# export XERCESCROOT=`pwd`
 /usr/local/src/xerces-c-src_2_8_0 root# cd src/xercesc
</pre>
</pre>
</td>
</table>
<p>
FreeBSD 7 users will encounter a problem when trying the run the <strong>runConfigure</strong> command.  The error &#8220;C compiler cannot create executables &#8221; will be produced.  The problem is on line 358 of runConfigure.  The libc_r library cannot be found since it has been deprecated on FreeBSD since version 5.X and removed from version 7.0.  Edit runConfigure to not include &#8220;<strong>-lc_r</strong>&#8221; in the list of threading libraries.  Then issue the command:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# runConfigure \
-pfreebsd -cgcc -xg++ -minmem -nsocket -tIconvFBSD -rpthread  -s
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# gmake
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# gmake install
</pre>
</td>
</table>
<p>
An easier option is to install xerces and xqilla through the FreeBSD port command:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root # cd /usr/ports/textproc/xqilla
 /usr/ports/textproc/xqilla root # make install clean
</pre>
</td>
</table>
<p>
Other operating systems, such as Linux, do not require any special steps.  You just need to run the commands:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# runConfigure -plinux
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# make
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# make install
</pre>
</td>
</table>
<p>
With Xerces-C++, configure and install XQilla.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 /usr/local/src/xerces-c-src_2_8_0/src/xercesc root# cd /usr/local/src/xqilla/
 /usr/local/src/xqilla root# ./configure --with-xerces=`pwd`/../xerces-c-src_2_8_0/
 /usr/local/src/xqilla root# make
 /usr/local/src/xqilla root# make install
</pre>
</td>
</table>
<p><h3>Bro Installation and Configuration</h3>
<p>There a few options when installing Bro.  Bro was not developed for the <a href="http://en.wikipedia.org/wiki/Pointy_Haired_Boss">PHB</a>.  Advance security software provides the power to the user, with all the options to adapt it to your environment.  To quote the Bro site, &#8220;Bro has been developed primarily as a research platform for intrusion detection and traffic analysis. It is not intended for someone seeking an &#8216;out of the box&#8217; solution. Bro is designed for use by Unix experts who place a premium on the ability to extend an intrusion detection system with new functionality as needed, which can greatly aid with tracking evolving attacker techniques as well as inevitable changes to a site&#8217;s environment and security policy requirements.&#8221;  With the Unix experts in mind, we will go through the steps involved to install both the stable and the development versions of Bro.  </p>
<h4><strong>Current Stable Version</strong></h4>
<p>The current version should be the most stable.  To install, follow these commands:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# wget ftp://bro-ids.org/bro-1.4-release.tar.gz
 /usr/local/src root# tar xzf bro-1.4-release.tar.gz
 /usr/local/src root# cd bro-1.4
</pre>
</td>
</table>
<p>
The configuration and installations appears below.</p>
<h4><strong>Subversion Trunk</strong></h4>
<p>Reading the posts on the <a href="http://mailman.icsi.berkeley.edu/pipermail/bro/">Bro mailing list</a>, reveals that modifications have already been made to the current release.  Fixes are being made continuously.  These changes, while fixing problems, might introduce new problems.  You do have the option of getting the most up-to-date code possible through the subversion repository.  The Bro development team has made available two subparts of the repository: the trunk and development branches.  The trunk is the main development head from which releases are made on a regular basis.  It should be fairly stable with changes passing a regression suite to ensure the code do not break existing functionality.  It is still considered experimental and not suitable for critical deployment.  Below is how to download code from the trunk.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# mkdir bro-cvs
 /usr/local/src/bro-cvs root# cd bro-cvs
 /usr/local/src/bro-cvs root# svn checkout http://svn.icir.org/bro/trunk/bro
 /usr/local/src/bro-cvs root# mv bro bro-1.4.cvs
 /usr/local/src/bro-cvs root# cd bro-1.4.cvs
 /usr/local/src/bro-cvs/bro-1.4.cvs root# ./autogen.sh
</pre>
</td>
</table>
<p><h4><strong>Robin&#8217;s Development Branch</strong></h4>
<p>The developers merge their work into the the Bro subversion trunk.  Robin Sommer has a separate branch which contains experimental code for:
<ul>
<li>the Bro Cluster framework</li>
<li>NetFlow support (by Bernhard Ager)</li>
<li>a BitTorrent analyzer (by Nadi Sarrar and Bernhard Ager)</li>
<li>an XML analyzer (by Tobias Kiesling)</li>
<li>Python bindings for Broccoli</li>
<li>restructured logic for taking drop decisions via Bro&#8217;s notice framework (by Brian Tierney and Robin Sommer)</li>
<li>a test-suite for Bro&#8217;s communication &#038; serialization subsystems</li>
<li>various tweaks and bugfixes</li>
</ul>
<p>If you want the latest work done by Robin and others mentioned above, you can get access to the code with the following commands.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
 /usr/local/src root# mkdir bro-cvs
 /usr/local/src root# cd bro-cvs
 /usr/local/src/bro-cvs root# svn checkout http://svn.icir.org/bro/branches/robin/work
 /usr/local/src/bro-cvs root# mv work bro-1.4.robin
 /usr/local/src/bro-cvs root# cd bro-1.4.robin
 /usr/local/src/bro-cvs/bro-1.4.robin root# ./autogen.sh
</pre>
</td>
</table>
<p><h4><strong>Configure and Install</strong></h4>
<p>Because of the various bug fixes and the additional features which add interesting options, we are going to step through installation of Robin&#8217;s branch.  Please use the version of Bro appropriate for your operation.
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src/bro-cvs/bro-1.4.robin
 /usr/local/src/bro-cvs/bro-1.4.robin root# ./configure --enable-debug \
--enable-perftools --prefix=/usr/local/bro --with-xqilla
 /usr/local/src/bro-cvs/bro-1.4.robin root# make
 /usr/local/src/bro-cvs/bro-1.4.robin root# make check
 /usr/local/src/bro-cvs/bro-1.4.robin root# make install
</pre>
</td>
</table>
<p>
If you run into any problems, go to back to the stable version of Bro and see if you can get it to compile.  Then you may want to try the subversion trunk code.</p>
<h3>Final Words</h3>
<p>We have taken the first step and now have Bro installed.  Installation is only the beginning.  In an upcoming post, we will walk through configuring Bro and examining a simple policy.  We will send some attacks against Bro, and see what kind of results are produced.  Having completed the first step of installing Bro, we can move on and have some fun.  As <a href="http://www.humphreybogart.com/">Humphrey Bogart</a> put it in his famous last line from <a href="http://www.imdb.com/title/tt0034583/">Casablanca</a>, &#8220;Louis, I think this is the beginning of a beautiful friendship.&#8221;  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/10/28/installing-bro-ids-14/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

