Installation
apt-get install inetutils-inetd
/etc/init.d/inetutils-inetd restart
apt-get install rsh-server
rexecd Service Detection (CVE-1999-0618)
- CVE-1999-0618 Detail (NVD)

Not working for now…
IP=x.x.x.x
PORT=512
CMD="ifconfig"
rexec -l root -p toor -a -d $IP "$CMD"