Skip to content

Commit

Permalink
Power-Escalate 1.1 WIFI passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
giMini committed Jan 8, 2017
1 parent 93c1aa2 commit f502dcd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions EYLR/Power-Escalate.ps1
@@ -1,5 +1,16 @@
#requires -version 2

<#
.SYNOPSIS
Power-Escalate launcher
.NOTES
Version: 1.1
Author: Pierre-Alexandre Braeken
#>

Set-StrictMode -version 2

function Write-Log {
Expand Down Expand Up @@ -178,6 +189,10 @@ foreach ($credential in $credentials) {
}
Write-Log -StreamWriter $streamWriter -InfoToLog "`r`n$i password(s) found"

$passwords = (netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize

Write-Log -StreamWriter $streamWriter -InfoToLog "`r`nWIFI passwords:`r`n $passwords "

$environmentPathVars = ($env:Path)
Get-UsualSuspect -StreamWriter $streamWriter -Result $environmentPathVars -Title "Any non-default directory is a possible win because authenticated users will have write access to these directories"

Expand Down

0 comments on commit f502dcd

Please sign in to comment.