CAPEC Definitions

    CAPEC Definitions / CAPEC-693

    CAPEC-693: StarJacking

    An adversary spoofs software popularity metadata to deceive users into believing that a maliciously provided package is widely used and originates from a trusted source.

    Severity:High
    Possibility:Medium

    Extended Description

    Many open-source software packages are hosted via third-party package managers (e.g., Node Package Manager, PyPi, Yarn, etc.) that allow for easy integration of software components into existing development environments. A package manager will typically include various metadata about the software and often include a link to the package's source code repository, to assist developers in determining the trustworthiness of the software. One common statistic used in this decision-making process is the popularity of the package. This entails checking the amount of "Stars" the package has received, which the package manager displays based on the provided source code repository URL. However, many package managers do not validate the connection between the package and source code repository being provided. Adversaries can thus spoof the popularity statistic of a malicious package by associating a popular source code repository URL with the package. This can ultimately trick developers into unintentionally incorporating the malicious package into their development environment.

    Mitigations

    Before downloading open-source packages, perform precursory metadata checks to determine the author(s), frequency of updates, when the software was last updated, and if the software is widely leveraged.

    Look for conflicting or non-unique repository references to determine if multiple packages share the same repository reference.

    Reference vulnerability databases to determine if the software contains known vulnerabilities.

    Only download open-source packages from reputable package managers.

    After downloading open-source packages, ensure integrity values have not changed.

    Before executing or incorporating the package, leverage automated testing techniques (e.g., static and dynamic analysis) to determine if the software behaves maliciously.

    Relationships with other CAPECs

    CAPEC-691: Spoof Open-Source Software Metadata

    Prerequisites

    Identification of a popular open-source package whose popularity metadata is to be used for the malicious package.

    Related Weaknesses

    CWE-494: Download of Code Without Integrity Check