查看: 22092|回复: 0

「分享」Django漏洞(CVE-2020-7471)POC

[复制链接]
  • TA的每日心情
    奋斗
    2024-1-11 16:11
  • 签到天数: 426 天

    [LV.9]以坛为家II

    发表于 2020-2-19 19:48:03 | 显示全部楼层 |阅读模式
            这个漏洞也是前些日子曝出的,但是因为远程上班原因,比较颓废比较忙,也没第一时间分享出来。(POC链接在最下边)
           
    以下内容转自github项目的readme文件

    受影响的 django 版本
    1.11 到 1.11.28(不含)
    2.2 到 2.2.10(不含)
    3.0 到 3.0.3(不含)
    下载使用前需要如下操作:
    安装 django 漏洞版本,我测试用的是

    pip install django==3.0.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
    参考 https://www.runoob.com/postgresql/windows-install-postgresql.html 完成 postgres 数据库的安装

    新建数据库

    CREATE DATABASE test;
    修改 sqlvul_projects/settings.py 里面的数据库配置,如果上一步你安装用的默认配置(包括设置密码为postgres),就无需修改任何配置,可以跳过这一步

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql',
            'NAME': 'test',         # 数据库名称
            'USER': 'postgres',
            'PASSWORD': 'postgres', # 数据库用户密码
            'HOST': '127.0.0.1',    # 数据库地址
            'PORT': '5432',
        }
    }
    通过 django 初始化数据表

    python3 manage.py migrate
    python3 manage.py makemigrations vul_app
    python3 manage.py migrate vul_app
    然后运行 POC 脚本CVE-2020-7471.py就可以了



    github项目地址:https://github.com/Saferman/CVE-2020-7471/
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    指导单位

    江苏省公安厅

    江苏省通信管理局

    浙江省台州刑侦支队

    DEFCON GROUP 86025

    旗下站点

    邮箱系统

    应急响应中心

    红盟安全

    联系我们

    官方QQ群:112851260

    官方邮箱:security#ihonker.org(#改成@)

    官方核心成员

    Archiver|手机版|小黑屋| ( 苏ICP备2021031567号 )

    GMT+8, 2024-4-23 21:24 , Processed in 0.043213 second(s), 12 queries , Gzip On, MemCache On.

    Powered by ihonker.com

    Copyright © 2015-现在.

  • 返回顶部