Results 1 to 4 of 4

Thread: Wifi & Wireshark (Sniffing the channels spectrum)

  1. #1
    Just burned his ISO htons139's Avatar
    Join Date
    Sep 2008
    Posts
    23

    Wink Wifi & Wireshark (Sniffing the channels spectrum)

    Say you want to use wireshark to sniff the packets of more than one AP which are on different channels and with the same/different or no wep/wpa keys, what do you do?

    First you will put your wifi NIC in monitor mode, then you can use this simple script to jump from one channel to the other

    Code:
    #channel hopping by htons139
    clear
    for ((  i = 1 ;  i <= 11;  i++  )) # channels range
    do
    iwconfig eth1 channel $i
    tput cup 0 40          # row 0 and column 40 is used to show channel
    echo -n "channel set to" $i " "      # put channel on screen
    sleep 0.1 # stay on the channel for 1/10 seconds just like kismet
    if [ $i -eq 11 ]
    then
    i=1
    fi
    done
    Sure you can increase the channels up to 14 if your country allows that...
    You can also increase or decrease the "sleep" time before jumping, (0.1 is used by kismet)
    Make sure you replace "eth1" with the name of your wifi nic.

    And finally, run wireshark, and use your wifi NIC for capturing data.
    {Many variations can be done with this script, let me know if any is needed}
    In a world where data is the coin of the realm, and transmissions are guarded by no better sentinels
    than man-made codes and corruptible devices, there is no such thing as a secret

  2. #2

    Default

    There have been a few of these scripts posted around the forum and interwebs over the years. Here is one that Josh Wright wrote back in 2006:

    Code:
    #!/bin/bash
    IFACE=ath0
    IEEE80211bg="1 2 3 4 5 6 7 8 9 10 11"
    IEEE80211bg_intl="$IEEE80211b 12 13 14"
    IEEE80211a="36 40 44 48 52 56 60 64 149 153 157 161"
    IEEE80211bga="$IEEE80211bg $IEEE80211a"
    IEEE80211bga_intl="$IEEE80211bg_intl $IEEE80211a"
    
    while true ; do
    
    for CHAN in $IEEE80211bg ; do
    
    echo "Switching to channel $CHAN"
    
    iwconfig $IFACE channel $CHAN
    
    sleep 1
    
    done
    done
    But, it's always nice to see members contribute back to the forums.
    Thank you for the script.

  3. #3
    Just burned his ISO htons139's Avatar
    Join Date
    Sep 2008
    Posts
    23

    Default

    You need to change

    iwconfig $IFACE $CHAN
    to

    Code:
    iwconfig $IFACE channel $CHAN
    cheers
    In a world where data is the coin of the realm, and transmissions are guarded by no better sentinels
    than man-made codes and corruptible devices, there is no such thing as a secret

  4. #4

    Default

    Sorry, must have been a typo on my part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •