Wolf in Sheep’s Clothing: Shearing the Camouflage of Malicious Java Components in Maven
In recent years, software supply chain attacks have become increasingly prevalent, prompting considerable research into detecting malicious packages within relevant repositories. With the popularity bolstered by the widespread adoption of open-source practices, Java become one of the preferred languages among modern developers. However, the issue of malware detection in Java components remains unresolved. Most prior approaches suffer from insufficient code coverage and coarse-grained representation, making them unsuitable for Java components. <p xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">In this paper, we propose an innovative solution called <small>Shear</small> tailored for detecting malicious Java components. <small>Shear</small> firstly analyzes all methods in the component and locates potential malicious code snippets based on sensitive calls, as slice-level analysis provides a better understanding of the specific malicious activities. Secondly, statements depending on sensitive call sites are extracted and embedded into vectors for further detection instead of function-level representation which is coarse-grained facing the dynamic features in Java. The corresponding experimental results show that <small>Shear</small> effectively identifies the malicious semantics hidden in the code slices by leveraging the neural network model, outperforming currently available tools to a great extent. Through real-world validation, <small>Shear</small> detected 51 components with malicious characteristics out of 68,273, demonstrating its practical feasibility. This study introduces the first Java malicious component detection method suitable for real-world scenarios, carrying considerable practical significance in bolstering defenses within the software supply chain.
Authors
- Cheng Huang (ORCID: https://orcid.org/0000-0002-5871-946X)
- Genpei Liang (ORCID: https://orcid.org/0000-0002-8412-7695)
- Nannan Wang (ORCID: https://orcid.org/0009-0004-4839-5571)
- Yi Zeng (ORCID: https://orcid.org/0000-0002-1357-7998)
- Shiqiang Jiang (ORCID: https://orcid.org/0009-0008-2985-9552)
- Jai Bok Han
- Jianguo Zhao
Institutions
- Sichuan University (CN)
Publication Details
- Journal
- IEEE Transactions on Software Engineering
- Published
- 2025-08-19
- DOI
- https://doi.org/10.1109/tse.2025.3599732
- Primary Topic
- Fashion and Cultural Textiles
- Type
- article
- Field-Weighted Citation Impact
- 0.00