Commit graph

947 commits

Author SHA1 Message Date
Jon Siwek
0cb2a90da4 Add script to detect filtered TCP traces, addresses BIT-1119.
If reading a trace file w/ only TCP control packets, a warning is
emitted to suggest the 'detect_filtered_traces' option if the user
doesn't desire Bro to report missing TCP segments for such a trace file.
2014-01-31 17:04:58 -06:00
Robin Sommer
dfcb4938d0 Merge remote-tracking branch 'origin/topic/jsiwek/tcp-improvements'
* origin/topic/jsiwek/tcp-improvements:
  Fix file_over_new_connection event to trigger when entire file is missed.
  Improve TCP connection size reporting for half-open connections.
  Improve gap reporting in TCP connections that never see data.
  Improve TCP FIN retransmission handling.

BIT-1119
2014-01-28 15:24:20 -08:00
Robin Sommer
9d3d31dbac Merge remote-tracking branch 'origin/topic/bernhard/fix-x509-extensions'
* origin/topic/bernhard/fix-x509-extensions:
  Fix x509_extension event.

BIT-1120 #merged
2014-01-28 10:27:39 -08:00
Bernhard Amann
6d73b8c57e Fix x509_extension event.
The event now really returns the extension. If openssl supports printing
it, it is converted into the openssl ascii output.

The output does not always look pretty because it can contain newlines.

New event syntax:
event x509_extension(c: connection, is_orig: bool, cert:X509, extension: X509_extension_info)

Example output for extension:
  [name=X509v3 Extended Key Usage,
    short_name=extendedKeyUsage,
    oid=2.5.29.37,
    critical=F,
    value=TLS Web Server Authentication, TLS Web Client Authentication]
  [name=X509v3 Certificate Policies,
   short_name=certificatePolicies,
   oid=2.5.29.32,
   critical=F,
   value=Policy: 1.3.6.1.4.1.6449.1.2.1.3.4^J  CPS: https://secure.comodo.com/CPS^J]
2014-01-27 10:24:57 -08:00
Jon Siwek
9b12967d40 Improve gap reporting in TCP connections that never see data.
The previous behavior was to accomodate SYN/FIN/RST-filtered traces by
not reporting missing data (via the content_gap event) for such
connections.  The new behavior always reports gaps for connections that
are established and terminate normally, but sequence numbers indicate
that all data packets of the connection were missed.  The behavior can
be reverted by redef'ing "detect_filtered_trace".
2014-01-24 16:21:02 -06:00
Robin Sommer
ba9571f9ff Merge remote-tracking branch 'origin/topic/jsiwek/gre'
* origin/topic/jsiwek/gre:
  Simplify FragReassembler memory management.
  BIT-867 - Support GRE tunnel decapsulation.

BIT-867 #merged
2014-01-20 12:27:13 -08:00
Robin Sommer
bd63cf2e36 Merge remote-tracking branch 'origin/topic/jazoff/notice_file_info'
* origin/topic/jazoff/notice_file_info:
  Include file information in notices

BIT-1113 #merged

I'm wondering if there's a way to test creating these emails ... ?
2014-01-20 12:01:44 -08:00
Jon Siwek
7717a3eb67 BIT-867 - Support GRE tunnel decapsulation.
This includes enhanced GRE headers.  GRE tunnels are treated just like
IP-in-IP tunnels by parsing past the GRE header in between the delivery
and payload IP packets.
2014-01-16 16:03:04 -06:00
Justin Azoff
852af5d02e Include file information in notices
Add file_desc and file_mime_type information to notice output if it
exists in the notice.
2014-01-13 17:01:51 -05:00
Justin Azoff
ec3f684c61 change Notice::suppressing to be a table of times
Instead of storing the entire notice in Notice::suppressing,
just store the time the notice should be suppressed until.

This has the same functionality, except that end_suppression can no
longer be generated.
2013-12-31 10:09:44 -05:00
Robin Sommer
5049d68c1b Merge remote-tracking branch 'origin/topic/seth/ie11-software-parsing'
* origin/topic/seth/ie11-software-parsing:
  Updated software framework to support parsing IE11 user-agent strings.
  Fix the irc_reply event for several server message types.

BIT-1104 #merged
2013-12-09 13:21:20 -08:00
Seth Hall
6d782e6834 Updated software framework to support parsing IE11 user-agent strings. 2013-12-05 15:05:11 -05:00
Robin Sommer
d5a48f04ac Tweak to SMTP script to adjust for new string slicing behaviour.
Also updating NEWS with a note.
2013-12-04 13:45:46 -08:00
Robin Sommer
320f2d5ab6 Merge remote-tracking branch 'origin/topic/bernhard/ssl_ciphers_vector'
BIT-1011 #merged

* origin/topic/bernhard/ssl_ciphers_vector:
  Change ciphers in changes ciphers from a set to a vector.
2013-12-04 12:17:22 -08:00
Robin Sommer
dadfcde70e Merge branch 'topic/robin/event-dumper'
Changes:

   - Changing semantics of the new_event() meta event: it's raised
     only for events that have a handler defined. There are too many
     checks in Bro that prevent events wo/ handler from being even
     prepared to raise to do that differently.

   - Adding test case.

* topic/robin/event-dumper:
  New script misc/dump-events.bro, along with core support, that dumps events Bro is raising in an easily readable form.
  Prettyfing Describe() for record types.
2013-12-04 12:13:07 -08:00
Bernhard Amann
b7dc03bb82 Change ciphers in changes ciphers from a set to a vector.
This preserves the ordering of the cipher suites the client sent,
allowing e.g. better client fingerprinting.
2013-12-04 11:38:15 -08:00
Robin Sommer
de9f03b0bf New script misc/dump-events.bro, along with core support, that dumps events Bro is raising
in an easily readable form.

This is for debugging purposes, obviously.

Example, including only SMTP events:

    > bro -r smtp.trace misc/dump-events.bro DumpEvents::include=/smtp/

    [...]
    1254722768.219663 smtp_reply
                  [0] c: connection   = [id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, [...]
                  [1] is_orig: bool   = F
                  [2] code: count     = 220
                  [3] cmd: string     = >
                  [4] msg: string     = xc90.websitewelcome.com ESMTP Exim 4.69 #1 Mon, 05 Oct 2009 01:05:54 -0500
                  [5] cont_resp: bool = T

    1254722768.219663 smtp_reply
                  [0] c: connection   = [id=[orig_h=10.10.1.4, orig_p=1470/tcp, resp_h=74.53.140.153, [...]
                  [1] is_orig: bool   = F
                  [2] code: count     = 220
                  [3] cmd: string     = >
                  [4] msg: string     = We do not authorize the use of this system to transport unsolicited,
                  [5] cont_resp: bool = T
    [...]
2013-11-22 14:20:00 -08:00
Jon Siwek
96ba5c82a3 Merge branch 'master' into topic/jsiwek/broxygen 2013-11-21 15:46:55 -06:00
Jon Siwek
9967aea52c Integrate new Broxygen functionality into Sphinx.
Add a "broxygen" domain Sphinx extension w/ directives to allow
on-the-fly documentation to be generated w/ Bro and included in files.

This means all autogenerated reST docs are now done by Bro.  The odd
CMake/Python glue scipts which used to generate some portions are now
gone.  Bro and the Sphinx extension handle checking for outdated docs
themselves.

Parallel builds of `make doc` target should now work (mostly because
I don't think there's any tasks that can be done in parallel anymore).

Overall, this seems to simplify things and make the Broxygen-generated
portions of the documentation visible/traceable from the main Sphinx
source tree.  The one odd thing still is that per-script documentation
is rsync'd in to a shadow copy of the Sphinx source tree within the
build dir.  This is less elegant than using the new broxygen extension
to make per-script docs, but rsync is faster and simpler.  Simpler as in
less code because it seems like, in the best case, I'd need to write a
custom Sphinx Builder to be able to get that to even work.
2013-11-21 14:34:32 -06:00
Robin Sommer
da9c31db55 Fixing warnings during doc build.
Includes adding a stub file that has been missing for a while already.
2013-11-07 00:46:48 -08:00
Vlad Grigorescu
d108481e73 Remove resp_size from the log. Refactor when we write out to the log a bit. Geodata now works reliably. 2013-11-05 11:58:00 -05:00
Vlad Grigorescu
2cf90d986e Fix resp_size in ssh.log, require a minimum resp_size for the heuristic. Some work on geodata, but still a WIP. 2013-11-05 11:34:32 -05:00
Robin Sommer
101fbdeff7 Adding source and original copyright statement to Mozilla cert list. 2013-11-01 05:24:43 -07:00
Seth Hall
26be082951 Return the Dir module to file name tracking instead of inode tracking. 2013-10-29 11:09:55 -04:00
Robin Sommer
2818bb3dbc Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  make the documentation of the SQLite reader/writer a bit nicer.
  Wrong example file was included - reported by Michael Auger @LM4K
2013-10-25 11:12:51 -07:00
Bernhard Amann
a09d8e94e0 make the documentation of the SQLite reader/writer a bit nicer. 2013-10-25 10:21:33 -07:00
Robin Sommer
a7cebff99d Merge remote-tracking branch 'origin/topic/dnthayer/doc-changes-for-2.2'
* origin/topic/dnthayer/doc-changes-for-2.2:
  Add gawk to list of optional packages
  Add more script package README files
  Add NEWS about new features of broctl and upgrade info
2013-10-24 14:35:21 -07:00
Seth Hall
ccc7b7669d Merge remote-tracking branch 'origin/topic/seth/fix-packetfilter-log'
* origin/topic/seth/fix-packetfilter-log:
  Hack to make sure that the starting BPF filter is logged on clusters.
2013-10-24 15:36:17 -04:00
Seth Hall
1cfb3a38e0 Add UDP support to the checksum offload detection script. 2013-10-24 15:21:03 -04:00
Seth Hall
af6e44589f Hack to make sure that the starting BPF filter is logged on clusters. 2013-10-24 14:55:37 -04:00
Daniel Thayer
72a4a90416 Add more script package README files
The text from these README files appears on the "Bro Script Packages"
page after building the documentation.
2013-10-23 16:36:14 -05:00
Daniel Thayer
4b8171f74a Document which Bro script vars are set by BroControl 2013-10-22 16:40:29 -05:00
Daniel Thayer
1b26c05c2c Add more script package README files
The text from these README files appears on the "Bro Script Packages"
page after building the documentation.
2013-10-22 14:44:59 -05:00
Daniel Thayer
e724e5d392 Do not include documentation of commented-out items
Some documentation of commented-out items was being output to HTML,
which was causing that documentation to be merged with the
documentation of the next item.  Fixed by changing "##" to "#" so
that the doc comments are not included in the HTML.
2013-10-22 13:46:09 -05:00
Daniel Thayer
f5d6931f00 Fix typos and formatting in the signature framework docs 2013-10-22 09:37:43 -05:00
Daniel Thayer
5a0e3dda7e Fix typos and formatting in the notice framework docs 2013-10-22 09:16:29 -05:00
Daniel Thayer
4434d231b2 Correct more typos in init-bare.bro 2013-10-20 21:07:39 -05:00
Daniel Thayer
d367f033dc Fix typos and formatting in init-bare.bro and init-default.bro 2013-10-20 01:32:17 -05:00
Robin Sommer
615cca8baa Merge remote-tracking branch 'origin/topic/dnthayer/doc-changes-for-2.2'
Snapshotting the work in this branch. I'll merge it again later as we
get closer to the release.

* origin/topic/dnthayer/doc-changes-for-2.2: (29 commits)
  Add README files for base/protocols
  Fix incorrect uses of reST directives
  Fix typos and formatting in the BiFs docs
  Fix typos and formatting in the base/utils docs
  Fix typos and formatting in the other protocol docs
  Fix typos and formatting in the ssl protocol docs
  Fix typos and formatting in the http protocol docs
  Fix typos and formatting in the ftp protocol docs
  Fix typos and formatting in the dns protocol docs
  Fix typos and formatting in the dhcp protocol docs
  Adjust line numbers to match changes in conn/main.bro
  Fix typos and formatting in the conn protocol docs
  Update FreeBSD install instructions
  Improvements to file analysis docs
  Add README files for most Bro frameworks
  Fix typos and formatting in various other framework docs
  Fix typos and formatting in the software framework docs
  Fix typos and formatting in the sumstats docs
  Fix typos and formatting in the packet filter docs
  Fix typos and formatting in the logging framework docs
  ...
2013-10-18 13:49:49 -07:00
Daniel Thayer
8f2336f531 Add README files for base/protocols
The text from these README files appears on the "Bro Script Packages"
page after building the documentation.
2013-10-17 12:47:32 -05:00
Daniel Thayer
9d2668a3f4 Fix incorrect uses of reST directives
These did not generate any warning messages unfortunately, so had to
find them using grep.
2013-10-17 01:50:42 -05:00
Daniel Thayer
92dc8e5880 Fix typos and formatting in the base/utils docs 2013-10-16 20:41:56 -05:00
Daniel Thayer
c224fbe7f8 Fix typos and formatting in the other protocol docs 2013-10-16 18:07:34 -05:00
Daniel Thayer
8764850337 Fix typos and formatting in the ssl protocol docs
Also changed one sentence (about setting the Mozilla root CA list) to make
it more clear that the user doesn't need to do anything.
2013-10-16 17:36:27 -05:00
Daniel Thayer
fe60404f0f Fix typos and formatting in the http protocol docs
Also adjusted line numbers in scripting doc due to changes in http/main.bro
2013-10-16 13:13:53 -05:00
Daniel Thayer
98181e829b Fix typos and formatting in the ftp protocol docs 2013-10-15 17:00:01 -05:00
Daniel Thayer
bc337f3d5a Fix typos and formatting in the dns protocol docs 2013-10-15 16:44:28 -05:00
Daniel Thayer
e36fcf0190 Fix typos and formatting in the dhcp protocol docs
Also added a link to an RFC and a Bro script (and corrected the name of the
script being referenced).
2013-10-15 16:19:06 -05:00
Daniel Thayer
3850399fa2 Fix typos and formatting in the conn protocol docs 2013-10-14 17:19:29 -05:00
Daniel Thayer
93c1073673 Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-changes-for-2.2 2013-10-11 23:16:57 -05:00