---
title: "CAPEC-504: Task Impersonation"
url: https://radicalnotion.ai/capec/capec-504
type: capec
description: "An adversary, through a previously installed malicious application, impersonates an expected or routine task in an attempt to steal sensitive information or leverage a user's privileges."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-504: Task Impersonation

- **Abstraction:** Standard
- **Status:** Stable
- **Typical severity:** High
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

An adversary, through a previously installed malicious application, impersonates an expected or routine task in an attempt to steal sensitive information or leverage a user's privileges.

When impersonating an expected task, the adversary monitors the task list maintained by the operating system and waits for a specific legitimate task to become active. Once the task is detected, the malicious application launches a new task in the foreground that mimics the user interface of the legitimate task. At this point, the user thinks that they are interacting with the legitimate task that they started, but instead they are interacting with the malicious application. Once the adversary's goal is reached, the malicious application can exit, leaving the original trusted application visible and the appearance that nothing out of the ordinary has occurred. A second approach entails the adversary impersonating an unexpected task, but one that may often be spawned by legitimate background processes. For example, an adversary may randomly impersonate a system credential prompt, implying that a background process requires authentication for some purpose. The user, believing they are interacting with a legitimate task, enters their credentials or authorizes the use of their stored credentials, which the adversary then leverages for nefarious purposes. This type of attack is most often used to obtain sensitive information (e.g., credentials) from the user, but may also be used to ride the user's privileges.

## Execution flow

### Step 1: Explore

\[Determine suitable tasks to exploit\] Determine what tasks exist on the target system that may result in a user providing sensitive information.

- Determine what tasks prompt a user for their credentials.
- Determine what tasks may prompt a user to authorize a process to execute with elevated privileges.

### Step 2: Exploit

\[Impersonate Task\] Impersonate a legitimate task, either expected or unexpected, in an attempt to gain user credentials or to ride the user's privileges.

- Prompt a user for their credentials, while making the user believe the credential request is legitimate.
- Prompt a user to authorize a task to run with elevated privileges, while making the user believe the request is legitimate.

## Prerequisites

- The adversary must already have access to the target system via some means.
- A legitimate task must exist that an adversary can impersonate to glean credentials.
- The user's privileges allow them to execute certain tasks with elevated privileges.

## Skills required

- **Low:** Once an adversary has gained access to the target system, impersonating a task is trivial.

## Resources required

- Malware or some other means to initially comprise the target system.
- Additional malware to impersonate a legitimate task.

## Indicators

- Credential or permission elevation prompts that appear illegitimate or unexpected.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control, Authentication | Gain Privileges | - |

## Mitigations

- The only known mitigation to this attack is to avoid installing the malicious application on the device. However, to impersonate a running task the malicious application does need the GET\_TASKS permission to be able to query the task list, and being suspicious of applications with that permission can help.

## Example instances

An adversary monitors the system task list for Microsoft Outlook in an attempt to determine when the application may prompt the user to enter their credentials to view encrypted email. Once the task is executed, the adversary impersonates the credential prompt to obtain the user's Microsoft Outlook encryption credentials. These credentials can then be leveraged by the adversary to read a user's encrypted email.

An adversary prompts a user to authorize an elevation of privileges, implying that a background task needs additional permissions to execute. The user accepts the privilege elevation, allowing the adversary to execute additional malware or tasks with the user's privileges.

## Related weaknesses (CWE)

- [CWE-1021](https://radicalnotion.ai/cwe/cwe-1021): Improper Restriction of Rendered UI Layers or Frames

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-173](https://radicalnotion.ai/capec/capec-173) | Action Spoofing |
| Child | [CAPEC-654](https://radicalnotion.ai/capec/capec-654) | Credential Prompt Impersonation |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| ATTACK | Masquerading: Masquerade Task or Service | 1036.004 |

## Frequently asked questions

### What is CAPEC-504?

An adversary, through a previously installed malicious application, impersonates an expected or routine task in an attempt to steal sensitive information or leverage a user's privileges.

### How does a Task Impersonation attack work?

It typically unfolds over 2 phases. It begins with: \[Determine suitable tasks to exploit\] Determine what tasks exist on the target system that may result in a user providing sensitive information.

### How do you prevent CAPEC-504?

The only known mitigation to this attack is to avoid installing the malicious application on the device. However, to impersonate a running task the malicious application does need the GET\_TASKS permission to be able to query the task list, and being suspicious of applications with that permission can help.

### What weaknesses does CAPEC-504 target?

CAPEC-504 exploits one CWE weakness: CWE-1021 (Improper Restriction of Rendered UI Layers or Frames).

### How severe is CAPEC-504?

MITRE rates CAPEC-504 as High severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/504.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-504). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
