Monday, 24 August 2020

Airba.sh - A POSIX-compliant, Fully Automated WPA PSK Handshake Capture Script Aimed At Penetration Testing



Airbash is a POSIX-compliant, fully automated WPA PSK handshake capture script aimed at penetration testing. It is compatible with Bash and Android Shell (tested on Kali Linux and Cyanogenmod 10.2) and uses aircrack-ng to scan for clients that are currently connected to access points (AP). Those clients are then deauthenticated in order to capture the handshake when attempting to reconnect to the AP. Verification of a captured handshake is done using aircrack-ng. If one or more handshakes are captured, they are entered into an SQLite3 database, along with the time of capture and current GPS data (if properly configured).
After capture, the database can be tested for vulnerable router models using crackdefault.sh. It will search for entries that match the implemented modules, which currently include algorithms to compute default keys for Speedport 500-700 series, Thomson/SpeedTouch and UPC 7 digits (UPC1234567) routers.

Requirements
WiFi interface in monitor mode aircrack-ng SQLite3 openssl for compilation of modules (optional) wlanhc2hcx from hcxtools
In order to log GPS coordinates of handshakes, configure your coordinate logging software to log to .loc/*.txt (the filename can be chosen as desired). Airbash will always use the output of cat "$path$loc"*.txt 2>/dev/null | awk 'NR==0; END{print}', which equals to reading all .txt files in .loc/ and picking the second line. The reason for this way of implementation is the functionality of GPSLogger, which was used on the development device.

Calculating default keys
After capturing a new handshake, the database can be queried for vulnerable router models. If a module applies, the default keys for this router series are calculated and used as input for aircrack-ng to try and recover the passphrase.

Compiling Modules
The modules for calculating Thomson/SpeedTouch and UPC1234567 (7 random digits) default keys are included in src/
Credits for the code go to the authors Kevin Devine and [peter@haxx.in].
On Linux:
gcc -fomit-frame-pointer -O3 -funroll-all-loops -o modules/st modules/stkeys.c -lcrypto
gcc -O2 -o modules/upckeys modules/upc_keys.c -lcrypto
If on Android, you may need to copy the binaries to /system/xbin/ or to another directory where binary execution is allowed.

Usage
Running install.sh will create the database, prepare the folder structure and create shortlinks to both scripts which can be moved to a directory that is on $PATH to allow execution from any location.
After installation, you may need to manually adjust INTERFACE on line 46 in airba.sh. This will later be determined automatically, but for now the default is set to wlan0, to allow out of the box compatibility with bcmon on Android.
./airba.sh starts the script, automatically scanning and attacking targets that are not found in the database. ./crackdefault.sh attempts to break known default key algorithms.
To view the database contents, run sqlite3 .db.sqlite3 "SELECT * FROM hs" in the main directory.

Update (Linux only ... for now):
Airbash can be updated by executing update.sh. This will clone the master branch into /tmp/ and overwrite the local files.

Output
_n: number of access points found
__c/m: represents client number and maximum number of clients found, respectively
-: access point is blacklisted
x: access point already in database
?: access point out of range (not visible to airodump anymore)

The Database
The database contains a table called hs with seven columns.
id: incrementing counter of table entries
lat and lon: GPS coordinates of the handshake (if available)
bssid: MAC address of the access point
essid: Name identifier
psk: WPA Passphrase, if known
prcsd: Flag that gets set by crackdefault.sh to prevent duplicate calculation of default keys if a custom passphrase was used.
Currently, the SQLite3 database is not password-protected.


Related articles

  1. Pentest Tools Android
  2. Pentest Tools
  3. Hacking Tools For Games
  4. Hacker Tools For Ios
  5. Hacker
  6. Best Pentesting Tools 2018
  7. Hack Tools Pc
  8. New Hack Tools
  9. Hacker Tools Free
  10. Pentest Tools For Mac
  11. Growth Hacker Tools
  12. Hacking Tools Pc
  13. Hacker Hardware Tools
  14. Pentest Tools Review
  15. Nsa Hack Tools
  16. Hacking Tools For Kali Linux
  17. Hack Tools
  18. Hacking Tools For Mac
  19. Hacker Tools
  20. Bluetooth Hacking Tools Kali
  21. Blackhat Hacker Tools
  22. Hacker Hardware Tools
  23. Hack Tools
  24. Hacking Tools Windows 10
  25. Hacker Hardware Tools
  26. Pentest Tools Kali Linux
  27. Hacker Tools Github
  28. Hackers Toolbox
  29. Nsa Hack Tools Download
  30. Easy Hack Tools
  31. Pentest Tools Alternative
  32. Hacker Tools Software
  33. Hacker Tools Apk
  34. Hacking Tools Usb
  35. Nsa Hack Tools
  36. Hacker Techniques Tools And Incident Handling
  37. Underground Hacker Sites
  38. Hack Tools Mac
  39. Physical Pentest Tools
  40. Best Pentesting Tools 2018
  41. Pentest Tools Framework
  42. Bluetooth Hacking Tools Kali
  43. Computer Hacker
  44. How To Make Hacking Tools
  45. Termux Hacking Tools 2019
  46. Tools For Hacker
  47. Hack Tools 2019
  48. Hacker Tools Hardware
  49. Hackers Toolbox
  50. Hacking Tools For Pc
  51. Hack Rom Tools
  52. Hacker Tools
  53. Hak5 Tools
  54. Tools Used For Hacking
  55. Hacker Tools
  56. Hacking Tools Software
  57. Pentest Tools Kali Linux
  58. Install Pentest Tools Ubuntu
  59. Hacking Tools Windows
  60. Pentest Tools For Windows
  61. Hacker Security Tools
  62. Tools Used For Hacking
  63. Hack Tools 2019
  64. Hack Tools Download
  65. Hack Tools For Windows
  66. Hack Website Online Tool
  67. Tools Used For Hacking
  68. Hacking Tools Name
  69. Hack Tools
  70. New Hacker Tools
  71. Pentest Tools Find Subdomains
  72. Hacker Tools Apk
  73. Hacking Tools For Windows 7
  74. How To Make Hacking Tools
  75. Best Hacking Tools 2020
  76. Pentest Tools Online
  77. Hacking Tools And Software
  78. Hack Tools Github
  79. Best Hacking Tools 2019
  80. Hacking Tools Download
  81. How To Make Hacking Tools
  82. Pentest Tools Nmap
  83. World No 1 Hacker Software
  84. Tools Used For Hacking
  85. Hak5 Tools
  86. Hacking Tools And Software
  87. Pentest Tools Nmap
  88. Hacking Tools
  89. Hacking Tools For Mac
  90. Pentest Tools Website
  91. Hack Tools Mac
  92. Hacking Tools 2019
  93. Pentest Box Tools Download
  94. Underground Hacker Sites
  95. Hack Tools For Mac
  96. Hack Tools For Windows
  97. Pentest Tools Port Scanner
  98. Install Pentest Tools Ubuntu
  99. Hack App
  100. Hacker Tools Software
  101. Hacker Techniques Tools And Incident Handling
  102. Pentest Tools Bluekeep
  103. Best Pentesting Tools 2018
  104. Hak5 Tools
  105. Hacker Tools Free Download
  106. Hack Tools Github
  107. Hacking App
  108. Hacker Tools List
  109. Hack Tools 2019
  110. Hacking Tools
  111. Best Hacking Tools 2020
  112. Pentest Tools Nmap
  113. New Hacker Tools
  114. Hack And Tools
  115. Hack Rom Tools
  116. Growth Hacker Tools
  117. Ethical Hacker Tools
  118. Hacking Tools And Software
  119. Hacker Tools Apk Download
  120. Tools Used For Hacking
  121. Pentest Tools Website Vulnerability
  122. Pentest Tools Website Vulnerability
  123. Hacking Tools 2020
  124. Computer Hacker
  125. Black Hat Hacker Tools
  126. How To Make Hacking Tools
  127. Hacking Tools Github
  128. Pentest Tools Subdomain
  129. Termux Hacking Tools 2019
  130. Hacker Search Tools
  131. Top Pentest Tools
  132. Hak5 Tools
  133. Free Pentest Tools For Windows
  134. Hacking Tools Windows 10
  135. Hacker Tools Software
  136. Hacking Tools Usb
  137. Top Pentest Tools
  138. Hacking Tools Kit
  139. Hacking Tools 2020
  140. Hacker Search Tools
  141. Pentest Tools Download
  142. World No 1 Hacker Software
  143. Hacking Tools Github
  144. Pentest Tools Alternative
  145. Tools For Hacker
  146. Pentest Tools Windows
  147. Hacking Tools Windows
  148. Tools 4 Hack
  149. Kik Hack Tools

No comments:

Post a Comment