Repository navigation
Expand file tree
/
Copy pathjava4shell.rules
More file actions
21 lines (15 loc) · 2.56 KB
/
Copy pathjava4shell.rules
File metadata and controls
21 lines (15 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Java4Shell (CVE-2026-114938) Suricata / Snort Detection Rules
# https://github.com/ikow/java4shell-poc
# Malformed Base64 padding in HTTP Basic Authentication
# Legitimate Base64 has length % 4 == 0; the trigger has length % 4 == 1
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"JAVA4SHELL Malformed Base64 Padding in Basic Auth (CVE-2026-114938)"; flow:to_server,established; http.header; content:"Authorization|3a 20|Basic "; pcre:"/Basic\s+[A-Za-z0-9+\/]{64,}={1}\s*$/R"; classtype:web-application-attack; sid:2026114901; rev:1; metadata:cve CVE-2026-114938, severity critical;)
# 64×A + = pattern (exact trigger for JDK 21+)
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"JAVA4SHELL Exact Trigger Pattern 64xA+= (CVE-2026-114938)"; flow:to_server,established; http.header; content:"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; classtype:web-application-attack; sid:2026114902; rev:1; metadata:cve CVE-2026-114938, severity critical;)
# 128×A + = pattern (trigger for JDK 17)
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"JAVA4SHELL Exact Trigger Pattern 128xA+= JDK17 (CVE-2026-114938)"; flow:to_server,established; http.header; content:"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; classtype:web-application-attack; sid:2026114903; rev:1; metadata:cve CVE-2026-114938, severity critical;)
# High-frequency Base64 requests from single source (warm-up detection)
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"JAVA4SHELL Potential JIT Warm-up - High Rate Base64 Auth (CVE-2026-114938)"; flow:to_server,established; http.header; content:"Authorization|3a 20|Basic "; threshold:type both, track by_src, count 1000, seconds 60; classtype:web-application-attack; sid:2026114904; rev:1; metadata:cve CVE-2026-114938, severity medium;)
# JVM crash indicator in response (hs_err)
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"JAVA4SHELL JVM Crash Indicator in Response (CVE-2026-114938)"; flow:to_client,established; http.response_body; content:"hs_err_pid"; content:"SIGSEGV"; classtype:web-application-attack; sid:2026114905; rev:1; metadata:cve CVE-2026-114938, severity high;)
# Malformed Base64 in JWT Bearer token
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"JAVA4SHELL Malformed Base64 in Bearer Token (CVE-2026-114938)"; flow:to_server,established; http.header; content:"Authorization|3a 20|Bearer "; pcre:"/Bearer\s+[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{64,}={1}\./R"; classtype:web-application-attack; sid:2026114906; rev:1; metadata:cve CVE-2026-114938, severity high;)