Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to reproduce Django SQL injection vulnerability CVE-2020-7471

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

How to reproduce the Django SQL injection vulnerability CVE-2020-7471, I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Brief introduction of vulnerabilities:

Django is a high-level open source Web application framework driven by the Python programming language, which originated in the open source community. Using Django, programmers can easily and quickly create high-quality, easy-to-maintain, database-driven applications, which are widely used. On February 11th, Green League Science and Technology Monitoring found that the vulnerability PoC has been made public. Please upgrade Django to the repaired version as soon as possible to fix this vulnerability.

Threat Typ

SQL injection

Threat level

High

Vulnerability number

CVE-2020-7471

Affected system and application version affected version:

Django 1.11.x

Django 2.2.x

Django 3.0.x

Django main development branch

Unaffected product version

Django 1.11.28

Django 2.2.10

Django 3.0.3

Recurrence of vulnerabilities:

Build an environment

(kali) install django vulnerability version (test version 3.0.2)

Install using the pip command

Pip3 install django==3.0.2

Install the postgres database

Sudo spt-get install postgresql postgresql-client

When you install the postgres database for the first time, the system creates a database superuser postgres with an empty password. Use the command (sudo-I-u postgres) to enter the postgres database and create the test database (test).

Sudo / etc/init.d/postgresql startsudo-I-u postgrespsql

Download CVE-2020-7471 locally

Git clone https://github.com/SNCKER/CVE-2020-7471.git

()

Modify the configuration file

Initialize the table in the test database test with the code in CVE

Python3 manage.py migrate

No changes can ignore it here.

Python3 manage.py migrate vul_app

The initialization process is complete.

2. Attack link

Enter the database:

\ d look at all the tables in the database

Execute the poc code generation content:

Python3 CVE-2020-7471.py

Query:

Select*fromvul_app_info

Injection successful!

2. Repair suggestion

Django has officially released a new version to fix the above vulnerabilities. Please upgrade and protect the affected users as soon as possible.

Download address of Django 1.11.28

Https://www.djangoproject.com/m/releases/1.11/Django-1.11.28.tar.gz

Download address of Django 2.2.10

Https://www.djangoproject.com/m/releases/2.2/Django-2.2.10.tar.gz

Django 3.0.3 download address:

Https://www.djangoproject.com/m/releases/3.0/Django-3.0.3.tar.gz has read the above, have you mastered how to reproduce the Django SQL injection vulnerability CVE-2020-7471? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report