Dark Mode

Settings

Capec-206 Detail

Signing Malicious Code

Detailed Supply Chain Software Typical Severity: Very High

Parents: 444

Threats: T73 T263 T281 T293 T307 T338 T387 T400

Description

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.

Not present

External ID Source Link Description
CAPEC-206 capec https://capec.mitre.org/data/definitions/206.html
CWE-732 cwe http://cwe.mitre.org/data/definitions/732.html
T1553.002 ATTACK https://attack.mitre.org/wiki/Technique/T1553/002 Subvert Trust Controls:Code Signing
REF-699 reference_from_CAPEC https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf Nicolas Falliere, Liam O Murchu, Eric Chien, W32.Stuxnet Dossier, 2010--11, Symantec
REF-700 reference_from_CAPEC https://www.microsoft.com/security/blog/2020/03/11/guarding-against-supply-chain-attacks-part-3-how-software-becomes-compromised/ Cristin Goodwin, Joram Borenstein, Guarding against supply chain attacks—Part 3: How software becomes compromised, 2020--03---11, Microsoft
REF-714 reference_from_CAPEC https://www.clearskysec.com/wp-content/uploads/2017/07/Operation_Wilted_Tulip.pdf Operation Wilted Tulip: Exposing a cyber espionage apparatus, 2017--07, ClearSky cyber security and Trend Micro
Explore
  1. 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. 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

Experiment
  1. 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.

Exploit
  1. 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.

  1. 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.)
  1. None: No specialized resources are required to execute this type of attack.

Not present

Not present

  1. In the famous Stuxnet malware incident, two digital certificates were compromised in order to sign malicious device drivers with legitimate credentials. The signing resulted in the malware appearing as trusted by the system it was running on, which facilitated the installation of the malware in kernel mode. This further resulted in Stuxnet remaining undetected for a significant amount of time. [REF-699]
  2. The cyber espionage group CyberKittens leveraged a stolen certificate from AI Squared that allowed them to leverage a signed executable within Operation Wilted Tulip. This ultimately allowed the executable to run as trusted on the system, allowing a Crowd Strike stager to be loaded within the system's memory. [REF-714]