Commit graph

1778 commits

Author SHA1 Message Date
Aaron Brown
f29dbb90a5 Allow for logging of the VLAN data about a connection in conn.log 2015-07-22 14:13:17 -04:00
Robin Sommer
c72d191ab5 Refactoring L2 parsing code to reside in the Packet class.
That way it can be reused more easily. This also avoid having to
change the serialization structure for packets, which is a problem as
external sources of packets (via Broccoli) wouldn't have the new
attributes available to send.

Also moving Packet.{h,cc} and Layer2.{h,cc} into iosource/, and
removing header size from properties that packet sources have to
provide, as we can now compute that easily from the link type.

Plus some more cleanup.
2015-07-20 16:21:34 -07:00
Robin Sommer
86440e44fc Adding more cross-checks for IP.
This prevents a few more packets from reaching raw_events(), see
baseline update for the corresponding test.
2015-07-17 13:59:12 -07:00
Robin Sommer
fe3579f1b4 Merge branch 'topic/rework-packets' of https://github.com/jsbarber/bro
* 'topic/rework-packets' of https://github.com/jsbarber/bro:
  One more tinker to Packet -- ensure no uninitialized values
  Packet::IP()-created IP_Hdr should not free
  Make enums work for non-C++11 config
  Refactor to make bro use a common Packet object. Do a better job of parsing layer 2 and keeping track of layer 3 proto. Add support for raw packet event, including Layer2 headers.

Conflicts:
	aux/plugins
2015-07-17 12:56:04 -07:00
Johanna Amann
0d9869a2aa (Hopefully) fix race condition between trace and intel file. 2015-07-15 09:14:36 -07:00
Robin Sommer
8fb708b9b2 Adding an environemtn variable to btest.cfg for external scripts. 2015-07-13 22:13:10 -07:00
Robin Sommer
5d30be2083 A set of tests exercising IP defragmentation and TCP reassembly. 2015-07-03 08:40:22 -07:00
Robin Sommer
c1f060be63 Merge branch 'topic/yunzheng/bit-1314'
I've worked on this a bit more:

    - Added tcp_max_old_segments to init-bare.bro.
    - Removed the existing call to Overlap() as that now led to
      duplicate events.
    - Fixed the code checking for overlaps, as it didn't catch all the
      cases.

BIT-1314 #merged
GitHub #31 merged

* topic/yunzheng/bit-1314:
  BIT-1314: Added QI test for rexmit_inconsistency
  BIT-1314: Add detection for Quantum Insert attacks
2015-07-03 08:40:12 -07:00
Robin Sommer
264a824fcc Merge remote-tracking branch 'origin/topic/seth/deflate-missing-headers-fix'
I've changed the dynamic allocation of the unzipbuf back to stack
allocation, hope I'm not not missing the reason for doing that ...

* origin/topic/seth/deflate-missing-headers-fix:
  Fixes an issue with missing zlib headers on deflated HTTP content.

BIT-1399 #merged
2015-06-28 12:23:36 -07:00
Robin Sommer
ffa254acd0 Merge remote-tracking branch 'origin/topic/seth/modbus_dpd_fix'
* origin/topic/seth/modbus_dpd_fix:
  Call ProtocolConfirmed on modbus
2015-06-19 14:08:13 -07:00
Seth Hall
7d105935b1 Call ProtocolConfirmed on modbus
After a PDU is successfully parsed from both sides of a
modbus connection we're now declaring the protocol confirmed.

A small extension to the modbus/events test was added to verify
that "modbus" was identified in the service field in conn.log.
2015-06-19 07:00:38 -04:00
Jon Siwek
7de83e0cf0 Fix a unit test to check for Broker requirement. 2015-06-05 09:10:50 -05:00
Robin Sommer
74c83058e6 Test for Broker termination. 2015-06-04 14:48:58 -07:00
Vlad Grigorescu
0a4604fe98 Add memleak btest for attachments over SMTP. 2015-06-01 21:14:52 -05:00
Vlad Grigorescu
847b16442b BIT-1410: Add btest 2015-06-01 20:49:04 -05:00
Vlad Grigorescu
05ea2d43c7 BIT-1410: Update baselines 2015-06-01 20:38:59 -05:00
Seth Hall
097354a43f Updates for the urls.bro script. Fixes BIT-1404. 2015-06-01 11:38:26 -04:00
Jeff Barber
30fdc37479 Refactor to make bro use a common Packet object.
Do a better job of parsing layer 2 and keeping track of layer 3 proto.
Add support for raw packet event, including Layer2 headers.
2015-05-29 10:37:39 -04:00
Yun Zheng Hu
2aa214d835 BIT-1314: Added QI test for rexmit_inconsistency 2015-05-28 12:12:22 +02:00
Johanna Amann
5147b0bb02 set fedora 21 specific environment variable to not make it complain about
md5 signed certs.

Addresses BIT-1402
2015-05-27 12:24:21 -07:00
Seth Hall
ea2ce67c5f Fixes an issue with missing zlib headers on deflated HTTP content.
- Includes a test.
2015-05-18 14:30:32 -04:00
Johanna Amann
8be8f2e725 update local-compat.test 2015-05-07 21:55:59 -07:00
Robin Sommer
1e66c6718a Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add /sbin to PATH in btest.cfg
2015-05-06 09:58:30 -07:00
Daniel Thayer
f6248994e4 Add /sbin to PATH in btest.cfg
Added /sbin to PATH so that a couple of tests that require ifconfig
are not skipped on systems (such as debian) which don't have /sbin
in PATH by default.

Also removed a duplicate default_path.
2015-05-04 14:47:56 -05:00
Robin Sommer
31e75c8eac Baseline update. 2015-04-29 20:34:37 -07:00
Jon Siwek
48fccb3bce BIT-1350: improve record coercion type checking.
For a field of the same name in both the target type and the coerced
type, a type mismatch is now reported as an error at parse-time.
2015-04-27 16:37:40 -05:00
Jon Siwek
f73b4f2a21 Fix some outdated documentation unit tests. 2015-04-23 12:30:54 -05:00
Robin Sommer
03a29368fe Merge branch 'topic/robin/ascii-escape-normalization'
* topic/robin/ascii-escape-normalization:
  Updating NEWS.
  In bifs, change ODesc objects to have RAW_STYLE.
  Changing what's escaped when printing.
  Remove several BroString escaping methods that are no longer useful.

BIT-1333 #merged
2015-04-21 15:59:54 -07:00
Robin Sommer
5b32791edb Merge remote-tracking branch 'origin/topic/vladg/sip'
* origin/topic/vladg/sip:
  Update NEWS.
  Update baselines.
  Spruce up SIP events.bif documentation a bit.
  Register SIP analyzer to well known port.
  Fix indenting issue in main.bro
  Add SIP btests.
  Small update for the SIP logs and DPD sig.
  SIP: Fix up DPD and the TCP analyzer a bit.
  SIP: Move to the new string BIFs
  SIP: Move to new analyzer format.
  Move the SIP analyzer to uint64 sequences, and a number of other small SIP fixes.
  Rely on content inspection and not just is_orig to determine client/server.
  Enable SIP in CMakeLists.txt
  Merge topic/seth/faf-updates.

BIT-1370 #merged
2015-04-21 15:30:25 -07:00
Robin Sommer
8b722c484d Renaming krb.log to kerberos.log. 2015-04-21 12:22:58 -07:00
Robin Sommer
9911993c6f Merge remote-tracking branch 'origin/topic/vladg/kerberos'
* origin/topic/vladg/kerberos:
  Fix doc on krb_cred
  Update the KRB tests a bit.
2015-04-21 11:58:44 -07:00
Robin Sommer
87eb5ef811 Merge remote-tracking branch 'origin/topic/vladg/kerberos'
* origin/topic/vladg/kerberos: (27 commits)
  Add Kerberos to NEWS.
  Add Kerberos memleak btest.
  Add Kerberos analyzer btest.
  Update baselines for Kerberos analyzer.
  Add known ports to krb/main.bro
  KRB: Clean up krb.log a bit.
  Kerberos: Remove debugging output.
  Kerberos: Fix a memleak.
  Kerberos: A couple small tweaks.
  Kerberos: Fix parsing of the cipher in tickets, and add it to the log.
  Kerberos: A couple more formatting fixes.
  Change krb Info string to success bool
  Clean up formatting.
  Documentation update, and rework events a bit.
  Add support for the SAFE message type.
  Add support for AP_REQ, AP_REP, PRIV, and CRED message types.
  Fix parsing error for KRB_Ticket_Sequence
  Continue clean-up. Some reformatting, removing hard-coded values, documentation, etc.
  Kerberos analyzer updates:   - Split up the (quite length) krb-protocol.pac into krb-protocol, krb-defs, krb-types and krb-padata   - Add some supporting types to get rid of awkward and difficult to read case true/false statements   - Clean up the conversion code in krb-analyzer.pac
  Improve Kerberos DPD and fix a few parse errors.
  ...

BIT-1369 #merged
2015-04-21 11:15:43 -07:00
Vlad Grigorescu
9f9bad48a4 Merge remote-tracking branch 'origin/master' into topic/vladg/kerberos
Conflicts:
	NEWS
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/plugins.hooks/output
	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2015-04-21 12:59:54 -04:00
Vlad Grigorescu
32284c753b Update the KRB tests a bit. 2015-04-21 12:27:14 -04:00
Robin Sommer
770f833ea2 Removing deprecated fields from the connection record.
Removing "hot" and "addl", which haven't been used anymore for a long
time. Also removing the functions append_addl() and append_addl_marker().
2015-04-20 20:07:24 -07:00
Robin Sommer
de1e2fe20b Removing the NetFlow analyzer.
Since the command-line option for reading NetFlow went away, the has
been neither used nor tested anymore. We might bring this back later,
but for now I'd rather remove it than having dead code that seems to
suggest that we support it.
2015-04-20 20:07:24 -07:00
Robin Sommer
a9979d56a4 Merge remote-tracking branch 'origin/topic/vladg/file-analysis-exe-analyzer'
* origin/topic/vladg/file-analysis-exe-analyzer: (31 commits)
  Tweak the PE OS versions based on real-world traffic.
  Update pe/main.bro to user register_for_mime_types, ensuring it will also work with the upcoming Files framework changes.
  A bit of final core-level cleanup.
  A bit of final script cleanup.
  Update baselines.
  Add a btest for the PE analyzer.
  Add a PE memleak test, and fix a memleak.
  Documentation and a bit of overall cleanup.
  Add data about which tables are present.
  Remove the .idata parsing, as it can be more complicated in some cases.
  Fix a PE analyzer failure where the IAT isn't aligned with a section boundary.
  PE: Rehash the log a bit.
  Make base_of_data optional.
  Fix support for PE32+ files.
  PE Analyzer cleanup.
  Checkpoint - Import Address Table being parsed.
  Some changes to fix PE analyzer on master.
  Parse PE section headers.
  Updated PE analyzer to work with changes in master.
  In progress checkpoint.  Things are starting to work.
  ...

BIT-1369 #merged
2015-04-20 19:23:31 -07:00
Robin Sommer
ed91732e09 Merge remote-tracking branch 'origin/topic/seth/more-file-type-ident-fixes'
* origin/topic/seth/more-file-type-ident-fixes:
  File API updates complete.
  Fixes for file type identification.
  API changes to file analysis mime type detection.
  Make HTTP 206 reassembly require ETags by default.
  More file type identification improvements
  Fix an issue with files having gaps before the bof_buffer is filled.
  Fix an issue with packet loss in http file reporting.
  Adding WOFF fonts to file type identification.
  Extended JSON matching and added OCSP responses.
  Another large signature update.
  More signature updates.
  Even more file type ident clean up.
  Lots of fixes for file type identification.

BIT-1368 #merged
2015-04-20 13:31:00 -07:00
Vlad Grigorescu
d0e4d17f31 Tweak the PE OS versions based on real-world traffic. 2015-04-20 12:49:42 -04:00
Vlad Grigorescu
928f870f58 Update pe/main.bro to user register_for_mime_types, ensuring it will also work with the upcoming Files framework changes. 2015-04-20 11:54:34 -04:00
Seth Hall
ed375167c8 File API updates complete.
Addresses BIT-1368.
2015-04-20 10:46:48 -04:00
Seth Hall
038e4c24f6 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1368' into topic/seth/more-file-type-ident-fixes
Conflicts:
	src/file_analysis/File.cc
	testing/btest/Baseline/plugins.hooks/output
2015-04-20 09:36:40 -04:00
Seth Hall
faabe8a5e3 Fixes for file type identification.
- Backed out eTag changes.  The real world is more complicated
   than just using eTags to identify the same file.
 - A bit of code simplication in the http base scripts.
 - Test updates (more existing small problems were identified!).
 -
2015-04-20 09:34:09 -04:00
Vlad Grigorescu
9683d8419f Update baselines. 2015-04-19 23:09:19 -04:00
Vlad Grigorescu
d5ea6b8457 Add SIP btests. 2015-04-19 22:25:37 -04:00
Vlad Grigorescu
71230fec81 Update baselines. 2015-04-19 21:16:35 -04:00
Vlad Grigorescu
0199ac5ece Add a btest for the PE analyzer. 2015-04-19 20:27:24 -04:00
Vlad Grigorescu
93b84463f5 Add a PE memleak test, and fix a memleak. 2015-04-19 20:22:42 -04:00
Vlad Grigorescu
5cf8001cb0 Add Kerberos memleak btest. 2015-04-17 21:44:59 -04:00
Vlad Grigorescu
569f43d625 Add Kerberos analyzer btest. 2015-04-17 21:28:22 -04:00