T1197 Sumo Logic CSE · Sumo

Detect BITS Jobs in Sumo Logic CSE

Adversaries may abuse Windows Background Intelligent Transfer Service (BITS) jobs to persistently execute code and perform background tasks such as downloading malicious payloads, executing arbitrary programs on job completion or error, and cleaning up artifacts. BITS is a COM-based file transfer mechanism built into Windows, commonly used by Windows Update and software installers. Adversaries exploit it via bitsadmin.exe or PowerShell BITS cmdlets to download tools from external infrastructure, achieve persistence using /SetNotifyCmdLine to invoke arbitrary executables when a job completes or errors (including after reboots), and exfiltrate data. BITS jobs are stored in a binary database (%ALLUSERSPROFILE%\Microsoft\Network\Downloader\) rather than in registry or filesystem, making them resistant to many persistence-focused detections. Active threat groups including APT39, APT41, Leviathan, Patchwork, and Wizard Spider have leveraged BITS for payload delivery and persistence.

MITRE ATT&CK

Tactic
Defense Evasion Persistence
Technique
T1197 BITS Jobs
Canonical reference
https://attack.mitre.org/techniques/T1197/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=windows* ("bitsadmin.exe" OR "powershell.exe" OR "pwsh.exe")
| parse regex field=_raw "(?i)(?:Image|NewProcessName)[=:]\s*(?P<image>[^\s"]+)" nodrop
| parse regex field=_raw "(?i)(?:CommandLine|ProcessCommandLine|Command)[=:]\s*(?P<command_line>.+?)(?:\n|\r|$)" nodrop
| parse regex field=_raw "(?i)(?:ParentImage|ParentProcessName)[=:]\s*(?P<parent_image>[^\s"]+)" nodrop
| parse regex field=_raw "(?i)(?:User|AccountName)[=:]\s*(?P<username>[^\s"]+)" nodrop
| where image matches "*bitsadmin.exe" or image matches "*powershell.exe" or image matches "*pwsh.exe"
| eval is_bitsadmin = if(matches(image, ".*bitsadmin\.exe$"), 1, 0)
| eval is_powershell = if(matches(image, ".*(powershell|pwsh)\.exe$"), 1, 0)
| eval has_notify = if(matches(toLowerCase(command_line), "(/setnotifycmdline|/setnotifyflags)"), 1, 0)
| eval has_transfer = if(matches(toLowerCase(command_line), "(/transfer|/addfile|start-bitstransfer|new-bitstransfer|add-bitsfile)"), 1, 0)
| eval has_reset = if(matches(toLowerCase(command_line), "/reset"), 1, 0)
| eval suspicious_dest = if(matches(toLowerCase(command_line), "(\\\\appdata\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\|\\\\windows\\\\temp\\\\|c:\\\\temp\\\\)"), 1, 0)
| eval suspicious_ext = if(matches(toLowerCase(command_line), "\.(exe|dll|ps1|bat|cmd|vbs|js|hta)(\s|$|'|\")"), 1, 0)
| eval external_download = if(matches(command_line, "https?://") and !matches(command_line, "(microsoft\.com|windowsupdate\.com|windows\.com)"), 1, 0)
| eval suspicion_score = has_notify + has_transfer + suspicious_dest + suspicious_ext + external_download
| where suspicion_score >= 1
| fields _messageTime, _sourceHost, username, image, command_line, parent_image, has_notify, has_transfer, has_reset, suspicious_dest, suspicious_ext, external_download, suspicion_score
| sort by suspicion_score desc, _messageTime desc
high severity high confidence

Detects BITS job abuse in Sumo Logic by parsing Windows process creation events for bitsadmin.exe or PowerShell invocations that use BITS cmdlets, download from non-Microsoft URLs, or write to suspicious staging directories. A composite suspicion score is calculated across five indicators; any event scoring >= 1 is surfaced.

Data Sources

Sumo Logic Cloud SIEMWindows Event Logs via Sumo Logic Installed CollectorSysmon for Windows via Sumo Logic

Required Tables

windows* _sourceCategory (Security, Sysmon, System event logs)

False Positives & Tuning

  • Windows Update background transfers matching bitsadmin patterns — the external domain exclusion for microsoft.com/windowsupdate.com/windows.com reduces this but verify the full URL in command_line
  • Third-party backup or sync agents that invoke PowerShell Start-BitsTransfer to write to AppData or ProgramData directories as part of normal operations — validate against known software inventory
  • Red team simulations or penetration testing activities using BITS as a documented test case — cross-reference with authorized testing windows and source hostnames
Download portable Sigma rule (.yml)

Other platforms for T1197


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1BITSAdmin Download from External URL

    Expected signal: Sysmon Event ID 1: Process Create with Image=bitsadmin.exe, CommandLine containing '/transfer' and 'http://127.0.0.1:8080/test.exe' and '%TEMP%\df00tech-test.exe'. Microsoft-Windows-Bits-Client EventID 3 (job created with name 'df00tech-test'). EventID 60 (job error, since no HTTP server is listening at 127.0.0.1:8080 — but job creation telemetry still fires). Security Event ID 4688 (if command line auditing enabled).

  2. Test 2BITS Persistence via SetNotifyCmdLine

    Expected signal: Sysmon Event ID 1: Four separate bitsadmin.exe Process Create events — for /create, /addfile, /SetNotifyCmdLine (CommandLine contains 'cmd.exe /c calc.exe'), and /SetNotifyFlags. Microsoft-Windows-Bits-Client EventID 3 (job creation). If the job errors (no HTTP server), the notify command fires: Sysmon EventID 1 for cmd.exe spawned by svchost.exe (BITS service) with ParentCommandLine containing BITS service context.

  3. Test 3PowerShell Start-BitsTransfer to Suspicious Location

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Start-BitsTransfer' and '$env:APPDATA' and 'payload.exe'. Microsoft-Windows-Bits-Client EventID 3 (job created programmatically). PowerShell ScriptBlock Log EventID 4104 with full Start-BitsTransfer cmdlet parameters. Sysmon EventID 3: Network connection attempt from svchost.exe (BITS service) to 127.0.0.1:8080.

  4. Test 4BITSAdmin Upload for Exfiltration Simulation

    Expected signal: Sysmon Event ID 1: bitsadmin.exe Process Create with '/upload' in CommandLine. Microsoft-Windows-Bits-Client EventID 3 (job created with upload type). Sysmon EventID 3: Outbound network connection from svchost.exe to 127.0.0.1:8080. EventID 60 (job error, connection refused) with upload direction noted in event data.

Unlock Pro Content

Get the full detection package for T1197 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections