CVE-2023-4220: Vulnerable Chamilo LMS container - #559
jheysel-r7 wants to merge 6 commits into
Conversation
|
Good job, can you move the |
|
@phith0n sure thing, thanks for the tip. Let me know if any thing else needs to be updated. |
Thanks, that's it. The valid folder structure is like: |
Hi @jheysel-r7 can you update the folder structure like this? |
|
Sorry about that @phith0n, let me know if everything looks okay now. |
Hi @jheysel-r7 good job. After reviewing the README.md, I think we are missing the vulnerability reproduction steps and screenshots, can you add it? |
CVE-2023-4220
Chamilo LMS is a free software e-learning and content management system. In versions prior to <= v1.11.24 a webshell can be uploaded via the bigload.php endpoint. If the GET request parameter
actionis set topost-unsupportedfile extension checks are skipped allowing for attacker controlled .php files to be uploaded to:/main/inc/lib/javascript/bigupload/files/if the/files/directory already exists - it does not exist by default. The required directory/files/has been added to this container for vulnerability testing purposes.This docker setup was entirely copied from https://github.com/22phuber/docker-compose-chamilo-lms. The original Dockerfile had the Chamilo version set to 1.11.12 which is unaffected by the vulnerability as it doesn't have the
/bigupload/endpoint. The base version of PHP was updated, as well as some necessary packages to prevent the build from failling. The version of Chamilo was updated to 1.11.18 which is affected by CVE-2023-4220 also as mentioned the necessary dierctory/files/has been added as well. Thanks to 22phuber for all the hard work.Chamilo LMS docker-compose
A simple docker-compose setup for Chamilo LMS.
Official Docker Hub images used:
Chamilo LMS on Github: https://github.com/chamilo/chamilo-lms
This setup doesn't directly install/configure Chamilo. You have to use the Chamilo installation wizard once the docker containers are up.
*This setup works with Chamilo version 1.11.x
Optional: Host system config
On the Host system you need to add a
/etc/hostsentry for the domain name configured in the apache vhost:.../etc/hostson Windows:C:\Windows\System32\Drivers\etc\hosts127.0.0.1 docker.chamilo.netat the end of the file and save.ENV Variables
environmentvariables for MYSQLYou can define mysql username, password and database name in the docker-compose config:
argsvariables for building ChamiloYou can define the Version for Chamilo with
CHAMILO_VERSION.And you have to set the
CHAMILO_TARfilename due to incosistent naming.Check for
.tar.gzfilenames here: https://github.com/chamilo/chamilo-lms/releasesExample in
docker-compose.yml:The
argssettings indocker-compose.ymlwill override theARGsettings in theDockerfile.If you remove the
argsindocker-compose.yml, the "fallback" values from theDockerfilewill be used.Build & Run
Build:
Build chamilo docker image
Run:
Database connection step in web installation wizard
The "Database Host" in step 4 of the mysql connections settings has to be the name of the docker image defined in the appropriate
docker-compose.yml.Database Host:
mariadbAccess Chamilo Website
Access Chamilo URL with
/etc/hostsentry:Without
/etc/hostsentry: