
Instructions for installing a vulnerable version of Exim and its expluatation
Instructions for installing a vulnerable version of Exim and its expluatation Tested on Linux Ubuntu 16.04, Exim 4.89
Download and extract exim version 4.89
Move into the extracted folder
Copy and modify required config files
sed -e 's,^EXIM_USER. * $,EXIM_USER=exim,' Local/Makefile src/EDITME > Local/Makefile
cp exim_monitor/EDITME Local/eximon.conf
Create exim user and group
sudo groupadd -g 31 exim
sudo useradd -d /dev/null -c "Exim Daemon" -g exim -s /bin/false -u 31 exim
Install dependencies
Install exim 4.89
Edit /usr/exim/configure to allow relaying so we can exploit without waiting 7 days
Run exim as user exim
Convert your shell command to hex. Example:
Table for example:
First we use nc to start a connection to the server.
Once we are connected we say HELO.
Next, we set the sender address to blank.
Then we set out recipient address with the payload we made earlier by inserting our desired command where the ellipses is rcpt to:${run{...}}@localhost.
And finally We first type DATA, followed by 31 lines, a blank line, and a period.