MODULE

Primefaces Remote Code Execution Exploit

Try Surface Command Get a continuous 360° view of your attack surface
Back to Search

Primefaces Remote Code Execution Exploit

Disclosed
02/15/2016
Created
12/07/2024

Description

This module exploits a Java Expression Language remote code execution flaw in the Primefaces JSF framework. Primefaces versions prior to 5.2.21, 5.3.8 or 6.0 are vulnerable to a padding oracle attack, due to the use of weak crypto and default encryption password and salt. Tested against Docker image with Tomcat 7.0 with the Primefaces 5.2 showcase application. See documentation for working payloads.

Author(s)

  • Bjoern Schuette
  • h00die

Platform

BSD,Linux,OSX,Unix,Windows

Architectures

cmd

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

;