# cve-2004-2167
Code to be tested:
Download CentOS 6.4 Opertaing System
Download the Latex2RTf to the Downloads folder from the below link:
https://sourceforge.net/projects/latex2rtf/files/latex2rtf-win/1.9.15/
cd /home/username/Downloads/
tar -xvf latex2rtf-1.9.15.tar.gz
cd latex2rtf-1.9.15
sudo make
sudo make install
gcc -o exploit exploit.c
./exploit > shell_code.tex
./latex2rtf shell_code.tex
Steps for patching:
Download the patch from:
https://github.com/uzzzval/cve-2004-2167/blob/master/definitions_patch.c
cp definitions_patch.c /home/username/Downloads/latex2rtf-1.9.15/
mv definitions_patch.c definitions.c
sudo Make
sudo make install
./latex2rtf shell_code.tex
[4.0K] /data/pocs/cd3be8187bd54af1140cca88611d1747de0a4d51
├── [ 17K] definitions_patch.c
├── [1.6K] exploit.c
└── [ 704] README.md
0 directories, 3 files