Rapid7 Vulnerability & Exploit Database

Kimai v0.9.2 'db_restore.php' SQL Injection

Back to Search

Kimai v0.9.2 'db_restore.php' SQL Injection

Disclosed
05/21/2013
Created
05/30/2018

Description

This module exploits a SQL injection vulnerability in Kimai version 0.9.2.x. The 'db_restore.php' file allows unauthenticated users to execute arbitrary SQL queries. This module writes a PHP payload to disk if the following conditions are met: The PHP configuration must have 'display_errors' enabled, Kimai must be configured to use a MySQL database running on localhost; and the MySQL user must have write permission to the Kimai 'temporary' directory.

Author(s)

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

;