Rapid7 Vulnerability & Exploit Database

SugarCRM unserialize() PHP Code Execution

Back to Search

SugarCRM unserialize() PHP Code Execution

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

Description

This module exploits a php unserialize() vulnerability in SugarCRM <= 6.3.1 which could be abused to allow authenticated SugarCRM users to execute arbitrary code with the permissions of the webserver. The dangerous unserialize() exists in the 'include/MVC/View/views/view.list.php' script, which is called with user controlled data from the 'current_query_by_page' parameter. The exploit abuses the __destruct() method from the SugarTheme class to write arbitrary PHP code to a 'pathCache.php' on the web root.

Author(s)

  • EgiX
  • juan vazquez <juan.vazquez@metasploit.com>
  • sinn3r <sinn3r@metasploit.com>

Platform

PHP

Architectures

php

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

;