what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

phpMyAdmin 4.8.1 Local File Inclusion

phpMyAdmin 4.8.1 Local File Inclusion
Posted Jun 22, 2018
Authored by ChaMd5

phpMyAdmin version 4.8.1 suffers from an authenticated local file inclusion vulnerabilities.

tags | exploit, local, vulnerability, file inclusion
SHA-256 | 10f1c79df42b570582f12ca0a79fda04ac535de993f89a192efc5df8747b4b0d

phpMyAdmin 4.8.1 Local File Inclusion

Change Mirror Download
The latest version downloaded from the official website, the file name is phpMyAdmin-4.8.1-all-languages.zip

The problem appears in /index.php

Find 55~63 lines

Line 61 contains include $_REQUEST['target'];

This is obviously LFI precursor, as long as we bypass the 55 to 59 restrictions on the line

Line 57 restricts the target parameter from beginning with index

Line 58 limit target parameter cannot appear within $target_blacklist

Find the definition of $target_blacklist :

In /index.php the first of 50 lines

As long as the target parameter is not import.php or export.php, the last limit is Core::checkPageValidity($_REQUEST['target'])

Find the checkPageValidity method of the Core class :

Defined in the \ libraries \ classes \ core.php on the 443 line

The problem is in urldecode() on line 465

We can use this function to bypass the white list detection!

I ? Twice url encoded as % 253f can bypass the validation!

Payload:

http://127.0.0.1/phpmyadmin/index.php?target=db_sql.php%253f/../../../../../../windows/wininit.ini


- - -

I thought the loophole was over, because I didn't find out where phpmyadmin could perform file operations to implement Getshell . After several weeks of inspiration, I thought of a way to get Shell without writing files .

We all know that after login phpmyadmin , the database is completely controllable, then we can write the WebShell to the database and then include the database file?

Tested locally, I found that if you use WebShell as the field value of the data table can be perfectly written to the database file:

Find the corresponding database file:

Include:

Payload:

http://127.0.0.1/phpmyadmin/index.php?a=phpinfo();&target=db_sql.php%253f/../../../../../../phpStudy/PHPTutorial/MySQL/data/hack/hack.frm

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    0 Files
  • 9
    Aug 9th
    0 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close