GAShellBreaker: Java Fileless Webshell Detection
GAShellBreaker: Java Fileless Webshell Detection
1 School of Computer and Electronic Information, Guangxi University, Nanning 530004, China;
2313393068@[Link] (Y.Z.); 2313393031@[Link] (Y.X.)
2 Guangxi Colleges and Universities Key Laboratory of Multimedia Communications and Information
Processing, Guangxi University, Nanning 530004, China
* Correspondence: ldf-0123@[Link]
Abstract: Webshells are widely used by attackers to maintain access during the post-
exploitation phase. As security defenses improve, traditional file-based Webshells are
increasingly detectable. To evade detection, attackers are shifting toward fileless Webshells,
which reside entirely in memory and present significant challenges to conventional security
tools. However, research on fileless Webshell detection remains limited. To address this
gap, we analyzed various fileless Webshell samples, summarized their behavioral patterns,
and constructed a corresponding threat model. Based on this, we propose a novel detection
approach named GAShellBreaker, which leverages grayscale image transformation and
deep learning. GAShellBreaker first establishes a dual-layer in-memory monitoring mecha-
nism to capture suspicious classes within the Java Virtual Machine (JVM) and export them
as bytecode files. It then extracts opcode sequences from these files, transforms them into
grayscale images, and employs a ResNet50-based classifier for detection. Due to the limited
availability of fileless samples, we trained and evaluated the model on a larger dataset
of 1351 file-based scripts (383 Webshells and 968 benign samples), and used 56 fileless
Webshells for validation. Experimental results show that GAShellBreaker achieves 99.10%
accuracy on file-based Webshells and 89.29% accuracy on fileless Webshells, outperforming
existing algorithms. Moreover, it maintains low computational overhead (6.7%), confirming
its practical feasibility.
networks to launch more sophisticated attacks. Therefore, detecting Webshells is crucial for
maintaining network security and stability.
In response to traditional Webshells, researchers have proposed various detection
mechanisms, including text-based feature analysis [3], statistical modeling [4], and network
traffic monitoring [5]. In recent years, deep learning techniques have also been increasingly
integrated to improve detection accuracy. These methods are generally effective in detecting
traditional file-based Webshells. However, the majority of existing research in this area
focuses on PHP-based Webshells, which account for approximately 68.18% of all studies [6].
In contrast, research on Java-based Webshells remains limited, even though Java has become
one of the most widely used and fastest-growing server-side programming languages since
early 2021 [7].
In addition, most Webshell detection approaches are based on text classification,
typically involving the transformation of fixed-length code fragments into word vectors,
which are then fed into a classifier. Due to the use of fixed-length inputs, attackers can
easily evade detection by inserting malicious logic at the end of a benign file segment—an
area often ignored by the classifier. Moreover, because fileless Webshells reside entirely
in memory and are dynamically loaded, these traditional methods are largely ineffective
against them.
Despite the increasing threat posed by fileless Webshells, current research still pre-
dominantly focuses on traditional file-based variants, with Java-based fileless Webshells
receiving little attention. To the best of our knowledge, only two studies have explicitly
addressed fileless Webshell detection, of which only one specifically targets Java-based
fileless Webshells. Although this method introduces a novel detection approach, it is lim-
ited in scope—capable of detecting only a narrow range of fileless Webshell types—and
suffers from relatively low detection accuracy. Furthermore, while several open-source
tools are available for detecting fileless Webshells, most rely on simple rule-based static text
matching, resulting in low efficiency and poor detection performance. Overall, existing
research and tools for fileless Webshell detection remain constrained by limited detection
range and suboptimal accuracy.
Through our investigation and analysis of existing detection methods, we have iden-
tified two critical challenges that have significantly hindered progress in the detection of
fileless Webshells. First, due to the nascent nature of this threat, there exists a substantial
scarcity of publicly available datasets. This data scarcity hampers the ability of detection
models to learn generalized behavioral patterns of in-memory attacks, thereby limiting
their effectiveness. Second, Java-based fileless Webshells often reside within the Java Virtual
Machine (JVM) as dynamically loaded classes, making them difficult to extract and monitor.
Traditional security mechanisms lack the capability to capture and analyze such in-memory
execution behaviors, further complicating the detection process.
To address these challenges, this paper proposes a hybrid detection framework for file-
less Webshells, named GAShellBreaker. At the dynamic level, GAShellBreaker performs the
real-time monitoring of the JVM to capture suspicious classes loaded into memory. At the
static level, we introduce a novel detection method that transforms class files into grayscale
images representing malicious code, which are then classified using a deep learning model.
This grayscale image-based approach effectively mitigates the limitations associated with
fixed-length inputs commonly used in traditional text-based detection methods.
Specifically, to mitigate the limitations caused by the scarcity of fileless Webshell
samples, we leverage the similarity in malicious logic between fileless and traditional
Webshells. The model is first pre-trained on a traditional file-based Webshell dataset and
subsequently applied to the detection of fileless Webshells. To overcome the limitations of
Electronics 2025, 14, 1678 3 of 23
2. Related Work
In this section, we review and discuss related work on Webshell detection and fileless
Webshell detection.
aforementioned approaches are designed for source code-based detection. In practice, at-
tackers frequently use evasion techniques such as string splitting and character obfuscation.
Consequently, detection methods that directly rely on source code are highly vulnerable to
such obfuscation strategies, which can degrade their performance.
To mitigate the risk of source code-based detection being easily bypassed by obfusca-
tion techniques, Viet et al. [18] proposed a method based on deep neural networks (DNNs)
that identifies Webshell activity through a real-time analysis of HTTP traffic. However,
since most websites today employ HTTPS encryption, detection methods that rely on HTTP
traffic analysis face inherent limitations. Additionally, Lee et al. [19] transformed Webshells
into abstract syntax trees (ASTs) and applied machine learning models for classification.
Yet, this method shares a key limitation with earlier approaches—it relies on fixed-length
input for text classification. Typically, these methods extract a fixed-length code segment
(often 128 characters) and feed it into the model. The effectiveness of such methods heavily
depends on whether the extracted segment contains the malicious payload. When mali-
cious code is embedded deeper within a longer benign segment, fixed-length truncation
often results in capturing only the benign portion, thereby reducing detection accuracy.
In addition, most of the aforementioned Webshell detection methods are limited to
PHP-based Webshells. To address these limitations, we propose a detection approach
based on grayscale image transformation. By converting the entire bytecode file into a
grayscale image, this method effectively avoids detection failures caused by the fixed-
length truncation of code segments. Moreover, since the target scenario involves fileless
Webshells—typically operating in Java environments—our detection method is primarily
designed for identifying Java-based Webshells.
bytecode structure and integrates dynamic monitoring with deep learning, thereby achiev-
ing superior detection accuracy and enhanced robustness against obfuscation techniques.
In addition to the three standard components, attackers may also target framework-
specific elements such as the Controller and Interceptor in the Spring framework, or the
Valve component in Tomcat.
Input Source: The input source refers to the origin of the input that activates the
Webshell trigger. In fileless Webshells, common input sources include Java web components
(e.g., Servlet, Filter, and Listener), Java framework components (e.g., the Controller and
Interceptor in the Spring framework and the Valve component in Tomcat), as well as loaded
classes, such as agent-based Webshells that dynamically modify classes within the JVM.
Trigger: The trigger determines how the Webshell is executed to facilitate subsequent
malicious privilege escalation. In fileless Webshells, triggers typically exploit deserialization
vulnerabilities, arbitrary file upload vulnerabilities, or similar attack mechanisms.
Payload: The attack payload consists of malicious code that serves as the core of a
fileless Webshell, enabling control over the web application. The payload dictates whether
the application transitions into a malicious privileged state.
Electronics 2025, 14, 1678 7 of 23
Privilege State: The privilege state represents the Webshell’s activation status. If suc-
cessfully activated, the Webshell enters a malicious privileged state, allowing the attacker to
execute further penetration operations. Conversely, if activation fails, the Webshell remains
in its normal state. Once in a malicious state, the attacker gains persistent access to the
Webshell, enabling the execution of additional attack strategies.
As the trigger mainly involves web vulnerabilities rather than the Webshell itself,
and a detailed analysis of web attacks may increase server overhead, this study focuses
on detecting Webshells based on the input source, attack payload, and malicious privi-
leged state.
Fileless Webshells typically rely on input sources to register or modify loaded classes
for injection purposes. Therefore, by detecting specific input source functions, it becomes
possible to capture the injection process of fileless Webshells and intercept them before they
transition into a malicious state. Furthermore, once a fileless Webshell enters a malicious
privileged state, its behavior closely resembles that of a traditional Webshell—primarily
aiming to gain control over the server through operations such as command execution and
database access. Consequently, this study also focuses on detecting malicious functions
executed by the Webshell after it reaches the malicious state.
The attack payload of a fileless Webshell generally resembles that of a traditional
Webshell, typically involving the establishment of malicious connection paths or the ex-
ecution of harmful operations. However, unlike traditional Webshells, fileless variants
often incorporate additional component registration logic during the initial stage of the
payload. Previous research on Java-based Webshell detection has predominantly relied
on text classification-based methods. These approaches commonly truncate the input
text to a fixed length of 128 characters before feeding it into the detection model. Due to
this length constraint, the extracted content may fail to capture the core malicious logic,
thereby reducing detection effectiveness—particularly for fileless Webshells. To address
this limitation, this study proposes a novel detection method that transforms opcode se-
quences into grayscale images and leverages deep learning to enhance the accuracy of the
detection model.
4. GAShellBreaker Model
In this section, we first introduce the overall framework of GAShellBreaker, followed
by a detailed explanation of its individual components.
4.1. Overview
As previously mentioned, in Java web applications, the code logic of a fileless Webshell
typically resides in the JVM as dynamically loaded classes. A conventional detection
approach, such as CopAgent [24], attempts to extract the bytecode of all classes in the JVM
and detect Webshells based on predefined rules.
However, due to the complexity of real-world applications, the JVM may load a large
number of classes, which can lead to significant performance overhead and reduced detec-
tion efficiency. To address this issue, we propose a dynamic detection framework named
GAShellBreaker, which combines grayscale image transformation and deep learning to iden-
tify fileless Webshells based on their behavioral characteristics and exploitation processes.
The overall architecture of GAShellBreaker is depicted in Figure 4, comprising three
core modules: (1) Monitoring Probe, (2) Detector, and (3) Alert System. Upon initialization,
GAShellBreaker is injected into the target web application’s JVM and activates the Monitor-
ing Probe to track suspicious loaded classes. The probe continuously monitors sensitive
methods and privileged functions, such as Webshell component registration or command
Electronics 2025, 14, 1678 8 of 23
execution routines. When a dynamically loaded class invokes any of these functions,
the probe captures the class and exports its bytecode and metadata for further analysis.
The extracted class file is then passed to the Detector module, where the bytecode is
converted into a grayscale image using an opcode adjacency matrix. This image is then
classified by a trained classifier to determine whether it represents a Webshell file. Based
on the classification result, the Alert System handles subsequent response actions: if the
sample is benign, normal execution proceeds and a low-risk alert is logged; if the sample is
identified as a Webshell, a high-risk alert is triggered, and detailed information is forwarded
to the system administrator.
The following sections provide an in-depth description of each component of the
GAShellBreaker framework.
The second monitoring layer targets functions required to transition into a malicious
state, termed malicious class functions. These functions are considered malicious because
they enable attackers to perform operations such as server intrusion, data exfiltration,
and command execution, thereby posing a considerable security threat.
The first monitoring layer (sensitive methods). The selection of sensitive methods must
meet specific criteria. An excessive number of methods may introduce unnecessary resource
consumption for web applications and lead to a high false-positive rate. Conversely,
selecting an insufficient number of methods may result in missed detections. Therefore,
this study proposes four evaluation criteria for method selection:
1. Sensitive functions must originate from the Java web framework rather than being
custom-defined by the attacker;
2. Sensitive functions should be as close as possible to the Webshell script itself. For in-
stance, if Program C calls m1, and m1 calls m2, where both m1 and m2 satisfy Criterion
1, then m1 should be selected as the sensitive function. This ensures a more accurate
tracing of the caller program in subsequent detection steps;
3. Sensitive functions should appear in at least the majority of fileless Webshells of the
same type;
4. On the basis of satisfying the first three rules, if a method has overloaded versions,
all methods with the same name should be considered sensitive functions. For exam-
ple, in the Agent class, both addTransformer(Transformer, boolean) and addTrans-
former(Transformer) should be classified as sensitive functions.
Based on the above rules, we conducted a manual analysis of all publicly available
fileless Webshells and identified 11 sensitive functions for GAShellBreaker to monitor.
The selected sensitive functions are detailed in Table 1.
The second monitoring layer (malicious class functions). Fileless Webshells, like their
traditional counterparts, aim to gain unauthorized control over the server to perform vari-
ous malicious operations. These typically include remote command execution, database
manipulation, and file system access. To identify the functions associated with such activi-
ties, we analyzed a large number of real-world Webshell samples and consulted official Java
API documentation [25], as well as security audit reports from prior research [26]. Based on
this analysis, we compiled a list of commonly exploited functions, such as command exe-
cution (e.g., [Link]()) and database connection routines (e.g., [Link]()).
Monitoring these sensitive functions enables our system to detect and intercept potentially
malicious Webshell behaviors at runtime.
Electronics 2025, 14, 1678 10 of 23
To further address persistence threats, we also monitor functions that are commonly
abused to achieve long-term control. For instance, since Webshell components are typi-
cally destroyed when a web application is shut down or restarted, attackers may register
shutdown hooks (e.g., [Link]()) to execute custom threads upon JVM
termination. These threads can write the Webshell to disk and subsequently reload it into
memory when the server restarts, thereby achieving both persistence and fileless char-
[Link] complete list of identified malicious functions and their usage contexts is
presented in Table 2.
4.3. Detector
This study presents a novel static detection approach that leverages grayscale image
transformation and deep learning techniques. The proposed detector consists of two key
components: a grayscale conversion engine and a deep learning classifier. The core method-
ology involves converting bytecode files into grayscale images using the transformation
engine, followed by feature extraction through the ResNet50 deep learning model to enable
the efficient and accurate identification of suspicious class files.
Given the shared payload characteristics between fileless and traditional file-based
Webshells—where fileless variants typically include an additional component registration
step—and the limited availability of fileless Webshell samples, our training dataset primar-
ily consists of conventional Webshell samples. After training, the system is then applied
to detect fileless Webshells. The following sections provide a detailed description of the
detector’s components and implementation.
The subsequent step involves transforming the extracted opcode sequence into a
grayscale image, as outlined in the pseudocode presented in Algorithm 2. To facilitate
this conversion, GAShellBreaker constructs an N × N opcode adjacency matrix, where N
denotes the number of unique opcode instructions identified in the dataset. Specifically, we
determined N = 149 by extracting all opcode instructions from the Java samples described
in Section 5.1 and counting the number of unique opcodes that appeared. Deprecated,
reserved, or unused opcodes were excluded to ensure that only relevant opcodes were
considered. These selected opcodes were then used as both row and column indices
to construct a 149 × 149 adjacency matrix, where each element holds an integer value
ranging from 0 to 255. Once the opcode sequence is transformed into the adjacency matrix,
GAShellBreaker generates a corresponding grayscale image. In this image, each pixel
represents the frequency of a specific opcode adjacency pair. Consequently, the resulting
grayscale image also has dimensions of 149 × 149.
In Table 3, we present the frequency rankings of opcode adjacency pairs in both benign
and Webshell samples. Specifically, we collected .class files corresponding to benign and
malicious Java programs (the dataset sources are detailed in Section 5.1) and used the
javap -c command to extract the opcode sequences. We then computed the frequency of
adjacent opcode instruction pairs (i.e., opcode 2-grams) within each sample and aggregated
these frequencies according to their respective categories (benign vs. Webshell). Finally, we
ranked the opcode pairs based on their overall frequency within each category and listed
the ten most frequent patterns. As illustrated in Table 3, the top-10 most frequent opcode
adjacency pairs in benign samples differ significantly from those in Webshell samples. This
pronounced disparity highlights the effectiveness of using grayscale images derived from
opcode adjacency pairs as a method for detecting malicious web activities.
Figure 6 presents two grayscale images constructed by GAShellBreaker. In these
images, the majority of pixel values are 0, indicating that most opcode instruction pairs do
not exhibit adjacency relationships—visually represented by black regions. The white spots
in the image reflect the frequency of calls between two opcode instructions: the brighter
the spot, the more frequent the interaction. The yellow rectangles highlight key differences
in opcode adjacency patterns between benign and Webshell samples. Notably, Webshell
samples tend to exhibit a higher frequency of opcode calls within the highlighted regions.
Electronics 2025, 14, 1678 13 of 23
4.3.2. Classifier
After extracting the bytecode files from memory and converting them into grayscale
images, GAShellBreaker employs a deep learning model to learn the visual features of
these representations. Given the relatively low dimensionality and complexity of the
generated grayscale images, we consider it unnecessary to adopt overly complex model
architectures. Among various candidates, ResNet50 is selected due to its well-documented
performance in image classification tasks and its ability to strike a balance between accuracy
and computational efficiency [27]. To empirically support this choice, we also conduct
comparative experiments using a baseline Convolutional Neural Network (CNN) model.
The results, presented in the subsequent experimental section, further confirm the superior
detection performance of ResNet50 in our task.
the system also records and exports critical details such as the file path, class name, and cor-
responding bytecode file for further analysis. Table 4 provides a representative example of
an alert generated in our experimental environment.
Table 4. Alert information content.
5.1. Dataset
Given the limited research on Java-based Webshells—particularly fileless variants,
which remain in the early stages of investigation—and the lack of standardized, publicly
available datasets, the Webshell samples used in this study were primarily collected from
open-source repositories. As shown in Table 5, the malicious Webshell samples were
obtained from projects publicly released by security researchers on GitHub ([Link]
com, accessed on 14 September 2024). For the benign samples used during training, we
collected widely used Tomcat instances to construct the normal sample set.
To ensure data integrity, duplicate samples were removed by computing and com-
paring their MD5 hash values. As a result, we obtained a curated dataset comprising
383 file-based Java Webshell samples, 968 benign Java samples, and 56 fileless Java Web-
shell samples.
In the subsequent model training process, the file-based Webshell dataset was split
into a training set and a testing set in an 8:2 ratio. To ensure the robustness of the results,
we conducted three independent test runs and averaged the outcomes to derive the final
performance metrics. For the fileless Webshell dataset, all samples were used to evalu-
ate the performance of GAShellBreaker, including its effectiveness in capturing fileless
Webshell classes loaded into memory and the accuracy of the static detector in identifying
these Webshells.
As shown in Table 6, based on the exploitation process of fileless webshells, we
categorized them into Component Class and Agent Class. Specifically, there are a total of
49 Component Class samples. However, the number of Agent Class samples is relatively
small, with only 7 samples collected so far.
Electronics 2025, 14, 1678 15 of 23
Word2vec-BiGRU [15] 0.9834 ± 0.0023 0.9718 ± 0.0070 0.9790 ± 0.0046 0.9753 ± 0.0035
[0.9778, 0.9890] [0.9544, 0.9891] [0.9677, 0.9904] [0.9667, 0.9840]
BERT-XGBoost [16] 0.9805 ± 0.0024 0.9699 ± 0.0052 0.9666 ± 0.0102 0.9682 ± 0.0029
[0.9746, 0.9864] [0.9570, 0.9828] [0.9413, 0.9918] [0.9609, 0.9755]
CodeBERT-BiGRU [17] 0.9857 ± 0.0040 0.9722 ± 0.0083 0.9842 ± 0.0039 0.9782 ± 0.0060
[0.9758, 0.9955] [0.9517, 0.9927] [0.9745, 0.9939] [0.9633, 0.9931]
Our detector (CNN) 0.9590 ± 0.0162 0.9597 ± 0.0154 0.9590 ± 0.0162 0.9571 ± 0.0180
[0.9187, 0.9992] [0.9214, 0.9979] [0.9187, 0.9992] [0.9125, 1.0000]
Our detector (ResNet50) 0.9910 ± 0.0012 0.9913 ± 0.0006 0.9830 ± 0.0086 0.9870 ± 0.0045
[0.9880, 0.9939] [0.9899, 0.9927] [0.9618, 1.0000] [0.9759, 0.9980]
Note: Bold values indicate the best performance under each evaluation metric.
GAShellBreaker JShellDetector
Types Category
Monitoring Probe Detector Suspicious Class Filter Webshell Detection
Servlet 12 10 12 9
Filter 10 10 10 8
Listener 12 11 12 11
Component Tomcat–Valve 2 2 0 2
WebSocket 2 1 0 1
Executor 1 1 0 1
Upgrade 1 1 0 1
Component Controller 6 6 6 4
(Spring) Interceptor 3 2 3 2
Agent - 7 6 0 6
Count - 56 50 43 45
the web application, and cannot be embedded during runtime. In contrast, GAShellBreaker
offers enhanced flexibility by supporting the agentmain mode, enabling injection during
program execution and significantly improving its detection capabilities.
It is important to note that high detection accuracy alone does not necessarily translate
to superior performance in real-world scenarios. A comprehensive evaluation should also
account for runtime efficiency and system overhead. Therefore, in the following section, we
further assess the feasibility of deploying GAShellBreaker by examining its performance
overhead in a realistic web application environment.
5.5.3. Feasibility
Given that GAShellBreaker’s monitoring probe operates at application runtime, it is
crucial to evaluate its performance to ensure minimal impact on the web server. Considering
that OpenRASP is a widely adopted open-source tool in the field of Runtime Application
Self-Protection (RASP) and has been deployed in numerous real-world security scenarios,
this study assesses the feasibility of GAShellBreaker by comparing its actual runtime
performance overhead with that of OpenRASP.
For the performance evaluation, we utilize Apache JMeter [29] as the benchmarking
tool. The experimental environment is deployed on the same cloud server configuration
described in Section 5.2, with Tomcat serving as the web application container. To sim-
ulate real-world user workloads, each request initiates 1000 hash computations on the
server, approximating typical web response latency. We evaluate three distinct deployment
scenarios: (1) a baseline environment without any protection, (2) an environment with
GAShellBreaker deployed, and (3) an environment with OpenRASP deployed.
To emulate realistic load conditions, JMeter is configured with 1000 threads and a
ramp-up period of 30 s, representing 1000 users accessing the server concurrently within
that timeframe. The test is executed 10 times, generating a total of 10,000 HTTP requests.
Evaluation metrics include the average response time and performance overhead. Let T1
and T2 denote the average response times before and after deploying the protection mecha-
nism, respectively. The performance overhead T is calculated as shown in Equation (1):
T2 − T1
T= × 100% (1)
T1
As shown in Table 10, when no protection program is running, the web server’s
average response time is 1.49 s. After deploying GAShellBreaker, the average response
time increases to 1.59 s, resulting in a performance overhead of 6.7%, which is within
an acceptable range. In contrast, after deploying OpenRASP, the web server’s average
response time increases to 1.87 s, leading to a performance overhead of 25.5%, which has a
slight impact on the server’s operation.
As shown in Figure 8, we have plotted the response time distribution curves before
and after running the detection tools. Overall, deploying a protection program increases the
response time. However, when running GAShellBreaker, the response time curve remains
closer to that of the unprotected environment. In contrast, OpenRASP exhibits a more
Electronics 2025, 14, 1678 20 of 23
Figure 8. Response time distribution curve before and after running the detection tool.
6. Conclusions
Webshells are malicious server-side scripts commonly used by attackers to maintain
access after compromising a server. However, as security defenses continue to evolve,
traditional file-based Webshells are becoming increasingly difficult to deploy undetected.
Consequently, fileless Webshells—characterized by their stealth and lack of persistence
on disk—have emerged as a new trend. Due to their memory-resident nature, traditional
detection tools struggle to effectively identify fileless Webshells. To address this challenge,
this paper systematically investigates Java-based fileless Webshells, analyzing the principles
underlying two main categories and constructing their corresponding threat models. We
then propose a novel detection method, GAShellBreaker, which targets three key aspects of
fileless Webshells: input sources, payloads, and privilege states. GAShellBreaker comprises
two core components: a monitoring probe and a static detector. The monitoring probe
captures suspicious in-memory classes by monitoring specific function invocations and
exports them as bytecode files. The static detector employs a ResNet50-based deep learn-
ing model combined with grayscale image transformation to classify these bytecode files.
Given the similarity in core malicious logic between fileless and traditional file-based Web-
shells, the detector is initially trained on a file-based Webshell dataset, achieving excellent
detection performance with an average accuracy of 99.10%, outperforming other compa-
rable methods. The trained model is subsequently used to analyze captured suspicious
classes. Experimental results demonstrate that our approach achieves 89.29% accuracy in
detecting fileless Webshells, with a runtime performance overhead of only 6.7%, highlight-
ing the practical deployment potential of GAShellBreaker in real-world Java-based web
server environments.
Although GAShellBreaker has demonstrated strong detection performance and ro-
bustness against source-level obfuscation techniques, it has not yet been evaluated against
bytecode-level evasion strategies, such as opcode injection and instruction-level obfuscation.
These techniques alter the structure of bytecode without modifying its semantic behavior,
Electronics 2025, 14, 1678 21 of 23
Author Contributions: Conceptualization, Y.Z.; data curation, Y.Z.; funding acquisition, D.L.; method-
ology, Y.Z.; project administration, D.L.; resources, D.L.; software, D.L.; supervision, D.L.; validation,
Y.Z. and Y.X.; writing—original draft, Y.Z.; writing—review and editing, Y.Z. and Y.X. All authors
have read and agreed to the published version of the manuscript.
Funding: This research was funded by the National Natural Science Foundation of China, grant
number 61662004.
Appendix A
Table A1 presents the detection results of GAShellBreaker and JShellDetector across
all fileless Webshell samples.
GAShellBreaker JShellDetector
Category Name Monitoring Suspicious Webshell
Detector
Probe Class Filter Detection
1AddServlet ✓ ✓ ✓ ✓
2addservlet ✓ ✗ ✓ ✓
3memservlet ✓ ✓ ✓ ✓
4icememservlet ✓ ✓ ✓ ✓
7icememservlet ✓ ✓ ✓ ✓
7memservlet ✓ ✓ ✓ ✓
Servlet
AddServlet ✓ ✓ ✓ ✗
ISRain ✓ ✓ ✓ ✓
ISRain10 ✓ ✓ ✓ ✗
SRain ✓ ✓ ✓ ✓
SRain10 ✓ ✗ ✓ ✗
Component
TestServlet ✓ ✓ ✓ ✓
addFilter ✓ ✓ ✓ ✓
memfilter8910 ✓ ✓ ✓ ✓
4icememfilter ✓ ✓ ✓ ✓
icememfilter8910 ✓ ✓ ✓ ✓
AddFilter ✓ ✓ ✓ ✓
Filter
FRain ✓ ✓ ✓ ✗
FRain10 ✓ ✓ ✓ ✓
IFRain ✓ ✓ ✓ ✗
IFRain10 ✓ ✓ ✓ ✓
TestFilter ✓ ✓ ✓ ✓
Electronics 2025, 14, 1678 22 of 23
GAShellBreaker JShellDetector
Category Name Monitoring Suspicious Webshell
Detector
Probe Class Filter Detection
1AddListener ✓ ✓ ✓ ✓
addlistener ✓ ✗ ✓ ✓
icememlistener ✓ ✓ ✓ ✓
listener ✓ ✓ ✓ ✓
memlistener ✓ ✓ ✓ ✓
2AddListener ✓ ✓ ✓ ✗
Listener
3AddListener ✓ ✓ ✓ ✓
ILRain ✓ ✓ ✓ ✓
ILRain10 ✓ ✓ ✓ ✓
LRain ✓ ✓ ✓ ✓
LRain10 ✓ ✓ ✓ ✓
TestListener ✓ ✓ ✓ ✓
AddController ✓ ✓ ✓ ✗
ControllerBased ✓ ✓ ✓ ✓
Component Evil ✓ ✓ ✓ ✓
Spring–Controller
InjectToController ✓ ✓ ✓ ✓
invisibleShell ✓ ✓ ✓ ✓
ReController ✓ ✓ ✓ ✗
AddInterceptor ✓ ✓ ✓ ✗
Spring–Interceptor TestInterceptor ✓ ✗ ✓ ✓
TestInterceptor1 ✓ ✓ ✓ ✓
myValve ✓ ✓ ✗ ✓
Tomcat–Valve
myValve1 ✓ ✓ ✗ ✓
cmdbypass ✓ ✓ ✗ ✓
WebSocket
wscmd ✓ ✗ ✗ ✗
Executor AddExecutor ✓ ✓ ✗ ✓
Upgrade AddTUpgrade ✓ ✓ ✗ ✓
DefineTransformer ✓ ✓ ✗ ✓
ProcessUtil ✓ ✓ ✗ ✓
Shell ✓ ✗ ✗ ✗
Agent - ShellChecker ✓ ✓ ✗ ✓
Shell1 ✓ ✓ ✗ ✓
Shell2 ✓ ✓ ✗ ✓
WriteShell ✓ ✓ ✗ ✓
References
1. Lexi DiScola. Talos IR Trends Q4 2024: Web Shell Usage and Exploitation of Public-Facing Applications Spike. 2024. Available
online: [Link] (accessed on 11 March 2025).
2. Asiainfo Security. Asiainfo Security Technologies-2020 Thematic Analysis Report on New Ransomware Virus Without File
Attack Techniques. 2020. Available online: [Link] (accessed on
11 March 2025).
3. Li, Y.; Huang, J.; Ikusan, A.; Mitchell, M.; Zhang, J.; Dai, R. Shellbreaker: Automatically detecting php-based malicious web shells.
Comput. Secur. 2019, 87, 101595. [CrossRef]
4. Cui, H.; Huang, D.; Fang, Y.; Liu, L.; Huang, C. Webshell detection based on random forest–gradient boosting decision tree
algorithm. In Proceedings of the 2018 IEEE Third International Conference on Data Science in Cyberspace (DSC), Guangzhou,
China, 18–21 June 2018; pp. 153–160.
Electronics 2025, 14, 1678 23 of 23
5. Yang, W.; Sun, B.; Cui, B. A webshell detection technology based on HTTP traffic analysis. In Proceedings of the Innovative
Mobile and Internet Services in Ubiquitous Computing: Proceedings of the 12th International Conference on Innovative Mobile
and Internet Services in Ubiquitous Computing (IMIS-2018), Matsue, Japan, 4–6 July 2018; pp. 336–342.
6. Hannousse, A.; Yahiouche, S. Handling webshell attacks: A systematic mapping and survey. Comput. Secur. 2021, 108, 102366.
[CrossRef]
7. W3Techs. Web Technology Surveys. 2025. Available online: [Link] (accessed on 11 March 2025).
8. Koonce, B.; Koonce, B. ResNet 50. In Convolutional Neural Networks with Swift for Tensorflow: Image Recognition and Dataset
Categorization; Apress: Berkeley, CA, USA, 2021; pp. 63–72.
9. Luczko, P.; Thornton, J. PHP Shell Detector. 2012. Available online: [Link] (accessed
on 11 March 2025).
10. Thangavel, M.; TGR, A.S.; Priyadharshini, P.; Saranya, T. Review on machine and deep learning applications for cyber security. In
Research Anthology on Machine Learning Techniques, Methods, and Applications; IGI Global: Hershey, PA, USA, 2022; pp. 1143–1164.
11. Wang, Z.; Yang, J.; Dai, M.; Xu, R.; Liang, X. A method of detecting webshell based on multi-layer perception. Acad. J. Comput.
Inf. Sci. 2019, 2, 81–91.
12. Guo, Y.; Marco-Gisbert, H.; Keir, P. Mitigating webshell attacks through machine learning techniques. Future Internet 2020, 12, 12.
[CrossRef]
13. Min, J. Conv-Bilstm: A New Intelligent Webshell Detection Network Based on bi-lstm. Master’s Thesis, Lanzhou University,
Lanzhou, China, 2021.
14. Phan, V.A.; Jerabek, J.; Le, D.K.; Gotthans, T. New Approach to Shorten Feature Set via TF-IDF for Machine Learning-Based
Webshell Detection. In Proceedings of the 2024 IEEE International Conference on Cyber Security and Resilience (CSR), London,
UK, 2–4 September 2024; pp. 50–55.
15. Liu, Z.; Li, D.; Wei, L. A new method for webshell detection based on bidirectional gru and attention mechanism. Secur. Commun.
Netw. 2022, 2022, 3434920. [CrossRef]
16. Pu, A.; Feng, X.; Zhang, Y.; Wan, X.; Han, J.; Huang, C. BERT-Embedding-Based JSP Webshell Detection on Bytecode Level Using
XGBoost. Secur. Commun. Netw. 2022, 2022, 4315829. [CrossRef]
17. Wang, G.Y.; Ko, H.J.; Chiang, C.P.; Wang, W.J. Webshell detection based on codebert and deep learning model. In Proceedings
of the 2024 5th International Conference on Computing, Networks and Internet of Things, Tokyo, Japan, 24–26 May 2024;
pp. 484–489.
18. Viet, H.L.; Phung, O.V.; Nguyen, H.N. Enhancing Webshell Detection with Deep Learning-Powered Methods. arXiv 2024,
arXiv:2412.05532.
19. Lee, H.J.; Hwang, S.J.; Pratiwi, M.; Choi, Y.H. Obfuscated PHP Webshell Detection Using the Webshell Tailored TextRank
Algorithm. In Proceedings of the 39th ACM/SIGAPP Symposium on Applied Computing, Avila, Spain, 8–12 April 2024;
pp. 1358–1365.
20. Lima, S.M.; Silva, S.H.; Pinheiro, R.P.; Souza, D.M.; Lopes, P.G.; de Lima, R.D.; de Oliveira, J.R.; Monteiro, T.d.A.; Fernandes, S.M.;
Albuquerque, E.d.Q.; et al. Next-generation antivirus endowed with web-server sandbox applied to audit fileless attack. Soft
Comput. 2023, 27, 1471–1491. [CrossRef]
21. Song, X.; Qin, Y.; Liu, X.; Cui, B.; Fu, J. JShellDetector: A Java Fileless Webshell Detector Based on Program Analysis. Comput.
Mater. Contin. 2023, 75, 2061–2078. [CrossRef]
22. IBM Corporation. Java Servlets 3.0. 2022. Available online: [Link]
java-servlets-30 (accessed on 11 March 2025).
23. Thomas, S.L.; Francillon, A. Backdoors: Definition, deniability and detection. In Proceedings of the International Symposium on
Research in Attacks, Intrusions, and Defenses, Heraklion, Greece, 10–12 September 2018; pp. 92–113.
24. LandGrey. Copagent. 2021. Available online: [Link] (accessed on 11 March 2025).
25. Oracle Corporation. Java Platform SE 8 API Specification. 2014. Available online: [Link]
(accessed on 9 April 2025).
26. Zang, C. Java Risky Functions Collection. 2022. Available online: [Link] (accessed
on 9 April 2025).
27. Sarwinda, D.; Paradisa, R.H.; Bustamam, A.; Anggia, P. Deep learning in image classification using residual network (ResNet)
variants for detection of colorectal cancer. Procedia Comput. Sci. 2021, 179, 423–431. [CrossRef]
28. Baidu Security. OpenRASP. 2022. Available online: [Link] (accessed on 5 October 2023).
29. APACHE. APACHE JMeter. 2022. Available online: [Link] (accessed on 11 March 2025).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.