CVE-2026-10520 Elastic Security · Elastic

Detect Ivanti Sentry OS Command Injection Exploitation (CVE-2026-10520) in Elastic Security

Detects exploitation attempts targeting CVE-2026-10520, an OS command injection vulnerability (CWE-78) in Ivanti Sentry. This vulnerability is actively exploited in the wild (CISA KEV) and allows unauthenticated or authenticated attackers to inject operating system commands through Ivanti Sentry's administrative or API interfaces, potentially leading to full system compromise. Ivanti Sentry acts as a gateway for enterprise mobile device management, making it a high-value target for threat actors seeking persistent access to corporate infrastructure.

MITRE ATT&CK

Tactic
Initial Access Execution Persistence Lateral Movement

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=30s
  [network where destination.port in (8443, 443, 9090) and
   network.direction == "inbound" and
   not source.ip == "127.0.0.1"]
  [process where event.type == "start" and
   process.parent.name in ("java", "sh", "bash", "catalina.sh") and
   process.name in ("sh", "bash", "dash", "python", "python3", "perl", "wget", "curl", "nc", "ncat", "netcat", "chmod", "mkfifo", "id", "whoami", "uname") and
   (
     process.args : ("*;*", "*&&*", "*||*", "*`*", "*$(*", "*>/tmp*", "*wget*", "*curl*") or
     process.name in ("nc", "ncat", "netcat", "mkfifo")
   )
  ]
critical severity high confidence

Uses EQL sequence correlation to link inbound network connections on Ivanti Sentry ports with subsequent suspicious process spawning from Java parent processes within a 30-second window, providing high-fidelity detection of active exploitation.

Data Sources

Elastic Endpoint SecurityElastic Network Packet CaptureFilebeat syslog

Required Tables

logs-endpoint.events.process-*logs-endpoint.events.network-*

False Positives & Tuning

  • Automated monitoring scripts polling Sentry health endpoints followed by coincidental admin shell activity
  • Load balancer health checks triggering network events simultaneous with scheduled maintenance scripts
  • Security scanner authenticated probes coinciding with background Java garbage collection shell calls
  • Ivanti update service downloading patches via wget/curl immediately after receiving management traffic

Other platforms for CVE-2026-10520


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.

  1. Test 1Ivanti Sentry CVE-2026-10520 Basic Command Injection Simulation

    Expected signal: EDR should record process creation event: parent=java, child=bash with arguments '-c' and 'id; whoami; uname -a; cat /etc/passwd | head -3'. Auditd should record EXECVE syscall with ppid matching java process PID. Network telemetry: no outbound connections expected in this basic test.

  2. Test 2Ivanti Sentry Reverse Shell Simulation via Java Parent

    Expected signal: Process chain: java -> bash (args: -c, 'echo ... | nc 127.0.0.1 9999') -> nc (args: 127.0.0.1, 9999). Network connection event: nc connecting to 127.0.0.1:9999. Auditd EXECVE syscalls for bash and nc with ppid chain traceable to java.

  3. Test 3Ivanti Sentry Web Shell Drop Simulation

    Expected signal: File creation event: /tmp/sim_sentry_webapps/cmd_sim_marker.jsp created by initiating process java (sentry_webshell_sim). Process creation event: java spawning bash to list directory contents. EDR file monitoring should record .jsp creation in simulated webapps directory with java as initiating process.

  4. Test 4Ivanti Sentry Credential Staging Simulation

    Expected signal: Process chain: java -> bash (multiple invocations with file read and base64 encoding commands). File access events: reads of simulated credential files. File creation event: /tmp/exfil_stage.b64 created by bash initiating from java parent. Auditd EXECVE records for bash invocations with ppid traceable to java.


Response Playbook

Triage

  1. Immediately identify all Ivanti Sentry appliances in the environment and confirm whether affected versions are deployed; cross-reference asset inventory against CISA KEV advisory for CVE-2026-10520.
  2. Review web server and application logs on Sentry appliances for anomalous HTTP/HTTPS requests to administrative endpoints (typically /mics/, /admin/, or /cfg/ paths) containing shell metacharacters (;, &&, ||, backticks, $()) in parameter values or headers.
  3. Examine process tree on suspected Sentry hosts for Java/Tomcat parent processes with unexpected child processes (sh, bash, wget, curl, nc, python) — a Java process spawning an interactive shell is near-certain exploitation.
  4. Check outbound network connections from Sentry appliances for unexpected destinations, particularly connections to external IP addresses on non-standard ports, which may indicate reverse shell establishment or C2 beacon activity.
  5. Query EDR telemetry for the presence of dropper artifacts in /tmp, /var/tmp, or Tomcat work directories on Sentry hosts; hash any suspicious files and submit to threat intelligence platforms.

Containment

  1. Immediately isolate confirmed or suspected compromised Ivanti Sentry appliances from the network by removing them from load balancer rotation and applying firewall ACLs to block all inbound traffic except from a dedicated investigation subnet — coordinate with MDM teams as this will impact mobile device connectivity.
  2. Rotate all credentials that may have been accessible to the Sentry appliance, including Active Directory service accounts used for MDM integration, API tokens for connected systems (Microsoft Intune, Exchange ActiveSync), and any certificates or private keys stored on or accessible by the Sentry server.
  3. If network isolation is not immediately feasible, apply emergency WAF rules to block requests containing OS injection metacharacters (;, &&, ||, backtick, $(), pipe followed by command) to Sentry administrative and API endpoints as a temporary mitigation while patch deployment is coordinated.

Evidence Collection

  1. Collect and preserve full memory dump of affected Sentry appliances using approved forensic tooling before any remediation; OS command injection may drop fileless payloads or install persistence only visible in memory (cron entries, SSH authorized_keys modifications, LD_PRELOAD hooks).
  2. Preserve compressed archives of: all Sentry application logs (/opt/sentry/logs/, /var/log/tomcat*, Nginx/Apache access logs), auditd logs, bash history for all accounts, /tmp and /var/tmp contents, crontab entries for all users, and SSH authorized_keys files — ensure chain of custody for potential incident response or legal proceedings.
  3. Capture full packet captures (pcap) from the period surrounding the suspected exploitation window using network taps or mirror ports on the Sentry network segment to reconstruct the attack payload and identify any data exfiltrated.

Escalation Criteria

  • !Escalate to incident commander and executive leadership immediately if forensic analysis confirms successful exploitation (shell spawned, persistence installed, or data exfiltration observed), as Ivanti Sentry's role as MDM gateway means compromise may expose enrolled mobile device credentials and enterprise email for all managed devices.
  • !Escalate to legal/compliance team and trigger breach notification review process if evidence indicates the attacker accessed Sentry-proxied data including ActiveSync email payloads, MDM enrollment credentials, or device certificates, as this may constitute a reportable data breach under applicable regulations (GDPR, HIPAA, state breach notification laws).
  • !Escalate to threat intelligence team and consider sharing indicators with ISACs (FS-ISAC, H-ISAC, etc.) if post-exploitation activity indicates a nation-state or advanced persistent threat actor based on tooling, infrastructure, or TTPs observed during forensic analysis.

Investigation Guide

Related Techniques

Forensic Artifacts

  • >Sentry application logs at /opt/sentry/logs/ or /var/log/sentry/ containing HTTP requests with shell metacharacters in URL parameters, headers, or POST body fields
  • >Auditd EXECVE records showing Java or Tomcat process spawning unexpected child processes (syscall=execve with ppid matching java/tomcat PID)
  • >Bash history files for service accounts (typically /home/sentry/.bash_history or /root/.bash_history) containing attacker-executed reconnaissance or persistence commands
  • >Crontab entries for service accounts or root created post-exploitation for persistent callback (check /var/spool/cron/ and /etc/cron.d/)
  • >Modified SSH authorized_keys files indicating attacker added SSH public key for persistent access without requiring exploit re-execution
  • >Artifacts in /tmp, /var/tmp, or Tomcat work directories: downloaded binaries, reverse shell scripts, or dropper files with recent modification timestamps

Tuning Guidance

Start with high-confidence signals: Java/Tomcat spawning nc, ncat, mkfifo, or bash with -i/-c flags are extremely high fidelity and should generate immediate alerts. Tune down wget/curl child process alerts by building an allowlist of known-good Ivanti update server IP ranges and CDN hostnames in your environment. For reconnaissance commands (id, whoami, uname), consider suppressing alerts from known maintenance windows using time-based exclusions. If Sentry hosts are in a dedicated network segment, reduce false positive noise by scoping the detection to only those network segments rather than all hosts. Validate parent process names carefully — some organizations run Java-based monitoring agents alongside Sentry that may legitimately spawn shell processes; build per-host process lineage baselines over 30 days before enforcing strict alerting.


Hunting Queries

Threat hunt query to identify outbound network connections initiated by Java/Tomcat-family processes on Sentry hosts to external (non-RFC1918) IP addresses, which may indicate reverse shell callback, C2 beacon, or data exfiltration following successful CVE-2026-10520 exploitation.

Hunting — KQL
kql
DeviceNetworkEvents
| where InitiatingProcessFileName in~ ("java", "sh", "bash", "python", "python3", "curl", "wget")
| where InitiatingProcessParentFileName in~ ("java", "tomcat", "catalina.sh")
| where RemoteIPType != "Private"
| where ActionType == "ConnectionSuccess"
| summarize ConnectionCount=count(), DestinationPorts=make_set(RemotePort), DestinationIPs=make_set(RemoteIP) by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where ConnectionCount > 0
| order by ConnectionCount desc
Hunting — SPL
spl
index=network OR index=endpoint sourcetype IN ("zeek:conn", "suricata", "linux_secure")
| eval is_sentry_initiator=if(match(lower(coalesce(process_name, app)), "java|tomcat|catalina|wget|curl|python|nc"), 1, 0)
| where is_sentry_initiator=1
| where NOT match(dest_ip, "^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.)")
| stats count AS connection_count, values(dest_port) AS dest_ports, values(dest_ip) AS dest_ips BY src_ip, process_name
| where connection_count > 0
| sort -connection_count

File creation hunt query targeting suspicious file drops in world-writable directories and Tomcat webapps paths from Java/shell initiators, which may indicate web shell deployment or dropper staging following OS command injection exploitation.

Hunting — KQL
kql
DeviceFileEvents
| where FolderPath startswith "/tmp" or FolderPath startswith "/var/tmp" or FolderPath contains "/tomcat/work/" or FolderPath contains "/webapps/"
| where InitiatingProcessFileName in~ ("java", "sh", "bash", "wget", "curl", "python", "python3")
| where ActionType in ("FileCreated", "FileModified")
| where FileName endswith ".jsp" or FileName endswith ".sh" or FileName endswith ".py" or FileName endswith ".pl" or not FileName contains "."
| project Timestamp, DeviceName, FolderPath, FileName, SHA256, InitiatingProcessCommandLine
| order by Timestamp desc
Hunting — SPL
spl
index=endpoint sourcetype=auditd type=PATH
| where match(name, "^(/tmp|/var/tmp)/.+$") OR match(name, "/tomcat/work/|/webapps/") AND match(name, "\.(jsp|sh|py|pl)$")
| join type=left name [ search index=endpoint sourcetype=auditd type=EXECVE | rename a0 as exec_cmd | table name, exec_cmd ]
| table _time, host, name, exec_cmd
| sort -_time

Atomic Red Team Tests

Test 1 Ivanti Sentry CVE-2026-10520 Basic Command Injection Simulation
linux

Simulates the process lineage created when an attacker exploits CVE-2026-10520 to inject OS commands through Ivanti Sentry. This test creates a Java parent process that spawns a bash child process executing reconnaissance commands, matching the expected telemetry signature without requiring the actual vulnerable appliance.

Command

bash
#!/bin/bash
# LAB ENVIRONMENT ONLY - Simulates CVE-2026-10520 process chain
# Requires Java installed
cat > /tmp/sentry_sim_exploit.java << 'EOF'
import java.io.*;
public class sentry_sim_exploit {
    public static void main(String[] args) throws Exception {
        System.out.println("[SIM] Ivanti Sentry CVE-2026-10520 process chain simulation");
        ProcessBuilder pb = new ProcessBuilder("/bin/bash", "-c", "id; whoami; uname -a; cat /etc/passwd | head -3");
        pb.redirectErrorStream(true);
        Process p = pb.start();
        BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
        String line;
        while ((line = br.readLine()) != null) { System.out.println(line); }
        p.waitFor();
    }
}
EOF
javac /tmp/sentry_sim_exploit.java -d /tmp/
cd /tmp && java sentry_sim_exploit

Cleanup

bash
rm -f /tmp/sentry_sim_exploit.java /tmp/sentry_sim_exploit.class

Expected Telemetry

EDR should record process creation event: parent=java, child=bash with arguments '-c' and 'id; whoami; uname -a; cat /etc/passwd | head -3'. Auditd should record EXECVE syscall with ppid matching java process PID. Network telemetry: no outbound connections expected in this basic test.

Expected Detection

Detection rule should fire on Java process spawning bash with semicolon-separated commands. Risk tier should be classified as HIGH due to shell metacharacter (;) in command line and bash child of java parent matching the Ivanti Sentry exploitation pattern.

Test 2 Ivanti Sentry Reverse Shell Simulation via Java Parent
linux

Simulates the reverse shell establishment phase of CVE-2026-10520 exploitation where the attacker's injected command creates an outbound reverse shell connection. Uses a loopback connection to avoid actual external exposure. Validates that both process creation and network connection telemetry is captured.

Command

bash
#!/bin/bash
# LAB ONLY - Reverse shell simulation for CVE-2026-10520 detection validation
# Start a loopback listener in background first
nc -l 127.0.0.1 9999 &
LISTENER_PID=$!
sleep 1

# Simulate the Java->bash->nc chain
cat > /tmp/sentry_revshell_sim.java << 'EOF'
import java.io.*;
public class sentry_revshell_sim {
    public static void main(String[] args) throws Exception {
        System.out.println("[SIM] Reverse shell simulation - loopback only");
        // Simulate injection: java spawns bash which spawns nc
        ProcessBuilder pb = new ProcessBuilder("/bin/bash", "-c",
            "echo '[CVE-2026-10520-SIM] reverse shell test' | nc 127.0.0.1 9999");
        pb.redirectErrorStream(true);
        Process p = pb.start();
        p.waitFor(5, java.util.concurrent.TimeUnit.SECONDS);
        System.out.println("[SIM] Reverse shell payload sent to loopback");
    }
}
EOF
javac /tmp/sentry_revshell_sim.java -d /tmp/
cd /tmp && java sentry_revshell_sim
kill $LISTENER_PID 2>/dev/null
echo "[DONE] Test complete - check EDR for java->bash->nc process chain"

Cleanup

bash
rm -f /tmp/sentry_revshell_sim.java /tmp/sentry_revshell_sim.class; kill $(pgrep -f 'nc -l 127.0.0.1 9999') 2>/dev/null

Expected Telemetry

Process chain: java -> bash (args: -c, 'echo ... | nc 127.0.0.1 9999') -> nc (args: 127.0.0.1, 9999). Network connection event: nc connecting to 127.0.0.1:9999. Auditd EXECVE syscalls for bash and nc with ppid chain traceable to java.

Expected Detection

Detection should fire at CRITICAL tier due to nc (netcat) process spawned as descendant of java parent. Network detection should also alert on nc establishing connection. This validates both process-lineage and network correlation detection logic.

Test 3 Ivanti Sentry Web Shell Drop Simulation
linux

Simulates the post-exploitation phase of CVE-2026-10520 where an attacker uses the command injection to drop a JSP web shell into the Tomcat webapps directory for persistent access. Validates file creation telemetry detection from Java parent processes.

Command

bash
#!/bin/bash
# LAB ONLY - Web shell drop simulation for CVE-2026-10520
# Creates a benign marker file (not functional) to simulate web shell drop
SIM_WEBAPPS_DIR="/tmp/sim_sentry_webapps"
mkdir -p "$SIM_WEBAPPS_DIR"

# Simulate java process creating a JSP file (represents attacker's injected command writing webshell)
cat > /tmp/sentry_webshell_sim.java << 'EOF'
import java.io.*;
import java.nio.file.*;
public class sentry_webshell_sim {
    public static void main(String[] args) throws Exception {
        String webappsPath = "/tmp/sim_sentry_webapps";
        System.out.println("[SIM] Simulating web shell drop via command injection");
        // Write a benign marker file with .jsp extension (non-functional)
        String shellMarker = "<!-- CVE-2026-10520-SIM: This file simulates web shell drop. NOT functional. -->";
        Files.writeString(Paths.get(webappsPath + "/cmd_sim_marker.jsp"), shellMarker);
        // Simulate attacker also checking /tmp for staging
        ProcessBuilder pb = new ProcessBuilder("/bin/bash", "-c",
            "ls -la /tmp/sim_sentry_webapps/ && echo '[SIM] Web shell staged'");
        pb.redirectErrorStream(true);
        Process p = pb.start();
        BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
        String line;
        while ((line = br.readLine()) != null) { System.out.println(line); }
    }
}
EOF
javac /tmp/sentry_webshell_sim.java -d /tmp/
cd /tmp && java sentry_webshell_sim
echo "[DONE] Check file creation telemetry for .jsp file created by java process"

Cleanup

bash
rm -rf /tmp/sim_sentry_webapps /tmp/sentry_webshell_sim.java /tmp/sentry_webshell_sim.class

Expected Telemetry

File creation event: /tmp/sim_sentry_webapps/cmd_sim_marker.jsp created by initiating process java (sentry_webshell_sim). Process creation event: java spawning bash to list directory contents. EDR file monitoring should record .jsp creation in simulated webapps directory with java as initiating process.

Expected Detection

File creation hunting query should surface .jsp file created by java process in a webapps-pattern directory path. Process detection should fire on java spawning bash with ls command. Combined telemetry correlates web shell deployment phase of CVE-2026-10520 post-exploitation workflow.

Test 4 Ivanti Sentry Credential Staging Simulation
linux

Simulates an attacker using CVE-2026-10520 command injection to stage credential files from the Sentry appliance for exfiltration. Tests detection of sensitive file access and outbound data staging patterns attributable to Java parent processes.

Command

bash
#!/bin/bash
# LAB ONLY - Credential staging simulation for CVE-2026-10520 post-exploitation
mkdir -p /tmp/sim_sentry_creds

# Create fake credential files that simulate what an attacker would target
echo 'SIMULATED_SENTRY_CONFIG_NOT_REAL' > /tmp/sim_sentry_creds/server.xml.bak
echo 'SIMULATED_KEYSTORE_NOT_REAL' > /tmp/sim_sentry_creds/keystore.jks.bak

# Simulate Java -> bash -> file staging chain
cat > /tmp/sentry_cred_stage_sim.java << 'EOF'
import java.io.*;
public class sentry_cred_stage_sim {
    public static void main(String[] args) throws Exception {
        System.out.println("[SIM] Credential staging simulation - CVE-2026-10520");
        String[] cmds = {
            "cat /tmp/sim_sentry_creds/server.xml.bak | base64 > /tmp/exfil_stage.b64",
            "wc -c /tmp/exfil_stage.b64",
            "echo '[SIM] Staging complete - attacker would curl/wget this to C2'"
        };
        for (String cmd : cmds) {
            ProcessBuilder pb = new ProcessBuilder("/bin/bash", "-c", cmd);
            pb.redirectErrorStream(true);
            Process p = pb.start();
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line;
            while ((line = br.readLine()) != null) { System.out.println(line); }
            p.waitFor();
        }
    }
}
EOF
javac /tmp/sentry_cred_stage_sim.java -d /tmp/
cd /tmp && java sentry_cred_stage_sim

Cleanup

bash
rm -rf /tmp/sim_sentry_creds /tmp/exfil_stage.b64 /tmp/sentry_cred_stage_sim.java /tmp/sentry_cred_stage_sim.class

Expected Telemetry

Process chain: java -> bash (multiple invocations with file read and base64 encoding commands). File access events: reads of simulated credential files. File creation event: /tmp/exfil_stage.b64 created by bash initiating from java parent. Auditd EXECVE records for bash invocations with ppid traceable to java.

Expected Detection

High-fidelity detection on java spawning bash with base64 encoding and file read commands. File creation in /tmp with .b64 extension from java-lineage process should trigger credential staging hunt query. Combined with process lineage, this represents the data collection phase of CVE-2026-10520 exploitation.

Related Detections