Commit graph

597 commits

Author SHA1 Message Date
Seth Hall
3a1a14d1c4 Now actually loading DCE-RPC's dpd.sig 2016-07-07 12:55:49 -04:00
Seth Hall
514dfc3479 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	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
2016-06-29 09:43:31 -04:00
Seth Hall
cfe3bddd75 Fixing SMB tests again. 2016-06-28 11:03:16 -04:00
Seth Hall
91161f790c SMB test clean up and docs 2016-06-28 10:30:41 -04:00
Johanna Amann
72903c8199 Add new ciphers from RFC 7905. 2016-06-22 17:17:01 -07:00
Seth Hall
5df4775cef Merge branch 'master' of ssh://git.bro.org/bro 2016-06-21 14:07:21 -04:00
Seth Hall
e27f311059 Fix an off-by-one error when grabbing x-originating-ip header in email. 2016-06-21 13:59:01 -04:00
Robin Sommer
0fc7eb1358 Merge remote-tracking branch 'origin/topic/johanna/bit-1578'
One tweak: I made ts optional and set it to network_time() if not given.

BIT-1578 #merged

* origin/topic/johanna/bit-1578:
  Weird: fix potential small issue when ignoring duplicates
  Rewrite weird logging.
2016-06-18 09:55:11 -07:00
Seth Hall
f5a689a760 Switch the MIME fields in smtp.log back to showing what's actually given.
- SMTP protocol headers now do some minimal parsing to clean up
   email addresses.
 - New function named split_mime_email_addresses to take MIME headers
   and get addresses split apart but including the display name.
 - Update tests.
2016-06-16 16:40:52 -04:00
Johanna Amann
697b2748f5 Rewrite weird logging.
This commit rewrites the way that weirds are logged and fixes a number
of issues on the way. Most prominently, flow weirds now actually log
information about the flow that they occur in (before this change, they
only logged the name of the weird, which is only marginally helpful).

Besides restructuring how weird logging works internally, weirds can now
also be generated by calling Weird::weird with the info record directly,
allowing more fine-granular passing of information. This is e.g. used
for DNS weirds, which do not have the connection record available any
more when they are generated (before data like the connection ID was
just not logged in these instances).

Addresses BIT-1578
2016-06-15 13:49:35 -07:00
Seth Hall
6bc7c3f1be Merge remote-tracking branch 'origin/master' into J-Gras-topic/jgras/bit-1507
# Conflicts:
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2016-06-15 10:32:46 -04:00
Seth Hall
d89ee3cee0 Change the meaning of some email fields.
We now extract email addresses in the fields that one would expect
to contain addresses.  This makes further downstream processing of
these fields easier like log analysis or using these fields in the
Intel framework.  The primary downside is that any other content
in these fields is no longer available such as full name and any
group information.  I believe the simplification of the content in
these fields is worth the change.

Added "cc" to the script that feeds information from SMTP into the
Intel framework.

A new script for email handling utility functions has been created
as a side effect of these changes.
2016-06-15 10:32:06 -04:00
Seth Hall
7c2307e079 Move the HTTP "filename" field to "orig_filenames" and "resp_filenames"
This changes the HTTP log format slightly but shouldn't mess
up anything that anyone was doing because the old "filename"
field was never actually filled out.  Tests are updated as well.
2016-06-15 01:44:18 -04:00
Seth Hall
de7396e4a9 Add a round trip time (rtt) field to dns.log.
Updated tests as well.
2016-06-15 00:17:23 -04:00
Seth Hall
56a24bdef6 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/site/local.bro
2016-06-14 15:35:05 -04:00
Seth Hall
134d0922d5 Move the SMB analyzer out of the default load.
This also adds a note in the local.bro script about enabling
the SMB analyzer.
2016-06-14 15:34:00 -04:00
Robin Sommer
d195f1b047 Fixing FTP cwd getting overlue long.
Now storing them compressed.
2016-05-29 08:52:47 -07:00
Robin Sommer
476891c14a Changing protocol_{confirmation,violation} events to queue like any
other event.

Addresses BIT-1530.
2016-05-27 13:19:04 -07:00
Seth Hall
e2fb7591f4 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-05-20 14:28:39 -04:00
Robin Sommer
34c7a3ef68 Merge remote-tracking branch 'origin/topic/dnthayer/doc-improvements'
* origin/topic/dnthayer/doc-improvements:
  Fix some scripting tutorial examples
  Add some missing Bro script documentation
  Fix more "make doc" warnings
  Fix some "make doc" warnings
  Improve documentation of the "for" statement
  Add more documentation to sumstats framework scripts
  Update traffic per core estimate in the cluster doc
  Update documentation for DNS "Z" field
  Improve documentation of Bro script statements

BIT-1520 #merged
2016-05-06 16:59:07 -07:00
Daniel Thayer
2d9127888f Add some missing Bro script documentation
Also fixed a few reST formatting issues.
2016-05-05 16:35:31 -05:00
Daniel Thayer
da6611e3c2 Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-improvements 2016-05-05 11:33:57 -05:00
Johanna Amann
6905984ee7 Merge remote-tracking branch 'origin/master' into topic/johanna/xmpp-starttls 2016-04-29 12:56:12 -07:00
Johanna Amann
3669b6aa9c Merge remote-tracking branch 'origin/master' into topic/johanna/imap-starttls 2016-04-26 10:52:16 -07:00
Mark Taylor
a14de582a2 Add DNS "CAA" RR type and event. 2016-04-22 15:26:34 -04:00
Seth Hall
d35adca9c5 Filter out another very common DCE/RPC operation. 2016-04-21 11:40:26 -04:00
Seth Hall
b96fe860ea Fix a bug in the DCE/RPC log ignoring mechanism. 2016-04-18 10:50:11 -04:00
Seth Hall
72f2c2ded2 More SMB/DCERPC/NTLM cleanup.
- NTLM Authentication failures over SMB2 are now marked as such in
   the ntlm.log.
 - Slightly updated filtering mechanism for DCE/RPC operations.
 - Uncommented the atsvc file so it compiles now.
2016-04-15 10:39:08 -04:00
Seth Hall
a176e053ca Improve NTLM authentication logging.
If only one side of a connection was seen, the ntlm.log
would indicate that the authentication failed.  This has been
modified so that the success is listed as null since it's not
known whether or not the authentication was successful.

It can be inferred from continued SMB analysis though because
activity will continue taking place.  I changed it though
because the log shouldn't assume more than what it sees.
2016-04-13 12:26:07 -04:00
Seth Hall
dcb8dee3eb Small improvements to DCE/RPC handling.
- Fix an issue with svcctl uuid -> operation mapping.
 - Add a heuristic to fill out the endpoint name in
   case the original dce/rpc binding wasn't seen.
 - Improve naming and code structure in the dce/rpc scripts.
2016-04-13 12:10:51 -04:00
Seth Hall
5d33ac773b Add success indicator to the ntlm.log.
This changes the single gssapi event slightly too.
2016-04-13 12:09:05 -04:00
Seth Hall
bfc06f7e17 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-04-13 01:57:07 -04:00
Seth Hall
9d0899325a Merge remote-tracking branch 'martin/topic/fox/rfb'
* martin/topic/fox/rfb:
  Fixed issue in state machine
  Some styling tweaks
  Implement protocol confirmation
  Analyzer and bro script for RFB protocol (VNC)

* <seth> I also applied a bit of clean up to the base
  script to make it match other scripts better and
  updated tests.
2016-04-12 17:00:06 -04:00
Martin van Hensbergen
034f725f3f Some styling tweaks
- used transient declarations where appropriate
- fixed brackets
- cleaned up some comments
2016-04-11 11:35:36 +02:00
Martin van Hensbergen
04dd65cbaf Implement protocol confirmation
Do not set the service field in the bro script but
use the protocol confirmation paradigm.

Protocol is considered confirmed if both a
succesful client and server banner have been
parsed.
2016-04-11 11:28:22 +02:00
Martin van Hensbergen
849875e8be Analyzer and bro script for RFB protocol (VNC)
This analyzer parses the Remote Frame Buffer
protocol, usually referred to as the 'VNC protocol'.

It supports several dialects (3.3, 3.7, 3.8) and
also handles the Apple Remote Desktop variant.

It will log such facts as client/server versions,
authentication method used, authentication result,
height, width and name of the shared screen.

It also includes two testcases.

Todo: Apple Remote Desktop seems to have some
bytes prepended to the screen name. This is
not interepreted correctly.
2016-04-11 10:35:00 +02:00
Seth Hall
003b32f904 Fixes to DCE_RPC analysis
- Previously there was an (incorrect) assumption that a TCP conneciton
   would only ever have one DCE_RPC binding.  That assumption was
   incorrect and with named pipes over SMB there can be multiple
   concurrent DCE_RPC bindings.  This commit fixes that assumption by
   dynamically creating a new DCE_RPC analyzer whenever a new, unknown
   binding is created.
 - There is a crash fix in how string handling in the bind_ack message
   was done.
 - Named pipe handling over SMB1 is still not working quite right
   and problems will show up with multiplexed DCE_RPC bindings.
2016-04-06 12:37:09 -04:00
Seth Hall
68d0f697eb Move some of the last DCE_RPC scripts out of SMB scripts. 2016-04-03 15:48:47 -04:00
Seth Hall
143eee5d8d Removed SMB Auth stuff and changed "DISK" to be the default share type.
- SMB auth information is now present in the ntlm.log.
 - Still need a heuristic to switch this to PIPE or other
   for non-DISK mounts.
2016-04-03 15:46:02 -04:00
Seth Hall
5b5589e167 Complete breakout of SMB, GSSAPI, and NTLM
- Looser coupling between these analyzers.
 - New ntlm.log (still pretty early)
 - Improved string handling for NTLM (convert UTF16 to UTF8)
 - SMB2 analyzer now supports GSSAPI.
 - Improved abstraction of DCE_RPC operations (still not finished)
 - Lots of whitespace cleanup.
2016-04-03 04:17:20 -04:00
Seth Hall
ff3437d157 Clean up and moving a few SMB2 commands out into their own files.
I assume that the upcoming SMB lock thing might be something
related to the SMB2 LOCK command...
2016-04-01 22:45:07 -04:00
Seth Hall
dbb4404b7d Improve DCE_RPC logging reliability. 2016-04-01 16:53:17 -04:00
Seth Hall
b1f8f0c099 Improvements for DCE_RPC
- Binding context versions are provided correctly now.
 - RPC stubs are no longer provided and instead only the length is given.
 - Some parsing problems related to handling the optional
   auth fields in RPC messages are fixed.  This removes some
   dpd log messages I was seeing.
2016-04-01 14:48:07 -04:00
Seth Hall
03d5b655af Add epmapper operations to dce_rpc scripts. 2016-04-01 13:01:23 -04:00
Seth Hall
086519e851 Adding more dcerpc operations and fixing a bug with how log records are handled. 2016-04-01 10:16:02 -04:00
Seth Hall
e70a528ad6 Removing some left over debugging prints. 2016-04-01 09:48:46 -04:00
Seth Hall
e2dfaf8a5b Fixes to SMB file handling and logging.
There were some cases where the log would be missing a field
or data wouldn't get sent to file analysis.  At least some of
this is fixed now and I get confused a bit less when I look
at the logs now.

Also, I made the default handling "FILE" so that things like
FILE_UNKNOWN wouldn't show up in the logs so regularly.  It's
technically correct that way, but it doesn't look good and it's
correct as FILE often enough that it make sense to make it the
default I think.
2016-04-01 09:43:13 -04:00
Seth Hall
5721db4be7 Lots of cleanup and improvement to DCE/RPC analyzer.
- It works with DCE/RPC over SMB1+2 now.
   - Using named pipes in 1+2 and the transaction cmd in SMB1.
 - Base scripts based on work by Josh Liburdi.
 - New dce_rpc.log.  Feedback on how to make this log more compact
   and useful would be appreciated.
2016-04-01 09:38:52 -04:00
Seth Hall
d249b76390 Added uid and conn_id to smb_auth log.
Thanks for Mike Reeves and Aaron Eppert for noticing.
2016-03-26 22:15:23 -04:00
Seth Hall
802adb66ea Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-03-23 23:10:01 -04:00