Identifying Split or Part Archive File Transfers
Detecting split or part archive files in a dataset can be useful for identifying potential data exfiltration or malicious activity. The following is a KQL query that works with the DeviceFileEvents table in Microsoft Sentinel to discover split or part archive files based on naming patterns:
Explanation:
Patterns for Split/Part Files:
SplitArchivePatterns
: Defines patterns that identify split or part archive files, such as.part1
,.zip.001
,.rar.002
,.z.003
, etc.Uses
matches regex
andhas_any
for flexible pattern matching.
File Extension Extraction:
Extracts the file extension from the
FileName
field usingsplit()
and converts it to lowercase for case-insensitive comparison.
Filters:
Filters the
FileName
field to match naming conventions for split or part archive files usingmatches regex
or the predefined pattern list.
Aggregation:
Summarises:
TotalFiles
: Number of files matching the pattern.UniqueDevices
: Number of unique devices involved.UniqueUsers
: Number of distinct users associated with the files.FileSizeSum
: Sum of file sizes for the detected files.
Time Binning:
Group results into 1-hour intervals using
bin(Timestamp, 1h)
for temporal analysis.
Results:
Displays key fields such as
Timestamp
,FileName
,FilePath
,FileExtension
,TotalFiles
,UniqueDevices
,UniqueUsers
, andFileSizeSum
.
Customisation:
Patterns:
Add or modify patterns in
SplitArchivePatterns
to align with your organisation's requirements.
Time Filtering:
Add a specific time range filter, e.g.,
| where Timestamp between (startTime .. endTime)
.
Additional Fields:
Include fields like
UserPrincipalName
,SourceIP
, orDestinationIP
for more context.
This query can help detect potentially suspicious activity related to split or part archive files in your environment.
Last updated