CAPEC-206

Signing Malicious Code
Draft
2014-06-23
00h00 +00:00
2022-02-22
00h00 +00:00
Alerta para un CAPEC
Manténgase informado sobre cualquier cambio en un CAPEC específico.
Gestionar notificaciones

Descripciones CAPEC

The adversary extracts credentials used for code signing from a production environment and then uses these credentials to sign malicious content with the developer's key. Many developers use signing keys to sign code or hashes of code. When users or applications verify the signatures are accurate they are led to believe that the code came from the owner of the signing key and that the code has not been modified since the signature was applied. If the adversary has extracted the signing credentials then they can use those credentials to sign their own code bundles. Users or tools that verify the signatures attached to the code will likely assume the code came from the legitimate developer and install or run the code, effectively allowing the adversary to execute arbitrary code on the victim's computer. This differs from CAPEC-673, because the adversary is performing the code signing.

Informaciones CAPEC

Flujo de ejecución

1) Explore

The adversary first attempts to obtain a digital certificate in order to sign their malware or tools. This certificate could be stolen, created by the adversary, or acquired normally through a certificate authority.

2) Explore

Based on the type of certificate obtained, the adversary will create a goal for their attack. This is either a broad or targeted attack. If an adversary was able to steal a certificate from a targeted organization, they could target this organization by pretending to have legitimate code signed by them. In other cases, the adversary would simply sign their malware and pose as legitimate software such that any user might trust it. This is the more broad approach

3) Experiment

The adversary creates their malware and signs it with the obtained digital certificate. The adversary then checks if the code that they signed is valid either through downloading from the targeted source or testing locally.

4) Exploit

Once the malware has been signed, it is then deployed to the desired location. They wait for a trusting user to run their malware, thinking that it is legitimate software. This malware could do a variety of things based on the motivation of the adversary.

Prerrequisitos

The targeted developer must use a signing key to sign code bundles. (Note that not doing this is not a defense - it only means that the adversary does not need to steal the signing key before forging code bundles in the developer's name.)

Recursos requeridos

None: No specialized resources are required to execute this type of attack.

Mitigaciones

Ensure digital certificates are protected and inaccessible by unauthorized uses.
If a digital certificate has been compromised it should be revoked and regenerated.
Even if a piece of software has a valid and trusted digital signature, it should be assessed for any weaknesses and vulnerabilities.

Debilidades relacionadas

CWE-ID Nombre de la debilidad

CWE-732

Incorrect Permission Assignment for Critical Resource
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

Referencias

REF-699

W32.Stuxnet Dossier
Nicolas Falliere, Liam O Murchu, Eric Chien.
https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf

REF-700

Guarding against supply chain attacks—Part 3: How software becomes compromised
Cristin Goodwin, Joram Borenstein.
https://www.microsoft.com/security/blog/2020/03/11/guarding-against-supply-chain-attacks-part-3-how-software-becomes-compromised/

REF-714

Operation Wilted Tulip: Exposing a cyber espionage apparatus
https://www.clearskysec.com/wp-content/uploads/2017/07/Operation_Wilted_Tulip.pdf

Envío

Nombre Organización Fecha Fecha de lanzamiento
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

Modificaciones

Nombre Organización Fecha Comentario
CAPEC Content Team The MITRE Corporation 2017-08-04 +00:00 Updated Resources_Required
CAPEC Content Team The MITRE Corporation 2018-07-31 +00:00 Updated Description Summary, Related_Weaknesses
CAPEC Content Team The MITRE Corporation 2019-04-04 +00:00 Updated Taxonomy_Mappings
CAPEC Content Team The MITRE Corporation 2020-07-30 +00:00 Updated Related_Attack_Patterns, Taxonomy_Mappings
CAPEC Content Team The MITRE Corporation 2020-12-17 +00:00 Updated Execution_Flow
CAPEC Content Team The MITRE Corporation 2021-06-24 +00:00 Updated Description, Prerequisites, Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2022-02-22 +00:00 Updated Example_Instances, Execution_Flow, Mitigations, References