Commit graph

7932 commits

Author SHA1 Message Date
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
Daniel Thayer
9f5c820c7b Rename the BrokerComm namespace to Broker 2016-03-30 14:31:25 -05:00
Jan Grashoefer
2ebac70782 Added remove function to intel-framework. 2016-03-30 20:03:07 +02: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
782e67d790 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-03-26 21:15:41 -04:00
william
35a4e428cf Wrong regex literal in scripting doc 2016-03-26 01:54:51 -07:00
Johanna Amann
ee132b6da4 NetControl: fix acld whitelist command 2016-03-24 15:21:36 -07:00
Johanna Amann
ee4abb5db2 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-03-24 15:07:38 -07:00
Johanna Amann
34ad4cf638 NetControl: add rule exists as state besides added and failure.
Rules that are already existing will, by default, not automatically be
timed out by NetControl.
2016-03-24 15:06:07 -07:00
Johanna Amann
8650841bf5 Only load openflow/netcontrol if compiled with broker. 2016-03-24 13:39:34 -07:00
Vlad Grigorescu
75de5481eb Merge remote-tracking branch 'origin/master' into topic/vladg/bit-1528 2016-03-24 11:27:31 -05:00
Seth Hall
802adb66ea Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-03-23 23:10:01 -04:00
Jan Grashoefer
cafae5351b Added support for subnets to intel-framework.
The intel-framework now supports the new indicator type Intel::SUBNET.
As subnets are matched against seen addresses, the field matched was
introduced to indicate which indicator types caused the hit. A testcase
for subents was added and the old ones have been updated accordingly.
2016-03-22 19:16:51 +01:00
Jan Grashoefer
06faee2cc8 Merge branch 'master' into topic/jgras/intel-update 2016-03-22 18:06:09 +01:00
Robin Sommer
a9cb90b6f5 Adding canonifier to test. 2016-03-21 21:08:42 -07:00
Robin Sommer
eae85afd60 Merge remote-tracking branch 'origin/topic/matthias/configure-fix'
* origin/topic/matthias/configure-fix:
  Adapt to recent change in CAF CMake script
2016-03-21 19:49:10 -07:00
Matthias Vallentin
357d52fd7d Adapt to recent change in CAF CMake script
Also deprecate --with-libcaf in favor of --with-caf, as already done in
Broker.
2016-03-21 19:02:25 -07:00
Robin Sommer
e27eef351e Merge remote-tracking branch 'origin/topic/matthias/configure-fix'
* origin/topic/matthias/configure-fix:
  Adapt to recent change in CAF CMake script
2016-03-21 18:10:07 -07:00
Matthias Vallentin
4e7e211ed0 Adapt to recent change in CAF CMake script
Also deprecate --with-libcaf in favor of --with-caf, as already done in
Broker.
2016-03-21 17:12:23 -07:00
Robin Sommer
c194919b57 Merge remote-tracking branch 'origin/topic/vladg/bit-1533'
BIT-1533 #merged

* origin/topic/vladg/bit-1533:
  Call ProtocolConfirmation in MySQL analyzer.
2016-03-21 12:46:45 -07:00
Robin Sommer
7388168a68 Merge remote-tracking branch 'origin/topic/johanna/filter_subnet_table'
BIT-1553 #merged

* origin/topic/johanna/filter_subnet_table:
  Check that there is only one of read, write, create_expire
  Update NEWS
  Fixed &read_expire for subnet-indexed tables
  Added &read_expire testcase for subnet tables
  Add filter_subnet_table bif
2016-03-21 12:20:24 -07:00