Skip to content

w0r1i0g1ht/CVE-2024-45440

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CVE-2024-45440

Drupal CVE-2024-45440 core/authorize.php in Drupal 11.x-dev allows Full Path Disclosure (even when error logging is None) if the value of hash_salt is file_get_contents of a file that does not exist.

使用

python CVE-2024-45440.py

image

靶场部署

settings.php将通过挂载的方式替换掉容器中的settings.php

替换settings.php后无法进行安装,但直接访问http://127.0.0.1:8080/core/authorize.php也能暴露出配置文件的完整路径

正常安装过程如下:

先将docker-ccompose.yml第15行的- ./settings.php:/opt/drupal/web/sites/default/settings.php注释掉,才能正常进行安装

启动docker容器

docker-compose up -d

选择语言

image-20241226171834277

选择安装方式

image-20241226171854577

设置数据库

image-20241226172032897

其他选项默认

设置网站

image-20241226172625492

其他选项默认,进行安装

接下来模拟开发人员更改/sites/default/settings.php 文件中第 268 行的 hash_salt 变量,我们关闭docker容器

docker-compose down

然后取消docker-ccompose.yml第15行的- ./settings.php:/opt/drupal/web/sites/default/settings.php注释,再次启动容器

docker-compose up -d

靶场设置完成

复现

访问http://127.0.0.1:8080/core/authorize.php

image-20241226170825303

暴露出配置文件的完整路径

或者使用脚本

python CVE-2024-45440.py

image

About

Drupal CVE-2024-45440

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published