Archive for the ‘Uncategorized’ Category.

3.8mm laser diode jammed in to aixiz 5.6mm module

There doesn’t seem to be a laser housing available that will take a 4.8mm diode. So I was forced to jammed a 3.8mm diode in to a standard 5.6mm aixiz module. This isn’t entirely sensible, but we’re playing with burning laser ripped out of DVD drives, the train for sensible town left long ago my friend.

I removed the 3.8mm diode from the drive but left it in it’s heatsink, I then cut away just enough of the heatsink so that it would fit in to the housing. I stuff some solder in the gaps just for good measure:

Unfortunately the driver I’m using, an OFL144, doesn’t fit in the housing either, so I’ve clamped the whole thing in a bent piece of metal. Pretty aint it:

SecurityTube, Wireless Lan Security Megaprimer notes: part 10 (Hacking Isolated Clients)

Vivek’s video is here.

You may have noticed that your phone or laptop autoconnects to wifi networks you’ve used before.
In this part Vivek discusses this behaviour and shows how it can be exploited.

Clients acquire preferred lists of SSIDs as they connect to different networks.

When the client is isolated, it will send out “Probe Request” packets to try and find the networks it already knows about.

0. Make sure your monitor mode interface (mon0 is up and running as before).

SSID is case sensitive.

1. You’ll need a client which you’ve previously connected to a number of networks.
Leave the Wifi on, but don’t associate with any network.

2. Load airodump, you should be able to see the client probing for various networks.

3. Start a wireshark capture as usual.

3.1 Use the mac address of the client from airodump like so:

wlan.addr == MACADDRESS

You should see a bunch of “Probe Request” packets. You should see probe requests for all the networks your client knows about.

You should note that different operating systems behave differently. Newer OSs don’t auto-connect to open networks.

Use Cases:

4. Open network, no encryption.

Attacker sniff Probe Request for a network.
Attacker sends a “Probe Response” saying “Yes I’m that network”.
Target is connected to attackers fake access point.
Attacker can attack the client at the IP level.

This is possible because SSID alone is used which network to connect to.

4.1 We can use airbase-ng to create a fake AP as before:

airbase-ng --essid SecurityTube -a AA:AA:AA:AA:AA:AA mon0

Note: You can add a “-v” to airbase-ng which displays a lot of interesting information.

4.2 Fire up wireshark add a filter for the MAC: AA:AA:AA:AA:AA:AA, the filter should look like this (where MACADDRESS is the MAC of your client previously found):

(wlan.addr == MACADDRESS) && (wlan.addr == AA:AA:AA:AA:AA:AA)

5. airbase-ng respond to everything!

airbase-ng can be configured to respond to /ALL/ probe requests:

airbase-ng -P -a AA:AA:AA:AA:AA:AA mon0

-C can also be used to send of beacon packets for networks probed too, neat!

airbase-ng -C 10 -P -a AA:AA:AA:AA:AA:AA mon0 -v

Vivek shows this iPhone hopping between different wifi networks which his fake AP is broadcasting.

We’ll discuss how to can use this behaviour with encrypted networks in later lessons.

SecurityTube, Wireless Lan Security Megaprimer notes: part 9 (Hotspot attack basics)

Vivek’s video is here.

Vivek shows you how to setup a fake software access point and force existing clients to connect to it in preference to the original access point. From this point a number of attacks could be launched, including man-in-the-middle attacks. These attacks are not discussed in detail here.

Wireless hotspots are usually Open Auth, sometimes have MAC filtering, no encryption (can’t really work here). May have application layer authentication (login portal).

Attacks

* Create an “evil twin”:
* Same ESSID
* Same BSSID (optional)

* Use de-auth to break client connections

* If our “evil” network has higher strength, then client will connect to it preferentially.

* Further attack options then exist. (metasploit the client, man in the middle)

0. Locate your target network with airodump. (For the lab setup an AP with no encryption, in the examples it’s called SecurityTube)

1. Use airbase-ng to create an access point.

iwconfig wlan0 channel NN # can be any channel
airbase-ng -a AA:AA:AA:AA:AA:AA -e SecurityTube mon0

This access point has 2 interfaces. One is mon0, the wireless interface.
airbase-ng creates a virtual network device called at0. This is the wired side of access point.

2. Bring up the virtual interface

ifconfig at0 up

That was just to test things out, kill airbase-ng.

3. Connect a client to the real access point.

4. Deauth all clients

iwconfig channel NN # same channel as REAL AP.
aireplay-ng --deauth 0 -a BSSID_OF_REAL_AP mon0 # BSSID found in airodump

Leave this running in the background.

5. Bring up airbase-ng again. In this case, we’re running airbase on the same channel (so we can send deauths in the background).

airbase-ng -a AA:AA:AA:AA:AA:AA -e SecurityTube mon0 # BSSID can be anything.

6. Try and connect your client again. Your client should connect to your soft access point.

7. Capture some data with wireshark on at0.

ifconfig at0 up #bring up at0

After a while, the client will give up trying to obtain a DHCP address.
It will assign itself an autoconfig address. You’ll see this in wireshark.
Source address will be listed as 169.x.x.x, in Vivek’s case he saw IGMP packets.

8. Assign at0 an address in this range and attempt to ping the client:

ifconfig at0 169.254.174.XX netmask 255.255.255.0 up #where 169.254.174.XX is an address in the same range as the client.
ping <address found in wireshark>

You can now access the client at the IP level.

SecurityTube, Wireless Lan Security Megaprimer notes: part 8 (Hacking Authentication, WEP is broken)

Vivek’s video is here.

This lesson gives you a taste of how broken WEP is. The encryption method sucks.
We’ll break the authentication process, this doesn’t give you access to the network, but it’s the first step. The conclusions will also show that this technique allows you to inject packets of 128 bytes and decrypt the first 128 bytes of any packet. This is all without any brute forcing, the protocol is just broken.

Authentication types

* Open Authentication
* Shared Authentication

* Open Auth:
* no actual authentication, just exchange 2 packets.
* edge cases where it can fail (e.g. MAC filtering)

* Shared Authentication
* WEP encryption
* WEP requires 2 things: “IV” (initialisation vector) and “encryption key”
* Uses RC4 encryption algorithm.
* Encrypted stream is XOR’d with cleartext to encrypt.

* Challenge is 128 byte plaintext (random, created by AP)
* Client encrypts it, with random IV.
* Access point checks this against it’s own encryption.

0. Setup an access point and client using WEP encryption, shared authentication.

1. Find the channel of the AP using airodump as before:

airodump-ng mon0 # make a note of the channel and BSSID of the target network

2. Use airodump to capture packets on this channel:

airodump-ng --channel NN mon0 --bssid APBSSID --write demo

3. Connect a client
3.1 Notice that the AUTH column changes and now says “SKA”.

4. Quit airodump. Run wireshark on the capture file:

wireshark demo-01.cap

4.1 Add a filter to show packets to/from our AP and to show auth packets only. You can add auth packets by right clicking and selecting “apply as filter”->”and selected”. You filter should look something like this:

(wlan.addr == APMACADDR) && (wlan.fc.type_subtype == 0x0b)

4.2 You should be able to see 4 packets:
* Check the “Auth SEQ”s you should see packets with SEQ numbers 1,2 and 4 (SEQ3 only shows data).
* SEQ1: The authentication request
* SEQ2: The authentication challenge, containing the challenge text (to be encrypted)
* SEQ3: Encrypted challenge text, with a random IV of the clients choice.
* SEQ4: AP, decrypts the packet. Checks everything is ok and sends success code.

5. Attacker can probe the exchange (like we just did).
5.1 We have the cleartext and the encrypted text.
5.2 Because the encrypted text = cleartext XOR keystream we can extract the keystream easily.
keystream = cleartext XOR encrypted text.
5.3 Uses the IV and the keystream we can authenticate!

5.4 airodump will do it for you. When you made the dump above it should have created a file called demoXXX.xor
5.4.1 It looks like this doesn’t always work, apparently due to broken Access point implementations… (see here)

6. Use aireplay to auth:

aireplay-ng --fakeauth 10 mon0 -e SecurityTube -y demoXXX.xor

6.1 You should see that the authenication is successful.

5. Attacker can probe the exchange (like we just did).
5.1 We have the cleartext and the encrypted text.
5.2 Because the encrypted text = cleartext XOR keystream we can extract the keystream easily.
keystream = cleartext XOR encrypted text.
5.3 Uses the IV and the keystream we can authenticate!

5.4 airodump will do it for you. When you made the dump above it should have created a file called demoXXX.xor
5.4.1 It looks like this doesn’t always work, apparently due to broken Access point implementations…

6. Use aireplay to auth:

aireplay-ng --fakeauth 10 mon0 -e SecurityTube -y demoXXX.xor

6.1 You should see that the authenication is successful.
6.2 Capture the fakeauthentication process with airodump and take a look at it in wireshark.

7. We’ve broken the authenication, so now what?
7.1 We can encrypt small packets and inject them (128bytes)
7.2 IV and keystream can be harvested from packet capture, and we can decrypt first 128 of all packets.

Conclusion: Shared key authentication is broken!