Difference between revisions of "Monitoring wireless networks"

From Ever changing code
Jump to navigation Jump to search
Line 9: Line 9:
</ol>
</ol>
For persistance mode please follow this steps at Kali documentation http://docs.kali.org/installation/kali-linux-live-usb-install
For persistance mode please follow this steps at Kali documentation http://docs.kali.org/installation/kali-linux-live-usb-install
===Persisatnce mode in Kali Linux===
*create additional partition (persistance space) on usb stick using <tt>gparted</tt> and make sure the volume label of the newly created partition is ''''persistence'''', and format it using the '''ext4''' filesystem.
*mount the partition, create in its main folder file <tt>persistence.conf</tt> file and edit adding one line <tt>/ union</tt>, unmount and reboot
mkdir /mnt/usb
mount /dev/sdb2 /mnt/usb
echo "/ union" >> /mnt/usb/persistence.conf
umount /mnt/usb
*select '''Live boot''' from the menu (don’t press enter) when the Kali Linux boot screen is displayed, then press the '''tab''' button. This will allow you to edit the boot parameters. Add the word '''persistence''' to the end of the boot parameter line each time you want to mount your persistent storage.
*Kali will boot and it will mount root folder to <tt>/dev/sdb2</tt> where all changes are saved. Below is part of <code>mount</code> output to visualise it.
/dev/sdb2 on /lib/live/mount/persistence/sdb2 type ext4 (rw,noatime,data=ordered)
root@kali:/lib/live/mount/persistence/sdb2# ls -al
total 64
drwxr-xr-x 12 root root  4096 Aug 11 11:04 .
drwxr-xr-x  3 root root  4096 Aug 11 11:04 ..
drwxr-xr-x 15 root root  4096 Aug 11 11:09 etc
drwxr-xr-x  3 root root  4096 Aug 11 11:04 home
drwxr-xr-x  3 root root  4096 Mar 15 09:51 lib
drwx------  2 root root 16384 Aug 11 10:56 lost+found
drwxr-xr-x  7 root root  4096 Aug 11 11:04 media
-rw-r--r--  1 root root    8 Aug 11 10:57 persistence.conf
drwxr-xr-x 13 root root  4096 Aug 11 11:10 root
drwxrwxrwt  7 root root  4096 Aug 11 11:17 tmp
drwxr-xr-x  6 root root  4096 Jul 23 12:30 var
-r--r--r--  4 root root    0 Aug 11 11:04 .wh..wh.aufs
drwx------  2 root root  4096 Aug 11 11:04 .wh..wh.orph
drwx------  2 root root  4096 Aug 11 11:04 .wh..wh.plnk


==Kismet==
==Kismet==

Revision as of 12:34, 11 August 2013

This is another All-In-One page for wireless monitoring solutions. The easiest is to use Kali Linux http://www.kali.org/ . Please follow a few steps to create bootable Live USB:

Bootable USB with Kali Linux

    1. Download ISO from http://www.kali.org/downloads/ or using wget command
      wget http://cdimage.kali.org/kali-latest/amd64/kali-linux-1.0.4-amd64.iso
    2. Install progress bar package to show information about a data transfer. It is not required to write the image to usb but it is useful to see progress bar. Install bar package but just to remember to append -s <file_size>. Another way to see the progress is to install pv Pipe Viewer package.
      apt-get install bar && apt-get install pv
    3. Copy image on usb drive. Please make sure that you use correct device to write the image as it will not warn you when writting. In ubuntu useful commands are: lsusb or mount
      dd if=kali.iso | bar -s 2.2g | of=/dev/sdb bs=512k
      dd if=kali.iso | pv | dd of=/dev/sdb bs=512k
      or
      dd if=kali.iso of=/dev/sdb bs=512k& pid=$! && while true; do kill -USR1 $pid && sleep 1 && clear; done
    The important thing to grasp here isn't the filename or location of your input or output, or even the block size for that matter, but the fact that you can keep an eye on 'dd' as it's running to see where you are at during its execution.

For persistance mode please follow this steps at Kali documentation http://docs.kali.org/installation/kali-linux-live-usb-install

Persisatnce mode in Kali Linux

  • create additional partition (persistance space) on usb stick using gparted and make sure the volume label of the newly created partition is 'persistence', and format it using the ext4 filesystem.
  • mount the partition, create in its main folder file persistence.conf file and edit adding one line / union, unmount and reboot
mkdir /mnt/usb
mount /dev/sdb2 /mnt/usb
echo "/ union" >> /mnt/usb/persistence.conf
umount /mnt/usb
  • select Live boot from the menu (don’t press enter) when the Kali Linux boot screen is displayed, then press the tab button. This will allow you to edit the boot parameters. Add the word persistence to the end of the boot parameter line each time you want to mount your persistent storage.
  • Kali will boot and it will mount root folder to /dev/sdb2 where all changes are saved. Below is part of mount output to visualise it.
/dev/sdb2 on /lib/live/mount/persistence/sdb2 type ext4 (rw,noatime,data=ordered)
root@kali:/lib/live/mount/persistence/sdb2# ls -al
total 64
drwxr-xr-x 12 root root  4096 Aug 11 11:04 .
drwxr-xr-x  3 root root  4096 Aug 11 11:04 ..
drwxr-xr-x 15 root root  4096 Aug 11 11:09 etc
drwxr-xr-x  3 root root  4096 Aug 11 11:04 home
drwxr-xr-x  3 root root  4096 Mar 15 09:51 lib
drwx------  2 root root 16384 Aug 11 10:56 lost+found
drwxr-xr-x  7 root root  4096 Aug 11 11:04 media
-rw-r--r--  1 root root     8 Aug 11 10:57 persistence.conf
drwxr-xr-x 13 root root  4096 Aug 11 11:10 root
drwxrwxrwt  7 root root  4096 Aug 11 11:17 tmp
drwxr-xr-x  6 root root  4096 Jul 23 12:30 var
-r--r--r--  4 root root     0 Aug 11 11:04 .wh..wh.aufs
drwx------  2 root root  4096 Aug 11 11:04 .wh..wh.orph
drwx------  2 root root  4096 Aug 11 11:04 .wh..wh.plnk

Kismet

Kismet is installed by default in Kali linux. A few information to consider:

  • it creates virtual interface for monitoring to minimise the WLAN interface reconfiguration in a system. The interface name created by appending mon to the interface name. We can preview this with iw dev. It may also reconfigure your main interface into Monitor mode, check with iwconfig.
  • it is client-server application by default listening on :2501 port
  • when adding source use your mon interface, eg: wlan0mon
  • requires root privilages to run

Run with

kismet

Wavemon

wavemon is an ncurses-based monitoring application for wireless network devices. Home page http://www.erg.abdn.ac.uk/wavemon/

  • to measure the link quality we need to be connected to the network first
  • different options are displayed at the bottom of a screen controled by function keys or the first letter of the option
    F1info F2lhist F3scan F4 F5 F6 F7prefs F8help F9about F10quit
Install wavemon
aptget install wavemon
Run with -i <interface>
wavemon -i wlan0

Monitor link quality from command line

See link quality continuously on screen

watch -n 1 cat /proc/net/wireless