Categories: Kali Linux

Airbash – A Shell Script For Automated WPA PSK Handshake Capture

Airbash is a POSIX-compliant, completely computerized WPA PSK handshake capture script went for penetration testing. It is perfect with Bash and Android Shell (tried on Kali Linux and Cyanogenmod 10.2) and utilizes aircrack-ng to filter for customers that are as of now associated with access points (AP). Those customers are then deauthenticated keeping in mind the end goal to catch the handshake when endeavoring to reconnect to the AP. Confirmation of a caught handshake is finished utilizing aircrack-ng. On the off chance that at least one handshakes are captured, they are gone into a SQLite3 database, alongside the season of catch and ebb and flow GPS information if legitimately designed.

After capture, the database can be tried for vulnerable router models using crackdefault.sh. It will scan for passages that match the actualized modules, which presently incorporate algorithms to figure default keys for Speedport 500-700 arrangement, Thomson/SpeedTouch and UPC 7 digits (UPC1234567) switches.

Also Read SAWEF – Send Attack Web Forms

Requirements For Airbash

WiFi interface in monitor mode aircrack-ng SQLite3 openssl for compilation of modules discretionary wlanhc2hcx from hcxtools.

Keeping in mind the end goal to log GPS directions of handshakes, design your facilitate logging software to log to .loc/*.txt. Airbash will dependably utilize the yield of feline “$path$loc”*.txt 2>/dev/invalid | awk ‘NR==0; END{print}’, which equivalents to perusing all .txt records in .loc/and picking the second line. The explanation behind along these lines of usage is the usefulness of GPS Logger, which was utilized 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.

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.

R K

Recent Posts

Install phpMyAdmin on Ubuntu 18.04 with Apache: Setup Guide

phpMyAdmin is a free, open-source PHP application that provides a browser-based interface for managing MySQL and…

2 days ago

Install Zabbix on Ubuntu 18.04: Server Setup with MySQL Backend

Zabbix is a mature open-source infrastructure monitoring platform that collects metrics from network devices, servers, virtual…

2 days ago

Install Gradle on Ubuntu 18.04: Set Up OpenJDK and Environment

Gradle is a powerful open-source build automation tool used primarily for Java, Kotlin, Groovy, and Android…

2 days ago

Install TeamViewer on Ubuntu 18.04: Download the .deb and Set Up

TeamViewer is a proprietary cross-platform remote access application for remote control, desktop sharing, file transfer, and online meetings. It is one of the most widely used remote support tools in the world, available for Windows, macOS, Linux, iOS, and Android. TeamViewer is not included in the Ubuntu repositories because it is proprietary software. This guide covers how to install TeamViewer on Ubuntu 18.04 using the official .deb package. The same steps apply to Ubuntu 16.04, Debian, Linux Mint, and Elementary OS. <strong>Prerequisite:</strong>&nbsp;You&nbsp;need&nbsp;sudo&nbsp;access. Install TeamViewer on Ubuntu: Download the .deb Package Download the official TeamViewer .deb package. The _amd64.deb suffix indicates this package is for 64-bit x86-64 systems. For ARM-based machines, download the appropriate package from the TeamViewer Linux downloads page: bashwget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb Install the package using apt. The ./ prefix tells apt this is a local file path, not a package name from the repositories:…

2 days ago

Install Nagios Core on Ubuntu 18.04: Build from Source Guide

Nagios is one of the most widely used open-source infrastructure monitoring systems in the world. It…

2 days ago

Install Laravel on Ubuntu 18.04 with Composer: Setup Guide

Laravel is an open-source PHP web application framework built around an expressive, developer-friendly syntax. It is…

3 days ago