Commit graph

6849 commits

Author SHA1 Message Date
Seth Hall
2fc8ef232a Updating CHANGES and VERSION. 2016-04-14 10:08:26 -04:00
Seth Hall
9aa9618473 Additional mime types for file identification and a few fixes.
Some of the existing mime types received extended matchers
to fix problems with UTF-16 BOMs.

New file mime types:
 - .ini files
 - MS Registry policy files
 - MS Registry files
 - MS Registry format files (e.g. DESKTOP.DAT)
 - MS Outlook PST files
 - Apple AFPInfo files

Mime type fixes:
 - MP3 files with ID3 tags.
 - JSON and XML matchers were extended
2016-04-14 10:06:58 -04:00
Seth Hall
7585d718c0 DCE_RPC Auth improvements.
Some DCE_RPC messages were being parsed incorrectly due to
misunderstandings about lengths of some fields.
2016-04-14 07:20:56 -04:00
Seth Hall
bc0a5da897 Fix a problem resulting in an SMB2 DPD warning. 2016-04-13 23:23:31 -04:00
Seth Hall
6d85769ae7 Modify protocol field length handling for DCE/RPC.
There were some DPD warnings resulting from this.
2016-04-13 23:22:47 -04:00
Seth Hall
23d25628ad Revert "Fix RFB analyzer to build on FreeBSD"
This reverts commit 16c0707b1d.
2016-04-13 16:55:28 -04:00
Seth Hall
61eea09395 Avoid a macro name conflict on FreeBSD. 2016-04-13 16:33:15 -04:00
Daniel Thayer
16c0707b1d Fix RFB analyzer to build on FreeBSD
The auto-generated header rfb_pac.h had class member functions "major"
and "minor" which were clashing with macros of the same name defined
in /usr/include/sys/types.h on FreeBSD.  Fixed by renaming the fields.
2016-04-13 14:16:31 -05: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
b4b9fbb8d2 Fix GSSAPI+ASN.1 build dependency tracking. 2016-04-13 12:08:04 -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
b722fe4540 Merge branch 'topic/seth/file-entropy'
* topic/seth/file-entropy:
  Add a file entropy test.
  Fixing a test.
  Updated tests for file entropy analyzer.
  Update and clean up to file entropy measurement.
  First commit of file entropy analyzer.
2016-04-13 01:43:27 -04:00
Seth Hall
adcc978f14 Add a file entropy test. 2016-04-13 00:44:02 -04:00
Seth Hall
2bde8ac052 Merge remote-tracking branch 'origin/topic/seth/file-entropy' into topic/seth/file-entropy
# Conflicts:
#	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
2016-04-12 23:40: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
Daniel Thayer
f54a5b52e5 Improve documentation of the "for" statement 2016-04-12 15:40:18 -05:00
Johanna Amann
00e759b44c Intel: CERT_HASH indicator type was never checked
Hence, when people specify data of type CERT_HASH in their intel source
files, it will never trigger an alert.
2016-04-11 15:50:55 +02:00
Martin van Hensbergen
000540645d Fixed issue in state machine
There is a slight difference in the message sequence
between version 3.7 and 3.8.

Version 3.8 will always send a Authentication Result
message when authentication type 'None' is selected
while 3.7 does not.
2016-04-11 11:37:50 +02: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
e2bbbdbb38 Opportunistically instantiate gssapi and ntlm analyzers in dce_rpc analyzer 2016-04-08 07:59:59 -04:00
Seth Hall
dfe0d58b7c Fix a bug in dce_rpc abstract syntax handling. 2016-04-08 07:59:20 -04:00
Robin Sommer
b5f1fb33fa Updating submodule(s).
[nomail]
2016-04-07 13:40:31 -07:00
Robin Sommer
57579c0b7c Merge branch 'master' of https://github.com/WilliamTom/bro
* 'master' of https://github.com/WilliamTom/bro:
  Wrong regex literal in scripting doc
2016-04-07 13:40:18 -07:00
Robin Sommer
ced3789619 Merge remote-tracking branch 'origin/topic/vladg/bit-1528'
BIT-1528 #merged

* origin/topic/vladg/bit-1528:
  Call ProtocolConfirmation in SNMP only if we saw a response SNMP packet
  Call ProtocolConfirmation in SIP only if we saw a response SIP packet
2016-04-07 13:33:41 -07: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
caa28bc3c5 More clean up and fixing for DCE_RPC. 2016-04-04 15:20:33 -04:00
Seth Hall
017fa13393 Fix mime type identification for Windows LNK files. 2016-04-04 15:20:03 -04:00
Seth Hall
78d9e38167 Fix a small bug with scriptland data types that led to a crash. 2016-04-04 15:07:01 -04:00
Seth Hall
c63bd17b5f Create a binpac function for converting UTF16 text to UTF8
- Abstracting a function from RDP and NTLM analyzers.
2016-04-03 23:59:02 -04:00
Seth Hall
6b5d969e49 Fixing a test baseline (more stuff working right!) 2016-04-03 15:49:02 -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
d6e01b7769 Pushing out the new NTLM and GSSAPI analyzers.
I accidentally left these out of the previous commit.
2016-04-03 04:18:45 -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
035fedd21d Fix a test which was failing now that SMB2 ioctl pipes are working.
- I was handling the parsing of the data for the pipe slightly
   wrong and it was causing a DPD error.
2016-04-01 16:53:01 -04:00
Seth Hall
473728e486 Update a test baseline for the rtt fix from earlier. 2016-04-01 14:49:08 -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
Daniel Thayer
cca9a6616e Split the broker main.bro into two scripts
Separate the former BrokerComm and BrokerStore portions of the script
because these files will be much larger when script wrappers for BIFs are
written.
2016-03-30 20:32:36 -05:00
Daniel Thayer
f46dfac63a Rename the BrokerStore namespace to Broker 2016-03-30 16:39:19 -05:00