Friday, January 29, 2016

Kali 2.0 on Raspberry Pi

How to run Kali 2 on RPi2

(source)
You need a microSD that's at least 8GB

Download the image here : https://www.offensive-security.com/kali-linux-arm-images/
Download Win32 Disk Imager : http://sourceforge.net/projects/win32diskimager
Download 7-zip if you don't have it : 7-zip.org
Extract the image with 7-zip
Use Win32 Disk Imager to install the img on the microSD card

The default username and password is 'root' and 'toor'

Set a static IP address (source)
If you want to use your Pi with ssh it's better is you set a static IP address.

nano /etc/network/interfaces

Modify the eth0 part so it's like this:
auto eth0
iface eth0 inet static
address 192.168.0.99
netmask 255.255.255.0
broadcast 192.168.0.255


restart connection (don't do it from ssh on eth0 cause you will lose the connection)
ifdown eth0
ifup eth0


Done! Now you can login with ssh


Install wifite

Wifite is a tool to test the security of WiFi networks
apt-get update
apt-get install wifite



Install Raspi-config

With raspi-config you can extend the partition size so that you use the entire uSD card.

apt install alsa-utils
wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20160108_all.deb
wget http://http.us.debian.org/debian/pool/main/l/lua5.1/

lua5.1_5.1.5-7.1_armhf.deb

wget http://http.us.debian.org/debian/pool/main/t/triggerhappy/triggerhappy_0.3.4-2_armhf.deb
dpkg -i triggerhappy_0.3.4-2_armhf.deb
dpkg -i

lua5.1_5.1.5-7.1_armhf.deb

dpkg -i raspi-config_20160108_all.deb


raspi-config manual

Run raspi-config and extend the uSD card partition size.




WiFi commands

Scan WiFi networks
iwlist wlan0 scan

Scan WiFi networks and only show the SSID
iwlist wlan1 scan | grep SSID

Turn the WiFi adapter on or off
ifconfig wlan0 up
ifconfig wlan0 down

Connect to WEP WiFi network from terminal
iwconfig wlan0 essid NAME key PASSWORD
dhclient wlan0


Connect to WPA WiFi network from terminal
(source)

First you need to install wpasupplicant.
apt-get install wpasupplicant

Turn the WiFi on
ifconfig wlan0 up

wpa_passphrase NETWORKSSID > wpa.conf
then enter password

wpa_supplicant -B -Dwext -iwlan0 -c/wpa.conf

dhclient -r
dhclient wlan0



Wifite

(source)

wifite
Ctrl-C to stop scanning and start hacking
enter target number and press enter

When hacking WPS enable routers:
Step 1: Pixie dust attack
list of vulnerable routers

Step 2:Brute force
can take a long time

Step 3:Handshake capture
If wifite succeeds at getting the handshake, you have to crack it to get the password
To do so, you can use cowpatty or aircrack-ng.
to be continued...


nmap

(source1) (source2)

nmap is used to scan your network.

To list all devices on the network
nmap -sP 192.168.0.0/24

Find the OS of a device
nmap -O 192.168.0.99



No comments:

Post a Comment