Monitoring For Persistence Via BITS

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.

Sigma rule (View on GitHub)

 1title: Monitoring For Persistence Via BITS
 2id: b9cbbc17-d00d-4e3d-a827-b06d03d2380d
 3status: test
 4description: |
 5    BITS will allow you to schedule a command to execute after a successful download to notify you that the job is finished.
 6    When the job runs on the system the command specified in the BITS job will be executed.
 7    This can be abused by actors to create a backdoor within the system and for persistence.
 8    It will be chained in a BITS job to schedule the download of malware/additional binaries and execute the program after being downloaded.    
 9references:
10    - https://www.fireeye.com/blog/threat-research/2020/10/kegtap-and-singlemalt-with-a-ransomware-chaser.html
11    - http://0xthem.blogspot.com/2014/03/t-emporal-persistence-with-and-schtasks.html
12    - https://isc.sans.edu/diary/Wipe+the+drive+Stealthy+Malware+Persistence+Mechanism+-+Part+1/15394
13author: Sreeman
14date: 2020-10-29
15modified: 2024-01-25
16tags:
17    - attack.defense-evasion
18    - attack.t1197
19logsource:
20    product: windows
21    category: process_creation
22detection:
23    selection_img:
24        - Image|endswith: '\bitsadmin.exe'
25        - OriginalFileName: 'bitsadmin.exe'
26    selection_cli_notify_1:
27        CommandLine|contains: '/SetNotifyCmdLine'
28    selection_cli_notify_2:
29        CommandLine|contains:
30            - '%COMSPEC%'
31            - 'cmd.exe'
32            - 'regsvr32.exe'
33    selection_cli_add_1:
34        CommandLine|contains: '/Addfile'
35    selection_cli_add_2:
36        CommandLine|contains:
37            - 'http:'
38            - 'https:'
39            - 'ftp:'
40            - 'ftps:'
41    condition: selection_img and (all of selection_cli_notify_* or all of selection_cli_add_*)
42falsepositives:
43    - Unknown
44level: medium

References

Related rules

to-top