CAPEC-695

Repo Jacking
2022-09-29
00h00 +00:00
中危
高危
Stable
2023-01-24
00h00 +00:00
指定 CAPEC 提醒
随时了解指定 CAPEC 的变更。
管理通知

CAPEC 信息

执行流程

1) Explore

[Identify target] The adversary must first identify a target repository that is commonly used and whose owner/maintainer has either changed/deleted their username or transferred ownership of the repository and then deleted their account. The target should typically be a popular and widely used package, as to increase the scope of the attack.

2) Experiment

[Recreate initial repository path] The adversary re-registers the account that was renamed/deleted by the target repository's owner/maintainer and recreates the target repository with malicious code intended to exploit an application. These steps may need to happen in reverse (i.e., recreate repository and then rename an existing account to the target account) if protections are in place to prevent repository reuse.

3) Exploit

[Exploit victims] The adversary's malicious code is incorporated into applications that directly reference the initial repository, which further allows the adversary to conduct additional attacks.

前提条件

Identification of a popular repository that may be directly referenced in numerous software applications
A repository owner/maintainer who has recently changed their username or deleted their account

所需技能

Ability to create an account on a VCS hosting site and recreate an existing directory structure.
Ability to create malware that can exploit various software applications.

缓解措施

Leverage dedicated package managers instead of directly linking to VCS repositories.
Utilize version pinning and lock files to prevent use of maliciously modified repositories.
Implement "vendoring" (i.e., including third-party dependencies locally) and leverage automated testing techniques (e.g., static analysis) to determine if the software behaves maliciously.
Leverage automated tools, such as Checkmarx's "ChainJacking" tool, to determine susceptibility to Repo Jacking attacks.

相关弱点

CWE-ID 弱点名称

CWE-494

Download of Code Without Integrity Check
The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.

CWE-829

Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.

参考资料

REF-722

Repo Jacking: Exploiting the Dependency Supply Chain
Indiana Moreau.
https://www.concretecms.org/about/project-news/security/supply-chain-hack-phpass-repo-jacking

REF-732

CyRC Vulnerability Analysis: Repo jacking in the software supply chain
Theo Burton.
https://www.synopsys.com/blogs/software-security/cyrc-vulnerability-analysis-repo-jacking/

REF-733

Attacker Caught Hijacking Packages Using Multiple Techniques to Steal AWS Credentials
Jossef Harush.
https://checkmarx.com/blog/attacker-caught-hijacking-packages-using-multiple-techniques-to-steal-aws-credentials/

REF-734

GitHub RepoJacking Weakness Exploited in the Wild by Attackers
Jossef Harush.
https://checkmarx.com/blog/github-repojacking-weakness-exploited-in-the-wild-by-attackers/

提交记录

名称 组织 日期 发布日期
CAPEC Content Team The MITRE Corporation 2022-09-29 +00:00

修改记录

名称 组织 日期 备注
CAPEC Content Team The MITRE Corporation 2023-01-24 +00:00 Updated Related_Weaknesses