<?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: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-6685214988020101778</id><updated>2012-02-16T22:52:32.795-05:00</updated><category term='linux'/><category term='Pen Test'/><category term='braindump'/><category term='Security Monitoring'/><category term='IR'/><category term='Honeypots'/><category term='Argus'/><category term='NSM'/><category term='Logs'/><category term='Snort'/><category term='Network Awareness'/><category term='Prelude'/><title type='text'>Open Source FTW</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-8624163548446667002</id><published>2012-01-30T08:58:00.003-05:00</published><updated>2012-01-30T09:00:04.732-05:00</updated><title type='text'>Collective Intelligence Framework</title><content type='html'>&lt;div&gt;&lt;p&gt;Looks interesting....&lt;/p&gt;&lt;p&gt;&lt;a href="http://code.google.com/p/collective-intelligence-framework"&gt;collective-intelligence-framework&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-8624163548446667002?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/8624163548446667002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=8624163548446667002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8624163548446667002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8624163548446667002'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2012/01/collective-intelligence-framework.html' title='Collective Intelligence Framework'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-7905905588756678631</id><published>2012-01-10T12:23:00.001-05:00</published><updated>2012-01-10T12:24:28.128-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='braindump'/><title type='text'>brain dump #1</title><content type='html'>for i in $(cat /usr/local/hadoop/conf/slaves); do scp mapred-site.xml $i:/usr/local/hadoop/conf/mapred-site.xml; done&lt;br /&gt;&lt;br /&gt;if (grep -q "^/usr/local/lib$" /etc/ld.so.conf); then echo ""; else echo "/usr/local/lib" &gt;&gt; /etc/ld.so.conf; fi&lt;br /&gt;&lt;br /&gt;lftp :~&gt; set ftp:ssl-force true&lt;br /&gt;lftp :~&gt; set ftp:ssl-protect-data&lt;br /&gt;lftp :~&gt; set ssl:verify-certificate&lt;br /&gt;lftp :~&gt; connect ftp.domain.tld&lt;br /&gt;lftp ftp.domain.tld:~&gt; login my_username&lt;br /&gt;&lt;br /&gt;test ssl anonymous auth:&lt;br /&gt;openssl s_client -starttls smtp -crlf -connect some_mail_server:25 -cipher aNULL&lt;br /&gt;&lt;br /&gt;test ssl on smtp:&lt;br /&gt;openssl s_client -starttls smtp -crlf -connect some_mail_server:25&lt;br /&gt;&lt;br /&gt;low cipher checks:&lt;br /&gt;openssl s_client -connect some_web_server:443 -cipher LOW:EXP&lt;br /&gt;&lt;br /&gt;shadow hash:&lt;br /&gt;openssl passwd -1 -salt XXYYZZ11&lt;br /&gt;&lt;br /&gt;screen rsync -avz /source/dir/ /target/dir/&lt;br /&gt;&lt;br /&gt;rsync -avz -e ssh /source/dir/ user@target_system:/target/dir/&lt;br /&gt;&lt;br /&gt;rsync -avz --delete /source/dir/ /target/dir/&lt;br /&gt;&lt;br /&gt;rsync -avz --exclude=.snapshot /source/dir/ /target/dir/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-7905905588756678631?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7905905588756678631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7905905588756678631'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2012/01/brain-dump-1.html' title='brain dump #1'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-9173644589316594458</id><published>2012-01-10T12:21:00.002-05:00</published><updated>2012-01-10T12:23:02.037-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>linux performance troubleshooting notes</title><content type='html'>&lt;pre&gt;&lt;br /&gt;vmstat &lt;# in seconds&gt;&lt;br /&gt;  procs&lt;br /&gt;    r = # of processes waiting for cpu&lt;br /&gt;    b = # of processes waiting for i/o&lt;br /&gt;  swap&lt;br /&gt;    si and so = swap in and swap out; &lt;br /&gt;                close to 0; &lt;br /&gt;                no more than 10 blocks/sec&lt;br /&gt;  io&lt;br /&gt;    bi and bo = disk i/o&lt;br /&gt;  system&lt;br /&gt;    in = # of interrupts / sec&lt;br /&gt;    cs = # of context switches / sec&lt;br /&gt;  cpu&lt;br /&gt;    us = % user&lt;br /&gt;    sy = % system&lt;br /&gt;    id = % idle&lt;br /&gt;    wa = % i/o wait&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iostat -dx &lt;# in seconds&gt;&lt;br /&gt;   various rw/sec options&lt;br /&gt;   await = # of milliseconds required to &lt;br /&gt;           respond to requests&lt;br /&gt;   %util = device utilization&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;top&lt;br /&gt;  load = 1m 5m 15m &lt;br /&gt;         (average # processes waiting on cpu time) &lt;br /&gt;         (quad core load of 4 is really same &lt;br /&gt;          amount as 1 core load of 1)&lt;br /&gt;  cpu  = us/user sy/system id/idle wa/io_wait&lt;br /&gt;  avail ram = free mem + cached&lt;br /&gt;&lt;br /&gt;  'C' = sort processes by %CPU&lt;br /&gt;  'M' = sort processes by %MEM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* high vmstat us cpu shows cpu-bound combined with &lt;br /&gt;  procs piled up in procs r column, combined with &lt;br /&gt;  low disk util in iostat&lt;br /&gt;* high vmstat procs b column combined with high disk &lt;br /&gt;  util in iostat show i/o bound&lt;br /&gt;* high values in swap si &amp; so in vmstat show swapping&lt;br /&gt;* idle machines show low r/b in vmstat procs, &lt;br /&gt;  high % in cpu id&lt;br /&gt;* iostat to track down which device is getting &lt;br /&gt;  heavy reads/writes&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-9173644589316594458?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/9173644589316594458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/9173644589316594458'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2012/01/linux-performance-troubleshooting-notes.html' title='linux performance troubleshooting notes'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-4787885881005073384</id><published>2007-11-09T18:31:00.000-05:00</published><updated>2007-11-09T20:30:06.500-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Logs'/><title type='text'>Syslog-NG Performance Tuning</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Yx7N0ayKjBc/RzNLJ5SAv7I/AAAAAAAAAOc/6hyUkyCtVqM/s1600-h/logo_syslog-ng_os.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_Yx7N0ayKjBc/RzNLJ5SAv7I/AAAAAAAAAOc/6hyUkyCtVqM/s200/logo_syslog-ng_os.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5130527033872400306" /&gt;&lt;/a&gt;&lt;br /&gt;I figured I would post some general tuning options that really improve performance on busy central syslog-ng servers.  The following settings are used in 2.x, although most will work in some earlier versions as well.  These settings work well for me in a tiered environment where client servers are sending both over tcp and udp, from standard syslog and syslog-ng, to a central server(s) running syslog-ng 2.0.5.  They are both used in heavy usage (25+ GB / day) situations, and in environments with plenty of hosts (900+).&lt;br /&gt;&lt;br /&gt;On to the configuration choices for your central log servers...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Name Resolution&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You most likely will want to resolve the IP addresses of client hosts to their hostnames, so enabling name lookups via use_dns(yes) is probably turned on.  However, you should ensure you are using your cache properly.  Adding dns_cache(1500) and dns_cache_expire(86400), both allow a cache of 1500 entries and set the expiration of entries in the cache to 24 hours.  Keep in mind, to allow for enough entries, and account for how often your hosts change IP addresses - such as in dynamic dns environments, etc.  These numbers here are just given as an example, tailor to your situation.&lt;br /&gt;&lt;br /&gt;If you would rather use the hosts file instead, look into use_dns(persist_only) and dns_cache_hosts(/etc/hosts).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Message Size&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Not so much a performance tuning option, but one that needs addressing anyhow.  If you are only collecting system logs, the default setting of 8192 bytes is probably enough - but if you collect application logs, you will need to plan accordingly with your log_msg_size(#) option.  You will see in your logs, indications of messages being split because they are too long if you have messages going beyond this length.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Output Buffers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is an extremely important setting - log_fifo_size(#).  The log_fifo_size(#) setting sizes the output buffer, which every destination has.  The output buffer must be large enough to store the incoming messages of every source.  This setting can be set globally or per destination.&lt;br /&gt;&lt;br /&gt;For the log_fifo_size(#), the number indicated is the number of lines/entries/messages that it can hold.  By default, it is globally set, extremely conservatively - and if you do any amount of traffic, you will end up seeing dropped messages at some point.  The statistics that include dropped messages are printed to syslog every 10 minutes unless you have altered this.  In the statistics line it will let you know which destination is dropping messages and how many.  You can then make determinations there of whether to globally increase it or per destination, and also an idea of how much larger you need to make it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Flushing Buffers with sync&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From the syslog-ng documentation: "The syslog-ng application buffers the log messages to be sent in an output queue. The sync() parameter specifies the number of messages held in this buffer."&lt;br /&gt;&lt;br /&gt;By default, sync(#) is set to 0, which flushes messages immediately - which depending on your logging volume, can be fairly taxing.  Increasing this number gently, say to 10 or 20, will hold that number of messages in its buffer before they are written to their destination.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Other Important Considerations&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are still having trouble with dropped messages, look into using flow control within syslog-ng.  Flow control allows you to finely tune the amount of messages received from a source.  Although, there are potential other issues you must account for, such as slowing down the source application if it cannot hand off its log messages, etc.&lt;br /&gt;&lt;br /&gt;Users with traditional syslog clients sending their logs via UDP, should have a look at &lt;a href="http://www.29west.com/docs/THPM/udp-buffer-sizing.html"&gt;this page&lt;/a&gt; on UDP Buffer Sizing.&lt;br /&gt;&lt;br /&gt;Also, sync() and log_fifo_size() should be tweaked on your client servers as necessary if they are using syslog-ng, and handle heavy loads, sporadic sources, etc.  Remember to use your statistics log entries to help you identify problems and load effectively.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-4787885881005073384?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/4787885881005073384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=4787885881005073384' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/4787885881005073384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/4787885881005073384'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/11/syslog-ng-performance-tuning.html' title='Syslog-NG Performance Tuning'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Yx7N0ayKjBc/RzNLJ5SAv7I/AAAAAAAAAOc/6hyUkyCtVqM/s72-c/logo_syslog-ng_os.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-3461016519811155217</id><published>2007-11-01T18:43:00.000-04:00</published><updated>2007-11-11T20:09:24.141-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honeypots'/><title type='text'>Learning with Honeypots</title><content type='html'>&lt;font style="font-weight: bold;"&gt;Honeypot Layout&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;I've recently rented some dedicated server and public IP resources for running some honeypot/honeynet/whatever setups, more or less to learn, figured I would post my game plan here.&lt;br /&gt;&lt;br /&gt;My basic idea is not earth shattering or anything new, I just hope to gain new insight, see what works or doesn't work, and find ways of using honeypots for intrusion detection or as an early warning system for a piece of the overall security monitoring puzzle.&lt;br /&gt;&lt;br /&gt;As we all know, any traffic hitting a honeypot system is suspicious, or not warranted at best, it whittles down the amount of traffic we have to look at compared to a production host.  However, if you have ever looked at logs or traffic of a publicly accessible, non-production machine, this "whittled down" traffic can still be quite large.  Both from things such as worms propagating to your annoying SSH brute force scans.  So how do we both look for the unkown nasties while not wasting time on the redundant, now passe, routine malicious scans and such?  One way is by filtering and tiering our honeypot architecture.&lt;br /&gt;&lt;br /&gt;&lt;font style="font-weight: bold;"&gt;Filtering, Tiering and Multiple Tools&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Fortunately, there are many great tools out there for honeypots and analysis:&lt;br /&gt;&lt;br /&gt;honeyd:  &lt;a href="http://www.honeyd.org/"&gt;http://www.honeyd.org/&lt;/a&gt;&lt;br /&gt;nepenthes:  &lt;a href="http://nepenthes.mwcollect.org/"&gt;http://nepenthes.mwcollect.org/&lt;/a&gt;&lt;br /&gt;honeyc:  &lt;a href="https://www.client-honeynet.org/honeyc.html"&gt;https://www.client-honeynet.org/honeyc.html&lt;/a&gt;&lt;br /&gt;Capture-HPC:  &lt;a href="https://www.client-honeynet.org/creleases.html"&gt;https://www.client-honeynet.org/creleases.html&lt;/a&gt;&lt;br /&gt;Honeywall:  &lt;a href="http://www.honeynet.org/tools/cdrom/"&gt;http://www.honeynet.org/tools/cdrom/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Combined with your standard monitoring and access control tools such as snort, tshark and iptables - and you come away with many ways to both watch, contain and direct how things happen.&lt;br /&gt;&lt;br /&gt;I have planned to heavily use VMware for the virtualization aspects of both the high interaction honeypots and some of the low interaction honeypots.  Tiering between filters to low interaction honeypots, then to high interaction honeypots - reduces the load and increases the matching of known misuse early on with the least amount of resources squandered.&lt;br /&gt;&lt;br /&gt;&lt;font style="font-weight: bold;"&gt;&lt;span style="font-style:italic;"&gt;The Plan&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;So, here's what I intend to do as a starting point.&lt;br /&gt;&lt;br /&gt;An initial box will run VMware, IPtables, and monitoring software (such as tshark/argus/snort or possibly sguil).  This box will pass pre-defined traffic after being filtered to a set of IP addresses exposed to an instance of honeyd.&lt;br /&gt;&lt;br /&gt;This honeyd machine controls a set number of public IP addresses that I intend to bind to various templates at various times - floating between Linux, Windows and dynamic emulations based on honeyd's passive fingerprinting capabilities provided by p0f signatures and other abilities (how about blacklisted source IPs for instance).&lt;br /&gt;&lt;br /&gt;At this point, honeyd will offer some custom service emulation scripts, watch for probes and pokes on various tcp and udp ports defined, and then with the help of some perl glue, make a determination what do with it.  The "what to do with it" part, will be either to drop it on the floor, pass it to nepenthes, or sending it to a high interaction honeypot (a Windows one if it is most likely a Windows exploit, a Linux one if it is most likely a Linux exploit, etc.).&lt;br /&gt;&lt;br /&gt;The virtual machines running nepenthes and the high interaction honeypots, will be on a NAT'ed network, funneled through the public IP space offered up by the front-end of this setup.  Nepenthes will provide a second-line of defense, noticing worms and malware that are already known.  If nepenthes does not recognize the traffic, or if the initial honeyd setup determines that these should go elsewhere, the traffic will be destined for an appropriate virtual machine running an OS most likely to match the intended target, or potentially to an emulated service.&lt;br /&gt;&lt;br /&gt;In addition, custom perl scripts will handle SMTP service emulation, to both capture and analyze spam and the resulting links and attachments they contain.  Tarpitting and utilizing client honeypot tools to visit the linked websites, is on the agenda as well.&lt;br /&gt;&lt;br /&gt;&lt;font style="font-weight: bold;"&gt;Things to Watch For&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;So many things come to mind as needing that extra care and attention, or that will just be plain fun to mess around with.  Here's my list:&lt;br /&gt;&lt;br /&gt;* Routing the traffic.  Both the honeyd aspect, and the perl glue that will be used to make other determinations, etc.&lt;br /&gt;&lt;br /&gt;* Automation.  How to maintain my sanity while still providing a valuable learning environment.&lt;br /&gt;&lt;br /&gt;* Control.  As with any honeypot setup, maintaining control of the various aspects as things are exploited and probed.&lt;br /&gt;&lt;br /&gt;* Keeping the various parts of this setup from being fingerprinted and identified as "not real".&lt;br /&gt;&lt;br /&gt;* Building a database of everything learned, and providing a usable interface to this data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Final Thoughts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I intend for this post to be a starting point for what I learn works or doesn't work, interesting tidbits found, etc.  Both documenting things I'd like to keep tabs on and sharing with other interested parties.  As always, comments and thoughts are welcome.&lt;br /&gt;&lt;br /&gt;Much of the ideas and technical know-how came from the recent, and excellent, book on &lt;a href="http://www.amazon.com/Virtual-Honeypots-Tracking-Intrusion-Detection/dp/0321336321/ref=pd_bbs_sr_1/105-7644193-5778040?ie=UTF8&amp;amp;s=books&amp;amp;qid=1193925021&amp;amp;sr=8-1"&gt;Virtual Honeypots&lt;/a&gt;, I highly recommend you check it out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-3461016519811155217?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/3461016519811155217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=3461016519811155217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/3461016519811155217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/3461016519811155217'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/11/learning-with-honeypots.html' title='Learning with Honeypots'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-2146386312250813857</id><published>2007-09-11T10:40:00.000-04:00</published><updated>2007-09-11T20:43:58.343-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NSM'/><title type='text'>Capturing flow data from your Linksys at home</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_Yx7N0ayKjBc/Ruc1agzQCLI/AAAAAAAAAMo/wSBAtHmj33I/s1600-h/DD-WRT_logo.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_Yx7N0ayKjBc/Ruc1agzQCLI/AAAAAAAAAMo/wSBAtHmj33I/s200/DD-WRT_logo.png" alt="" id="BLOGGER_PHOTO_ID_5109111031872882866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As a big believer in flow/session data collection in all NIDS locations, it is only right that there be an easy way to do so at home without putting a full-time IDS in place.  So with a trusty Linksys router re-flashed with &lt;a href="http://www.dd-wrt.com/dd-wrtv2/index.php"&gt;DD-WRT&lt;/a&gt;, an extra package installed on the router, and a suite of flow collection/analysis tools on your primary Linux desktop, we can easily achieve this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;On your Linksys:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;First things first.  In this scenario we re-flashed a Linksys router with DD-WRT, following these &lt;a href="http://www.dd-wrt.com/wiki/index.php/Installation"&gt;instructions&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Next, via the DD-WRT web interface, we enabled JFFS2 support and SSH located in subsections of the Administration tab.&lt;/li&gt;&lt;li&gt;Moving on, update your ipkg configuration, with: &lt;span style="font-style: italic;"&gt;ipkg update.  &lt;/span&gt;Then install fprobe via ipkg: &lt;span style="font-style: italic;"&gt;ipkg install fprobe&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Finally, add a shell script to /jffs/etc/config/fprobe.startup.  Change permissions: &lt;span style="font-style: italic;"&gt;chmod 700 fprobe.startup&lt;/span&gt; and reboot your router.  The file should contain the following command:  &lt;span style="font-style: italic;"&gt;fprobe -i br0 -f ip 192.168.1.100:9801&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;A brief discussion of the fprobe command is needed:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;-i specifies the interface you are interested in watching flows on.  I chose my internal interface.&lt;/li&gt;&lt;li&gt;- f specifies a bpf filter.  In this scenario, I chose to only create flow records for IP traffic.&lt;/li&gt;&lt;li&gt;IP:Port, is the remote IP address and UDP port that you have your flow collector listening on - this will be later on your desktop Linux box.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;On your Linux box:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install flow-tools from &lt;a href="http://www.splintered.net/sw/flow-tools/"&gt;here&lt;/a&gt;.  All that is needed, is a standard: &lt;span style="font-style: italic;"&gt;configure; make; make install&lt;/span&gt;.  *There is one caveat to watch out for, if you use gcc 4.x, a patch available where you downloaded the tarball is necessary.&lt;/li&gt;&lt;li&gt;Create a directory to store your flow data: &lt;span style="font-style: italic;"&gt;mkdir -p /data/flows/internal&lt;/span&gt;&lt;/li&gt;&lt;li&gt;If you run IPTables or some other host-based firewall, make sure to allow UDP 9801 connections from your router.&lt;/li&gt;&lt;li&gt;Finally, both run the following command and add it somehow to your system startup (via /etc/rc.local, for example):  &lt;span style="font-style: italic;"&gt;/usr/local/netflow/bin/flow-capture 192.168.1.100/192.168.1.1/9801 -w /data/flows/internal&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;A brief discussion of the flow-capture command is needed:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You specify the network interface you want your collector to listen on, then the address of the flow probe, followed by the UDP port to use - all in a local/remote/UDP format.&lt;/li&gt;&lt;li&gt;-w specifies to write out flow files to that directory.  By default, flow-capture will have new ones for every 15 minute chunk of time.&lt;/li&gt;&lt;/ul&gt;So now that we have some flow data being collected to your machine, what are some cool things we can do with it?  Looking in flow-tools default install directory for binaries, /usr/local/netflow/bin, we see numerous flow-* tools.  We'll look at a few briefly below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using flow-print:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;flow-print &lt; ft-v05.2007-09-11.080001-0400&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above command will print out the results contained in that particular flow file.  The columns will contain srcIP/dstIP/protocol/srcPort/dstPort/octets/packets.  The octets line is the equivalent of bytes.  This is your standard session/flow data.&lt;br /&gt;&lt;br /&gt;Adding a "-f 1" flag will produce timestamps among other things.  The -f flag allows for numerous types of formatting and additional columns, etc.&lt;br /&gt;&lt;br /&gt;On a sidenote, standard *nix tools - such as awk and grep can be very useful in pulling data from plain old dumps of the flow records.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using flow-cat and flow-stat:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Much like Argus, with flow-tools you stack together various of the utilities to get output like you want.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;flow-cat ft-v05.2007-09-11.0* | flow-stat -f9 -S2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the above set of commands, flow-cat is used to concatenate all the files that names match that criteria.  The resulting output is passed to flow-stat for crunching and displaying.  The flow-stat command generates reports, taking formatting options via the -f flag and sorting on both -S and -s.  Our example specified a report format on the Source IP address, and sorting based on the Octet (ie. Bytes) field (have a look at the man page for flow-stat to see all the various options).  Thus, we now have detailed output from all those files, showing the *noisiest* source hosts listed by most bytes transferred.&lt;br /&gt;&lt;br /&gt;Utilizing your desktop and a router, things you probably already have at home, you too can watch/collect/analyze flow data to keep a watchful eye on your network - without deploying a dedicated NIDS or NSM sensor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-2146386312250813857?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/2146386312250813857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=2146386312250813857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2146386312250813857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2146386312250813857'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/09/capturing-flow-data-from-your-linksys.html' title='Capturing flow data from your Linksys at home'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Yx7N0ayKjBc/Ruc1agzQCLI/AAAAAAAAAMo/wSBAtHmj33I/s72-c/DD-WRT_logo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-5369993974458337957</id><published>2007-09-03T11:23:00.000-04:00</published><updated>2007-09-03T12:39:54.993-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prelude'/><title type='text'>Writing Prelude LML rules</title><content type='html'>In this post, we will cover the basics of adding your own rules to Prelude-LML, which is Prelude's own log monitoring analysis engine.  Highly optimized in C, Prelude-LML, comes with numerous rules built-in for everything from SSH authentication to Netscreen firewall rules.&lt;br /&gt;&lt;br /&gt;To start we will navigate to the default LML ruleset directory, which is located in /usr/local/etc/prelude-lml/ruleset - unless you specified otherwise.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Our Example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For example purposes, we'll use the made up syslog entry below to follow along with.  It shows the date, a host named some_hostame, with a service called mylogger_service, that printed some message.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Aug 22 05:22:05 some_hostname mylogger_service: We have an imortant message here.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Setting Up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first thing you want to do is have a look at pcre.rules.  The pcre.rules file, provides a way to match on certain criteria that all rules in a certain set will all match on, a lot of them are based on services, such as ssh, which allows LML to limit how many log messages are processed against which rules.&lt;br /&gt;&lt;br /&gt;Since our service, mylogger_service, is new and no other specific rulesets apply to it, we'll add a line to pcre.rules to only apply our new rule (which we will add to its own file later, called local.rules).  Adding the following to pcre.rules will do just this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;regex=mylogger_service;        include = local.rules;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What this does, is only process rules in the local.rules file, if the log entry contains "mylogger_service" in it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Adding a Rule to its own Ruleset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So now we see that we have prepped our new rule file (local.rules), to receive any log entries that contain the line mylogger_service in them.  We next need to add rules to our local.rules file for further processing and alerting on any matches.  Here is what we will add to local.rules for our example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# Detect important messages from the mylogger_service.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;# LOG:Aug 22 05:22:05 some_hostname mylogger_service: We have an imortant message here.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;regex=important message; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;classification.text=Important Message Detected.; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;id=32001; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;revision=1; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;assessment.impact.type=other; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;assessment.impact.severity=low; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;assessment.impact.description=An important message was detected with the mylogger_service; \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;last;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Stepping through this example, we see the following:&lt;br /&gt;&lt;br /&gt;- A comment line that describes what this rule is about.&lt;br /&gt;- A LOG line that shows an actual example syslog entry for what we are looking for.&lt;br /&gt;- regex, that is what we are matching on, any potential regex can be used here.  Such as character classes (\w,\d) or wildcards (.,*,+).&lt;br /&gt;- classification.text, here is the main alert text for this rule&lt;br /&gt;- id, which differentiates on this particular rule&lt;br /&gt;- revision, bump this up by one as you make production edits&lt;br /&gt;- impact type, which can be things such as admin, user, other, etc.&lt;br /&gt;- impact severity, such as low, medium, high&lt;br /&gt;- impact description, a longer description of what most likely is referenced in classification.text&lt;br /&gt;- last, which basically tells LML to stop further processing if this rule matches&lt;br /&gt;&lt;br /&gt;Many more IDMEF fields may be used, such as references or process names.&lt;br /&gt;&lt;br /&gt;When mylogger_service is seen in a syslog entry that LML processes, it will process this entry against all the rules in the local.rules file (which is how we set this up in pcre.rules).  Furthermore, if the entry matches our regex of "important message", we will get an alert with severity of low, a message text of "Important Message Detected", and the various other settings we have set.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This example showed a simple way of adding rules to your LML engines.  You may have noticed when looking in pcre.rules, at the top is a "best practices" section on creating/adding LML rules.  For much more extensive information, look &lt;a href="https://trac.prelude-ids.org/wiki/PreludeLML"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-5369993974458337957?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/5369993974458337957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=5369993974458337957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/5369993974458337957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/5369993974458337957'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/09/in-this-post-we-will-cover-basics-of.html' title='Writing Prelude LML rules'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-7766138960164146292</id><published>2007-08-17T20:24:00.001-04:00</published><updated>2007-08-17T21:13:39.729-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Argus'/><title type='text'>Threat Assessments with Argus</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Yx7N0ayKjBc/RsZHMAzQCKI/AAAAAAAAAMI/HpJQ_nFIjjI/s1600-h/warning.jpeg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp0.blogger.com/_Yx7N0ayKjBc/RsZHMAzQCKI/AAAAAAAAAMI/HpJQ_nFIjjI/s200/warning.jpeg" alt="" id="BLOGGER_PHOTO_ID_5099841899742628002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A useful practice for both incident response and general discovery, is the practice of threat assessments using session/flow data.  My tool of choice for this is Argus, but any session/flow tool such as NetFlow or SANCP will do.  For further information beyond this post, reference the book &lt;a href="http://www.amazon.com/Extrusion-Detection-Security-Monitoring-Intrusions/dp/0321349962/ref=pd_bbs_sr_1/105-1628438-1749246?ie=UTF8&amp;s=books&amp;amp;qid=1187396623&amp;sr=8-1"&gt;Extrusion Detection&lt;/a&gt; for extensive details of traffic threat assessments with both Argus and SANCP.  I'll assume you are already familiar with collecting Argus data, if not have a look at the Argus labels on this blog for articles pertaining to it.&lt;br /&gt;&lt;br /&gt;What I'll describe here for conducting a threat assessment, is what I call a blind threat assessment.  What I mean by "blind", is that I am not looking for particular traffic like you would when responding to an incident - where you know a victim address, and possibly a source address and protocols.  In the past during any downtime that I had, I would pick an Argus data file (which I generally rotate either daily or every X number of hours, depending on how busy the sensor collecting the data is), and pick it apart.&lt;br /&gt;&lt;br /&gt;Let's move on to an example, reading in your Argus file of choice.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ra -nn -r /data/argus_data.arg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This pulls in and displays all the data in the Argus file, including src/dst IPs &amp; ports, data transferred, etc.  But let's apply some BPFs to it - let's say your mail server is at address 192.168.l.25, and for this assessment you don't care about traffic to/from it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ra -nn -r /data/argus_data.arg - not host 192.168.1.25&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So now on the screen scrolls by gobs of data that does not contain anything related to your mail server at that address.  Next, we may decide that any web traffic is of no interest to us today - so we append more BPFs to our current one and continue to whittle down the amount of traffic displayed by the Argus client.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ra -nn -r /data/argus_data.arg - not host 192.168.1.25 and not port 80 and not port 443&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, you realize you are seeing a bunch of ARP traffic that is of little use to you currently - so let's get rid of it too.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ra -nn -r /data/argus_data.arg - not host 192.168.1.25 and not port 80 and not port 443 and not arp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The basic premise of this blind assessment is to narrow down your view of the data until you get to various things you may never notice, such as a user running a new peer-to-peer client or a rogue MP3 server on your corporate network.  You can continue to limit with BPFs, adding them on to the end of your list, or start utilizing rasort to find larger bandwidth sessions (maybe you like the noisy stuff).  The whole principle of this blind threat assessment, is that there is no wrong way of doing it - stumbling randomly across some weird connection then applying a human's logic to it, is something your traditional signature-based NIDS can't do.&lt;br /&gt;&lt;br /&gt;You won't always be able to catch everything this way, as depending on how much traffic you look at and what you decide to globally eliminate, huge chunks of traffic will never be reviewed.  Nonetheless, I feel that the occasional, manual review, adds value as you usually turn up something interesting that you did not know about.  So take fifteen minutes of your day or week, and notice something new.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-7766138960164146292?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/7766138960164146292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=7766138960164146292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7766138960164146292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7766138960164146292'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/08/threat-assessments-with-argus.html' title='Threat Assessments with Argus'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Yx7N0ayKjBc/RsZHMAzQCKI/AAAAAAAAAMI/HpJQ_nFIjjI/s72-c/warning.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-2867865668602942554</id><published>2007-07-31T10:37:00.000-04:00</published><updated>2007-07-31T10:41:05.131-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Snort'/><title type='text'>Managing Snort Rules</title><content type='html'>I know many people like to use &lt;a href="http://oinkmaster.sourceforge.net/"&gt;Oinkmaster&lt;/a&gt; to pull in rule updates, manage rules, etc. - and I am no different.  But....one thing I tend not to do, is maintain numerous Oinkmaster configurations for various hosts.  Let me elaborate on a rule management scheme for Snort signatures that I find easier to manage.&lt;br /&gt;&lt;br /&gt;Let's say we have five Snort sensors deployed, watching various different types of networks and hosts - and thus requiring vastly different rule tweaks and tuning.  Each of these sensors is going to require both some of the same and different rulesets and individual rules to be loaded.  You could let Oinkmaster handle this or you could use thresholding within Snort itself.&lt;br /&gt;&lt;br /&gt;Example Architecture:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download new Snort signatures daily from snort.org and BleedingThreats via Oinkmaster, disabling rules that you &lt;span style="font-style: italic;"&gt;globally&lt;/span&gt; do NOT use (with disablesid lines).&lt;/li&gt;&lt;li&gt;Run these new rules through a loaded Snort configuration (basically a config with most everything turned on), in testing mode ( -T ).  Potentially quarantine or notify a rule maintainer that new rules are available.&lt;/li&gt;&lt;li&gt;If the new rules pass the Snort testing phase, make these rules centrally available - possibly via a revision control repository, scp, or packaged (rpm, deb, etc.).&lt;/li&gt;&lt;li&gt;Have your sensors check for new signatures at various intervals (using revision, timestamp, or version to decipher if a new ruleset is available).  Let Snort restart with the new rules.&lt;/li&gt;&lt;/ul&gt;Here's the per-sensor tweak:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Utilize thresholding in Snort to suppress or threshold rules that affect less-than-all of your sensors.  Have a look at threshold.conf that comes along with the Snort tarball.&lt;/li&gt;&lt;/ul&gt;So essentially, this approach, relies on one server to update and maintain centrally, new Snort signatures.  A rule that can be removed from all sensor configurations is done so at the Oinkmaster level, while rules that affect anything but all of the sensors is handled at the sensor level in threshold.conf.&lt;br /&gt;&lt;br /&gt;Here is the caveat and where many people take exception to this process: it isn't as efficient on the Snort detection engine itself.  When rules are removed at the Oinkmaster level, they are never loaded into the Snort configuration.  However, when suppressed via Snort thresholding, it happens post-processing (ie. Snort has already detected a hit on the rule, and it then decides it should be suppressed).&lt;br /&gt;&lt;br /&gt;So the moral of the story is, if you have the spare cycles in beefy sensors that are not bogged down with the traffic they are watching - then you can benefit from the administration ease and having rule modifications stay close to the sensor for view, etc.  If your sensors are already taxed, you should really use Oinkmaster all the way through.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-2867865668602942554?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/2867865668602942554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=2867865668602942554' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2867865668602942554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2867865668602942554'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/07/managing-snort-rules.html' title='Managing Snort Rules'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-6399181908876838543</id><published>2007-07-23T16:51:00.000-04:00</published><updated>2007-07-23T16:51:03.850-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prelude'/><title type='text'>High Availability Prelude Central Services</title><content type='html'>I recently &lt;a href="https://trac.prelude-ids.org/wiki/HACtlSrvs"&gt;posted&lt;/a&gt; to the Prelude wiki, a sample configuration for providing high availability for your central Prelude services.&lt;br /&gt;&lt;br /&gt;Basically what the configuration provides is a setup across two servers to host these services: Manager, Correlator, Apache, MySQL, and Prewikka.  It is purely a fault tolerant scheme, as opposed to a performance booster.  Although, you could spread the load to increase performance - such as with a split of the web interface to one while the other provides database interaction for incoming events, or offloading things such as reporting and backups to the secondary.&lt;br /&gt;&lt;br /&gt;MySQL v5 is required to avoid potential auto increment collisions when doing multi-master replication.  Other than that, there really should be minimal changes needed for using various versions with regards to the other software pieces.  Either host in the pair, is capable of taking over as the primary - only caveat is heartbeat is for machine failure, not service failure.  So....you will still need your application-level monitoring (ie. Nagios or other snmp-based solution) in place to be notified of service issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-6399181908876838543?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/6399181908876838543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=6399181908876838543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/6399181908876838543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/6399181908876838543'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/07/high-availability-prelude-central.html' title='High Availability Prelude Central Services'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-3290514530520859935</id><published>2007-07-14T15:33:00.000-04:00</published><updated>2007-07-14T17:17:26.519-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network Awareness'/><title type='text'>Changes of the Seasons</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Yx7N0ayKjBc/Rpkl1YNIRAI/AAAAAAAAAGs/Qi9M6joVan0/s1600-h/leaves.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_Yx7N0ayKjBc/Rpkl1YNIRAI/AAAAAAAAAGs/Qi9M6joVan0/s200/leaves.gif" alt="" id="BLOGGER_PHOTO_ID_5087138853052498946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When the seasons change in New England, there are distinct things you notice - such as the chill in the air as the leaves change in fall, to the rainy months of early spring.  Most changes are anticipated, but as New England weather goes, you always expect the unexpected - you can just as easily get snow in April or have warm January days.  Where I am going with this is in relation to Network Awareness, the ability to notice changes, additions, etc. from endpoints on your network - whether this is new ports, increased protocol activity, or just actively getting to know the hosts making use of your network.&lt;br /&gt;&lt;br /&gt;Much like the weather in New England, the network activity of your hosts is at many times predictable, but there are also the numerous anomalies that appear every day - hosts that shouldn't be running a web server, or increased activity from an IP address.  Alerting on, and profiling these anomalies, is what I am getting at with this Network Awareness approach.  Basically, utilizing existing tools (nessus, nmap, p0f, etc.), with storage (mysql, text, etc.), and custom tools (perl, c, etc.) to build profiles, notice trends, and generate alerts.&lt;br /&gt;&lt;br /&gt;Maybe there are open source tools already in the this space (do you know of any?), but it also is a task that benefits from the flexibility of a home-grown process - as each network and set of endpoints is so vastly different nowadays.&lt;br /&gt;&lt;br /&gt;Things of interest (have any others?):&lt;br /&gt;&lt;br /&gt;* Build profiles and store all interesting events in a database, both for maintaining history, state, and future correlations&lt;br /&gt;&lt;br /&gt;* Analyze various sources of data for various types of items&lt;br /&gt;&lt;br /&gt;* Sources of Data:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;nessus: both for assessing and verifying compliance, provides a baseline&lt;/li&gt;&lt;li&gt;nmap: actively profile port openings and OS detection&lt;/li&gt;&lt;li&gt;p0f:  passively identify OS&lt;/li&gt;&lt;li&gt;tshark:  for traffic profiling and statistics&lt;/li&gt;&lt;li&gt;pads: passively noticing new services offered &lt;/li&gt;&lt;li&gt;argus: counting hosts, ports, traffic, etc.&lt;/li&gt;&lt;li&gt;various others, including netics or fl0p&lt;/li&gt;&lt;li&gt;custom: for mining logs, running comparisons, etc.&lt;/li&gt;&lt;/ul&gt;* Important Items:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;tcp and udp ports&lt;/li&gt;&lt;li&gt;ip addresses&lt;/li&gt;&lt;li&gt;services offered on those ports&lt;/li&gt;&lt;li&gt;identifying operating system usage&lt;/li&gt;&lt;li&gt;traffic patterns&lt;/li&gt;&lt;li&gt;establishing normal usage profiles on traffic, endpoints, and potentially users of those endpoints&lt;/li&gt;&lt;/ul&gt;* Establish signatures to build these profiles, notice trends, and spot anomalies&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is not an idea based on real-time alerting or analysis, but a crunching of various data to cast a light over areas that deserve attention or investigation.  I guess the operative word here is &lt;span style="font-style: italic;"&gt;change&lt;/span&gt;.  Change can be good, especially when making improvements, but in our context, we are looking for those changes that indicate something unauthorized or outside the scope of a security policy.  Services and people many times operate in a set pattern with noticeable characteristics...let's find the anomalies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-3290514530520859935?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/3290514530520859935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=3290514530520859935' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/3290514530520859935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/3290514530520859935'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/07/changes-of-seasons.html' title='Changes of the Seasons'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Yx7N0ayKjBc/Rpkl1YNIRAI/AAAAAAAAAGs/Qi9M6joVan0/s72-c/leaves.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-8357865340874314058</id><published>2007-07-06T18:30:00.000-04:00</published><updated>2007-07-14T15:42:01.408-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pen Test'/><title type='text'>Brute Forcing SSH Passwords with Hydra</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Yx7N0ayKjBc/Ro7BBpcUUsI/AAAAAAAAAGk/2yQU5cY_9G4/s1600-h/walnut_100.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp2.blogger.com/_Yx7N0ayKjBc/Ro7BBpcUUsI/AAAAAAAAAGk/2yQU5cY_9G4/s200/walnut_100.gif" alt="" id="BLOGGER_PHOTO_ID_5084213263396524738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Quite often you may find the need to audit passwords without grabbing a copy of the hashes, or maybe need to generate a simulated brute force attack to test one of your sensors or correlation engines. In from stage left steps &lt;a href="http://www.thc.org/thc-hydra/"&gt;THC-Hydra&lt;/a&gt;, the self-described &lt;span style="font-style: italic;"&gt;"very fast network logon cracker which supports many different services."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are familiar with &lt;a href="http://www.remote-exploit.org/backtrack.html"&gt;BackTrack&lt;/a&gt;, running Hydra from within is quite easy, located under the online password cracking tools. Otherwise, Hydra can be built from source, just make sure to have openssl and ssh libraries installed for it to be compiled against - as usual, the configure script will let you know which libraries are lacking on your system.&lt;br /&gt;&lt;br /&gt;Much like nmap, and the gui front-end for it, Hydra can be run from either the command-line or with a simple GTK gui wrapper. The only change necessary is to have X working, and specify xhydra as opposed to just hydra. I'll use the command-line options in this post, as the gui makes it extremely easy to figure out the options, etc. In fact, using the gui will actually build the hydra command-line for you to see how it is configured to run.&lt;br /&gt;&lt;br /&gt;Numerous services are supported for cracking in the latest version of Hydra, which is 5.4 at the time of this post. Although we will use ssh2 in this example, other network services such as cvs, ftp, imap, mysql, ldap, and http are also available. So let's move on to running an over-the-air ssh password attack (exercise caution if you lock out accounts, or have other account policy settings in place)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A simple one-off username/password combo:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hydra 192.168.1.25 ssh2 -l foohacker -p bluebird&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above attempts to login over ssh v2 to 192.168.1.25 as foohacker with password of bluebird.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Quick alteration to utilize lists:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hydra -M targets.txt ssh2 -L users.txt -P passwords.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So...now we have replaced the single setting for each and allowed ourselves to brute force ssh login with a matrix of users, passwords, and hosts.  I specify a single item per line in my flat text files when using these lists.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A couple options worth mentioning:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-f allows you to exit hydra once a match is found&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;-t allows you to manipulate the number of tasks it runs in parallel.  from the readme, experimenting with this feature can result in improved speed or in disabling the service, :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Have a look &lt;a href="http://www.thc.org/thc-hydra/"&gt;here&lt;/a&gt; and &lt;a href="http://www.thc.org/thc-hydra/README"&gt;here&lt;/a&gt;, to learn more about the options, download source, and view changelogs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-8357865340874314058?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/8357865340874314058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=8357865340874314058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8357865340874314058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8357865340874314058'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/07/brute-forcing-ssh-passwords-with-hydra.html' title='Brute Forcing SSH Passwords with Hydra'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_Yx7N0ayKjBc/Ro7BBpcUUsI/AAAAAAAAAGk/2yQU5cY_9G4/s72-c/walnut_100.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-6255707888941193977</id><published>2007-07-01T08:32:00.000-04:00</published><updated>2007-07-01T09:01:09.372-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prelude'/><title type='text'>Prelude Registration Server</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_Yx7N0ayKjBc/RoelI5cUUrI/AAAAAAAAAGc/5Oo0tvtvxLw/s1600-h/bulb.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_Yx7N0ayKjBc/RoelI5cUUrI/AAAAAAAAAGc/5Oo0tvtvxLw/s200/bulb.jpg" alt="" id="BLOGGER_PHOTO_ID_5082212276788023986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="on" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;As anyone who has used Prelude, you will know that registering a sensor with a Prelude Manager/Relay, is the first step in having your sensor send alerts into your Prelude framework.  Usually a combination of, (a) running 'prelude-adduser registration-server' on the manager/relay, and (b) running 'prelude-adduser register' on the sensor you are adding - followed by accepting the registration on the manager, etc.&lt;br /&gt;&lt;br /&gt;In this post, I will show a quick way of setting up a &lt;span style="font-style: italic;"&gt;pseudo-daemonized&lt;/span&gt;  instance of the Prelude registration server, that will auto-accept the sensor registration.  This comes in handy when you have a bunch of sensors to register, yet you don't want to constantly be going back to the manager console to acknowledge each individual sensor registration.&lt;br /&gt;&lt;br /&gt;On the manager side, first install the &lt;a href="http://www.linuxjournal.com/article/6340"&gt;screen&lt;/a&gt; utility.&lt;br /&gt;&lt;br /&gt;Continuing on the manager machine, I usually create an init script, that has the process being the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/usr/bin/screen -d -m /usr/local/bin/prelude-adduser registration-server prelude-manager --passwd=somepassword --keepalive --no-confirm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What this command says is, have screen fire up this prelude command while detaching the screen session - thus putting it in the background, much like a daemonized process (ie. not running active in your console).  The 'prelude-adduser registration-server' command runs using the prelude-manager analyzer profile.  The key additions to the command, are the use of a pre-shared password, and the keepalive and no confirm options.  The pre-shared password is used by the sensor registering, and the no confirm eliminates the need to accept the sensor registration on the manager each time.  Finally, the keepalive option, does not cause the registration server to exit after a single successful registration on the manager side.&lt;br /&gt;&lt;br /&gt;Finally, running the following on the sensors needing to register (in this example, a snort sensor):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;prelude-adduser register prelude-snort-profile "idmef:w admin:r" 192.168.1.2 --uid snort --gid snort --passwd=somepassword&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above does the normal sensor registration pieces of specifying the profile in use, prelude permissions to use, and user/group to allow access to the sensor profile.  The important addition, is the use of the pre-shared password that was specified in the registration server running on our manager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-6255707888941193977?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/6255707888941193977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=6255707888941193977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/6255707888941193977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/6255707888941193977'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/07/prelude-registration-server.html' title='Prelude Registration Server'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Yx7N0ayKjBc/RoelI5cUUrI/AAAAAAAAAGc/5Oo0tvtvxLw/s72-c/bulb.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-2605930009272172493</id><published>2007-06-29T21:23:00.000-04:00</published><updated>2007-07-10T14:55:28.971-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Snort'/><title type='text'>Snort starter configuration</title><content type='html'>Everyone has their own ways of configuring up a new Snort IDS sensor, below is a glance over the base options that I feel should be given some attention when first deploying.  This applies to the 2.6 strain of Snort.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HOME_NET variable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;var HOME_NET [192.168.1.0/24,192.168.25.25]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The general rule to keep in mind when setting the HOME_NET variable is to specify the networks or hosts you are protecting.  For example, if watching a gateway where your local network resides on one side, and the Internet on the other - HOME_NET would be set for your local network address.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EXTERNAL_NET variable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;var EXTERNAL_NET !$HOME_NET&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I generally set my EXTERNAL_NET variable to be anything not in my HOME_NET.  Essentially, anything that is not in the "protected" zone for this sensor.  There are exceptions to this rule, for example, a highly subnetted internal network that may have other sensors watching elsewhere or that you generally are not interesting in watching traffic from with a network IDS.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Service-specific variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;var DNS_SERVERS [192.168.1.5,192.168.1.6]&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;var SMTP_SERVERS [192.168.25.50] &lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;var HTTP_SERVERS [192.168.1.100,192.168.1.101]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next comes the groupings of service-specific variables.  There are two main reasons for getting these as accurate as possible pertaining to the network you are watching with this sensor.  First, they will make the potential alerts more accurate - think less false positives, because you are only looking for DNS-related alerts against DNS servers (if the rules are written with these variables used of course).  Second, they will make your Snort engine more efficient.  Instead of applying certain rules against all IP addresses, if a rule is written to watch for a certain HTTP exploit and specifies the HTTP_SERVERS variable in the rule, it will only be applied against those specific servers.  Any limits you place on what Snort has to match against, speeds up the whole process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Service-specific port variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;var HTTP_PORTS 80&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;include coldfusion.rules&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;var HTTP_PORTS 8080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;include coldfusion.rules&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I won't spend time here, but the same principles that apply to the service-specific variables for IP addresses in the section above, also apply here for various ports.  *Note that each port definition must be defined separately and with each rule set bound to it, unless using contiguous ports - such as 80:85.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Detection Engine memory usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;config detection: search-method ac-bnfa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Various options can be used here that both directly affect the performance of the detection engine and the resources it uses.  Utilizing ac-bnfa is becoming both the default recommended setting from various sources, and I can attest to having the best globally acceptable expectations across numerous platforms and hardware.  It is rated at "low memory, high performance".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;frag3 preprocessor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;preprocessor frag3_global: max_frags 65536&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;preprocessor frag3_engine: policy windows bind_to [192.168.10.0/24]&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;preprocessor frag3_engine: policy linux detect_anomalies&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The frag3 preprocessor handles IP fragmentation  and attempts to thwart the various IDS evasion techniques that utilize fragmentation.  The key thing I want to point out here, is the policy bindings.  Different operating systems, implement TCP/IP in different ways, and thus handle IP fragmentation in different ways.  The frag3 preprocessor is a target-based preprocessor that allows you to let the IDS see the reassembled packets in the way the target OS will.  The first policy statement above applies a "windows" policy, which Windows happens to follow for example.  The last policy statement without the bind_to, applies to all other target IP addresses other than our 192.168.10.x network.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Perfmonitor preprocessor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;preprocessor perfmonitor: time 300 file /data/snort/snort.stats&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As its name implies, this preprocessor measures performance.  Things such as CPU usage, packet counts, and my favorite - drop rate, are measured here.  The above configuration line tells the perfmonitor preprocessor to write out statistics every 300 seconds to that particular file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sfportscan preprocessor&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;preprocessor sfportscan: proto { all } ignore_scanned { 192.168.1.22 }ignore_scanners { 192.168.1.150 } sense_level { low }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Not everyone feels it necessary to run this preprocessor, especially on internal network segments, where portscans should be less of an issue - but a few tuning options can go a long way.  Utilizing the ignore_scanned and ignore_scanners options, can reduce portscan alerts generated by sensitive targets or sources - for instance a vulnerability assessment scanner.  The sense level can be raised to higher levels to detect slow scans, but at the expense of generating more false positives - whereas setting to low will only watch for error responses from the targets of a potential scan, making this option much less noisy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Removing unnecessary rule sets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;include $RULE_PATH/smtp.rules&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;include $RULE_PATH/coldfusion.rules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the best ways to improve performance of your sensors (ie. reduction of dropped packets), is to globally remove rule sets that are not pertinent to the hosts you are protecting with this sensor.  For example, do NOT include coldfusion.rules if you do not have ColdFusion servers you are protecting.  Remove or comment out those rule sets that are not necessary from your snort configuration altogether.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use of Bleeding Threats rule sets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;include $BLEEDING_RULE_PATH/bleeding.rules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;include $BLEEDING_RULE_PATH/bleeding-attack_response.rules &lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;include $BLEEDING_RULE_PATH/bleeding-dos.rules &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Much along the lines of globally removing rule sets that do not pertain to your environment, is if you decide to use Bleeding Threats rules, do not use the large, all inclusive bleeding.rules.  Select only the individual rule sets that you are interested in using.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;thresholding/suppression&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;suppress gen_id 1, sig_id 1231, track by_src, ip  10.10.10.10&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;suppress gen_id 1, sig_id 573, track by_dst, ip 192.168.1.20&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I will get into this area in a future post in much more depth, but utilizing threshold.conf for both thresholding and suppression can be extremely beneficial.  If you have a Nagios server that constantly trips an alert for an SNMP rule against a certain router, consider utilizing a suppression to remove this particular instance from alerting, while still allowing other hosts to trigger this rule.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are numerous configuration options within Snort, and this post only touched upon the few that I feel are most immediately useful with the tweaks above.  Every sensor and network is different, for example, performance tuning the stream4 preprocessor or tuning http_inspect for particular ports, will be more or less important in various situations.  Utilizing a base Snort configuration, tweaking as necessary to tailor for both resource constraints (bandwidth, processor, memory) and network profile (types of servers and traffic, nature of environment, etc.), will make your Snort IDS sensor much more useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-2605930009272172493?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/2605930009272172493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=2605930009272172493' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2605930009272172493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2605930009272172493'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/snort-starter-configuration.html' title='Snort starter configuration'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-8070504502903051036</id><published>2007-06-23T13:28:00.000-04:00</published><updated>2007-06-25T08:57:29.931-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NSM'/><category scheme='http://www.blogger.com/atom/ns#' term='IR'/><title type='text'>How NSM Saved Christmas</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Yx7N0ayKjBc/Rn1kQgPEVSI/AAAAAAAAAGU/fbQMdNGiSDM/s1600-h/sguil_logo.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp1.blogger.com/_Yx7N0ayKjBc/Rn1kQgPEVSI/AAAAAAAAAGU/fbQMdNGiSDM/s200/sguil_logo.png" alt="" id="BLOGGER_PHOTO_ID_5079326189437605154" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Introduction&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;'Twas the night before Christmas....well...not exactly.  This is a real-world account of how I used open source tools and the foundation of Network Security Monitoring to save my chances of attending the company Christmas party.  It was a few years ago in the middle of December when the incident that follows occurred, only but a couple hours before I was set to attend the party.  Luckily, the practices of NSM were already in place, trimming down the time needed and stress endured considerably, while scoping the extent of the damage.&lt;br /&gt;&lt;br /&gt;For those not familiar with the concept of NSM, I highly recommend the &lt;a href="http://taosecurity.blogspot.com/"&gt;blog&lt;/a&gt; and &lt;a href="http://www.taosecurity.com/books.html"&gt;books&lt;/a&gt; of Richard Bejtlich, security guru and NSM evangelist.  The basic principle that NSM boils down to, is to not rely on a single point of network data for detecting and responding to your intrusions.  So instead of collecting only alert data from your IDS, you supplement this alert data, with session or flow data, full content, and potentially statistical data.&lt;br /&gt;&lt;br /&gt;In the scenario that follows, NSM was employed using various open source tools, including &lt;a href="http://sguil.sourceforge.net/"&gt;Sguil&lt;/a&gt;, &lt;a href="http://www.snort.org/"&gt;Snort&lt;/a&gt; and &lt;a href="http://www.metre.net/sancp.html"&gt;SANCP&lt;/a&gt;.  If you have never used Sguil before, you are in for a treat - as it ties together the Snort alerts, with corresponding SANCP session data and another Snort instance capturing full content data.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;The First Hint&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;"CHAT IRC channel join", those four words is how it all began.  Normally, a Snort alert of that nature would not have caused me much concern - mainly, since many co-workers and myself used IRC on a daily basis.  The source IP address, however, made it all the more frightening.  It happened to be a Debian FTP server we had in our DMZ, which would have absolutely no reason to be running an IRC client legitimately.  Could it be an employee that was doing work on the server, deciding to install an IRC client on it and connect from there?  Or, was it something more sinister, like that of a compromised Linux box joining a botnet?&lt;br /&gt;&lt;br /&gt;The first thing that led me initially away from it being an insider doing something they should not be, was in the packet payload - viewable via Sguil from the Snort alert data collected (a sample Sguil packet view of a generic alert is shown &lt;a href="http://sguil.sourceforge.net/images/sguil_main.png"&gt;here&lt;/a&gt; on the main Sguil site).  A random jumble of characters for the nick used to log onto the IRC server, this is seeming stranger by the minute.  Why would someone that worked here use a random character string and join a channel that did not make any more sense than the nick?  From knowledge of working on the FTP server recently, I knew that there was a limited exposed attack surface, only TCP ports 21 for FTP and 22 for SSH were listening.&lt;br /&gt;&lt;br /&gt;In an all too common occurrence when an IDS is deployed, our investigation without touching the server in question would most likely be over.  Sure, we could have been collecting logs centrally or had some sort of host IDS installed, but using network sensors that were collecting various data, allowed us to solve this from a 3rd party point of view at the network level.  Luckily for us, we had NSM already in place, so in addition to the Snort alert we saw, we were able to dig deeper into the session (ie. flow) data and full content data to further analyze what exactly was taking place.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Tracking Down the Compromise&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;So where did I go from here?   Well...I first decided to query for any Snort alerts, on both the source and destination IP addresses for the   last week - nothing of any use came back. The next step was to pull any session/flow  SANCP data from Sguil's database of all connections in the last week involving our victim machine.  Sguil's SANCP view, looks like this &lt;a href="http://sguil.sourceforge.net/images/sguil_sancp.png"&gt;sample&lt;/a&gt; from the Sguil website, and includes data formatted with the following headers:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;Start Time    End Time    SrcIP    SPort    DstIP    DPort    SBytes DBytes&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;From the SANCP data returned, we could see numerous connections from external addresses with very little data being exchanged to tcp port 22 of our victim machine, especially from the destination side (this is classic of SSH brute force attempts, and confirmed from central logs from the victim host).  The real interesting flow results, were the sudden stop of excessive SSH connections, followed by a connection to an external FTP server and a public IRC server!  Now we are getting somewhere!!&lt;br /&gt;&lt;br /&gt;One of the best things of working with Sguil, is that we can right-click any SANCP session and request the full-content data related to it (either in full capture view via Wireshark or output in a transcript window if an ASCII-based protocol, such as HTTP, SMTP, FTP, etc) .  Within a traditional Sguil setup, you have a separate instance of Snort constantly recording pcap data to hourly files, which Sguil then applies the appropriate BPFs to get the correct data requested by the analyst using the Sguil client.&lt;br /&gt;&lt;br /&gt;With full-content data at our disposal, we immediately requested the transcripts of the IRC and FTP sessions (a sample generic transcript screenshot can be seen &lt;a href="http://sguil.sourceforge.net/images/sguil_transcript.png"&gt;here&lt;/a&gt; from the main Sguil site).  Within the FTP transcripts we notice various tarballs being downloaded (with names of not any popular software), which ironically, can be fully regenerated from the full-content data we have collected with open source tools - but that is a topic for another post.  Furthermore, the IRC transcripts confirm our earlier IDS alert that suggested the victim host had in fact joined up to the popular Freenode IRC network, joining both an obscure channel and with an equally obscure nick.  Forensics performed later on a copy of the hard disk showed a custom IRC client with various "enhanced" drone abilities.&lt;br /&gt;&lt;br /&gt;So what did we learn here?  As you can see, having full content data made diagnosing the issue at hand, extremely easy.  But what if you don't have full content data or all the communication had been encrypted??  That is why the flow data is so important.  Even eliminating the full-content analysis we did above, we were still able to find out various important things just from SANCP flow data, enough to get a sense of what had happened, including:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;1. Noticing plenty of source-heavy, quick SSH connections from external addresses - implicating SSH brute force attempts to login against an account.&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;2. A sudden stop in the rapid SSH connections, followed by an FTP connection to an external IP address and pulling substantial amounts of data to the victim system.&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;3. Connection to IRC, from a machine that shouldn't be.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style="font-weight: bold;font-size:100%;" &gt;Scoping the Extent of the Incident&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;The final step before taking this machine out of service, to both be forensically analyzed and rebuilt from known good sources, was to scope the extent of the damage.&lt;br /&gt;&lt;br /&gt;Once again, we turned to the flow data in Sguil provided by SANCP.  The following steps gave that "warm, fuzzy feeling" that we were okay:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;1. Lookups across the SANCP database table that involved any communication from all external IP addresses involved.  This included, the original SSH brute force scanner, which also happened to be the box they logged into SSH with once successfully cracking a password.  Also the FTP server the tools were grabbed from and IRC server they connected to.  Nothing beyond the time frame and machines we had already been investigating gave cause for alarm.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;2. The victim machine, our Debian FTP server in the DMZ, had its IP address searched across all of the SANCP data available as well - with importance placed on connections both 72 hours prior to the successful compromise and anything thereafter.  With importance this time placed on looking for such things as attacks on other DMZ hosts of ours in the same accessible subnet, to scanning of external hosts on strange ports.&lt;br /&gt;&lt;br /&gt;3.  Finally, a search across the SANCP table for other hosts in the same DMZ subnet.  Looking for any protocols used or communications that appeared out of the norm.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Having centralized logs, HIDS, rootkit checkers, etc. are an ideal situation to compliment network based evidence, but if given the choice, a properly deployed NSM sensor is my first course of action when responding to intrusions.  Just utilizing our NSM tools, we determined what happened to the machine, what it did, and scoped the extent of the intrusion.&lt;br /&gt;&lt;br /&gt;After finishing our network-based analysis, we had a look at our central log server.  The syslog data confirmed, shortly after the brute force attacks, and at the same time as the network data showed the last bits of SSH communication - a successful login on an unprivileged account.  The files downloaded via FTP to /tmp, which included the custom IRC bot client, all with permissions and ownership of this compromised, unprivileged account.  A successful grinding of a weak user account password over SSH had been the way in, with the common post-attack scenario of it being joined to a botnet army of drones, the result.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Conclusion&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Hopefully this article has sparked an interest in enabling your IDS sensors to do more, and provide you with a broad way of investigating incidents.  Once you move away from the alert-only mentality of a traditional IDS, you will find even more value in the data that tools like Sguil provide.  For more information on NSM and the various tools that can be used, I point you again to Richard Bejtlich's &lt;a href="http://taosecurity.com/books.html"&gt;books&lt;/a&gt; and the &lt;a href="http://www.vorant.com/nsmwiki/Main_Page"&gt;Sguil/NSM wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;* All of the network forensics (ie. non-local), were completed in only a couple of hours, leaving plenty of time to have fun at the Christmas party!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-8070504502903051036?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/8070504502903051036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=8070504502903051036' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8070504502903051036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8070504502903051036'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/how-nsm-saved-christmas.html' title='How NSM Saved Christmas'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_Yx7N0ayKjBc/Rn1kQgPEVSI/AAAAAAAAAGU/fbQMdNGiSDM/s72-c/sguil_logo.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-2345019922135276983</id><published>2007-06-15T19:53:00.000-04:00</published><updated>2007-06-16T08:52:54.869-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IR'/><title type='text'>Incident Response: Breaking the Cycle</title><content type='html'>An alert comes into your email inbox, notifying of a possible intrusion noticed by one of your sensors.  What do you do next?  Unfortunately, a common answer to this question, is the analyst rushes to logon to the machine that is potentially breached - which is exactly the &lt;span style="font-style: italic;"&gt;WRONG&lt;/span&gt; thing to do!&lt;br /&gt;&lt;br /&gt;I guess it is human nature to readily go to an ailing object, in our case the victim system.  But, when doing so in responding to possible intrusions, you potentially contaminate evidence, or possibly alert the intruder that you know of their existence - losing the upper hand you currently possess in organizing your plan.  Even if you do go to that victim machine and start running commands such as 'w' or 'ps -ef', how can you trust their output - trojaning system utilities is a common reinforcement procedure after a successful compromise.&lt;br /&gt;&lt;br /&gt;As I have discussed in a previous post, having a robust security monitoring infrastructure is imperative to your noticing and responding to incidents.  With centrally located data, you can form a much clearer picture as to what could have happened, or set your mind at ease that nothing has happened - all without touching the victim machine.&lt;br /&gt;&lt;br /&gt;So what are some ways to use our security monitoring infrastructure for IR:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Flow data:&lt;/span&gt;  If you collect flow data, from say Argus, SANCP, or even Cisco Netflow - you could have all the connections that both the source machine and victim machine have made.  Querying for what other hosts, ports, and how much data has been transferred are all helpful clues.  You may notice strange connections to IRC servers, or large amounts of data transferred over FTP.  Flow data can prove invaluable when you don't have access to collected full content data, due to technical or political limitations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Network IDS Alerts:&lt;/span&gt;  They aren't just for real-time alerting!  Why not search your recorded IDS alerts for previous hits on your victim's IP address or maybe the attacking source's network address.  Any otherwise insignificant alert like a portscan, may provide better context to the investigation at hand.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Logs:&lt;/span&gt;  Both system and application logs can play a huge part here.  The key point that needs to be made, is these logs must be collected centrally.  They are too easily removed from the "hacked" machine if so desired by an attacker.  Logs can show you who logged in recently or what account may have been compromised for instance.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HIDS:&lt;/span&gt;  If you run a HIDS, you may have file modification alerts - noticing an addition to /etc/passwd or a change to your DNS resolver.  These alerts and your system logs may be your only concrete evidence if an encrypted channel such as SSL or SSH is being used.&lt;br /&gt;&lt;br /&gt;Having some sort of SIM/SEIM or Event Management system, allows you to review these alerts from one interface, cross-reference, or correlate.  Sometimes, logging onto the victim machine will unfortunately be your only option - for instance, if an important clue is only available in running memory on the system.  When you get to this stage, remember to always use trusted read-only media with the tools you require.    The most important point to take away from this post, is to exhaust your options &lt;span style="font-style: italic;"&gt;BEFORE&lt;/span&gt; touching the victim machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-2345019922135276983?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/2345019922135276983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=2345019922135276983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2345019922135276983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/2345019922135276983'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/incident-response-breaking-cycle.html' title='Incident Response: Breaking the Cycle'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-573499037336640056</id><published>2007-06-10T18:20:00.000-04:00</published><updated>2007-06-11T07:59:25.657-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prelude'/><category scheme='http://www.blogger.com/atom/ns#' term='Logs'/><title type='text'>Prelude-LML as a UDP Listener</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_Yx7N0ayKjBc/RmyB_QPEVRI/AAAAAAAAAGM/pfywj-cmVNc/s1600-h/logs.jpeg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_Yx7N0ayKjBc/RmyB_QPEVRI/AAAAAAAAAGM/pfywj-cmVNc/s200/logs.jpeg" alt="" id="BLOGGER_PHOTO_ID_5074573803829613842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If you have ever used &lt;a href="https://trac.prelude-ids.org/wiki/PreludeLML"&gt;Prelude's Log Monitoring Lackey (LML)&lt;/a&gt; before, you probably know that the default behavior is to process these log files that happen to be local to the server.  What I will show in this post, is how to set Prelude-LML to listen on a UDP port, and accept messages there from Syslog-NG or anything that can transport the messages to it via UDP.&lt;br /&gt;&lt;br /&gt;Having Prelude-LML listen for UDP messages, is as easy as adding the following to your startup options:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;--format syslog --udp-server=192.168.1.25:10514&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Basically, what the above says, is for the Syslog format, listen on the interface with IP address 192.168.1.25 for UDP messages on port 10514.  Listening on UDP, can also be specified in the format section in prelude-lml.conf of your choosing, whether a format for Syslog messages or maybe Apache log formats, etc.&lt;br /&gt;&lt;br /&gt;So now you have a Prelude-LML instance listening for UDP port 10514 messages on its appropriate network interface.   Let us also assume you already collect your Syslog data from all your hosts in your environment centrally via TCP, to a server running Syslog-NG.   All you need to add to your Syslog-NG configuration would be something similar to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;destination d_prelude_lml{ udp("192.168.1.25" port(10514)); };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;log { source(s_tcp); destination(d_prelude_lml); };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above assumes, you already collect your logs centrally from all hosts via TCP, and have labeled the source as s_tcp in your Syslog-NG configuration - adjust accordingly.  We created a new destination call d_prelude_lml, pointing it to use udp with our IP and port combination we setup on our Prelude-LML server.  The log statement we have added, combines the source TCP statement, with our new Prelude-LML destination statement to send any logs coming into our Syslog-NG central log server from hosts over TCP out over UDP to our LML instance.  Allowing all the logs to be processed via Prelude-LML, but without, for instance, being stored on our LML server.&lt;br /&gt;&lt;br /&gt;Prelude-LML is highly configurable, many more options and combinations can be made to tailor it for your environment.  I hope this provided one option of adapting it to an architecture that already collects their Syslog data centrally.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-573499037336640056?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/573499037336640056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=573499037336640056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/573499037336640056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/573499037336640056'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/prelude-lml-as-udp-listener.html' title='Prelude-LML as a UDP Listener'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Yx7N0ayKjBc/RmyB_QPEVRI/AAAAAAAAAGM/pfywj-cmVNc/s72-c/logs.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-5590562028671202797</id><published>2007-06-07T18:19:00.000-04:00</published><updated>2007-06-10T11:38:01.109-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prelude'/><title type='text'>Prelude for Event Management (ie. SIM)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.prelude-ids.org/"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp3.blogger.com/_Yx7N0ayKjBc/RmiG6QPEVQI/AAAAAAAAAGE/D5pvqIjOP6A/s200/center.png" alt="" id="BLOGGER_PHOTO_ID_5073453315581564162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The hybrid IDS, or "meta-IDS", as described by the project's founder, makes an excellent choice as a SIM/Event Management tool in what is a sparse area of the Open Source world.  Not only is it "good enough" to justify &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; throwing hundreds of thousands of dollars at an Arcsight or Network Intelligence solution, it has far exceeded my expectations in many areas.&lt;br /&gt;&lt;br /&gt;I'd like to commence this first post on &lt;a href="http://www.prelude-ids.org/"&gt;Prelude&lt;/a&gt;, by detailing five things that I most like about it.  In no particular order, let us begin the Prelude Five.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;** The Framework **&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When Prelude first started out, it was very much an IDS, with a NIDS of its own, etc.  But realizing that the framework itself was the crux of this project, was probably the wisest design decision made.&lt;br /&gt;&lt;br /&gt;From deploying and configuring numerous sensors, from Samhain to Snort, the Prelude library makes it seamless to connect agents/sensors into the existing framework.  TLS encrypted channels secure the data in transit, from your agents to Prelude Managers at a central site or in a relaying configuration to distribute the load.  Registration of the individual agents/sensors/relays, allows you to only accept and connect systems that &lt;span style="font-style: italic;"&gt;you&lt;/span&gt; specifically specify.&lt;br /&gt;&lt;br /&gt;The distributed architecture allows for various systems, along the route to your central site, to spool events and data when various relays, etc. are unavailable.  Both allowing you to spread out your load, and have fault-tolerance baked in.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;** Versatile API **&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Have a sensor or tool that has data you want sent to Prelude and it isn't one of the natively supported sensors?  No big deal!  Prelude's API allows you to use C, Perl, or Python to format your alert/event in IDMEF and pump it into the Prelude framework.  Install the Prelude library, format the data appropriately, and use one of the languages to create your client and away you go.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;**Prewikka**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If there is one thing that the Open Source world of projects frequently lacks, it is a nice GUI interface.  Prewikka, the web interface to Prelude, is one exception to this statement.&lt;br /&gt;&lt;br /&gt;The ability to view alerts, drill-down to event data, view agents - and not to mention the additional features in a commercial add-on (that includes graphs, stats, ticketing, reports, etc.).  The Python-based code, runs either as a CGI program, mod_python module or within its own self-contained web daemon.  All in all, a very well thought out interface that is both usable and constantly improving.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;**Analysis Engines**&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Two analyzers that come with Prelude, are the Correlator and LML (log monitoring lackey).&lt;br /&gt;&lt;br /&gt;Let's say you want to analyze your syslog data or even your windows event logs (exporting them via ntsyslog in a syslog format), this is what LML is for.  Heavily weighted in regular expressions, you generate alerts from your logs on failed SSH logins, firewall events, mail system abnormalities, and all the usual suspects that make up a standard log analyzer.  But here's the real catch....most of these open source log analyzers are written in Perl, while LML is "highly optimized" in C!  I've personally seen LML with the default ruleset not break a sweat on thousands of large syslog messages per second, when SEC (a very fine pattern matching program itself) get brought to its knees with a much smaller, tuned ruleset.&lt;br /&gt;&lt;br /&gt;Then there is the Correlator, still technically not released officially, and with a very minimal ruleset at the moment, but nonetheless extremely usable.  What would an event management solution be if it couldn't take in Snort alerts, and correlate them with firewall or syslog events.  This is just what the Correlator does, by leveraging Prelude's heavy reliance on the IDMEF RFC for event format, allowing correlation across any of the fields.&lt;br /&gt;&lt;br /&gt;Best of all, both with Correlator and LML, you can add/change/delete rules as you see fit.  No black box, enable or disable only options for you - this is Open Source my friend!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;**Modular Plugins**&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;So you  want to pump your data into a database, who wouldn't....so enable the database plugin, make a few changes, and presto.  Maybe you don't want to log to the database and you want all your alerts in a flat text file, sure that can be done.  Or you could purchase, for minimal dollars, the SMTP alerting plugin to send alerts to you via email.&lt;br /&gt;&lt;br /&gt;All the plugins are enabled/disabled in the Prelude Manager, and allow various things to happen with this data you are gathering in from your various sensors.   Remove what you don't need, and add what you do - you have full control of this.&lt;br /&gt;&lt;br /&gt;If modular plugins aren't enough, you can stack them too.  Stacking the plugins allows you to take the benefits of one plugin, say the filtering capabilities of the IDMEF-Criteria plugin, and hook it to the Thresholding plugin (limiting the number of events processed), then hooking that to the Database plugin.  Effectively, creating a stack of plugins hooking into the next to manipulate a chain of events as you see fit, on the exact events or data that you require.&lt;br /&gt;&lt;br /&gt;As you can see, Prelude has plenty to offer in the Event Management/SIM space, is actively developed and supported, with both an Open Source community and a commercial outfit providing both support and enhancements.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-5590562028671202797?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/5590562028671202797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=5590562028671202797' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/5590562028671202797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/5590562028671202797'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/prelude-for-event-management-ie-sim.html' title='Prelude for Event Management (ie. SIM)'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Yx7N0ayKjBc/RmiG6QPEVQI/AAAAAAAAAGE/D5pvqIjOP6A/s72-c/center.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-8548762166588481374</id><published>2007-06-01T22:30:00.001-04:00</published><updated>2007-06-11T09:21:05.873-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Argus'/><title type='text'>Argus: The Basics</title><content type='html'>&lt;span style="font-size:100%;"&gt;When regular network IDS alerts aren't enough, and turning to full content data is not an option - the use of flow data can prove useful in tracking down the connections, bandwidth usage, and intents of particular hosts.  &lt;a href="http://qosient.com/argus/"&gt;Argus&lt;/a&gt; fits the bill as a lightweight, yet fully featured, bi-directional flow suite of tools.&lt;br /&gt;&lt;br /&gt;Capturing data can be as simple as this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span style="font-family:courier new;"&gt;argus -d -i eth0 -w logfile&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Where -d starts argus as a daemon, -i specifies the network interface to capture on, and -w tells it where to write out its data to.  Scripting the restart, naming of the output files, etc. allow for a more robust collecting scheme and more manageable file sizes.&lt;br /&gt;&lt;br /&gt;Now let's say you want to look for a certain host communicating.  You could do something as simple as this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-family:courier new;"&gt;ra -r logfile -nn - host 10.10.5.4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This uses the argus client (ra), to read the logfile with -r.  The -nn tells argus to not resolve IP addresses to hostnames, and to also not translate port numbers to service names - making the processing of the file that much faster.  The pieces that follow the last (-), can be any BPF filter, with any number of combinations.  The BPF used above, simply says, only include records that have IP address 10.10.5.4 as the source &lt;span style="font-style: italic;"&gt;or&lt;/span&gt; destination.  Various other ra* clients exist, for various different uses - as we will get into below.&lt;br /&gt;&lt;br /&gt;Output from the above example could look like this:&lt;br /&gt;&lt;br /&gt;01 Jun 07 14:01:22 q    tcp    192.168.1.25 -&gt; 10.10.5.4  7    1236   FIN&lt;br /&gt;01 Jun 07 14:01:31 q     udp  10.10.5.4 &lt;-&gt; 192.168.10.10  13   1411   CON&lt;br /&gt;&lt;br /&gt;The ra client displays various useful information, such as a timestamp, protocol, source &amp; destination ports and IPs, source and destination bytes transferred, and last known established state or pseudo-state.&lt;br /&gt;&lt;br /&gt;Let's move on to a more complicated example, combining various argus clients to pull together some data that we may be interested in.  Combining argus clients, to process the outputs of each sequentially allows much more powerful results.&lt;br /&gt;&lt;br /&gt;Since argus takes a best guess as to an established flow or session, ragator, aggregates the various flows into what it thinks a "conversation" may contain - by combining flows it believes go together.  Let's run it as so:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;ragator -r logfile -nn -w tempgator - host 10.10.5.4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We read in our logfile with ragator, this time writing out our results to a new file called tempgator.  Ragator aggregates the flows into "conversations" containing our host 10.10.5.4 in either the source or destination IP.  This data could be useful to get a bigger picture, maybe seeing large transfers, etc.  But let's now process this file through ramon to find our top pair of talkers with 10.10.5.4 being one on either side.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;ramon -r tempgator -nn -w tempmon -M Matrix&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the above, ramon processes the ragator file, and finding the top pairs of talkers by bytes.  Various other options can be passed to the -M option, such as finding only the top 10 talkers, etc.  We will then process this resultant file through rasort to list our top talker pairs in a more orderly format.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;rasort -r tempmon -nn -M saddr bytes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What we did here was tell rasort to list, in order, first by the source IP address, then by total bytes transferred the top talkers' conversations.  Quickly identifying who were the largest bandwidth hoggers from our resultant argus capture file.  Numerous sorting options are available to rasort via the -M option.&lt;br /&gt;&lt;br /&gt;One other useful client to mention is racount.  Racount will take a statistical snapshot of the file that you process to give you some higher level protocol breakdowns.  As an example, run:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;racount -ar logfile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will give statistical counts of IP, TCP, UDP, etc. breakdowns of packets, bytes, etc.  Useful for determining what the general makeup of this argus captured file is.&lt;br /&gt;&lt;br /&gt;Argus includes many options, as this was only a small sampling of options available.  Furthermore, v3.0 will introduce racluster which greatly simplifies the various steps needed to take to get data in the format that other argus clients act upon.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-8548762166588481374?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/8548762166588481374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=8548762166588481374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8548762166588481374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/8548762166588481374'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/06/argus-basics.html' title='Argus: The Basics'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6685214988020101778.post-7718114185628040171</id><published>2007-05-11T21:30:00.001-04:00</published><updated>2007-06-10T11:38:32.756-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security Monitoring'/><title type='text'>The Security Monitoring Five</title><content type='html'>When discussing security monitoring, or architecting solutions, I base everything in how it fits in this five-pronged approach.  It both makes it easier to see how everything ties together and how it will benefit the overall solution (which is hopefully to detect, respond and resolve incidents).  It has been a while since I have blogged, and mostly I do it to remember ideas, sites or particular steps I took to implement something.  However, this post is more informative for shelling out a framework for future posts on security monitoring and how they fit in.&lt;br /&gt;&lt;p&gt;So what are the "Security Monitoring Five"?&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;NSM&lt;/span&gt; - Your network collecting sensors, for IDS alerts, flow data, full content, and statistical data.  Snort, Argus, and Tshark are some of the tools I prefer to use here.  I both initially learned NSM techniques and principles from using Sguil and its associated supporters/maintainers.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;HIDS&lt;/span&gt; - The individual agents on hosts, that monitor for file changes, additions, rootkits, etc.  Agents such as OSSEC and Samhain fit the bill.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Network Awareness&lt;/span&gt; - Encompasses various utilities and software packages, that notice changes or vulnerabilities in your environment.  Various packages such as Nessus, nmap, and home-grown analysis take shape in this region.  This is where you can build some logic amongst various output, for instance, trend spotting and anomalies.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Log Analysis&lt;/span&gt; - "Real-time" analysis of your syslog, event log, or application logs.   SEC is a popular and flexible choice.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Event Management&lt;/span&gt; - Some call it a SIM, others call it event management.  It basically encompasses a central point for correlation, alerting, reporting, etc.  An open source package that I continue to be impressed with and will receive plenty of posts here, is Prelude, a so-called meta-IDS.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6685214988020101778-7718114185628040171?l=15cards.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://15cards.blogspot.com/feeds/7718114185628040171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6685214988020101778&amp;postID=7718114185628040171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7718114185628040171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6685214988020101778/posts/default/7718114185628040171'/><link rel='alternate' type='text/html' href='http://15cards.blogspot.com/2007/05/security-monitoring-five.html' title='The Security Monitoring Five'/><author><name>ScottO</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
