<div dir="ltr">Yes, yes, and yes.&nbsp; This is the part where a modular, pluggable architecture lets everyone contribute their various scoring mechanisms and checks.&nbsp; There could be a plugin for your SIP/DIP methodology, a plugin for the Google malware domain checker, to Shadowserver.org, etc., etc.&nbsp; But the key is that we don&#39;t have to make a web request on a per-packet basis, rather, we update lists for the sniffer periodically, and we only have to check external sources when we are handed an event from the sniffer.&nbsp; If we buffer the data from the sniffer to the event policy engine queue, then we can afford to do lots and lots of scoring, checking, re-checking, and ranking before a human ever has to wonder what&#39;s going on without dropping packets.&nbsp; As an added bonus, the source lists can be updated based on the collective decisions, so we get a positive cycle of pruning the source lists.<br>
<br>Thanks for the feedback!&nbsp; I can&#39;t wait to all of the cool stuff this group is going to dream up.<br><br>Martin<br><br><div class="gmail_quote">On Fri, Oct 17, 2008 at 4:13 PM,  <span dir="ltr">&lt;<a href="mailto:robert.jamison@bt.com">robert.jamison@bt.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Great e-mail Martin!<br>
<br>
Disclaimer: My comments and thoughts are coming from an MSSP<br>
perspective, not from a local network security administrator with strong<br>
knowledge of and view into a given environment (this is good and bad, I<br>
suppose...).<br>
<br>
Expanding on Martin&#39;s comments:<br>
<div class="Ih2E3d"><br>
&quot; So, while perl would be far<br>
&gt; too slow to do real-time content matching, it is certainly not too<br>
&gt; slow to receive an alert, check to see if this source IP has alerted<br>
&gt; recently, create an incident with some priority, see who needs to be<br>
&gt; notified of the incident, and then send an alert.&quot;<br>
<br>
</div>Checking to see if the SIP has alerted recently, and checking for<br>
derogatory information on the DIP gives opportunity to consider<br>
additional evidence outside the context of the observed session. &nbsp;While<br>
a blacklist provides a seed to begin session tracking, it&#39;s typically<br>
Boolean and doesn&#39;t provide historical or concurrent significance in<br>
establishing an event priority. &nbsp;The common framework is building on<br>
that by more effective session analysis and intelligent classification,<br>
resulting in better incident response--I&#39;m not going to add to this as<br>
my perspective is much more lateral than focused.<br>
<br>
One of the projects I&#39;ve been working on is the analysis and storage of<br>
firewall logs from functionally and geographically diverse environments.<br>
We are attempting to leverage cross customer firewall accept and deny<br>
data as well as security events from IDS/IPS systems which may or may<br>
not be on the same networks in which the firewalls exist. &nbsp;This could<br>
perhaps be viewed as filling gaps in a protective perimeter by<br>
harnessing detection resources that exist elsewhere. &nbsp;Parallelism vs.<br>
Serialism. &nbsp; &nbsp;This is to build confidence that a customer client is<br>
indeed infected, before reaction policy is even engaged. &nbsp;Even though<br>
SIP or client &#39;Alpha&#39; may only be seen from a single network (which we,<br>
as a MSSP typically don&#39;t have control over) security alerts from<br>
disparate IDS/IPS platforms often implicate the same destination address<br>
as being a control node, or hosting malware. &nbsp;Some of the input we aim<br>
to feed the incident priority algorithm are:<br>
<br>
1) How many other networks have connections to this blacklisted DIP<br>
2) What ports have been accessed<br>
3) What is the historical frequency of access to this DIP from all<br>
monitored environments<br>
4) What are the IDS/IPS signatures which have been tripped<br>
5) Is there a common security classification of those sigs<br>
6) Has any forensic investigation of a client that has been in contact<br>
with this DIP uncovered a rootkit or malware instance<br>
7) What is the historic significance in IP addresses in the DIP&#39;s<br>
allocated block (e.g. have other addresses in that block been listed as<br>
DIPs in other security alerts within the same or other attack<br>
classification type?)<br>
<br>
I hope to participate more in this project.<br>
<br>
Thanks,<br>
<br>
<br>
Rob Jamison<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:discussion-bounces@openinfosecfoundation.org">discussion-bounces@openinfosecfoundation.org</a><br>
[mailto:<a href="mailto:discussion-bounces@openinfosecfoundation.org">discussion-bounces@openinfosecfoundation.org</a>] On Behalf Of Matt<br>
Jonkman<br>
Sent: Friday, October 17, 2008 3:58 PM<br>
To: Martin Holste<br>
Cc: <a href="mailto:discussion@openinfosecfoundation.org">discussion@openinfosecfoundation.org</a><br>
Subject: Re: [Discussion] Features and Design Strategy<br>
<br>
Well put Martin. I definitely like the idea. It goes well with one of<br>
the core things we need to do, let everything thread off away from the<br>
flow of packets as possible.<br>
<br>
So to generalize a bit more, we should strive to make anything possible<br>
able to be hooked, or fed out to a side process as possible. Output of<br>
course, but anything else as well. Just leave generic hook points any<br>
process could pull data from fifo style.<br>
<br>
This would likely be where we could let the extracted binaries come out<br>
of the core processes as well.<br>
<br>
Great concept to add, I&#39;ll get this into the wiki so we don&#39;t lose the<br>
idea.<br>
<br>
What challenges does anyone see in this concept?<br>
<br>
What other advantages might we gain if we plan correctly?<br>
<br>
Matt<br>
<br>
Martin Holste wrote:<br>
&gt; First off, many congrats, Matt!<br>
&gt;<br>
&gt; When you look at the threat landscape, it&#39;s clear that the most<br>
imminent<br>
&gt; threats are against web-facing clients and servers, so I think we<br>
should<br>
&gt; focus on client-side attacks and attacks against web applications.<br>
&gt; Detecting SMB protocol attacks, etc. is still important, but most<br>
&gt; attacks against non-web protocols need a foothold on the LAN first.<br>
&gt; Most IDS are historically built for defending servers from clients,<br>
and<br>
&gt; I think that idea is becoming a bit antiquated, though certainly far<br>
&gt; from obsolete.<br>
&gt;<br>
&gt; My group has had great success doing what John at Berkeley is/will be<br>
&gt; doing with file carving. &nbsp;We&#39;ve been auto-extracting packed files from<br>
&gt; the network stream and auto-submitting to VirusTotal for over a year<br>
&gt; now. &nbsp;John&#39;s point about processing the layer-7 data inside the<br>
streams<br>
&gt; is dead-on. &nbsp;We need to move away from answering &quot;what strings did the<br>
&gt; traffic contain&quot; to answering &quot;what did the host actually do?&quot; &nbsp;We<br>
also<br>
&gt; need to keep in mind that canonically defining what &quot;bad&quot; behavior is<br>
&gt; can be incredibly difficult even if you&#39;re just trying to put it in<br>
words.<br>
&gt;<br>
&gt; The design strategy that it is important to me is plugin<br>
extensibility.<br>
&gt; One of the reasons I love perl so much is that there is a CPAN module<br>
&gt; for just about anything you could ever dream of needing. &nbsp;The extreme<br>
&gt; ease with which you can incorporate others&#39; code into your own project<br>
&gt; is what has kept it thriving for so long. &nbsp;The differences between<br>
&gt; individual organization&#39;s security needs and preferences mandate that<br>
a<br>
&gt; successful project will have a long-term goal of being extremely<br>
&gt; modular, while also having a core functionality that is superb.<br>
&gt;<br>
&gt; Since Snort is what I&#39;m familiar with, I will try to make my point by<br>
&gt; comparison: &nbsp;Snort has excellent core functionalilty, but despite<br>
&gt; Marty&#39;s best efforts, extending it is not a trivial task because the<br>
&gt; code is in C. &nbsp;When Jason Brevenik posted his SnortUnified.pm module<br>
&gt; which gives perl access to realtime Snort alerts, I realized that<br>
there<br>
&gt; was suddenly an avenue for decoupling the pure network-grepping core<br>
&gt; functionality of Snort with the action component. &nbsp;Moreover, I now had<br>
a<br>
&gt; hook for writing extremely customized and complicated event handling<br>
in<br>
&gt; my programming language of choice instead of trying to debug segfaults<br>
&gt; in preprocessors all day. &nbsp;So, while perl would be far too slow to do<br>
&gt; real-time content matching, it is certainly not too slow to receive an<br>
&gt; alert, check to see if this source IP has alerted recently, create an<br>
&gt; incident with some priority, see who needs to be notified of the<br>
&gt; incident, and then send an alert. &nbsp;So, the point is, we only need the<br>
&gt; really fast component to do a limited number of tasks, and if we<br>
&gt; decouple the real-time, per-packet tasks from the high level &quot;what do<br>
we<br>
&gt; do with this&quot; tasks, anyone is free to trivially write their own hooks<br>
&gt; into how they want things handled, which is the part that varies the<br>
&gt; most from org to org. &nbsp;Marty recognized all of this when he wrote the<br>
&gt; unified output module, but Sourcefire never had a commercial reason<br>
for<br>
&gt; extending it much since it would encroach on their own product<br>
&gt; offerings. &nbsp;OISF has the advantage of not being for-profit, and so we<br>
&gt; can make extensibility a priority.<br>
&gt;<br>
&gt; What I would like to see is a brand-new program with functions similar<br>
&gt; to Snort&#39;s HTTP preprocessor which has the sole purpose in life of<br>
&gt; sniffing the network and attaching HTTP header fields to the traffic,<br>
&gt; most importantly the host, content-type, and content-length fields.<br>
&gt; This daemon would read a config file which specifies rules more like<br>
&gt; scripts. &nbsp;The rules would have variables populated from a policy<br>
server,<br>
&gt; and it would update these variables very regularly (without a program<br>
&gt; restart of any kind). &nbsp;This would de-couple the work of sniffing from<br>
&gt; the work of policy setting. &nbsp;The policy server would get its variables<br>
&gt; from all kinds of sources, like remote XML files. &nbsp;Armed with this,<br>
very<br>
&gt; simple signatures which identify web applications could be written.<br>
&gt; Here&#39;s a pseudo-code example of what I think the configs would look<br>
like:<br>
&gt;<br>
&gt; ## On the policy server ##<br>
&gt;<br>
&gt; # Declare vars<br>
&gt;<br>
&gt; DECLARE $attacked = ARRAY;<br>
&gt;<br>
&gt; DECLARE $attackers = ARRAY;<br>
&gt;<br>
&gt; DECLARE $bad_hosts = { type=dns,<br>
url=<a href="http://blacklists.example.org/bad_dns.xml" target="_blank">blacklists.example.org/bad_dns.xml</a><br>
&gt; &lt;<a href="http://blacklists.example.org/bad_dns.xml" target="_blank">http://blacklists.example.org/bad_dns.xml</a>&gt;, refresh_list=30 };<br>
&gt;<br>
&gt; DECLARE $bad_ips = { type=ip,<br>
&gt; url=<a href="http://more_blacklists.example.org/bad_ips.xml" target="_blank">more_blacklists.example.org/bad_ips.xml</a><br>
&gt; &lt;<a href="http://more_blacklists.example.org/bad_ips.xml" target="_blank">http://more_blacklists.example.org/bad_ips.xml</a>&gt;, refresh_list=30 };<br>
&gt;<br>
&gt; DECLARE $our_windows_hosts = { type=ip,<br>
&gt; url=<a href="http://mycompany.example.org/our_windows_hosts.xml" target="_blank">http://mycompany.example.org/our_windows_hosts.xml</a>,<br>
refresh_list=900 };<br>
&gt;<br>
&gt; ## On the HTTP sniffer ##<br>
&gt;<br>
&gt; # Detect our web apps<br>
&gt;<br>
&gt; ID $google AS [http,https ] FROM [ host=&#39;*.<a href="http://google.com" target="_blank">google.com</a><br>
&gt; &lt;<a href="http://google.com" target="_blank">http://google.com</a>&gt;&#39; ];<br>
&gt;<br>
&gt; ID $google_search_result AS [ $google ] MATCHING [ uri =~ /search/ ];<br>
&gt;<br>
&gt; ID $our_web_clients AS [http,https] TO [ $our_windows_hosts ];<br>
&gt;<br>
&gt; ID $us_sending_email AS [smtp] FROM [ $our_web_clients ];<br>
&gt;<br>
&gt; ID $malware_webapp AS [ http, https ] FROM [ $bad_hosts OR $bad_ips ];<br>
&gt;<br>
&gt; # Define our actions<br>
&gt;<br>
&gt; # Create an event and record a client as attacked if it is referred to<br>
a<br>
&gt; malware page by a Google search<br>
&gt;<br>
&gt; FORWARD EVENT IF { $google_search_result REFERS $malware_webapp } AND<br>
[<br>
&gt; ADD $_CLIENT TO $attacked, ADD $_SERVER TO $attackers ];<br>
&gt;<br>
&gt; The important thing is that our daemon doing the HTTP sniffing is<br>
&gt; agnostic in that it has no idea if things are bad or good, it just<br>
lets<br>
&gt; somebody know when a predefined set of criteria has occurred. &nbsp;It is<br>
up<br>
&gt; to an event policy server to receive these events and do something<br>
&gt; intelligent (and highly configurable) with it. &nbsp;So, we&#39;ve decoupled<br>
any<br>
&gt; decision making from the component that has the most time-sensitive<br>
work<br>
&gt; to do. &nbsp;All of the other components can buffer their work, but the<br>
&gt; network sniffer needs as much work lifted from it as possible so that<br>
it<br>
&gt; can cope with high loads. &nbsp;The policy server components would be the<br>
&gt; only parts that would require much customization, and they would be<br>
&gt; written in a high-level language like perl for maximum extensibility.<br>
&gt;<br>
&gt; Let&#39;s also not forget the plethora of other apps out there that we can<br>
&gt; leverage. &nbsp;Of particular importance would be SANCP and PADS.<br>
&gt;<br>
&gt; SANCP&#39;s newest version contains a feature that John Curry added for me<br>
&gt; which writes out an index of the file position within a bulk pcap<br>
where<br>
&gt; a packet starts and stops. &nbsp;This means that you can do instantaenous<br>
&gt; bulk packet retrievals using the index. &nbsp;In my tests, I can pull an<br>
&gt; arbitrary host&#39;s traffic from a 30 GB pcap in under 5 seconds. &nbsp;This<br>
&gt; technique could be used for file carving, which would provide the<br>
&gt; ability to send to sandboxes, send to VirusTotal, Symantec, etc.<br>
&gt;<br>
&gt; PADS provides a ready-made daemon for identifying the protocols used<br>
&gt; between hosts. &nbsp;If PADS fed a policy server, we could automagically<br>
&gt; update the policy server when new Windows hosts come online, or when<br>
an<br>
&gt; SMTP session starts. &nbsp;Since the HTTP sniffer would be reading from the<br>
&gt; policy server on a regular basis, PADS would be able to keep it<br>
informed<br>
&gt; as to the state of the network. &nbsp;P0f could work as well.<br>
&gt;<br>
&gt; So, the main idea would be to have a very lightweight daemon with a<br>
&gt; specific task forward events to an event policy server written in a<br>
&gt; higher level language, and to remove almost all decision making from<br>
the<br>
&gt; sniffer.<br>
&gt;<br>
&gt; Comments?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Martin<br>
&gt;<br>
&gt;<br>
&gt;<br>
------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Discussion mailing list<br>
&gt; <a href="mailto:Discussion@openinfosecfoundation.org">Discussion@openinfosecfoundation.org</a><br>
&gt; <a href="http://lists.openinfosecfoundation.org/mailman/listinfo/discussion" target="_blank">http://lists.openinfosecfoundation.org/mailman/listinfo/discussion</a><br>
<br>
--<br>
--------------------------------------------<br>
Matthew Jonkman<br>
Emerging Threats<br>
Phone 765-429-0398<br>
Fax 312-264-0205<br>
<a href="http://www.emergingthreats.net" target="_blank">http://www.emergingthreats.net</a><br>
--------------------------------------------<br>
<br>
PGP: <a href="http://www.jonkmans.com/mattjonkman.asc" target="_blank">http://www.jonkmans.com/mattjonkman.asc</a><br>
<br>
<br>
_______________________________________________<br>
Discussion mailing list<br>
<a href="mailto:Discussion@openinfosecfoundation.org">Discussion@openinfosecfoundation.org</a><br>
<a href="http://lists.openinfosecfoundation.org/mailman/listinfo/discussion" target="_blank">http://lists.openinfosecfoundation.org/mailman/listinfo/discussion</a><br>
</div></div></blockquote></div><br></div>