Grey Hack – Simple Wi-Fi Auto Hack

In this guide I would like to share the first script that I run after every save reset. It automatically hacks the best wifi network and connects to it. In addition it creates some folders that I usually use for the later scripts.

It is simple enough to understand and to add your own extensions.

Complete Script – Comments Inline

// Load crypto library
crypto = include_lib("/lib/")
// Start Wifi monitoring
crypto.airmon("start", "wlan0")

// Get a l ist of all available WiFi networks
scanResult = get_shell.host_computer.wifi_networks("wlan0")
networks = []
for net in scanResult
	networkEntry = net.split(" ")
	BSSID = networkEntry[0]
	Power = networkEntry[1].remove("%")
	ESSID = networkEntry[2]
        // Push the result into a new map
end for

// Sort the list of WiFi networks and revert it so the best connection comes first
bestNetwork = networks.pull

// Start the reply attack until you get 10000 acks
result = crypto.aireplay(bestNetwork.BSSID, bestNetwork.ESSID,10000)
if typeof(result) == "string" then exit(result)

// Crack the encrypted password in the file.cap file
password = crypto.aircrack(home_dir+"/file.cap")
successful = get_shell.host_computer.connect_wifi("wlan0",bestNetwork.BSSID,bestNetwork.ESSID,password)
print("Wifi hacked and connected!")
// These 2 lines will remove the now unnecessary file.cap file
file = get_shell.host_computer.File(home_dir+"/file.cap")

// Create some folders for later
get_shell.host_computer.create_folder(home_dir, "Upload")
get_shell.host_computer.create_folder(home_dir, "Victims")
get_shell.host_computer.create_folder(home_dir, "Bounty")
Originally posted by Patriot2k

Be the first to comment

Leave a Reply

Your email address will not be published.