New Windows Task Scheduler Vulnerabilities Expose UAC Bypass & Log Tampering Risks

Listen to this Post

A recent discovery by Cymulate security researcher Ruben E. has revealed four critical flaws in Windows Task Scheduler (schtasks.exe) that allow:
– Local Privilege Escalation
– UAC Bypass
– Audit Log Manipulation

Attackers can exploit these flaws using Batch Logon with compromised credentials (e.g., cracked NTLMv2 hashes) to:
– Elevate privileges
– Impersonate Admins & Backup Operators
– Manipulate SYSTEM-level operations via `schtasks`
– Overwrite Windows Security Event Logs (erasing forensic evidence)

One technique involves inserting an XML task author field with 3,500+ characters, causing log overflow and evasion.

You Should Know:

Exploitation Techniques & Mitigations

1. Privilege Escalation via Task Scheduler

schtasks /create /tn "MaliciousTask" /tr "C:\malware.exe" /sc ONLOGON /ru "SYSTEM" /f

– Creates a task running as SYSTEM upon logon.

2. UAC Bypass via Silent Task Execution

schtasks /run /tn "UpdateChecker" /i  Bypasses UAC if task is misconfigured 

3. Log Tampering via XML Overflow

<Author>AAAAAAAA...[3500+ chars]...</Author>  Triggers log corruption 

4. Detecting Malicious Tasks

Get-ScheduledTask | Where-Object { $_.Author -like "hacker" } | Remove-ScheduledTask 

5. Disabling Task Scheduler (If Not Needed)

sc config Schedule start= disabled 
net stop Schedule 

6. Monitoring Suspicious Activity

Get-WinEvent -LogName "Microsoft-Windows-TaskScheduler/Operational" -MaxEvents 100 | Where-Object { $_.Id -eq 129 } 

7. Patching & Hardening

  • Apply Windows Update KB5034441 (if available).
  • Restrict schtasks.exe via AppLocker:
    <RuleCollection Type="Exe"> 
    <FilePathRule Action="Deny" Description="Block schtasks" Name="BlockSchtasks" FilePath="C:\Windows\System32\schtasks.exe" /> 
    </RuleCollection> 
    

What Undercode Say:

Windows Task Scheduler, a core component, is now a double-edged sword. Attackers abuse it for stealthy persistence, while defenders must:
– Audit scheduled tasks (schtasks /query /v)
– Monitor event logs (Event ID 4698 for task creation)
– Enforce least privilege (deny non-admins task creation)
– Use Sysmon for deep task tracking:

<EventFiltering> 
<RuleGroup name="TaskScheduler Monitor"> 
<ScheduledTaskCreate onmatch="include" /> 
</RuleGroup> 
</EventFiltering> 

Expected Output:

A hardened Windows environment where:

  • Unnecessary tasks are disabled
  • Logs are protected from overflow attacks
  • Privilege escalation paths via `schtasks` are closed

Stay updated with CVE-2024-XXXXX (if assigned) and apply patches immediately.

References:

Reported By: Rudra Kumar – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image