Users with administrative privileges accessing sensitive data outside of normal business hours may indicate potential insider threats, as such behavior could signal data exfiltration or unauthorized access. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate insider risks before they lead to data breaches or compliance violations.
KQL Query
// --------------------------------------------------------------------------------------------------------------------------- //
//
//Use of Suspicious Executable
//
// Replace and extend with any desired .exes
let SuspiciousEXEs = pack_array ("dnscat2.exe", "dnscat.exe");
DeviceProcessEvents
| where ProcessCommandLine has_any (SuspiciousEXEs) or FileName has_any (SuspiciousEXEs)
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessParentFileName, ProcessCommandLine, InitiatingProcessCommandLine
id: daa0abc7-08e6-45d4-86c3-5fd54aab0837
name: insider-threat-detection-queries (13)
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:
- DeviceProcessEvents
tactics:
- Initial access
- Persistence
- Exfiltration
query: |
// --------------------------------------------------------------------------------------------------------------------------- //
//
//Use of Suspicious Executable
//
// Replace and extend with any desired .exes
let SuspiciousEXEs = pack_array ("dnscat2.exe", "dnscat.exe");
DeviceProcessEvents
| where ProcessCommandLine has_any (SuspiciousEXEs) or FileName has_any (SuspiciousEXEs)
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessParentFileName, ProcessCommandLine, InitiatingProcessCommandLine
| Sentinel Table | Notes |
|---|---|
DeviceProcessEvents | Ensure this data connector is enabled |
Scenario: System Maintenance Task Using MTP
Description: A system administrator is performing routine maintenance using a tool like PowerShell or Task Scheduler to move files between servers, which triggers the MTP detection.
Filter/Exclusion: Exclude events where the source and destination are known internal systems used for maintenance, e.g., EventID=4663 with SubjectUserName matching admin accounts and DestinationObject in a predefined maintenance folder.
Scenario: Scheduled Backup Job Using MTP
Description: A scheduled backup job (e.g., using Veeam, Commvault, or Dell EMC Data Domain) is transferring data between storage systems, which is flagged as MTP.
Filter/Exclusion: Exclude events where the source and destination are known backup systems, e.g., EventID=4663 with DestinationObject matching backup server names or paths.
Scenario: Admin Task Using MTP for Data Migration
Description: An admin is using a tool like rsync, RoboCopy, or Azure Data Factory to migrate data between servers, which is flagged as MTP.
Filter/Exclusion: Exclude events where the user is a privileged admin and the source/destination are within the same organizational domain or data migration network segment.
Scenario: User-Initiated File Transfer via MTP
Description: A user is transferring files between internal systems using a tool like scp, smbclient, or FTP for legitimate collaboration, which triggers the MTP rule.
Filter/Exclusion: Exclude events where the user is part of a collaboration group, and the transfer is between known internal systems, e.g., EventID=4663 with SubjectUserName in a collaboration group and DestinationObject in