Rapid7 Vulnerability & Exploit Database

X7 Chat 2.0.5 lib/message.php preg_replace() PHP Code Execution

Back to Search

X7 Chat 2.0.5 lib/message.php preg_replace() PHP Code Execution

Disclosed
10/27/2014
Created
05/30/2018

Description

This module exploits a post-auth vulnerability found in X7 Chat versions 2.0.0 up to 2.0.5.1. The vulnerable code exists on lib/message.php, which uses preg_replace() function with the /e modifier. This allows a remote authenticated attacker to execute arbitrary PHP code in the remote machine.

Author(s)

  • Fernando Munoz <fernando@null-life.com>
  • Juan Escobar <eng.jescobar@gmail.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/multi/http/x7chat2_php_exec
msf exploit(x7chat2_php_exec) > show targets
    ...targets...
msf exploit(x7chat2_php_exec) > set TARGET < target-id >
msf exploit(x7chat2_php_exec) > show options
    ...show and set options...
msf exploit(x7chat2_php_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

;