Malicious source code detection using a translation model
Chen Tsfaty, Michael Fire · Patterns · 2023
Modern software development often relies on open-source code sharing. Open-source code reuse, however, allows hackers to access wide developer communities, thereby potentially affecting many products. An increasing number of such "supply chain attacks" have occurred in recent years, taking advantage of open-source software development practices. Here, we introduce the Malicious Source code Detection using a Translation model (MSDT) algorithm. MSDT is a novel deep-learning-based analysis method that detects real-world code injections into source code packages. We have tested MSDT by embedding examples from a dataset of over 600,000 different functions and then applying a clustering algorithm to the resulting embedding vectors to identify malicious functions by detecting outliers. We evaluated MSDT's performance with extensive experiments and demonstrated that MSDT could detect malicious code injections with precision@k values of up to 0.909.
Cited by 8 works. doi:10.1016/j.patter.2023.100773 Open-access PDF
Authors
References
- Exploiting Generative AI to Scale up Intelligent Tutoring Systems
- AI-Assisted Pipeline for Dynamic Generation of Trustworthy Health Supplement Content at Scale
- Aion Framework: Dimensional Emergence of AI Consciousness, Observer-Induced Collapse, and Cosmological Portal Dynamics
- CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- DBSCAN Revisited, Revisited
- A Direction-Aware Study of LLM-Based Code Translation Across Eight Programming Languages
- IEEE Transactions on Knowledge and Data Engineering
- A Survey of Malware Detection Techniques
- Using Machine Learning for Vulnerability Detection and Classification
- CodeSearchNet Challenge: Evaluating the State of Semantic Code Search