CAPEC-504
Task Impersonation
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.
On this page
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.
Ask an AI about this attack pattern
Show the prompt
Explain the attack pattern CAPEC-504: Task Impersonation: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/504.html and https://cve.bz/cve/capec/504?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.
How the attack unfolds
Explore
The attacker looks for a way in.
[Determine suitable tasks to exploit] Determine what tasks exist on the target system that may result in a user providing sensitive information.
2 techniques
- 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.
Exploit
They carry out the attack.
[Impersonate Task] Impersonate a legitimate task, either expected or unexpected, in an attempt to gain user credentials or to ride the user's privileges.
2 techniques
- 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 skill
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.
Signs of an attack
Credential or permission elevation prompts that appear illegitimate or unexpected.
Consequences
| Impact | Affects | Note |
|---|---|---|
| Gain Privileges | Access Control, Authentication |
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.
Weaknesses it exploits
- CWE-1021 Improper Restriction of Rendered UI Layers or Frames
Recent CVEs with these weaknesses
- 2.3CVE-2026-134450
Dockhand before 1.0.57 contains a clickjacking vulnerability because src/hooks.server.ts never sets X-Frame-Options or CSP frame-ancestors headers on responses. Attackers on a same-site origin can embed the UI in an invisible iframe to tri…
- 7.7CVE-2026-122244
Budibase is an open-source low-code platform. Prior to 3.50.0, a BASIC application user, or an unauthenticated visitor to a public write form, can store markup in a shared external datasource that a builder or administrator later evaluates…
- 8.7CVE-2026-73967
AnsibleForms is a self-hosted web application that turns automation into self-service forms. Prior to 6.2.1, AnsibleForms stores attacker-influenceable job output that server/src/lib/common.js processes through formatOutput without HTML es…
- 3.1CVE-2026-111518
Dell Alienware Command Center (AWCC), versions prior to 6.14.105.0, contain an Improper Restriction of Rendered UI Layers or Frames vulnerability. A high privileged attacker with remote access could potentially exploit this vulnerability, …
- 5.4CVE-2026-131085
Clickjacking in PermissionElement in Google Chrome prior to 158.0.8127.36 allowed a remote attacker leveraging social engineering to spoof UI elements via a crafted HTML page. (Chromium security severity: Low)
- 5.1CVE-2026-105625
The web interface in Zenitel Connect before 1.11.0 loads an integration iframe without sandboxing or origin restrictions, which allows remote attackers to present phishing content to authenticated users via a crafted frame source.
- 8.6CVE-2026-102236
Improper restriction of rendered ui layers or frames in Visual Studio Code allows an unauthorized attacker to bypass a security feature locally.
- 2.5CVE-2026-18194
IBM App Connect Enterprise 13.0.1.0 through 13.0.8.2 could allow a remote attacker to perform unauthorized actions due to missing anti-clickjacking controls.
The newest records naming one of them. Each weakness's page lists them all.
Related attack patterns
Examples
An adversary monitors the system task list for Microsoft Outlook in an attempt to determine when the applicat…
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 ad…
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.
MITRE's words, unchanged: CAPEC-504 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.