Detect CVE-2021-26828: OpenPLC ScadaBR Unrestricted File Upload RCE in Elastic Security
Detects exploitation of CVE-2021-26828, an unrestricted file upload vulnerability in OpenPLC ScadaBR that allows authenticated attackers to upload files with dangerous types (e.g., JSP, PHP, WAR) to the server, leading to remote code execution. ScadaBR is a SCADA/HMI web application widely used in industrial control systems. This vulnerability is actively exploited in the wild and listed in CISA KEV.
MITRE ATT&CK
- Tactic
- Initial Access Execution Persistence
Elastic Detection Query
sequence by host.name with maxspan=5m
[file where event.action == "creation" and
(
file.path like~ "*/scadabr/*" or
file.path like~ "*/openplc/*" or
file.path like~ "*/tomcat/webapps/*"
) and
file.extension in ("jsp", "jspx", "php", "war", "sh", "py", "pl", "aspx", "cfm")
]
[process where event.action == "start" and
(
process.parent.name in ("java", "java.exe", "catalina.sh") or
process.parent.executable like~ "*/jre/*"
) and
process.name in ("cmd.exe", "powershell.exe", "bash", "sh", "python", "python3", "perl", "ruby", "nc", "ncat", "wget", "curl")
] EQL sequence detecting file creation of dangerous file types in ScadaBR/Tomcat directories followed within 5 minutes by a command interpreter spawned from a Java parent process, indicating web shell upload and execution.
Data Sources
Required Tables
False Positives & Tuning
- Automated deployment pipelines that copy JSP files to Tomcat webapps directory before restarting services
- ICS engineers deploying legitimate ScadaBR customizations via WAR packaging
- Monitoring agents or health check scripts spawned from Java application servers
- Load testing tools initiated by Java-based test frameworks
Other platforms for CVE-2021-26828
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Upload JSP Web Shell to ScadaBR Upload Endpoint
Expected signal: HTTP POST to /ScadaBR/upload.shtm with multipart form data containing .jsp file; Tomcat access log shows 200 response; file creation event for .jsp file in webapps directory
- Test 2Execute OS Command via Uploaded JSP Web Shell
Expected signal: Java process (Tomcat JVM) spawning child process for id, whoami, cat commands; Sysmon Event ID 1 with ParentImage containing java; process command line containing /etc/passwd
- Test 3Establish Reverse Shell from ScadaBR Server via Web Shell
Expected signal: Java process spawning bash with /dev/tcp redirect; outbound TCP connection from ScadaBR host to ATTACKER_IP:4444; network flow event with non-standard destination port from Java process
- Test 4Upload PHP Web Shell as Image File Bypass
Expected signal: POST request to upload endpoint with PHP file disguised as image; file creation event showing PHP content in webapps directory; Content-Type mismatch between declared image/jpeg and actual PHP content
Unlock Pro Content
Get the full detection package for CVE-2021-26828 including response playbook, investigation guide, and atomic red team tests.