Rapid7 Vulnerability & Exploit Database

Kong Gateway Admin API Remote Code Execution

Back to Search

Kong Gateway Admin API Remote Code Execution

Disclosed
10/13/2020
Created
12/03/2020

Description

This module uses the Kong admin API to create a route and a serverless function plugin that is associated with the route. The plugin runs Lua code and is used to run a system command using os.execute(). After execution the route is deleted, which also deletes the plugin.

Author(s)

  • Graeme Robinson

Platform

Linux,OSX

Architectures

x86, x64

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/multi/http/kong_gateway_admin_api_rce
msf exploit(kong_gateway_admin_api_rce) > show targets
    ...targets...
msf exploit(kong_gateway_admin_api_rce) > set TARGET < target-id >
msf exploit(kong_gateway_admin_api_rce) > show options
    ...show and set options...
msf exploit(kong_gateway_admin_api_rce) > 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

;