Rapid7 Vulnerability & Exploit Database

Advantech iView NetworkServlet Command Injection

Back to Search

Advantech iView NetworkServlet Command Injection

Disclosed
06/28/2022
Created
08/29/2022

Description

Versions of Advantech iView software below `5.7.04.6469` are vulnerable to an unauthenticated command injection vulnerability via the `NetworkServlet` endpoint. The database backup functionality passes a user-controlled parameter, `backup_file` to the `mysqldump` command. The sanitization functionality only tests for SQL injection attempts and directory traversal, so leveraging the `-r` and `-w` `mysqldump` flags permits exploitation. The command injection vulnerability is used to write a payload on the target and achieve remote code execution as NT AUTHORITY\SYSTEM.

Author(s)

  • rgod
  • y4er
  • Shelby Pace

Platform

Windows

Architectures

x86, x64, cmd

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/http/advantech_iview_networkservlet_cmd_inject
msf exploit(advantech_iview_networkservlet_cmd_inject) > show targets
    ...targets...
msf exploit(advantech_iview_networkservlet_cmd_inject) > set TARGET < target-id >
msf exploit(advantech_iview_networkservlet_cmd_inject) > show options
    ...show and set options...
msf exploit(advantech_iview_networkservlet_cmd_inject) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;