1.漏洞影响范围
/受影响版本
Django 1.11.x < 1.11.28
Django 2.2.x < 2.2.10
Django 3.0.x < 3.0.3
Django 主开发分支
/不受影响产品版本
Django 1.11.28
Django 2.2.10
Django 3.0.3
2.前期准备
查看:按照此链接做好基础工作
做好基础工作后可参考此链接复现https://blog.csdn.net/qq_41260930/article/details/104303146
3.进入环境
3.1安装 django 漏洞版本(测试使用版本为3.0.2)
root@debian:~# mkdir ./.pip
root@debian:~# vim ./.pip/pip.conf
root@debian:~# pip3 install django==3.0.2
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting django==3.0.2
Downloading https://mirrors.aliyun.com/pypi/packages/55/d1/8ade70e65fa157e1903fe4078305ca53b6819ab212d9fbbe5755afc8ea2e/Django-3.0.2-py3-none-any.whl (7.4MB)
100% |████████████████████████████████| 7.4MB 207kB/s
Collecting sqlparse>=0.2.2 (from django==3.0.2)
Downloading https://mirrors.aliyun.com/pypi/packages/85/ee/6e821932f413a5c4b76be9c5936e313e4fc626b33f16e027866e1d60f588/sqlparse-0.3.1-py2.py3-none-any.whl (40kB)
100% |████████████████████████████████| 40kB 1.7MB/s
Collecting pytz (from django==3.0.2)
Downloading https://mirrors.aliyun.com/pypi/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
100% |████████████████████████████████| 512kB 1.9MB/s
Collecting asgiref~=3.2 (from django==3.0.2)
Downloading https://mirrors.aliyun.com/pypi/packages/68/00/25013f7310a56d17e1ab6fd885d5c1f216b7123b550d295c93f8e29d372a/asgiref-3.2.7-py2.py3-none-any.whl
Installing collected packages: sqlparse, pytz, asgiref, django
Successfully installed asgiref-3.2.7 django-3.0.2 pytz-2019.3 sqlparse-0.3.1
3.2安装postgres 数据库
由于Debian默认包括PostgreSQL。要在Debian上安装PostgreSQL,可以直接使用apt-get(或其他apt-driving)命令,这里安装的是postgresql-11。
root@debian:~# sudo apt-get install postgresql-11
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
libxslt1.1 postgresql-client-11 postgresql-client-common postgresql-common
sysstat
建议安装:
postgresql-doc-11 libjson-perl isag
下列【新】软件包将被安装:
libxslt1.1 postgresql-11 postgresql-client-11 postgresql-client-common
postgresql-common sysstat
升级了 0 个软件包,新安装了 6 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 16.6 MB 的归档。
解压缩后会消耗 55.1 MB