<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Scheduled_task — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/scheduled_task/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/scheduled_task/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious Image Load (taskschd.dll) from MS Office</title><link>https://feed.craftedsignal.io/briefs/2024-01-suspicious-image-load-office/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-suspicious-image-load-office/</guid><description>Detection of taskschd.dll image loads from Microsoft Office applications indicates potential COM-based scheduled task creation for persistence, bypassing traditional schtasks.exe usage.</description><content:encoded><![CDATA[<p>This detection rule identifies a suspicious image load (<code>taskschd.dll</code>) originating from Microsoft Office applications (WINWORD.EXE, EXCEL.EXE, POWERPNT.EXE, MSPUB.EXE, MSACCESS.EXE). The behavior suggests potential adversarial activity involving the creation of scheduled tasks through the Windows Component Object Model (COM). Attackers may exploit this technique to establish persistence, circumventing traditional monitoring focused on the <code>schtasks.exe</code> utility. The use of COM for scheduled task management allows for stealthier operation and evasion of standard security controls, making it a valuable persistence mechanism for malicious actors. The rule is designed for data generated by Elastic Defend, Sysmon, and other endpoint detection platforms.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>User opens a malicious Microsoft Office document (e.g., Word, Excel).</li>
<li>The document executes embedded macro code or exploits a vulnerability.</li>
<li>The macro or exploit leverages the Component Object Model (COM).</li>
<li>The Office application (e.g., WINWORD.EXE) loads the <code>taskschd.dll</code> library, providing access to the Task Scheduler service.</li>
<li>The COM interface is used to programmatically create a new scheduled task.</li>
<li>The scheduled task is configured to execute a malicious payload at a later time or on a recurring basis.</li>
<li>The malicious payload could be a script, executable, or command-line instruction.</li>
<li>Upon execution, the payload achieves the attacker&rsquo;s objective, such as establishing persistence, downloading additional malware, or compromising the system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>A successful attack leveraging this technique can allow adversaries to maintain persistent access to a compromised system. This can lead to long-term data exfiltration, lateral movement within the network, and deployment of ransomware. The low severity score assigned to the original rule may underestimate the potential impact, as persistence is a critical component of many advanced attacks. Affected systems may require extensive remediation to remove all traces of the malicious activity.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Office Application Loading Task Scheduler DLL&rdquo; to your SIEM and tune for your environment to detect this specific activity.</li>
<li>Enable Sysmon Event ID 7 (Image Loaded) logging on Windows endpoints to provide visibility into DLL loading events, which is a prerequisite for the Sigma rule.</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on the specific scheduled tasks that are created and the payloads they execute.</li>
<li>Monitor for scheduled task creation events (Event ID 4698) and deletion events (Event ID 4699) in the Windows Event Logs, as referenced in the rule&rsquo;s investigation guide.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>persistence</category><category>execution</category><category>windows</category><category>image_load</category><category>scheduled_task</category></item><item><title>Suspicious Local Scheduled Task Creation</title><link>https://feed.craftedsignal.io/briefs/2024-01-local-scheduled-task-creation/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-local-scheduled-task-creation/</guid><description>This rule detects the creation of scheduled tasks on Windows systems by non-system accounts, a common technique used by adversaries for persistence, lateral movement, and privilege escalation.</description><content:encoded><![CDATA[<p>Adversaries frequently abuse scheduled tasks in Windows to maintain persistence, move laterally within a network, or escalate privileges. This involves creating or modifying scheduled tasks to execute malicious commands or scripts at specific times or intervals. This detection rule focuses on identifying the creation of scheduled tasks by non-system accounts, which is often indicative of malicious activity. The rule specifically monitors for the execution of <code>schtasks.exe</code> with specific arguments related to task creation. It is designed to trigger when scheduled tasks are created by non-system level users, helping to filter out legitimate administrative activities. This is crucial for defenders because scheduled tasks provide a reliable and stealthy mechanism for attackers to maintain control over compromised systems.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a Windows system through various means.</li>
<li>The attacker executes a command shell (e.g., cmd.exe, PowerShell) or script interpreter (e.g., wscript.exe) on the compromised system.</li>
<li>The attacker uses <code>schtasks.exe</code> with the <code>/create</code> parameter to create a new scheduled task.</li>
<li>The <code>/TN</code> parameter is used to specify the name of the task, and the <code>/TR</code> parameter defines the program or script to execute.</li>
<li>The <code>/SC</code> parameter sets the schedule for the task (e.g., daily, hourly, onlogon), and <code>/RU</code> specifies the user account under which the task will run.</li>
<li>The attacker configures the task to run with elevated privileges or under a non-system account to bypass security controls.</li>
<li>The scheduled task executes the attacker&rsquo;s payload at the specified time or event, achieving persistence.</li>
<li>The payload may perform various malicious actions, such as installing malware, exfiltrating data, or establishing a command and control channel.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to persistent access to the compromised system, allowing attackers to maintain control even after reboots or user logoffs. Attackers can leverage scheduled tasks to escalate privileges, potentially gaining access to sensitive data or critical system resources. The creation of unauthorized scheduled tasks can also be used to move laterally within the network, compromising additional systems and expanding the scope of the attack.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Sysmon process creation logging with Event ID 1 to capture command-line arguments and process details (reference: Sysmon setup in rule setup).</li>
<li>Deploy the Sigma rule &ldquo;Scheduled Task Creation by Non-System Account&rdquo; to your SIEM to detect suspicious schtasks.exe activity.</li>
<li>Review and whitelist legitimate scheduled task creation activities in your environment to reduce false positives (reference: False positive analysis).</li>
<li>Monitor process activity for processes such as cmd.exe, powershell.exe, wscript.exe creating scheduled tasks (reference: query).</li>
<li>Investigate any scheduled tasks created by non-system accounts that do not have a clear business justification (reference: Investigation Guide).</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>persistence</category><category>windows</category><category>scheduled_task</category><category>attack.persistence</category></item><item><title>Detecting Suspicious Scheduled Task Creation in Windows</title><link>https://feed.craftedsignal.io/briefs/2024-01-scheduled-task-creation/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-scheduled-task-creation/</guid><description>This rule detects the creation of scheduled tasks in Windows using event logs, which adversaries may use for persistence, lateral movement, or privilege escalation by creating malicious tasks.</description><content:encoded><![CDATA[<p>Adversaries frequently abuse Windows scheduled tasks to establish persistence, move laterally within a network, and escalate privileges. This technique involves creating or modifying scheduled tasks to execute malicious code at specific times or in response to certain events. This detection rule identifies suspicious task creation by filtering out benign tasks and those initiated by system accounts, focusing on potential threats. The rule relies on Windows Security Event Logs, offering a valuable method for identifying unauthorized task creation indicative of malicious activity. The detection logic specifically excludes common tasks associated with software updates from vendors like Hewlett-Packard, Microsoft, Google, and Mozilla, as well as tasks run by system accounts.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a system, potentially through phishing or exploiting a vulnerability.</li>
<li>The attacker uses their initial access to execute commands, potentially leveraging PowerShell or cmd.exe.</li>
<li>The attacker uses the <code>schtasks</code> command-line utility or the COM interface to create a new scheduled task.</li>
<li>The scheduled task is configured to execute a malicious payload, such as a reverse shell or a data exfiltration script.</li>
<li>The task is set to trigger based on a specific schedule, such as at system startup, at a specific time, or upon a specific event.</li>
<li>When the trigger occurs, the scheduled task executes the malicious payload.</li>
<li>The malicious payload establishes persistence, allowing the attacker to maintain access to the compromised system.</li>
<li>The attacker can then use the persistent access to move laterally to other systems or to exfiltrate sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows adversaries to maintain persistent access to compromised systems, potentially leading to data theft, system disruption, or further lateral movement within the network. By creating malicious scheduled tasks, attackers can ensure their code is executed even after a system reboot or user logoff. This can result in long-term compromise and significant damage to affected organizations. While the number of victims and specific sectors targeted are not detailed, the potential impact is broad due to the widespread use of Windows systems in enterprise environments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Windows Security Event Logging and ensure that event ID 4698 (A scheduled task was created) is collected.</li>
<li>Deploy the Sigma rule &ldquo;Suspicious Scheduled Task Creation via Winlog&rdquo; to your SIEM to detect potentially malicious scheduled task creation events.</li>
<li>Regularly review and update the exclusion list in the Sigma rule to account for new benign scheduled tasks in your environment.</li>
<li>Investigate any alerts generated by the Sigma rule by examining the task&rsquo;s name, path, actions, and triggers to determine if they are suspicious.</li>
<li>Monitor for related suspicious activity, such as unusual process executions or network connections originating from the compromised system.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>persistence</category><category>scheduled_task</category><category>windows</category></item></channel></rss>