10.09.2016 Views

Hacking_and_Penetration_Testing_with_Low_Power_Devices

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

110 CHAPTER 5 <strong>Power</strong>ing The Deck<br />

# wpa_supplicant configuration file for PFE-Secure<br />

network¼{<br />

ssid¼"PFE-Secure"<br />

psk¼"moremoney"<br />

}<br />

Assuming the configuration file is named wpas.conf <strong>and</strong> stored in the current directory,<br />

a connection can be created using wpa_supplicant -B -iwlan0 -cwpas.conf<br />

-Dwext. The -B option caused wpa_supplicant to be run in the background. The -i<br />

<strong>and</strong> -c flags specify the interface <strong>and</strong> configuration file, respectively. The final -D<br />

option is used select a driver.<br />

Connecting to the network <strong>with</strong> wpa_supplicant is not sufficient. You also need<br />

an IP address, routing, <strong>and</strong> a DNS server. In most cases, Dynamic Host Configuration<br />

Protocol (DHCP) is used to set up all of these things. Typing dhclient3 wlan0<br />

should properly configure the Beagle to connect to the network. A ping comm<strong>and</strong><br />

can be used to confirm connectivity.<br />

If we run ifconfig wlan0, it will tell us that PFE is using a 192.168.10.0/24<br />

network. We can then use the go-to tool for network scanning, Nmap. A basic Nmap<br />

scan can be performed by typing nmap 192.168.10.0/24. The output of this comm<strong>and</strong><br />

is shown in Figure 5.11. From the Nmap output, we see six machines are<br />

active. The host at 192.168.10.1 is the company router. Based on the MAC address,<br />

FIGURE 5.11<br />

Basic Nmap output for PFE-Secure network.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!