The HWL-2511-SS device from Hytec Inter is an industrial LTE router that can be used for remote data transmission such as collecting sensor data and checking surveillance camera images.
All Hytec Inter HWL-2511-SS devices from version 1.05
and under.
[CVE-2022-36553] - Unauthenticated Remote Command Injection.
A vulnerability in the implementation of the ping
command can allow an unauthenticated, remote attacker to perform a command injection attack. This vulnerability is due to insufficient validation of a process argument in the binary file /www/cgi-bin/popen.cgi
. A successful exploit could allow the attacker to execute arbitrary commands on the underlying operating system with the root privileges.
[CVE-2022-36554] - SSH CLI Command Injection.
A vulnerability in the implementation of the CLI (command line interface) can allow a local attacker with low privilege to perform a command injection attack. This vulnerability is due to insufficient validation of a process argument in the binary file /usr/sbin/clishell
. A successful exploit could allow the attacker to execute arbitrary commands on the underlying operating system with the root privileges.
[CVE-2022-36555] - Use of weak Hard-coded Cryptographic Key.
By default the HWL-2511-SS devices have a built-in weak SHA512crypt hash for the root account that can be recovered after a brute-force attack. This vulnerability can allow an external attacker to SSH the device or login to the web administration interface.
The endpoint /cgi-bin/popen.cgi
can be called remotely without user authentication as there is no cookie verification Cookie: mgs=UUID
to check if the request is legitimate. The second problem is that the GET parameter command
can be injected to execute any Linux command. In the example below we create a crafted query that displays the contents of the /etc/shadow
file.
When a user login to SSH a custom binary file with limited commands is loaded /usr/sbin/clishell
. In the example below we show how it is possible via the traceroute
command to use a command injection payload and escape the custom CLI binary to spawn a real shell.
After extracting the firmware image and then reverse engineering it, we found that the file /etc/shadow
has a built-in SHA512crypt
hash for the root user and only took us a few minutes to recover it by a brute-force attack.
Exploit script available on GitHub: https://github.com/0xNslabs/CVE-2022-36553-PoC
As of 8 Aug 2022, there were 77 Hytec Inter HWL-2511-SS LTE router devices exposed to the internet and were affected by the vulnerabilities discovered.
https://jvndb.jvn.jp/ja/contents/2022/JVNDB-2022-015962.html
https://jvndb.jvn.jp/ja/contents/2022/JVNDB-2022-015963.html
https://jvndb.jvn.jp/ja/contents/2022/JVNDB-2022-015964.html