Detect OpenPLC ScadaBR Cross-Site Scripting (XSS) Exploitation Detected in Splunk
Detects exploitation attempts targeting CVE-2021-26829, a stored or reflected cross-site scripting vulnerability in OpenPLC ScadaBR. ScadaBR is a SCADA/HMI platform used in industrial control environments. Successful exploitation allows attackers to inject malicious scripts into the web interface, potentially enabling session hijacking, credential theft, or lateral movement within OT/ICS environments. This CVE is listed on CISA's Known Exploited Vulnerabilities catalog.
MITRE ATT&CK
SPL Detection Query
index=web OR index=network OR index=ics
(sourcetype=access_combined OR sourcetype=iis OR sourcetype=waf OR sourcetype=pan_traffic)
(
(uri="*ScadaBR*" OR uri="*scada*" OR host="*scadabr*")
AND
(
(uri_query IN ("*<script*", "*javascript:*", "*onerror=*", "*onload=*", "*alert(*", "*document.cookie*", "*<img*onerror*", "*<svg*onload*"))
OR (http_referrer IN ("*<script*", "*javascript:*", "*onerror=*"))
OR (status=200 AND bytes>0 AND method=POST AND uri="*ScadaBR*")
)
)
| eval cve="CVE-2021-26829"
| eval severity="high"
| eval attack_type="XSS-ScadaBR"
| stats count AS request_count, values(uri_query) AS payloads, values(src_ip) AS source_ips, dc(src_ip) AS unique_sources, earliest(_time) AS first_seen, latest(_time) AS last_seen BY host, uri, method, status, cve, severity
| where request_count >= 1
| eval first_seen=strftime(first_seen, "%Y-%m-%dT%H:%M:%SZ"), last_seen=strftime(last_seen, "%Y-%m-%dT%H:%M:%SZ")
| table host, uri, method, status, payloads, source_ips, unique_sources, request_count, first_seen, last_seen, cve, severity
| sort - request_count Searches web access logs for HTTP requests targeting ScadaBR URIs that contain XSS payload patterns in URI query parameters or referrer headers. Aggregates by host and URI to surface repeated exploitation attempts.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Authorized vulnerability scanners performing scheduled assessments of ScadaBR deployments
- Security researchers with authorized access testing XSS defenses in lab environments
- Burp Suite or OWASP ZAP automated scans run by development or security teams
- False URI matches on legitimate web applications with 'scada' in their path unrelated to ScadaBR
Other platforms for CVE-2021-26829
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 1Reflected XSS Probe via ScadaBR Search Parameter
Expected signal: Web server access log entry with URI containing '<script>alert(document.cookie)</script>' and HTTP response code (200 if reflected, 400/500 if filtered). WAF logs should show XSS rule match.
- Test 2Stored XSS via ScadaBR Watchlist Name Field
Expected signal: POST request in web access logs to ScadaBR watchList endpoint with body containing XSS payload. Subsequent GET requests loading the watchlist page will serve the stored payload to other authenticated users.
- Test 3Session Cookie Exfiltration Simulation via XSS
Expected signal: Outbound HTTP GET request from the ScadaBR operator's browser/host to the attacker's listener IP on port 8888 with the session cookie in the query parameter. Network flow logs should show the lateral connection from the OT network to the attacker IP.
- Test 4ScadaBR XSS via HTTP Referrer Header Injection
Expected signal: HTTP access log entry showing the malicious Referer header value. If ScadaBR reflects the Referer in error pages or breadcrumbs, the response body will contain the injected script tag.
Unlock Pro Content
Get the full detection package for CVE-2021-26829 including response playbook, investigation guide, and atomic red team tests.