Malicious Source Code Detection Using Transformer
Authors: Chen Tsfaty, Michael Fire
AI-generated Key Points
- Open source code is commonly used in modern software development
- Reused code presents a risk for supply chain attacks
- Malicious actors can inject malicious code into products that rely on reused code
- Many approaches have been developed to detect vulnerable packages, but detecting malicious code within packages is uncommon
- The Malicious Source Code Detection using Transformers (MSDT) algorithm was introduced to address this issue
- MSDT is a static analysis based on deep learning that detects real-world code injection cases in source code packages
- MSDT uses a dataset with over 600,000 different functions and applies a clustering algorithm to identify outliers and detect malicious functions
- Extensive experiments were conducted to evaluate MSDT's performance, demonstrating its capability to detect functions injected with malicious code with precision@k values of up to 0.909.
- Developing new detection methods for identifying malicious code within open source packages is important to mitigate supply chain attacks in software development.
Abstract: Open source code is considered a common practice in modern software development. However, reusing other code allows bad actors to access a wide developers' community, hence the products that rely on it. Those attacks are categorized as supply chain attacks. Recent years saw a growing number of supply chain attacks that leverage open source during software development, relaying the download and installation procedures, whether automatic or manual. Over the years, many approaches have been invented for detecting vulnerable packages. However, it is uncommon to detect malicious code within packages. Those detection approaches can be broadly categorized as analyzes that use (dynamic) and do not use (static) code execution. Here, we introduce Malicious Source code Detection using Transformers (MSDT) algorithm. MSDT is a novel static analysis based on a deep learning method that detects real-world code injection cases to source code packages. In this study, we used MSDT and a dataset with over 600,000 different functions to embed various functions and applied a clustering algorithm to the resulting vectors, detecting the malicious functions by detecting the outliers. We evaluated MSDT's performance by conducting extensive experiments and demonstrated that our algorithm is capable of detecting functions that were injected with malicious code with precision@k values of up to 0.909.
Tools for this paper
Ask questions about this paper to our AI assistant
You can also chat with multiple papers at once here.
⚠The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.
The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.
⚠The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.
Similar papers summarized with our AI tools
Navigate through even more similar papers through a
tree representationLook for similar papers (in beta version)
We compare the title and abstract with papers indexed in our database. For arXiv papers, we search within the same category; for DOI and other sources, we search across sources and subjects. You can rerun the search as our database grows.
Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.