Detecting PowerShell-based Fileless Cryptojacking Attacks Using Machine Learning

📅 2026-02-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work proposes a novel detection method for fileless PowerShell-based cryptojacking attacks, which are notoriously difficult to identify—particularly when malicious scripts persist after their source code has been erased. By integrating abstract syntax tree (AST) representations with a fine-tuned CodeBERT model, the approach leverages the structural semantics of PowerShell scripts to enhance detection accuracy. The authors construct a dedicated experimental dataset and inject structured AST information into the pre-trained code language model, subsequently combining it with a machine learning classifier to achieve high precision and recall in identifying malicious behaviors. This study represents the first effort to combine AST-derived structural features with CodeBERT for PowerShell security analysis, demonstrating a significant improvement in detecting stealthy malicious scripts and validating the effectiveness of structure-aware pre-trained models in programming language–based threat detection.

Technology Category

Application Category

📝 Abstract
With the emergence of remote code execution (RCE) vulnerabilities in ubiquitous libraries and advanced social engineering techniques, threat actors have started conducting widespread fileless cryptojacking attacks. These attacks have become effective with stealthy techniques based on PowerShell-based exploitation in Windows OS environments. Even if attacks are detected and malicious scripts removed, processes may remain operational on victim endpoints, creating a significant challenge for detection mechanisms. In this paper, we conducted an experimental study with a collected dataset on detecting PowerShell-based fileless cryptojacking scripts. The results showed that Abstract Syntax Tree (AST)-based fine-tuned CodeBERT achieved a high recall rate, proving the importance of the use of AST integration and fine-tuned pre-trained models for programming language.
Problem

Research questions and friction points this paper is trying to address.

PowerShell
fileless cryptojacking
remote code execution
stealthy attacks
Windows OS
Innovation

Methods, ideas, or system contributions that make the work stand out.

Abstract Syntax Tree
CodeBERT
PowerShell
fileless cryptojacking
machine learning
🔎 Similar Papers
No similar papers found.
S
Said Varlioglu
School of Information Technology, University of Cincinnati, Cincinnati, OH, USA
Nelly Elsayed
Nelly Elsayed
University of Cincinnati
Applied AIHealthcare InformaticsCybersecurityIntelligent Information Systems
Murat Ozer
Murat Ozer
University of Cincinnati
Information Technology & Criminal Justice
Zag ElSayed
Zag ElSayed
UC, CCHMC, OCR
Computer Engineering BCIEEGCybersecurityAI and MLIoT
J
John M. Emmert
School of Information Technology, University of Cincinnati, Cincinnati, OH, USA; Department of Electrical and Computer Engineering, University of Cincinnati, Cincinnati, OH, USA