
🔍 A simple Bash script to detect malicious JSP webshells, including those used in exploits of SAP NetWeaver CVE-2025-31324.
A lightweight script to scan .jsp and .jspx files for suspicious patterns typically associated with JSP-based webshells, including those observed in attacks exploiting SAP NetWeaver CVE-2025-31324.
This scanner has also been expanded with triage checks for Oracle PeopleSoft / ShinyHunters / UNC6240 indicators associated with CVE-2026-35273, including suspicious PeopleSoft paths, filenames, hashes, and C2 strings.
This is a triage tool. It is intended to help defenders quickly identify suspicious files, paths, and strings that warrant follow-up review.
The scanner hunts for JSP/JSPX files and related web-tier artifacts that contain patterns such as:
Runtime.getRuntime()request.getParameter()exec(, cmd=, command=, and ProcessBuildernew File(), FileWriter, PrintWriter, and FileOutputStreamresponse.getWriter() and out.println()cmd.exe, powershell, /bin/sh, and /bin/bashIt inspects file contents, not just filenames, making it suitable for detecting renamed or stealth webshells.
The scanner also includes triage checks for Oracle PeopleSoft indicators associated with the June 2026 ShinyHunters / UNC6240 campaign involving CVE-2026-35273.
These checks include:
/PSEMHUB/hub/PSIGW/HttpListeningConnector/PSEMHUB/.jsp or .jspx files under PSEMHUB.warPSEMHUB.war/envmetadata/transactionslogs, persistantstorage, persistentstorage, or scratchpad directories under PSEMHUB pathsenvmetadata/data/environmentREADME-IF-YOU-SEE-THIS-YOUVE-BEEN-HACKED.TXT142.11.200.186
142.11.200.187
142.11.200.188
142.11.200.189
142.11.200.190
108.174.202.99
176.120.22.24
azurenetfiles.net
wss://azurenetfiles.net:443/agent.ashx
README-IF-YOU-SEE-THIS-YOUVE-BEEN-HACKED.TXT
*_fanout.sh
meshagent
meshagent.exe
meshagent32-azure-ops.exe
meshagent64-azure-ops.exe
meshagent64-v2.exe
meshctrl.js
.bash_history
2ab684d93c1553fad87041b4dea97188a97e78589deee2a7bacff905564f3a35
f02a924c9ff92a8780ce812511341182c6b509d45bc59f3f7b522e37225d24fc
d83fdb9e53c5ff03c4cb0451ea1bebd79b53f29eadc1e2fa394c7af13a86ce2f
c7e9332731b06644fc73e0046a2a89eaa59b09f54250e9bd622467187351711f
68257a6f9ff196179ec03624e849927f26599eb180a7c82e14ef5bc4e93bc309
Clone the repo or download the Bash script:
chmod +x detect_webshells.sh
./detect_webshells.sh /path/to/scan
Example:
./detect_webshells.sh .
Example SAP path:
./detect_webshells.sh /usr/sap
Example PeopleSoft paths:
./detect_webshells.sh /u01/app/psoft
./detect_webshells.sh /u01/app/psoft/ps_config_homes
./detect_webshells.sh /opt/oracle/psft
Clone the repo or download the PowerShell script:
.\detect_webshells.ps1 -Path .
Example:
.\detect_webshells.ps1 -Path C:\inetpub\wwwroot
Example PeopleSoft paths:
.\detect_webshells.ps1 -Path D:\PeopleSoft
.\detect_webshells.ps1 -Path D:\Oracle\PeopleSoft
.\detect_webshells.ps1 -Path C:\Oracle\Middleware
If PowerShell blocks script execution, run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\detect_webshells.ps1 -Path .
This changes the execution policy only for the current PowerShell session.
==== 1. Suspicious JSP code patterns ====
[HIT] Suspicious JSP pattern: Runtime\.getRuntime\(
/usr/sap/OP1/J31/work/suspicious.jsp:13: out.println(Runtime.getRuntime().exec(cmd));
[HIT] Suspicious JSP pattern: request\.getParameter\(
/usr/sap/OP1/J31/work/shell.jsp:9: String cmd = request.getParameter("cmd");
==== 2. PeopleSoft / ShinyHunters HTTP path indicators ====
[HIT] HTTP/path indicator: POST /PSEMHUB/hub
/u01/app/psoft/logs/access.log:1042: 142.11.200.186 - - "POST /PSEMHUB/hub HTTP/1.1" 200
==== 4. Filename indicators ====
[HIT] Suspicious filename: /u01/app/psoft/README-IF-YOU-SEE-THIS-YOUVE-BEEN-HACKED.TXT
==== 1. Suspicious JSP code patterns ====
[HIT] Suspicious JSP pattern in C:\PeopleSoft\webserv\shell.jsp:9: String cmd = request.getParameter("cmd");
==== 5. Network/C2 indicators in files and logs ====
[HIT] Network/C2 IOC 'azurenetfiles.net' in C:\PeopleSoft\logs\access.log:522: connection to azurenetfiles.net
A scanner hit should be treated as a lead for investigation, not definitive proof of compromise.
For SAP NetWeaver environments, review:
For PeopleSoft environments, review:
/PSEMHUB/hub/PSIGW/HttpListeningConnectorPSEMHUB.warThis script is provided as-is, without warranties, guarantees, or liability of any kind.
It is intended as a quick triage tool to assist in the initial identification of suspicious .jsp and .jspx files, especially those that may resemble webshells related to vulnerabilities such as SAP NetWeaver CVE-2025-31324.
It also includes triage checks for selected Oracle PeopleSoft / ShinyHunters / UNC6240 indicators, but it is not a comprehensive PeopleSoft forensic scanner.
This tool is not a replacement for full incident response, forensic review, vendor patch validation, EDR telemetry, or log analysis.
You are solely responsible for how you interpret and act on the findings. This project is shared in good faith and for community benefit, but use is entirely at your own risk.
Contributions are welcome and appreciated.
If you'd like to improve this tool — whether by adding new detection patterns, optimizing scanning logic, improving IOC coverage, or reducing false positives — feel free to open an issue or submit a pull request.
Before submitting a pull request:
Thank you for supporting open-source security tooling.
*_fanout.shpsappsrv.cfg, ps_config, and config.xml