Rapid7 Vulnerability & Exploit Database

Apache Struts 2 Developer Mode OGNL Execution

Back to Search

Apache Struts 2 Developer Mode OGNL Execution

Disclosed
01/06/2012
Created
05/30/2018

Description

This module exploits a remote command execution vulnerability in Apache Struts 2. The problem exists on applications running in developer mode, where the DebuggingInterceptor allows evaluation and execution of OGNL expressions, which allows remote attackers to execute arbitrary Java code. This module has been tested successfully on Struts 2.3.16, Tomcat 7 and Ubuntu 10.04.

Author(s)

  • Johannes Dahse
  • Andreas Nusser
  • Alvaro
  • juan vazquez <juan.vazquez@metasploit.com>

Platform

Java

Architectures

java

Development

References

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

;