insider-threat-detection-queries (17)


Description

Intent: - Use MTP capability to look for insider threat potential risk indicators - Indicators would then serve as the building block for insider threat risk modeling in subsequent tools Definition of Insider Threat: "The potential for an individual who has or had authorized access to an organization's assets to use their access, either maliciously or unintentionally, to act in a way that could negatively affect the organization." This collection of queries describes the different indicators that could be used to model and look for patterns suggesting an increased risk of an individual becoming a potential insider threat. Note: no single indicator should be used as a lone determinant of insider threat activity, but should be part of an overall program to understand the increased risk to your organization's critical assets. This in turn is used to feed an investigation by a formal insider threat program to look at the context associated with the whole person to understand the implication of a set of indicators.

Query · kql

// --------------------------------------------------------------------------------------------------------------------------- //
//
//Service Account Use
//
let ServiceAccountPrefix = pack_array(       // Declare Account Prefix to identify Service Accounts
    '_',
    'svc',
    'service'
);
let InteractiveTypes = pack_array(           // Declare Interactive logon type names
    'Interactive',
    'CachedInteractive',
    'Unlock',
    'RemoteInteractive',
    'CachedRemoteInteractive',
    'CachedUnlock'
);
let WhitelistedAccounts = pack_array(
      'WhitelistAccount1',
      'WhitelistAccount2'
);                                              // List of accounts that match criteria but are able to logon interactively
DeviceLogonEvents                               // Get all logon events...
| where AccountName !in~ (WhitelistedAccounts)  // ...where it is not a whitelisted account...
| where ActionType == "LogonSuccess"            // ...and the logon was successful...
| where AccountName !contains "$"               // ...and not a machine logon. . .
| where AccountName startswith ServiceAccountPrefix                // ...and not a machine logon. . .
| where LogonType in (InteractiveTypes)         // Determine if the logon is interactive (True=1,False=0)...
Raw source insider-threat-detection-queries (17) · KQL
Esc
Published by Azure/Azure-Sentinel ↗, licensed under MIT ↗. Reproduced here unmodified.
id: b2ef671b-57c1-4660-9247-9e88e5e0a16d
name: insider-threat-detection-queries (17)
description: |
  Intent:
  - Use MTP capability to look for insider threat potential risk indicators
  - Indicators would then serve as the building block for insider threat risk modeling in subsequent tools
  Definition of Insider Threat:
  "The potential for an individual who has or had authorized access to an organization's assets to use their access, either maliciously or unintentionally, to act in a way that could negatively affect the organization."
  This collection of queries describes the different indicators that could be used to model and look for patterns suggesting an increased risk of an individual becoming a potential insider threat.
  Note: no single indicator should be used as a lone determinant of insider threat activity, but should be part of an overall program to understand the increased risk to your organization's critical assets. This in turn is used to feed an investigation by a formal insider threat program to look at the context associated with the whole person to understand the implication of a set of indicators.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceLogonEvents
tactics:
- Initial access
- Persistence
- Exfiltration
query: |
  // --------------------------------------------------------------------------------------------------------------------------- //
  //
  //Service Account Use
  //
  let ServiceAccountPrefix = pack_array(       // Declare Account Prefix to identify Service Accounts
      '_',
      'svc',
      'service'
  );
  let InteractiveTypes = pack_array(           // Declare Interactive logon type names
      'Interactive',
      'CachedInteractive',
      'Unlock',
      'RemoteInteractive',
      'CachedRemoteInteractive',
      'CachedUnlock'
  );
  let WhitelistedAccounts = pack_array(
        'WhitelistAccount1',
        'WhitelistAccount2'
  );                                              // List of accounts that match criteria but are able to logon interactively
  DeviceLogonEvents                               // Get all logon events...
  | where AccountName !in~ (WhitelistedAccounts)  // ...where it is not a whitelisted account...
  | where ActionType == "LogonSuccess"            // ...and the logon was successful...
  | where AccountName !contains "$"               // ...and not a machine logon. . .
  | where AccountName startswith ServiceAccountPrefix                // ...and not a machine logon. . .
  | where LogonType in (InteractiveTypes)         // Determine if the logon is interactive (True=1,False=0)...

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.