Use the phpinfo information LFI temporary file

Source: Internet
Author: User

Do you still remember that the LFI proposed by a foreign ox contains temporary files?

The path and name of the temporary file are unknown, although the name of the temporary file can be similar <> *? Wildcard match (we temporarily call it a wildcard). If N people request together, many temporary files may be generated at the same time. Therefore, wildcards cannot be matched, in addition, the path for saving temporary files can only be guessed.

We know that when uploading data to any PHP file post request on the server, a temporary file will be generated. We did not know that the path and name of the temporary file can only be guessed, this time, foreign friends proposed to use phpinfo ().

When uploading data to any PHP file post request, you can find the path and name of the temporary file on the phpinfo page.

 

Refer:

Http://gynvael.coldwind.pl/download.php? F=PHP_LFI_rfc1867_temporary_files.pdf

Http://www.insomniasec.com/publications/LFI%20With%20PHPInfo%20Assistance.pdf

This paper contains a script written in python. At least I used it once and never succeeded once. Maybe it is the reason for indentation? Writing python code into pdf is not a good idea :(

So I wrote one by myself. If the website is fast, it takes several seconds. If the website is slow, it takes dozens of seconds to get shell.

 

Address: http://secer.org/pentest/lfi_tmp.py

If the space is down, save the image as rar and decompress it.

 

This script is only used for research and exchange by network security practitioners and network security enthusiasts. Do not use it for illegal purposes ...... By the way ......

# ----------------------- 2011.9.12 update -----------------------#

Sogili tested my script and reported an error, so I found the solution and gave it to him. By the way, I updated it here.

Sometimes the response of the website itself is very slow. Solution: gradually increase the padding length to drag the phpinfo page response.

In addition, some servers cannot be truncated at % 00. At this time, you can try to truncate them, or.

I have tested the local windows, and the German ping value is 500 + linux.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.