xchwarze / frieren

Frieren is a micro-framework designed for use in routers and Single Board Computers (SBCs). This framework is built to be lightweight, efficient, and easy to integrate into various hardware projects.
Other
11 stars 0 forks source link

how to capture wpa2 handshake #2

Closed atdx closed 2 weeks ago

atdx commented 2 weeks ago

How to capture handshake using tcpdump?

xchwarze commented 2 weeks ago

the issues in this repository are about this development, but I will answer you anyway.


To capture a WPA handshake effectively on an OpenWRT system, you need to use suitable tools and ensure ethical practices, strictly operating within legal boundaries. Here's a summarized guide in English for performing this task on OpenWRT:

Necessary Tools

  1. Compatible Network Interface: Ensure your network adapter supports monitor mode, crucial for capturing wireless traffic.

  2. Packet Capture Software: Although Aircrack-ng is commonly used on various Linux distributions, ensure it’s compatible with OpenWRT or use alternative tools available for OpenWRT.

Steps to Capture a WPA Handshake on OpenWRT

  1. Set Network Interface to Monitor Mode:

    • Identify your wireless interface using commands like iwconfig or ifconfig.
    • Configure the interface for monitor mode:
      ifconfig wlan0 down
      iwconfig wlan0 mode monitor
      ifconfig wlan0 up
    • Verify the mode with iwconfig.
  2. Capture Traffic with Airodump-ng (or equivalent):

    • Start monitoring wireless networks:
      airodump-ng wlan0
    • Note the target network’s BSSID and channel.
  3. Focus on the Target Network:

    • Narrow down to capture on a specific channel and BSSID:
      airodump-ng -c [channel] --bssid [BSSID] -w [output_file] wlan0
    • Replace [channel], [BSSID], and [output_file] with the respective values.
  4. Deauthenticate a Client:

    • Use aireplay-ng to disconnect a client, forcing them to reconnect:
      aireplay-ng -0 2 -a [BSSID] -c [client] wlan0
    • [client] is the MAC address of a connected client.
  5. Verify the Handshake Capture:

    • Ensure that Airodump-ng indicates that the handshake was captured, usually shown in the top-right corner of its interface.
xchwarze commented 2 weeks ago

and to leave capturing while deauthenticate tcpdump -i wlan0 'type mgt subtype beacon and ether proto 0x888e' -w handshake.cap