Vulnerability & Exploit Database

Back to search

Apache Struts ClassLoader Manipulation Remote Code Execution

This module exploits a remote command execution vulnerability in Apache Struts versions 1.x (<= 1.3.10) and 2.x (< 2.3.16.2). In Struts 1.x the problem is related with the ActionForm bean population mechanism while in case of Struts 2.x the vulnerability is due to the ParametersInterceptor. Both allow access to 'class' parameter that is directly mapped to getClass() method and allows ClassLoader manipulation. As a result, this can allow remote attackers to execute arbitrary Java code via crafted parameters.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name

exploit/multi/http/struts_code_exec_classloader

Authors

  • Mark Thomas
  • Przemyslaw Celej
  • Redsadic <julian.vilas [at] gmail.com>
  • Matthew Hall <hallm [at] sec-1.com>

References

Targets

  • Java
  • Linux
  • Windows
  • Windows / Tomcat 6 & 7 and GlassFish 4 (Remote SMB Resource)

Platforms

  • linux
  • windows

Architectures

  • java
  • x86

Reliability

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

Related Vulnerabilities