Rapid7 Vulnerability & Exploit Database

Apache Struts includeParams Remote Code Execution

Back to Search

Apache Struts includeParams Remote Code Execution

Disclosed
05/24/2013
Created
05/30/2018

Description

This module exploits a remote command execution vulnerability in Apache Struts versions < 2.3.14.2. A specifically crafted request parameter can be used to inject arbitrary OGNL code into the stack bypassing Struts and OGNL library protections. When targeting an action which requires interaction through GET, the payload should be split, taking into account the URI limits. In this case, if the rendered JSP has more than one point of injection, it could result in payload corruption. This should happen only when the payload is larger than the URI length.

Author(s)

  • Eric Kobrin
  • Douglas Rodrigues
  • Richard Hicks <scriptmonkey.blog@gmail.com>

Platform

Java,Linux,Windows

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

;