Giter Site home page Giter Site logo

bzar's Introduction

BZAR (Bro/Zeek ATT&CK-based Analytics and Reporting)

1. Introduction

The BZAR project uses the Bro/Zeek Network Security Monitor to detect ATT&CK-based adversarial activity.

MITRE ATT&CK is a publicly-available, curated knowledge base for cyber adversary behavior, reflecting the various phases of the adversary lifecycle and the platforms they are known to target. The ATT&CK model includes behaviors of numerous threats groups.

BZAR is a set of Bro/Zeek scripts utilizing the SMB and DCE-RPC protocol analyzers and the File Extraction Framework to detect ATT&CK-like activity, raise notices, and write to the Notice Log.

BZAR and CAR

BZAR is a component of the Cyber Analytics Repository. It was originally located within that library, but due to requirements for Zeek packages it was moved to its own repository. It's still managed as a component of CAR.

2. Tuning BZAR for Your Environment

BZAR must be tuned for your specific operational envrionment. For example, some of the ATT&CK-like activity that BZAR detects may be authorized and legitimate activity in your environment. Therefore, these detections would produce lots of unnecessary entries in the Notice Log. This can be tuned by the use of BZAR whitelists and by toggling on/off detection and/or reporting. See the CHANGES document for more information.

3. Complex Analytics for Detecting ATT&CK-like Activity

The BZAR analytics use the Bro/Zeek Summary Statistics (SumStats) Framework to combine two or more simple indicators in SMB and DCE-RPC traffic to detect ATT&CK-like activity with a greater degree of confidence. Three (3) BZAR analytics are described below.

3.1. SumStats Analytics for ATT&CK Lateral Movement and Execution

Use SumStats to raise a Bro/Zeek Notice event if an SMB Lateral Movement indicator (e.g., SMB File Write to a Windows Admin File Share: ADMIN$ or C$ only) is observed together with a DCE-RPC Execution indicator against the same (targeted) host, within a specified period of time.

Relevant ATT&CK Techniques

Relevant Indicators Detected by Bro/Zeek

  • smb1_write_andx_response::c$smb_state$path contains ADMIN$ or C$
  • smb2_write_request::c$smb_state$path** contains ADMIN$ or C$
  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • svcctl::CreateServiceW
    • svcctl::CreateServiceA
    • svcctl::StartServiceW
    • svcctl::StartServiceA
    • IWbemServices::ExecMethod
    • IWbemServices::ExecMethodAsync
    • atsvc::JobAdd
    • ITaskSchedulerService::SchRpcRegisterTask
    • ITaskSchedulerService::SchRpcRun
    • ITaskSchedulerService::SchRpcEnableTask

NOTE: Preference would be to detect smb2_write_response event (instead of smb2_write_request), because it would confirm the file was actually written to the remote destination. Unfortunately, Bro/Zeek does not have an event for that SMB message-type yet.

3.2. SumStats Analytics for ATT&CK Lateral Movement (Multiple Attempts)

Use SumStats to raise a Bro/Zeek Notice event if multiple SMB Lateral Movement indicators (e.g., multiple attempts to connect to a Windows Admin File Share: ADMIN$ or C$ only) are observed originating from the same host, regardless of write-attempts and regardless of whether or not any connection is successful --just connection attempts-- within a specified period of time.

Relevant ATT&CK Techniques

Indicators detected by Bro/Zeek

  • smb1_tree_connect_andx_request::c$smb_state$path contains ADMIN$ or C$
  • smb2_tree_connect_request::c$smb_state$path contains ADMIN$ or C$

3.3. SumStats Analytics for ATT&CK Discovery

Use SumStats to raise a Bro/Zeek Notice event if multiple instances of DCE-RPC Discovery indicators are observed originating from the same host, within a specified period of time.

Relevant ATT&CK Techniques

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • lsarpc::LsarEnumerateAccounts
    • lsarpc::LsarEnumerateAccountRights
    • lsarpc::LsarEnumerateAccountsWithUserRight
    • lsarpc::LsarEnumeratePrivileges
    • lsarpc::LsarEnumeratePrivilegesAccount
    • lsarpc::LsarEnumerateTrustedDomainsEx
    • lsarpc::LsarGetSystemAccessAccount
    • lsarpc::LsarGetUserName
    • lsarpc::LsarLookupNames
    • lsarpc::LsarLookupNames2
    • lsarpc::LsarLookupNames3
    • lsarpc::LsarLookupNames4
    • lsarpc::LsarLookupPrivilegeDisplayName
    • lsarpc::LsarLookupPrivilegeName
    • lsarpc::LsarLookupPrivilegeValue
    • lsarpc::LsarLookupSids
    • lsarpc::LsarLookupSids2
    • lsarpc::LsarLookupSids3
    • lsarpc::LsarQueryDomainInformationPolicy
    • lsarpc::LsarQueryInfoTrustedDomain
    • lsarpc::LsarQueryInformationPolicy
    • lsarpc::LsarQueryInformationPolicy2
    • lsarpc::LsarQueryTrustedDomainInfo
    • lsarpc::LsarQueryTrustedDomainInfoByName
    • samr::SamrLookupNamesInDomain
    • samr::SamrLookupIdsInDomain
    • samr::SamrLookupDomainInSamServer
    • samr::SamrGetGroupsForUser
    • samr::SamrGetAliasMembership
    • samr::SamrGetMembersInAlias
    • samr::SamrGetMembersInGroup
    • samr::SamrGetUserDomainPasswordInformation
    • samr::SamrEnumerateAliasesInDomain
    • samr::SamrEnumerateUsersInDomain
    • samr::SamrEnumerateGroupsInDomain
    • samr::SamrEnumerateDomainsInSamServer
    • samr::SamrQueryInformationAlias
    • samr::SamrQueryInformationDomain
    • samr::SamrQueryInformationDomain2
    • samr::SamrQueryInformationGroup
    • samr::SamrQueryInformationUser
    • samr::SamrQueryInformationUser2
    • samr::SamrQueryDisplayInformation
    • samr::SamrQueryDisplayInformation2
    • samr::SamrQueryDisplayInformation3
    • srvsvc::NetrConnectionEnum
    • srvsvc::NetrFileEnum
    • srvsvc::NetrRemoteTOD
    • srvsvc::NetrServerAliasEnum
    • srvsvc::NetrServerGetInfo
    • srvsvc::NetrServerTransportEnum
    • srvsvc::NetrSessionEnum
    • srvsvc::NetrShareEnum
    • srvsvc::NetrShareGetInfo
    • wkssvc::NetrWkstaGetInfo
    • wkssvc::NetrWkstaTransportEnum
    • wkssvc::NetrWkstaUserEnum

4. Simple Indicators for Detecting ATT&CK-like Activity

In addition to the analytics described above, BZAR uses simple indicators within SMB and DCE-RPC traffic to detect ATT&CK-like activity, although with a lesser degree of confidence than detection via the SumStats analytics. The BZAR indicators are grouped into six (6) categories, as described below.

4.1. Indicators for ATT&CK Lateral Movement

Raise a Bro/Zeek Notice event if a single instance of an SMB Lateral Movement indicator (e.g., SMB File Write to a Windows Admin File Share: ADMIN$ or C$ only) is observed, which indicates ATT&CK-like activity.

Relevant ATT&CK Techniques

Relevant Indicator(s) Detected by Bro/Zeek

  • smb1_write_andx_response::c$smb_state$path contains ADMIN$ or C$
  • smb2_write_request::c$smb_state$path** contains ADMIN$ or C$

NOTE: Preference would be to detect smb2_write_response event (instead of smb2_write_request), because it would confirm the file was actually written to the remote destination. Unfortunately, Bro/Zeek does not have an event for that SMB message-type yet.

4.2. Indicators for File Extraction Framework

Launch the Bro/Zeek File Extraction Framework to save a copy of the file associated with ATT&CK-like Lateral Movement onto a remote system. Raise a Bro Notice event for the Lateral Movement Extracted File.

Relevant ATT&CK Techniques

Relevant Indicator(s) Detected by Bro/Zeek

  • smb1_write_andx_response::c$smb_state$path contains ADMIN$ or C$
  • smb2_write_request::c$smb_state$path** contains ADMIN$ or C$

NOTE: Preference would be to detect smb2_write_response event (instead of smb2_write_request), because it would confirm the file was actually written to the remote destination. Unfortunately, Bro/Zeek does not have an event for that SMB message-type yet.

4.3. Indicators for ATT&CK Credential Access

Raise a Bro/Zeek Notice event if a single instance of any of the following Windows DCE-RPC functions (endpoint::operation) is observed, which indicates ATT&CK-like Credential Access techniques on the remote system.

Relevant ATT&CK Technique(s)

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • drsuapi::DRSReplicaSync
    • drsuapi::DRSGetNCChanges

4.4. Indicators for ATT&CK Defense Evasion

Raise a Bro/Zeek Notice event if a single instance of any of the following
Windows DCE-RPC functions (endpoint::operation) is observed, which indicates ATT&CK-like Defense Evasion techniques on the remote system.

Relevant ATT&CK Techniques

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • eventlog::ElfrClearELFW
    • eventlog::ElfrClearELFA
    • IEventService::EvtRpcClearLog

4.5. Indicators for ATT&CK Execution

Raise a Bro/Zeek Notice event if a single instance of any of the following Windows DCE-RPC functions (endpoint::operation) is observed, which indicates ATT&CK-like Execution techniques on the remote system.

Relevant ATT&CK Technique(s)

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • svcctl::CreateServiceW
    • svcctl::CreateServiceA
    • svcctl::StartServiceW
    • svcctl::StartServiceA
    • IWbemServices::ExecMethod
    • IWbemServices::ExecMethodAsync
    • atsvc::JobAdd
    • ITaskSchedulerService::SchRpcRegisterTask
    • ITaskSchedulerService::SchRpcRun
    • ITaskSchedulerService::SchRpcEnableTask

4.6. Indicators for ATT&CK Persistence

Raise a Bro/Zeek Notice event if a single instance of any of the following Windows DCE-RPC functions (endpoint::operation) is observed, which indicates ATT&CK-like Persistence techniques on the remote system.

Relevant ATT&CK Technique(s):

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • ISecLogon::SeclCreateProcessWithLogonW
    • ISecLogon::SeclCreateProcessWithLogonExW
    • IRemoteWinspool::RpcAsyncAddMonitor
    • IRemoteWinspool::RpcAsyncAddPrintProcessor
    • spoolss::RpcAddMonitor # a.k.a. winspool | spoolss
    • spoolss::RpcAddPrintProcessor # a.k.a. winspool | spoolss

4.7. Indicators for ATT&CK Impact

Raise a Bro/Zeek Notice event if a single instance of any of the following
Windows DCE-RPC functions (endpoint::operation) is observed, which indicates ATT&CK-like Impact techniques on the remote system.

Relevant ATT&CK Techniques

Relevant Indicator(s) Detected by Bro/Zeek

  • dce_rpc_response::c$dce_rpc$endpoint + c$dce_rpc$operation contains any of the following:
    • InitShutdown::BaseInitiateShutdown
    • InitShutdown::BaseInitiateShutdownEx
    • WindowsShutdown::WsdrInitiateShutdown
    • winreg::BaseInitiateSystemShutdown
    • winreg::BaseInitiateSystemShutdownEx
    • winstation_rpc::RpcWinStationShutdownSystem
    • samr::SamrShutdownSamServer # MSDN says not used on the wire

5. Additional DCE-RPC Interfaces and Methods

The BZAR project adds 144 more Microsoft DCE-RPC Interface UUIDs (a.k.a. "endpoints") to the Bro/Zeek DCE_RPC::uuid_endpoint_map.

The BZAR project also adds 1,145 Microsoft DCE-RPC Interface Methods (a.k.a. "operations") to the Bro/Zeek DCE_RPC::operations.

See the Bro/Zeek script 'bzar_dce-rpc_consts' for more information.

Most of the DCE-RPC endpoints and operations defined in 'bzar_dce-rpc_consts' were merged into Zeek's main product line, version 3.2.0-dev.565 | 2020-05-26 21:55:54 +0000. Ref: https://github.com/zeek/zeek/blob/master/scripts/base/protocols/dce-rpc/consts.zeek#L92

6. References

  1. Microsoft Developer Network (MSDN) Library. MSDN Library > Open Specifications > Protocols > Windows Protocols > Technical Documents. https://msdn.microsoft.com/en-us/library/jj712081.aspx
  2. Marchand, "Windows Network Services Internals". 2006. http://index-of.es/Windows/win_net_srv.pdf

7. Contributing

Contributions are welcome. This code is licensed under the same terms as the CAR repository. See the LICENSE file and the Developer Certificate of Origin certification in the CONTRIBUTING file in the root of the repository.

The information in this README file is current, as of 10/09/2020.

Copyright 2018 The MITRE Corporation. All Rights Reserved.
Approved for public release. Distribution unlimited. Case number 18-2489.

bzar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bzar's Issues

installation

Hello i install bzar with zkg but how can i sure that loaded and work ?

does not work with Zeek v5.0

Zeek v5.0.0 was recently released. Here are the errors/warnings I get when using this package with that release:

> zeek -NN local 2>&1 | grep -i bzar
warning in /opt/zeek/share/zeek/site/packages/./bzar/./main.zeek, lines 126-130: "when" statement referring to locals without an explicit [] capture is deprecated: BZAR::match, BZAR::orig_h, BZAR::w (when ((BZAR::n1 = lookup_addr(BZAR::orig_h)) && (BZAR::n1 in BZAR::w$orig_names)) { BZAR::match = T} timeout BZAR::whitelist_dns_timeout { BZAR::match = F})
warning in /opt/zeek/share/zeek/site/packages/./bzar/./main.zeek, lines 137-141: "when" statement referring to locals without an explicit [] capture is deprecated: BZAR::match, BZAR::resp_h, BZAR::w (when ((BZAR::n2 = lookup_addr(BZAR::resp_h)) && (BZAR::n2 in BZAR::w$resp_names)) { BZAR::match = T} timeout BZAR::whitelist_dns_timeout { BZAR::match = F})
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 25: type clash (string and drsuapi::DRSReplicaSync)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 25 and string: type mismatch (drsuapi::DRSReplicaSync and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 25-26: inconsistent type in set constructor (set(drsuapi::DRSReplicaSync, drsuapi::DRSGetNCChanges))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 25-26: type clash in assignment (BZAR::t1003_006_rpc_strings = set(drsuapi::DRSReplicaSync, drsuapi::DRSGetNCChanges))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 42: type clash (string and eventlog::ElfrClearELFW)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 42 and string: type mismatch (eventlog::ElfrClearELFW and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 43-44: inconsistent type in set constructor (set(eventlog::ElfrClearELFW, eventlog::ElfrClearELFA, IEventService::EvtRpcClearLog))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 43-44: type clash in assignment (BZAR::t1070_001_rpc_strings = set(eventlog::ElfrClearELFW, eventlog::ElfrClearELFA, IEventService::EvtRpcClearLog))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 62: type clash (string and svcctl::CreateServiceWOW64W)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 62 and string: type mismatch (svcctl::CreateServiceWOW64W and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 66-67: inconsistent type in set constructor (set(svcctl::CreateServiceWOW64W, svcctl::CreateServiceWOW64A, svcctl::CreateServiceW, svcctl::CreateServiceA, svcctl::StartServiceW, svcctl::StartServiceA))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 66-67: type clash in assignment (BZAR::t1569_002_rpc_strings = set(svcctl::CreateServiceWOW64W, svcctl::CreateServiceWOW64A, svcctl::CreateServiceW, svcctl::CreateServiceA, svcctl::StartServiceW, svcctl::StartServiceA))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 73: type clash (string and IWbemServices::ExecMethod)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 73 and string: type mismatch (IWbemServices::ExecMethod and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 73-74: inconsistent type in set constructor (set(IWbemServices::ExecMethod, IWbemServices::ExecMethodAsync))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 73-74: type clash in assignment (BZAR::t1047_rpc_strings = set(IWbemServices::ExecMethod, IWbemServices::ExecMethodAsync))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 80: type clash (string and atsvc::JobAdd)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 80 and string: type mismatch (atsvc::JobAdd and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 80: inconsistent type in set constructor (set(atsvc::JobAdd))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 80: type clash in assignment (BZAR::t1053_002_rpc_strings = set(atsvc::JobAdd))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 86: type clash (string and ITaskSchedulerService::SchRpcRegisterTask)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 86 and string: type mismatch (ITaskSchedulerService::SchRpcRegisterTask and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 87-88: inconsistent type in set constructor (set(ITaskSchedulerService::SchRpcRegisterTask, ITaskSchedulerService::SchRpcRun, ITaskSchedulerService::SchRpcEnableTask))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 87-88: type clash in assignment (BZAR::t1053_005_rpc_strings = set(ITaskSchedulerService::SchRpcRegisterTask, ITaskSchedulerService::SchRpcRun, ITaskSchedulerService::SchRpcEnableTask))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 103: type clash (string and winreg::BaseInitiateSystemShutdown)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 103 and string: type mismatch (winreg::BaseInitiateSystemShutdown and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 108-109: inconsistent type in set constructor (set(winreg::BaseInitiateSystemShutdown, winreg::BaseInitiateSystemShutdownEx, InitShutdown::BaseInitiateShutdown, InitShutdown::BaseInitiateShutdownEx, WindowsShutdown::WsdrInitiateShutdown, winstation_rpc::RpcWinStationShutdownSystem, samr::SamrShutdownSamServer))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 108-109: type clash in assignment (BZAR::t1529_rpc_strings = set(winreg::BaseInitiateSystemShutdown, winreg::BaseInitiateSystemShutdownEx, InitShutdown::BaseInitiateShutdown, InitShutdown::BaseInitiateShutdownEx, WindowsShutdown::WsdrInitiateShutdown, winstation_rpc::RpcWinStationShutdownSystem, samr::SamrShutdownSamServer))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 125: type clash (string and ISecLogon::SeclCreateProcessWithLogonW)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 125 and string: type mismatch (ISecLogon::SeclCreateProcessWithLogonW and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 125-126: inconsistent type in set constructor (set(ISecLogon::SeclCreateProcessWithLogonW, ISecLogon::SeclCreateProcessWithLogonExW))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 125-126: type clash in assignment (BZAR::t1547_004_rpc_strings = set(ISecLogon::SeclCreateProcessWithLogonW, ISecLogon::SeclCreateProcessWithLogonExW))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 132: type clash (string and spoolss::RpcAddMonitor)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 132 and string: type mismatch (spoolss::RpcAddMonitor and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 134-135: inconsistent type in set constructor (set(spoolss::RpcAddMonitor, spoolss::RpcAddPrintProcessor, IRemoteWinspool::RpcAsyncAddMonitor, IRemoteWinspool::RpcAsyncAddPrintProcessor))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 134-135: type clash in assignment (BZAR::t1547_010_rpc_strings = set(spoolss::RpcAddMonitor, spoolss::RpcAddPrintProcessor, IRemoteWinspool::RpcAsyncAddMonitor, IRemoteWinspool::RpcAsyncAddPrintProcessor))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 159: type clash (string and srvsvc::NetrServerTransportEnum)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 159 and string: type mismatch (srvsvc::NetrServerTransportEnum and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 159-160: inconsistent type in set constructor (set(srvsvc::NetrServerTransportEnum, wkssvc::NetrWkstaTransportEnum))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 159-160: type clash in assignment (BZAR::t1016_rpc_strings = set(srvsvc::NetrServerTransportEnum, wkssvc::NetrWkstaTransportEnum))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 166: type clash (string and srvsvc::NetrServerGetInfo)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 166 and string: type mismatch (srvsvc::NetrServerGetInfo and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 167-168: inconsistent type in set constructor (set(srvsvc::NetrServerGetInfo, srvsvc::NetrServerAliasEnum, wkssvc::NetrWkstaGetInfo))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 167-168: type clash in assignment (BZAR::t1018_rpc_strings = set(srvsvc::NetrServerGetInfo, srvsvc::NetrServerAliasEnum, wkssvc::NetrWkstaGetInfo))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 174: type clash (string and lsarpc::LsarGetUserName)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 174 and string: type mismatch (lsarpc::LsarGetUserName and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 185-186: inconsistent type in set constructor (set(lsarpc::LsarGetUserName, lsarpc::LsarEnumerateTrustedDomainsEx, lsarpc::LsarGetSystemAccessAccount, lsarpc::LsarQueryDomainInformationPolicy, lsarpc::LsarQueryInfoTrustedDomain, samr::SamrEnumerateGroupsInDomain, samr::SamrEnumerateDomainsInSamServer, samr::SamrQueryInformationDomain, samr::SamrQueryInformationDomain2, samr::SamrQueryInformationGroup))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 185-186: type clash in assignment (BZAR::t1033_rpc_strings = set(lsarpc::LsarGetUserName, lsarpc::LsarEnumerateTrustedDomainsEx, lsarpc::LsarGetSystemAccessAccount, lsarpc::LsarQueryDomainInformationPolicy, lsarpc::LsarQueryInfoTrustedDomain, samr::SamrEnumerateGroupsInDomain, samr::SamrEnumerateDomainsInSamServer, samr::SamrQueryInformationDomain, samr::SamrQueryInformationDomain2, samr::SamrQueryInformationGroup))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 192: type clash (string and srvsvc::NetrConnectionEnum)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 192 and string: type mismatch (srvsvc::NetrConnectionEnum and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 192-193: inconsistent type in set constructor (set(srvsvc::NetrConnectionEnum, srvsvc::NetrSessionEnum))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 192-193: type clash in assignment (BZAR::t1049_rpc_strings = set(srvsvc::NetrConnectionEnum, srvsvc::NetrSessionEnum))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 199: type clash (string and lsarpc::LsarEnumerateAccountRights)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 199 and string: type mismatch (lsarpc::LsarEnumerateAccountRights and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 209-210: inconsistent type in set constructor (set(lsarpc::LsarEnumerateAccountRights, lsarpc::LsarEnumerateAccountsWithUserRight, lsarpc::LsarEnumeratePrivileges, lsarpc::LsarEnumeratePrivilegesAccount, lsarpc::LsarLookupPrivilegeValue, lsarpc::LsarLookupPrivilegeName, lsarpc::LsarLookupPrivilegeDisplayName, samr::SamrGetGroupsForUser, samr::SamrGetAliasMembership, samr::SamrGetMembersInAlias, samr::SamrGetMembersInGroup))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 209-210: type clash in assignment (BZAR::t1069_rpc_strings = set(lsarpc::LsarEnumerateAccountRights, lsarpc::LsarEnumerateAccountsWithUserRight, lsarpc::LsarEnumeratePrivileges, lsarpc::LsarEnumeratePrivilegesAccount, lsarpc::LsarLookupPrivilegeValue, lsarpc::LsarLookupPrivilegeName, lsarpc::LsarLookupPrivilegeDisplayName, samr::SamrGetGroupsForUser, samr::SamrGetAliasMembership, samr::SamrGetMembersInAlias, samr::SamrGetMembersInGroup))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 216: type clash (string and lsarpc::LsarQueryInformationPolicy)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 216 and string: type mismatch (lsarpc::LsarQueryInformationPolicy and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 219-221: inconsistent type in set constructor (set(lsarpc::LsarQueryInformationPolicy, lsarpc::LsarQueryInformationPolicy2, lsarpc::LsarQueryTrustedDomainInfo, lsarpc::LsarQueryTrustedDomainInfoByName, samr::SamrGetUserDomainPasswordInformation))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 219-221: type clash in assignment (BZAR::t1082_rpc_strings = set(lsarpc::LsarQueryInformationPolicy, lsarpc::LsarQueryInformationPolicy2, lsarpc::LsarQueryTrustedDomainInfo, lsarpc::LsarQueryTrustedDomainInfoByName, samr::SamrGetUserDomainPasswordInformation))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 227: type clash (string and srvsvc::NetrFileEnum)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 227 and string: type mismatch (srvsvc::NetrFileEnum and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 227: inconsistent type in set constructor (set(srvsvc::NetrFileEnum))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 227: type clash in assignment (BZAR::t1083_rpc_strings = set(srvsvc::NetrFileEnum))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 233: type clash (string and lsarpc::LsarEnumerateAccounts)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 233 and string: type mismatch (lsarpc::LsarEnumerateAccounts and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 252-254: inconsistent type in set constructor (set(lsarpc::LsarEnumerateAccounts, lsarpc::LsarLookupNames, lsarpc::LsarLookupNames2, lsarpc::LsarLookupNames3, lsarpc::LsarLookupNames4, lsarpc::LsarLookupSids, lsarpc::LsarLookupSids2, lsarpc::LsarLookupSids3, samr::SamrEnumerateAliasesInDomain, samr::SamrEnumerateUsersInDomain, samr::SamrLookupNamesInDomain, samr::SamrLookupIdsInDomain, samr::SamrLookupDomainInSamServer, samr::SamrQueryDisplayInformation, samr::SamrQueryDisplayInformation2, samr::SamrQueryDisplayInformation3, samr::SamrQueryInformationAlias, samr::SamrQueryInformationUser, samr::SamrQueryInformationUser2, wkssvc::NetrWkstaUserEnum))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 252-254: type clash in assignment (BZAR::t1087_rpc_strings = set(lsarpc::LsarEnumerateAccounts, lsarpc::LsarLookupNames, lsarpc::LsarLookupNames2, lsarpc::LsarLookupNames3, lsarpc::LsarLookupNames4, lsarpc::LsarLookupSids, lsarpc::LsarLookupSids2, lsarpc::LsarLookupSids3, samr::SamrEnumerateAliasesInDomain, samr::SamrEnumerateUsersInDomain, samr::SamrLookupNamesInDomain, samr::SamrLookupIdsInDomain, samr::SamrLookupDomainInSamServer, samr::SamrQueryDisplayInformation, samr::SamrQueryDisplayInformation2, samr::SamrQueryDisplayInformation3, samr::SamrQueryInformationAlias, samr::SamrQueryInformationUser, samr::SamrQueryInformationUser2, wkssvc::NetrWkstaUserEnum))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 260: type clash (string and srvsvc::NetrRemoteTOD)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 260 and string: type mismatch (srvsvc::NetrRemoteTOD and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 260: inconsistent type in set constructor (set(srvsvc::NetrRemoteTOD))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 260: type clash in assignment (BZAR::t1124_rpc_strings = set(srvsvc::NetrRemoteTOD))
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 266: type clash (string and srvsvc::NetrShareEnum)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 266 and string: type mismatch (srvsvc::NetrShareEnum and string)
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 266-267: inconsistent type in set constructor (set(srvsvc::NetrShareEnum, srvsvc::NetrShareGetInfo))
error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 266-267: type clash in assignment (BZAR::t1135_rpc_strings = set(srvsvc::NetrShareEnum, srvsvc::NetrShareGetInfo))

Persistence detection question

Hello,

I ran "T1547.004 Boot or Logon Autostart Execution: Winlogon Helper DLL" and "T1547.010 Boot or Logon Autostart Execution" and did not see any of the expected RPC traffic. I took a pcap and zeeked it with zeek 4.0. Do you all have an example or a pcap where these show up? Do you know why it didn't work for me? The first image is the results of Winlogon and the second is port monitor. Thanks!

image

image

Automated suppression with $identifier?

Hello,

I am working to suppress identical alerts, is there any built-in suppression in BZAR? Is there any way to hook the $identifier into the BZAR NOTICE?

No notice logs

Hello, Im testing the scripts on zeek with some pcaps but no notice log is being generated.
How can I assure the installition was properly done?

Fix Zeek 3.1 Deprecations

Any interest in a PR with Zeek 3.1 changes? Rename .bro scripts to .zeek to eliminate deprecation warnings, switch to the new smb2_write_response event (thanks for the great comments to help with that), and switch from bro-pkg to zkg. It's incompatible with Bro, of course.

type error issue (bzar_dce-rpc_consts.zeek)

There is type mismatching errors when parsing Sets type arrays.

It should be like : [" "], > " ",

the error messages are here:
error in string and /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 25: type clash (string and drsuapi::DRSReplicaSync) error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, line 25 and string: type mismatch (drsuapi::DRSReplicaSync and string) error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 25-26: inconsistent type in set constructor (set(drsuapi::DRSReplicaSync, drsuapi::DRSGetNCChanges)) error in /opt/zeek/share/zeek/site/packages/./bzar/./bzar_dce-rpc_consts.zeek, lines 25-26: type clash in assignment (BZAR::t1003_006_rpc_strings = set(drsuapi::DRSReplicaSync, drsuapi::DRSGetNCChanges))

error with latest zeek

  • zeek verion : 6.0.2
error in /opt/zeek/share/zeek/site/scripts/bzar/./main.zeek, lines 126-130: BZAR::match is used inside "when" statement but not captured (when ((BZAR::n1 = lookup_addr(BZAR::orig_h)) && (BZAR::n1 in BZAR::w$orig_names)) { BZAR::match = T} timeout BZAR::whitelist_dns_timeout { BZAR::match = F})
error in /opt/zeek/share/zeek/site/scripts/bzar/./main.zeek, lines 137-141: BZAR::w is used inside "when" statement but not captured (when ((BZAR::n2 = lookup_addr(BZAR::resp_h)) && (BZAR::n2 in BZAR::w$resp_names)) { BZAR::match = T} timeout BZAR::whitelist_dns_timeout { BZAR::match = F})

PR to Zeek for the UUID/Endpoint Mapping

First great work! This is awesome.
Have you all thought about creating a PR to Zeek for the UUID & Endpoint mappings you all have in this project?

The BZAR project adds 144 more Microsoft DCE-RPC Interface UUIDs (a.k.a. "endpoints") to the Bro/Zeek DCE_RPC::uuid_endpoint_map.

The BZAR project also adds 1,145 Microsoft DCE-RPC Interface Methods (a.k.a. "operations") to the Bro/Zeek DCE_RPC::operations.

reference:
https://github.com/mitre-attack/bzar#additional-dce-rpc-interfaces-and-methods

reference added things:

redef DCE_RPC::uuid_endpoint_map +=

redef DCE_RPC::operations +=

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.