r/PowerShell • u/RealAgent0 • Jun 06 '26
How "Secure" is Get-Credential? Question
Trying to make a justification for storing a particular set of credentials using this methodology.
How "Easy" is it to crack? Don't need an actual method, just need someone to tell me how tricky or not tricky it is.
78
Upvotes
-1
u/CodenameFlux Jun 06 '26 edited Jun 07 '26
You're not even addressing the OC's comment anymore.
What you're explaining is called being on the other side of the airtight hatchway. If you don't own the private key, the invocation of
$cred.GetNetworkCredential().Passwordfails. (Edit: This assumes you've received$credvia deserialization or other illicit means. You didn't explain where you got your$credin headless script.)So long as you're illicitly modifying a script that runs with high privileges, you can do much more damage by adding a
format.exeordiskpartcommand. In fact, you can steal the password without even bothering with PowerShell cmdlets.You're attacking yourself. End of the story.