Windows Scheduled Task Creation via schtasks.exe Using sshd/ssh.exe for Tunnel Setup
Alerts when schtasks.exe creates scheduled tasks that invoke sshd.exe or ssh.exe with tunnel-related arguments.
FreeUnreviewedSigmahighv1
windows-scheduled-task-creation-via-schtasks-exe-using-sshd-ssh-exe-for-tunnel-s-2daa93a0
title: Windows Scheduled Task Creation via schtasks.exe Using sshd/ssh.exe for Tunnel Setup
id: e2e7edc9-ec88-479a-850f-90ca56506675
status: experimental
description: This rule flags process executions of schtasks.exe where the command line includes a scheduled task creation (/create) that references sshd.exe with -f or ssh.exe with -i. Such behavior can indicate an attacker setting up persistent access by periodically launching an SSH-based tunnel or service. The detection relies on Windows process creation telemetry capturing the Image/OriginalFileName and full command line arguments used to create the task.
references:
- https://thedfirreport.com/2023/10/30/netsupport-intrusion-results-in-domain-compromise/
- https://www.kroll.com/en/insights/publications/cyber/cactus-ransomware-prickly-new-variant-evades-detection
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_schtasks_openssh_tunnelling.yml
author: Rory Duncan, Huntrule Team
date: 2025-07-14
tags:
- attack.privilege-escalation
- attack.persistence
- attack.execution
- attack.t1053.005
- attack.command-and-control
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: \schtasks.exe
- OriginalFileName: schtasks.exe
selection_cli_sshd:
CommandLine|contains|all:
- " /create "
- sshd.exe
- -f
selection_cli_ssh:
CommandLine|contains|all:
- " /create "
- ssh.exe
- -i
condition: selection_img and 1 of selection_cli_*
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: 2daa93a0-a5fb-41c5-8cd8-3c11294bfd1f
type: derived
What it detects
This rule flags process executions of schtasks.exe where the command line includes a scheduled task creation (/create) that references sshd.exe with -f or ssh.exe with -i. Such behavior can indicate an attacker setting up persistent access by periodically launching an SSH-based tunnel or service. The detection relies on Windows process creation telemetry capturing the Image/OriginalFileName and full command line arguments used to create the task.
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.