CVE-2024-27773
Executive Summary
CVE-2024-27773 is a critical vulnerability affecting Unitronics Unistream Unilogic versions prior to 1.35.227. The flaw, classified under CWE-348 (Use of Less Trusted Source), allows an unauthenticated remote attacker to achieve Remote Code Execution (RCE) by exploiting the trust relationship between the Unistream PLC and the Unilogic IDE. The vulnerability has a CVSS score of 8.8, indicating high severity. No public proof-of-concept (PoC) or exploit code has been released, and the EPSS score is currently 0.0%, suggesting low exploitation activity in the wild. However, given the critical nature of the vulnerability and the widespread use of Unitronics devices in industrial control systems (ICS), immediate patching is strongly recommended.
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 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 8.8 (High)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely over the network.
- Attack Complexity: Low (AC:L) – No special conditions or complex attack sequences are required.
- Privileges Required: None (PR:N) – No authentication is needed to exploit the vulnerability.
- User Interaction: None (UI:N) – The victim does not need to perform any action.
- Scope: Unchanged (S:U) – The exploit cannot affect resources beyond the vulnerable component.
- Confidentiality Impact: High (C:H) – Full disclosure of sensitive data is possible.
- Integrity Impact: High (I:H) – The attacker can modify or delete data.
- Availability Impact: High (A:H) – The attacker can cause a denial of service or disrupt operations.
Threat Level: Critical. The combination of network exploitability, no authentication, and high impact makes this a severe threat to ICS environments.
Deep Dive & Mechanics
The vulnerability resides in the trust model between the Unistream PLC and the Unilogic IDE. The PLC accepts commands from any source that appears to be the Unilogic IDE without proper validation. An attacker can craft malicious packets that mimic the IDE's communication protocol, leading to arbitrary code execution on the PLC.
Root Cause: The Unistream PLC uses a less trusted source (the network) to determine the origin of commands. It does not enforce cryptographic authentication or integrity checks on incoming IDE commands. This allows an attacker to send specially crafted packets that the PLC interprets as legitimate IDE instructions.
Attack Vector: The attacker sends a malicious packet to the PLC's network interface (typically port 20256 for Unilogic). The packet contains a payload that exploits the trust relationship to execute arbitrary code.
Impact: Successful exploitation allows the attacker to:
- Execute arbitrary code on the PLC with full system privileges.
- Modify PLC logic, potentially causing physical damage to industrial processes.
- Exfiltrate sensitive data from the PLC or connected systems.
- Use the PLC as a pivot point to attack other devices on the ICS network.
Vulnerable vs. Patched Code
Vulnerable Code (Unilogic < 1.35.227): The PLC accepts commands from any network source without verifying the identity of the sender. The code likely uses a simple source IP check or no check at all.
// Pseudo-code for vulnerable version
void handle_command(packet_t *pkt) {
// No authentication or source validation
execute_command(pkt->command, pkt->payload);
}
Patched Code (Unilogic >= 1.35.227): The patched version introduces cryptographic authentication and integrity checks. The PLC now verifies that the command originates from a trusted Unilogic IDE.
// Pseudo-code for patched version
void handle_command(packet_t *pkt) {
if (!verify_signature(pkt->signature, pkt->payload)) {
log_error("Invalid signature");
return;
}
if (!is_trusted_source(pkt->source_ip)) {
log_error("Untrusted source");
return;
}
execute_command(pkt->command, pkt->payload);
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A vulnerable Unitronics Unistream PLC (Unilogic < 1.35.227).
- Network access to the PLC (port 20256).
- A tool to craft and send raw packets (e.g., Scapy, custom Python script).
Exploitation Steps:
- Identify the target PLC's IP address and ensure port 20256 is open.
- Craft a malicious packet that mimics the Unilogic IDE's command structure.
- Send the packet to the PLC.
- The PLC executes the payload, granting the attacker remote code execution.
Example Python Script (Conceptual):
import socket
def exploit(target_ip, payload):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, 20256))
# Craft packet mimicking Unilogic IDE
packet = b"\x00\x01" + payload
sock.send(packet)
response = sock.recv(1024)
print(f"Response: {response}")
sock.close()
# Example usage
exploit("192.168.1.100", b"malicious_code")
Blue Team (Defense)
Detection:
- Monitor network traffic to/from PLCs on port 20256 for unusual patterns.
- Use IDS/IPS rules to detect anomalous Unilogic protocol packets.
- Implement network segmentation to limit access to PLCs.
Mitigation:
- Apply the patch by upgrading to Unilogic version 1.35.227 or later.
- Restrict network access to PLCs using firewalls and ACLs.
- Enable logging and alerting on PLC management interfaces.
Indicators of Compromise (IOCs)
Network IOCs:
- Unusual traffic on port 20256 (Unilogic protocol).
- Packets with unexpected payload sizes or patterns.
- Connections from untrusted IP addresses to PLCs.
Host IOCs:
- Unexpected processes or services running on the PLC.
- Modified PLC logic or configuration.
- Unauthorized user accounts or credentials.
File IOCs:
- Suspicious files uploaded to the PLC (e.g., .bin, .hex).
- Modified firmware or bootloader files.
Detection Engineering
YARA Rule
rule CVE_2024_27773_Unilogic_RCE {
meta:
description = "Detects malicious packets targeting CVE-2024-27773"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-27773"
strings:
$s1 = { 00 01 } // Unilogic command header
$s2 = "malicious" // Example payload string
condition:
$s1 at 0 and $s2
}
Sigma Rule
title: CVE-2024-27773 Unilogic RCE Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects network traffic targeting CVE-2024-27773
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
dest_port: 20256
payload|contains: "00 01"
condition: selection
falsepositives:
- Legitimate Unilogic IDE traffic
level: high
Suricata Rule
alert tcp any any -> any 20256 (msg:"CVE-2024-27773 Unilogic RCE Attempt"; content:"|00 01|"; depth:2; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade all Unistream PLCs to Unilogic version 1.35.227 or later.
- Isolate PLCs from untrusted networks using firewalls and VLANs.
- Disable unused services and ports on PLCs.
Long-Term Measures:
- Implement network segmentation for ICS environments.
- Use VPNs or dedicated management networks for PLC access.
- Regularly audit and update firmware on all industrial devices.
- Deploy IDS/IPS with custom rules for ICS protocols.
Workarounds (if patching is not possible):
- Restrict access to port 20256 to only trusted IP addresses.
- Monitor logs for suspicious activity on PLC management interfaces.
- Implement application-layer filtering for Unilogic protocol traffic.
Valters IT