A ${jndi:ldap://…} in the User-Agent against a Java app
Signals
- The WAF logs "${jndi:ldap://…}" in the User-Agent header against a Java app
- The server makes an outbound LDAP connection to an external IP right after
- The java process spawns a child /bin/sh
- Thousands of similar requests from different IPs
What do you do first?
▸ See the breakdown (reasoning, evidence, MITRE, detection)
- A) It is mass-scanned from thousands of IPs: blocking one is useless.
- B) ✅ Correct. The outbound LDAP callback + the java process spawning a shell confirm SUCCESSFUL exploitation, not a mere attempt. Confirm the scope (what was downloaded/executed?) and mitigate the vulnerable component.
- C) Restarting can wipe in-memory evidence and does not remove the vulnerability.
- D) The WAF signature helps as an extra layer, but it can be obfuscated; it neither confirms nor remediates the compromise.
The key difference: an attempt ("${jndi…}" in a log) is not a compromise; the outbound CALLBACK and the child process confirm it. Prioritize: (1) confirm successful exploitation via egress and process telemetry, (2) mitigate the vulnerable component (patch or temporary mitigation), (3) hunt for persistence and lateral movement. Blocking IPs or WAF signatures buy time, not a cure.
- Access/WAF logs: jndi:ldap/rmi/dns patterns in headers, URI or body
- Outbound LDAP/RMI connections from the application server
- The JVM spawns unexpected child processes (cmd/sh) and later downloads (T1105)
Rule for jndi patterns in requests + LDAP/RMI egress from app servers + unexpected JVM child processes.