Commit graph

34 commits

Author SHA1 Message Date
Daniel Thayer
01a899255e Convert more redef-able constants to runtime options 2018-08-24 16:05:44 -05:00
Luciano Mammino
ff84e4faa3
Update consts.bro
Removed duplicated entries (`000001a0-0000-0000-c000-000000000046`, with `i=3, i=4`) and related comments line

This change should make this file more readable and it will be easier to convert it to other formats (personally I found it out while I was trying to convert this to a JavaScript structure).
2018-04-25 16:25:34 +01:00
Daniel Thayer
15a825eb2d Fixed some warnings seen while running "make doc"
Moved the definitions of DCE_RPC::BackingState and DCE_RPC::State types
into the export block.  These types are used in the redef of the
"connection" record.
2016-11-14 14:46:53 -06:00
Daniel Thayer
5745213326 Fix minor typos in documentation of various scripts 2016-11-11 14:08:17 -06:00
Johanna Amann
c92060a8ca Merge remote-tracking branch 'origin/topic/seth/smb-auth-fixes'
* origin/topic/seth/smb-auth-fixes:
  Disable SMB2 error data parsing.
  Removed some files that aren't being used.
  Fix SMB tree connect handling.
  Fix a small issue where DCE_RPC commands were improperly being logged.
  SMB fixes and cleanup.
  Including a test for raw NTLM in SMB
  Updates for SMB auth handling from Martin van Hensbergen.

BIT-1721 #merged
2016-11-02 10:25:33 -07:00
Seth Hall
19a4376a9a Fix a small issue where DCE_RPC commands were improperly being logged. 2016-11-01 03:13:04 -04:00
Seth Hall
ff682b8c2c Merge remote-tracking branch 'origin/master' into topic/seth/smb-auth-fixes 2016-10-31 16:17:01 -04:00
Seth Hall
4f3fe047f4 SMB fixes and cleanup.
SMB error handling improved. The analyzer isn't destroyed when a problem
is encoutered anymore.  The flowbuffer in the parser is now flushed and
the analyzer is set to resync against an SMB command.  This was needed
because there is some state about open files that is kept within the
parser itself which was being destroyed and that was causing analysis
after content gaps or parse errors to be faulty.  The new mechanism
doesn't detroy the parser so parsing after gaps is improved.

DCE_RPC handling in SMB is improved in the edge case where a drive
mapping isn't seen. There is a new const named SMB::pipe_filenames
which is used as a heuristic for identifying "files" opened on named
pipe shares.  If the share mapping type isn't known and a filename
in this set is found, the share type will change to "PIPE" by
generating an event named "smb_pipe_connect_heuristic".  Reads and
writes to that file will be sent to the DCE_RPC analyzer instead of
to the files framework.

The concept of "unknown" share types has been removed due to the new
heuristic detection of share types.

Some general clean up of how the SMB cmd log is written and when.
2016-10-31 13:35:47 -04:00
Robin Sommer
b7a774ab28 Moved the DCE_RPC constants into init-bare.bro. 2016-10-25 16:50:48 -07:00
Robin Sommer
1f36ae61ba Adding one more case to the DCE_RPC defrag logic.
(and fixing a couple of compiler warnings)
2016-10-25 16:45:10 -07:00
Seth Hall
36ae5e6662 Make DCE_RPC skip input in strange fragment circumstances.
If there are too many concurrent fragments or too much
data fragmented, skip further input on DCE_RPC.
2016-10-24 13:50:13 -04:00
Seth Hall
e4b620673b More DCE_RPC improvements.
- The logic for fragment handling has been rewritten and should be correct now.
 - There are now tunables for fragment handling overflow situations.
   - DCE_RPC::max_cmd_reassembly and DCE_RPC::max_frag_data
   - They result in weirds and analyzer removal.
 - Memory leak fixed by unique_ptr auto cleanup.
 - DCE_RPC is now intolerate of content gaps and will stop
   analyzing traffic if content gaps happen (like most other analyzers currently).
2016-10-24 03:22:20 -04:00
Johanna Amann
38f6ca87ae Merge remote-tracking branch 'origin/topic/dnthayer/ticket1720'
BIT-1720 #merged

* origin/topic/dnthayer/ticket1720:
  Added missing README files for documentation
  List new log files in the log-files.rst document
2016-10-13 14:09:44 -07:00
Daniel Thayer
23a5f83c94 Added missing README files for documentation
These are the one-line script package descriptions.
2016-10-10 22:55:50 -05:00
Seth Hall
029d92183e Fixes for DCE_RPC analyzer
- DCE_RPC fragmentation handling returns!
  - Fixed some general parsing issues
  - Fixed an issue with the DCE_RPC signature not working for IPv6 connections.
2016-10-08 10:00:26 -04:00
Seth Hall
5fc0fc5116 Fixing tests for SMB. 2016-08-08 16:15:20 -04:00
Seth Hall
117b5c3ac7 Lots of SMB1 parsing fixes. 2016-08-08 15:36:07 -04:00
Seth Hall
ebd064de17 Add some more DCE_RPC endpoints. 2016-08-05 12:29:45 -04:00
Seth Hall
d1b1a560c0 Add a DCE-RPC test. 2016-07-07 14:17:25 -04:00
Seth Hall
3a1a14d1c4 Now actually loading DCE-RPC's dpd.sig 2016-07-07 12:55:49 -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
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
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
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
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
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