Commit graph

554 commits

Author SHA1 Message Date
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
Johanna Amann
33f9eca0c8 Update TLS constants and extensions from IANA. 2016-03-18 11:23:44 -07:00
Seth Hall
08399da6cb Files transferred over FTP were showing incorrect sizes.
The server-reported file size was being collected poorly and if
a file name had a number in it, that was reported as the file
size instead of the actual size.

A new test is included to avoid reintroducing the problem.
2016-03-11 12:56:28 -05:00
Seth Hall
9c6402bd91 More smb_files.log improvements.
- Actually get the path into the smb_files.log now.
 - When a share root is having the "create" message used on it,
   instead of giving a null file name, now give a special
   indicator of "<share_root>".
 - Update test baselines.
2016-03-09 04:49:48 -05:00
Seth Hall
90559a3372 Disabled the attempt at support for the SMB2 SetInfo message.
It was causing reporter warnings and was so wildly incomplete
that it provided no benefit.
2016-03-08 11:28:32 -05:00
Johanna Amann
f89874b9e9 Merge branch 'patch-4' of https://github.com/aeppert/bro
* 'patch-4' of https://github.com/aeppert/bro:
  (BIT-1545) Add "disable_analyzer_after_detection" en lieu of "skip_processing_after_detection"

I also removed the old disable_analyzer_after_detection option
completely - if someone wants that, they can just catch the event
themselves and call skip_further_processing.

I also adjusted the ssh test case to contain conn.log to prevent
re-addition of this problem in the future.

BIT-1545 #merged
2016-03-07 13:39:28 -08:00
Seth Hall
c63ad1cdcf Add a signature for SMB 2016-03-07 16:03:31 -05:00
Seth Hall
c8818da09a Fix a bug that resulted in recursion in the type system.
- There is a bit of other minor reorganization cleanup here too.
2016-03-07 13:50:12 -05:00
Seth Hall
ca58dc84d5 Create an smb_auth.log.
- Brings the SMB NTLM support all the way to a log.
 - Only support SMB1 right now.
 - A bit more clean up of logged file actions and code organization.
2016-03-07 11:17:51 -05:00
Aaron Eppert
c93b057a97 (BIT-1545) Add "disable_analyzer_after_detection" en lieu of "skip_processing_after_detection"
The default of "skip_processing_after_detection" is confusing and causes conn.log to not be written as one would assume, plus the counters are not incremented and thus some kinds of potential detections are short-changed. I propose adding "disable_analyzer_after_detection" which would react, on the surface, the same way by disabling the SSH analyzer, but allowing conn.log to be written appropriately.
2016-03-05 11:59:52 -05:00
Seth Hall
462316acdf Prevent some extra smb logging of cmd messages. 2016-03-03 16:33:29 -05:00
Seth Hall
b9afc01d91 Fixed a problem with file names and path names containing nulls.
This would come up when a string is UTF-16 containing characters
outside of straight ASCII.  The file analysis framework uses
CheckString to create file IDs which can't cope with the NULL bytes.
2016-03-03 15:52:34 -05:00
Seth Hall
e02c612742 Fix some SMB1 "field missing" expression errors. 2016-03-03 15:31:26 -05:00
Seth Hall
d453dc149c A lot of changes to SMB analyzer.
- Add beginning of infrastructure for pipe support in SMB2.
 - Improve identification of non-file tree mappings.
 - Stop passing pipe data to the file analysis framework.
 - Reduce log volume in smb_files.log by watching for repeated
   files being seen so that you don't end up with nearly
   the exact same log line over and over and over.
 - Lots of little whitespace and indentation changes.
2016-03-03 14:27:15 -05:00
Robin Sommer
3dc445900b Merge remote-tracking branch 'origin/topic/johanna/bit-1529'
BIT-1529 #merged

* origin/topic/johanna/bit-1529:
  Subscribe is a valid message per RFC 3265
2016-03-03 07:58:10 -08:00
Johanna Amann
fdf36393ba Update documentation for RSTR.
Addresses BIT-1535
2016-03-01 14:08:58 -08:00
Johanna Amann
9f6f7312a3 Subscribe is a valid message per RFC 3265
Addresses BIT-1529
2016-03-01 14:00:11 -08:00
Seth Hall
41e2eaa02d Source clean up and some fixes for SMB.
- Remove the separate string handling for NTLM.
 - Fixed a crash in RPC Bind handling when no context
   elements are included.
2016-03-01 14:16:45 -05:00
Seth Hall
2e2fb6831f Merge remote-tracking branch 'origin/topic/vladg/smb' into topic/seth/smb
# Conflicts:
#	scripts/base/protocols/smb/files.bro
#	scripts/base/protocols/smb/main.bro
#	scripts/base/protocols/smb/smb1-main.bro
#	scripts/base/protocols/smb/smb2-main.bro
2016-03-01 11:11:50 -05:00
Seth Hall
dbb5992f43 Disable the smb_cmd.log by default. 2016-02-19 00:23:05 -05:00
Seth Hall
f9cbee20f8 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	src/analyzer/protocol/smb/SMB.cc
2016-02-18 23:09:22 -05:00
Seth Hall
7251b0f240 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/base/init-default.bro
2016-01-16 21:04:43 -05:00
Robin Sommer
9431ed3fe9 Merge branch 'patch-3' of https://github.com/aeppert/bro
* 'patch-3' of https://github.com/aeppert/bro:
  Add version to HTTP::Info
2016-01-15 10:35:57 -08:00
Vlad Grigorescu
8654ce5ce0 Merge remote-tracking branch 'origin/master' into topic/vladg/smb 2016-01-15 10:13:59 -06:00
Aaron Eppert
ada2b0088b Add version to HTTP::Info 2016-01-12 14:58:36 -05:00
Aaron Eppert
47a5db230e NOTIFY is a valid SIP message per RFC3265
Exists in newer Asterisk servers.
2016-01-08 17:11:14 -05:00
Seth Hall
4e4dece70a SIP scripts code cleanup.
- Daniel Guerra pointed out a type issue for SIP
   request and response code length fields which is now
   corrected.
 - Some redundant code was removed.
 - if/else tree modified to use switch instead.
2015-11-29 00:24:53 -05:00
Johanna Amann
401e6c9102 Extend ssl dpd signature to allow alert before server_hello.
The alert in this case is caused by the server name in the SNI not being
recognized by the server, which triggers an alert. Since the server is
an apache, and this might happen reasonably often, the new signature
allows one TLS alert before the server hello is expected.
2015-10-22 13:36:21 -07:00
Daniel Thayer
6519103890 Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-fixes
Conflicts:
	scripts/base/protocols/conn/main.bro
2015-09-23 11:45:10 -05:00
Robin Sommer
f2dbe7f01d Merge branch 'topic/jgras/base64-logging' of https://github.com/J-Gras/bro
* 'topic/jgras/base64-logging' of https://github.com/J-Gras/bro:
  Update calls of Base64 functions.
  Refactoring of Base64 functions.

I've removed the additional bif for encoding with a connection, as I'm
not sure there's much of a use case for it; we can always add it back
later if it turns out there is. I've also renamed
decode_base64_intern() to decode_base64_conn() to be a bit more
explicit about the difference.
2015-08-30 20:24:55 -07:00
Robin Sommer
7c98497444 Merge remote-tracking branch 'origin/topic/vladg/bit-1466'
BIT-1466 #merged

* origin/topic/vladg/bit-1466:
  Add Q and update I documentation for conn history
2015-08-25 07:45:36 -07:00
Vlad Grigorescu
9cd4071cb3 Add Q and update I documentation for conn history
- Q (MULTI_FLAG_PKT) was not in the documentation for the history field.

- I (FIN_RST_PKT) was documented incorrectly. It was documented as a
SYN+RST, when it actually represents a FIN+RST.

The new documentation was derived from:
d3f513f/src/analyzer/protocol/tcp/TCP.cc (L493)

Addresses BIT-1466
2015-08-24 12:10:35 -05:00
Daniel Thayer
ac9552a0cf Update documentation of Conn::Info history field 2015-08-20 10:45:22 -05:00
Robin Sommer
a9867c706d Make Teredo DPD signature more precise.
Contributed by Martina Balint in https://github.com/bro/bro/pull/39.

(I didn't merge the github branch, as that has some more stuff in its
history. Instead I applied the single-line change directly.)
2015-08-12 17:16:09 -07:00
Jan Grashoefer
55dc982a33 Update calls of Base64 functions.
Base64 encoding-errors during authentication in POP3 analyzer,
authentication in FTP analyzer (using GSI) and basic
authentication on HTTP will be logged to Weird.
2015-08-05 11:33:57 +02:00
Albert Zaharovits
b4e8a44630 SMTP logs include CC: addresses [BIT-1429] 2015-07-26 22:08:43 +03:00
Johanna Amann
5f07268805 Small changes to iana tls registry. 2015-07-16 16:40:35 -07:00
Robin Sommer
582da62d04 Fix reporter errors with GridFTP traffic. 2015-06-08 09:42:06 -07:00
Robin Sommer
26d10d88d2 Merge remote-tracking branch 'origin/topic/dnthayer/doc-improvements-2.4'
Lots of good stuff! Thanks for catchign the plugin doc inconsistencies!

* origin/topic/dnthayer/doc-improvements-2.4:
  Add missing documentation on the "Bro Package Index" page
  More improvements to the Logging Framework doc
  Fix documentation typo
  Update the "Log Files" documentation
  Add links in the logging framework doc
  Add a link to the bro-plugins documentation
  Update bro man page
  Update script language reference documentation
  Fix typos in the "writing bro plugins" doc
  Fix a "make doc" warning
  Improve logging framework doc
  Add link to broctl doc from the quickstart doc
  Update install documentation and fix some typos
  Minor improvements to logging framework documentation
  Correct a minor typo in the docs
2015-06-02 09:44:51 -07:00
Seth Hall
0eb345a25a Updating the Mozilla root certs. 2015-06-02 11:51:08 -04:00