Detection rules › Sigma

Monitoring For Persistence Via BITS

Severity
medium
Author
Sreeman
Source
upstream

BITS will allow you to schedule a command to execute after a successful download to notify you that the job is finished. When the job runs on the system the command specified in the BITS job will be executed. This can be abused by actors to create a backdoor within the system and for persistence. It will be chained in a BITS job to schedule the download of malware/additional binaries and execute the program after being downloaded.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1197 BITS Jobs
Defense EvasionT1197 BITS Jobs

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: selection_img

or:
Image|endswith: '\bitsadmin.exe'
OriginalFileName: bitsadmin.exe

Stage 2: all of selection_cli_notify_1

CommandLine|contains: '/SetNotifyCmdLine'

Stage 3: all of selection_cli_notify_2

or:
CommandLine|contains: '%COMSPEC%'
CommandLine|contains: cmd.exe
CommandLine|contains: regsvr32.exe

Stage 4: all of selection_cli_add_1

CommandLine|contains: '/Addfile'

Stage 5: all of selection_cli_add_2

or:
CommandLine|contains: 'ftp:'
CommandLine|contains: 'ftps:'
CommandLine|contains: 'http:'
CommandLine|contains: 'https:'

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
CommandLinematch
  • %COMSPEC% corpus 2 (sigma 2)
  • /Addfile
  • /SetNotifyCmdLine
  • cmd.exe corpus 2 (sigma 2)
  • ftp:
  • ftps:
  • http:
  • https:
  • regsvr32.exe corpus 2 (sigma 2)
Imageends_with
  • \bitsadmin.exe corpus 23 (sigma 23)
OriginalFileNameeq
  • bitsadmin.exe corpus 9 (sigma 9)