Execution (TA0002)(external, opens in a new tab or window)
Initial Access (TA0001)(external, opens in a new tab or window)
text code block:sequence by host.id with maxspan=5s [network where event.action == "connection_accepted" and network.direction == "ingress" and process.name : "java" and destination.port < 49152 and source.port >= 32768] by process.pid [process where event.type == "start" and /* Suspicious JAVA child process */ process.parent.name : "java" and process.name : ( "sh", "bash", "dash", "ksh", "tcsh", "zsh", "ash", "mksh", "busybox", "curl", "wget", "perl*", "python*", "ruby*", "php*", "lua*", "socat", "nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional", "nc.openbsd", "nc.traditional", "nohup", "setsid", "disown", "hostname", "whoami", "id" ) and not process.command_line like~ ( "bash -c ulimit -u", "bash /opt/flutter/bin/flutter*", "bash -c echo $$", "/bin/bash /opt/python3/bin/jira*", "/bin/sh -c env LC_ALL=C /usr/sbin/lpc status*" )] by process.parent.pid
Install detection rules in Elastic Security
Detect Potential Java Service Exploitation via Suspicious Child Process in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).