Rapid7 Vulnerability & Exploit Database

Sun/Oracle GlassFish Server Authenticated Code Execution

Back to Search

Sun/Oracle GlassFish Server Authenticated Code Execution



This module logs in to a GlassFish Server (Open Source or Commercial) using various methods (such as authentication bypass, default credentials, or user-supplied login), and deploys a malicious war file in order to get remote code execution. It has been tested on Glassfish 2.x, 3.0, 4.0 and Sun Java System Application Server 9.x. Newer GlassFish versions do not allow remote access (Secure Admin) by default, but is required for exploitation.


  • juan vazquez <juan.vazquez@metasploit.com>
  • Joshua Abraham <jabra@rapid7.com>
  • sinn3r <sinn3r@metasploit.com>




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