Previous: http://www.bkjia.com/Article/201209/153278.html
Mysql, mssql, and oracle databases all have their own unique commands. We can determine the database type to be injected based on them. In mysql and mssql, select @ version returns the current database version. in oracle, select banner from v & version returns the database version. Access to different database constructor strings is different. For example, to construct the string "yeetrack", the command in oracle is 'y' | 'track'. The command in mssql is 'y' + 'track ', in mysql, the command is 'y' 'track' with a space in the middle.
Oracle Database:
1. For a query URL, such as http://www.yeetrack.com/wordpress? P = 54, first test the number of columns to be returned for this URL, construct the URL http://www.bkjia.com/wordpress /? P = 54% 20 union % 20 select % 20 null % 20 from % 20dual-, view the returned result, if the error indicates that the number of returned columns is not 1, increase the number of null, http://www.yeetrack.com/wordpress? P = 54% 20 union % 20 select % 20 null % 20 null % 20 from % 20dual-until no error occurs in the result.
2. Confirm the number of returned columns, and then confirm the type of each column. Change null to 'A' in sequence to view the returned results. If a is returned, the returned result is correct; if an exception occurs, modify the location of 'A' until it is correct.
3. Find a correct type to test the database information. Query all objects of the database owned by the current user. select object_name, object_type from user_object. Find the table you are interested in based on the returned information, and then test the columns of the table. Select column_name from user_tab_columns where table_name = 'tablename', and finally test the table data. select username, password from user-
MSSQL database:
1. Same as oracle database.
2. Same as oracle database.
3. Check the database information. select name from sysobjects-and find the table you are interested in. Then, you can put forward the table fields and information.