top of page

Part 3 -(Persistence) Windows Persistence: A Deep Dive into Scheduled Tasks


In the intricate realm of Windows systems, achieving persistence is a paramount goal for adversaries seeking to maintain a foothold.


Scheduled tasks, with a history dating back to the infamous "at.exe" command, stand as a versatile and granular method for achieving persistence. This blog post will delve into the nuances of scheduled tasks, exploring their evolution, functionalities, and the security implications they pose.


The Legacy of "at.exe":

Originally a core component in the hacker's arsenal, the "at.exe" command was notorious for its role in privilege escalation attacks, particularly in Windows XP. Even after patches addressed this vulnerability, adversaries continue to leverage "at.exe" and its successor, "schtasks.exe," in Windows 7 environments. The familiarity and simplicity of usage contribute to its persistent presence in malicious activities.


Understanding ".job" Files:

When a task is scheduled using "at.exe" or "schtasks.exe," corresponding ".job" files are generated. These files reside in the \Windows\Tasks and \Windows\System32\Tasks folders, with the latter introduced in Windows 7. The sequential naming convention, starting with "at1.job," stores essential details about the scheduled task. In Windows XP, task information is also logged in C:\Windows\Schedlgu.txt.


Syntax Example:


  1. Using "at.exe":

  2. Using "schtasks.exe":



Advanced Features of "schtasks.exe":

"schtasks.exe" presents an upgraded version of its predecessor, offering an extensive range of features. Tasks can be configured based on specific events, such as user logons, providing a more sophisticated approach to persistence beyond simple time-based scheduling. The introduction of the "Task Scheduler Operational" event log in Windows Vista enhances visibility

into scheduled tasks.


Remote Task Execution:

Both "at.exe" and "schtasks.exe" support the scheduling of tasks on remote systems. This capability introduces intriguing possibilities for attackers, allowing them to propagate malware, execute scripts, and conduct routine actions like credential dumping across multiple systems.


Forensic Artifacts and Detection:

Forensic artifacts related to remote tasks are primarily found on the systems where the tasks were executed, not on the originating system. The Autoruns tool from Sysinternals proves valuable for collecting information on currently scheduled jobs from the task scheduler service.


Akash Patel


49 views0 comments

Komentar


bottom of page