LoFP LoFP / portable applications, installers and updaters executed from a user's downloads or desktop folder may legitimately use taskkill.exe to close a running instance of themselves or another application. filter as needed based on the parent process name or path.

Techniques

Sample rules

Windows User Profile Binary Terminating Process Via Taskkill

Description

The following analytic detects taskkill.exe being launched with a process ID (/pid) argument by an executable that resides directly within a user profile folder, such as the Downloads or Desktop folder. Filtering for parent processes located two to three directory levels deep under root folder. This activity is significant because browser hijackers and adware droppers executed from the Downloads folder forcefully terminate the running browser by PID so that they can modify its profile and relaunch it with their own settings. If confirmed malicious, this could allow an attacker to tamper with browser preference files, side-load extensions and redirect the victim’s browsing traffic.

Detection logic


| tstats `security_content_summariesonly`
  count min(_time) as firstTime
        max(_time) as lastTime

from datamodel=Endpoint.Processes where

(
    Processes.process_name=taskkill.exe
    OR
    Processes.original_file_name=taskkill.exe
)
Processes.process IN ("* /pid *", "* -pid *")
Processes.parent_process_path="*:\\Users\\*"

by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
   Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
   Processes.parent_process_name Processes.parent_process_path Processes.process Processes.process_exec
   Processes.process_guid Processes.process_hash Processes.process_id Processes.process_integrity_level
   Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product


| `drop_dm_object_name(Processes)`

| regex parent_process_path="(?i)^\\w+\\:\\\\(?:[^\\\\\\/\\x27\\x22]+\\\\){2,3}[^\\\\\\/\\x27\\x22]+\\.exe$"

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `windows_user_profile_binary_terminating_process_via_taskkill_filter`