EUVIMEDEUVIMED entdecken
Crossref

Toward a Robust Detection of PowerShell Malware against Code Mixing and Obfuscation by Using Sentence Transformer and Similarity Learning

Zhiwei Fu, Leo Song, Steven Ding, Furkan Alaca, Sudipta Acharya

ACM Transactions on Privacy and Security · 30.11.2025 · 28 (4) · 1-23

DOI: 10.1145/3771542 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Privacy and Security, online erschienen am 19.11.2025. Verfasst von Zhiwei Fu und 4 weiteren Autor:innen. Die Arbeit wurde bisher 3-mal zitiert (Crossref) und nennt 50 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Embedded PowerShell commands or scripts are among the most popular malware payloads. For malware that prioritizes stealthiness, such as fileless malware, PowerShell’s access to Windows API functions without additional libraries makes it useful for evading detection. Detecting malicious PowerShell scripts and commands is an open challenge for proactive endpoint protection due to three major issues: (1) The malicious commands are usually hidden in a long script beyond the processing limit of typical machine learning models. (2) They are usually mixed with bulky benign scripts. (3) Script obfuscation can easily conceal their potential matching signatures. In this article, we introduce a novel model addressing these challenges. It incorporates similarity learning, sentence transformer, sliding window method, and stochastic gradient descent (SGD) classifier. Our key insight is that malicious PowerShell code, particularly when obfuscated, exhibits semantic and statistical deviations from benign administrative usage, and these deviations can be captured by contrastive sentence embeddings without the need for de-obfuscation or handcrafted features. We operate this insight through a Siamese similarity learning framework that improves robustness against Out-of-Vocabulary tokens due to unseen code obfuscation methods. The sliding window method enables the model to handle long scripts, and the SGD classifier evaluates segment-level maliciousness. Our model achieves accuracies of 99.01%, 97.59%, 98.70%, and 99.73% across multiple obfuscated and mixed script benchmarks, outperforming existing baselines by over 30% in all cases. This work demonstrates a scalable and effective strategy for robust PowerShell malware detection in real-world scenarios.

Zitieren

APA

Fu, Z., Song, L., Ding, S., Alaca, F., & Acharya, S. (2025). Toward a Robust Detection of PowerShell Malware against Code Mixing and Obfuscation by Using Sentence Transformer and Similarity Learning. ACM Transactions on Privacy and Security, 28(4), 1-23. https://doi.org/10.1145/3771542

Vancouver

Fu Z, Song L, Ding S, Alaca F, Acharya S. Toward a Robust Detection of PowerShell Malware against Code Mixing and Obfuscation by Using Sentence Transformer and Similarity Learning. ACM Transactions on Privacy and Security. 2025;28(4):1-23. doi:10.1145/3771542

BibTeX
@article{Fu2025,
  author = {Fu, Zhiwei and Song, Leo and Ding, Steven and Alaca, Furkan and Acharya, Sudipta},
  title = {Toward a Robust Detection of PowerShell Malware against Code Mixing and Obfuscation by Using Sentence Transformer and Similarity Learning},
  journal = {ACM Transactions on Privacy and Security},
  year = {2025},
  volume = {28},
  number = {4},
  pages = {1--23},
  doi = {10.1145/3771542}
}
Kostenlos starten →