Download of Code Without Integrity Check |
Weakness ID: 494 (Weakness Base) | Status: Draft |
Description Summary
Extended Description
An attacker can execute malicious code by compromising the host server, performing DNS spoofing, or modifying the code in transit.
Scope | Effect |
---|---|
Availability | Executing untrusted code could result in a compromise of the application and failure to function correctly for users. |
Confidentiality | If an attacker can influence the untrusted code then, upon execution, it may provide the attacker with access to sensitive files. |
Integrity | Executing untrusted code could compromise the control flow of the program, possibly also leading to the modification of sensitive resources. |
Manual Analysis Manual analysis is typically required to find the behavior that triggers the download of code, and to determine whether integrity-checking methods are in use. |
Example 1
Reference | Description |
---|---|
CVE-2008-3438 | OS does not verify authenticity of its own updates. |
CVE-2008-3324 | online poker client does not verify authenticity of its own updates. |
CVE-2001-1125 | anti-virus product does not verify automatic updates for itself. |
CVE-2002-0671 | VOIP phone downloads applications from web sites without verifying integrity. |
Phase: Implementation Perform proper forward and reverse DNS lookups to detect DNS spoofing. This is only a partial solution since it will not prevent your code from being modified on the hosting site or in transit. |
Phases: Architecture and Design; Operation Encrypt the code with a reliable encryption scheme before transmitting. This will only be a partial solution, since it will not detect DNS spoofing and it will not prevent your code from being modified on the hosting site. |
Phase: Architecture and Design Use integrity checking on the transmitted code.
|
Phase: Testing Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules. |
Phase: Testing Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process and also sniff the network connection. Trigger features related to product updates or plugin installation, which is likely to force a code download. Monitor when files are downloaded and separately executed, or if they are otherwise read back into the process. Look for evidence of cryptographic library calls that use integrity checking. |
Nature | Type | ID | Name | View(s) this relationship pertains to |
---|---|---|---|---|
ChildOf | Category | 490 | Mobile Code Issues | Development Concepts (primary)699 |
ChildOf | Weakness Class | 669 | Incorrect Resource Transfer Between Spheres | Research Concepts (primary)1000 |
ChildOf | Category | 752 | 2009 Top 25 - Risky Resource Management | Weaknesses in the 2009 CWE/SANS Top 25 Most Dangerous Programming Errors (primary)750 |
ChildOf | Category | 802 | 2010 Top 25 - Risky Resource Management | Weaknesses in the 2010 CWE/SANS Top 25 Most Dangerous Programming Errors (primary)800 |
PeerOf | Weakness Base | 79 | Failure to Preserve Web Page Structure ('Cross-site Scripting') | Research Concepts1000 |
CanFollow | Weakness Base | 79 | Failure to Preserve Web Page Structure ('Cross-site Scripting') | Research Concepts1000 |
This is critical for mobile code, but it is likely to become more and more common as developers continue to adopt automated, network-based product distributions and upgrades. Software-as-a-Service (SaaS) might introduce additional subtleties. Common exploitation scenarios may include ad server compromises and bad upgrades. |
Microsoft. "Introduction to Code Signing". <http://msdn.microsoft.com/en-us/library/ms537361(VS.85).aspx>. |
Apple. "Code Signing Guide". Apple Developer Connection. 2008-11-19. <http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Introduction/chapter_1_section_1.html>. |
Anthony Bellissimo, John Burgess and Kevin Fu. "Secure Software Updates: Disappointments and New Challenges". <http://prisms.cs.umass.edu/~kevinfu/papers/secureupdates-hotsec06.pdf>. |
[REF-17] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 18: The Sins of Mobile Code." Page 267. McGraw-Hill. 2010. |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
CLASP | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Other Notes, Taxonomy Mappings | ||||
2009-01-12 | CWE Content Team | MITRE | Internal | |
updated Applicable Platforms, Common Consequences, Description, Name, Other Notes, Potential Mitigations, References, Relationships, Research Gaps, Type | ||||
2009-03-10 | CWE Content Team | MITRE | Internal | |
updated Potential Mitigations | ||||
2009-07-27 | CWE Content Team | MITRE | Internal | |
updated Description, Observed Examples, Related Attack Patterns | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | Mobile Code: Invoking Untrusted Mobile Code | |||
2009-01-12 | Download of Untrusted Mobile Code Without Integrity Check | |||