Check out the results from our first round of ATT&CK Evaluations at attackevals.mitre.org!

BITS Jobs

Windows Background Intelligent Transfer Service (BITS) is a low-bandwidth, asynchronous file transfer mechanism exposed through Component Object Model (COM). [1] [2] BITS is commonly used by updaters, messengers, and other applications preferred to operate in the background (using available idle bandwidth) without interrupting other networked applications. File transfer tasks are implemented as BITS jobs, which contain a queue of one or more file operations.

The interface to create and manage BITS jobs is accessible through PowerShell [2] and the BITSAdmin tool. [2]Admin

Adversaries may abuse BITS to download, execute, and even clean up after running malicious code. BITS tasks are self-contained in the BITS job database, without new files or registry modifications, and often permitted by host firewalls. [3] [4] [5] BITS enabled execution may also allow Persistence by creating long-standing jobs (the default maximum lifetime is 90 days and extendable) or invoking an arbitrary program when a job completes or errors (including after system reboots). [6] [3]

BITS upload functionalities can also be used to perform Exfiltration Over Alternative Protocol. [3]

ID: T1197

Tactic: Defense Evasion, Persistence

Platform:  Windows

Permissions Required:  User, Administrator, SYSTEM

Data Sources:  API monitoring, Packet capture, Windows event logs

Defense Bypassed:  Firewall, Host forensic analysis

Contributors:  Ricardo Dias, Red Canary

Version: 1.0

Examples

NameDescription
Cobalt Strike

Cobalt Strike can download a hosted "beacon" payload using BITSAdmin.[7]

JPIN

A JPIN variant downloads the backdoor payload via the BITS service.[8]

Leviathan

Leviathan has used bitsadmin.exe to download additional tools.[9]

Mitigation

This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, disabling all BITS functionality will likely have unintended side effects, such as preventing legitimate software patching and updating. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identification of subsequent malicious behavior. [4]

Modify network and/or host firewall rules, as well as other network controls, to only allow legitimate BITS traffic.

Consider limiting access to the BITS interface to specific users or groups. [5]

Consider reducing the default BITS job lifetime in Group Policy or by editing the JobInactivityTimeout and MaxDownloadTime Registry values in HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\BITS. [2]

Detection

BITS runs as a service and its status can be checked with the Sc query utility (sc query bits). [10] Active BITS tasks can be enumerated using the BITSAdmin tool (bitsadmin /list /allusers /verbose). [2]

Monitor usage of the BITSAdmin tool (especially the ‘Transfer’, 'Create', 'AddFile', 'SetNotifyFlags', 'SetNotifyCmdLine', 'SetMinRetryDelay', 'SetCustomHeaders', and 'Resume' command options) [2]Admin and the Windows Event log for BITS activity. Also consider investigating more detailed information about jobs by parsing the BITS job database. [3]

Monitor and analyze network activity generated by BITS. BITS jobs use HTTP(S) and SMB for remote connections and are tethered to the creating user and will only function when that user is logged on (this rule applies even if a user attaches the job to a service account). [2]

References