Detection rules › Kusto Query Language

Bitsadmin Activity

Source
upstream

Background Intelligent Transfer Service (BITS) is a way to reliably download files from webservers or SMB servers. This service is commonly used for legitimate purposes, but can also be used as part of a malware downloader. Additionally, bitsadmin can be used to upload files and therefore can be used for data exfiltration. This query will identify use of bitsadmin.exe for either purpose and will identify directionality file transfer directionality.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1197 BITS Jobs
Defense EvasionT1197 BITS Jobs
Command & ControlT1105 Ingress Tool Transfer
ExfiltrationT1048 Exfiltration Over Alternative Protocol

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.
Defender-DeviceProcessEvents9001000Process activity (any)

Stages and Predicates

Stage 1: source

DeviceProcessEvents

Stage 2: where

and
  or
    FileName eq "bitsadmin.exe"
     macro "(column_ifexists('ProcessVersionInfoOriginalFileName', 'ColumnNotAvailable') =~ 'bitsadmin.exe')"
  ProcessCommandLine match ["/Transfer", "/AddFile", "/AddFileSet", "/AddFileWithRanges"]

Stage 3: extend

Stage 4: extend

Stage 5: project-reorder

Stage 6: extend

Stage 7: extend

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
FileNameeq
  • bitsadmin.exe
ProcessCommandLinematch
  • /AddFile
  • /AddFileSet
  • /AddFileWithRanges
  • /Transfer