powershell 对Powershell脚本进行反混淆密码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 对Powershell脚本进行反混淆密码相关的知识,希望对你有一定的参考价值。

# Assuming a 128-bit (16 Byte) key was used to encrypt it and we know the key...
[Byte[]] $key = (1..16)

# $obfPW obtained from obfuscate_password.ps1 script, injected in this case
$obfPW = '76492d1116743f0423413b16050a5345MgB8AEUASQBwAHgANwBqAEQAUABYAGsAcgBqAFAAYwA0AEMAbwBxAGwAbABLAHcAPQA9AHwAMwBiAGQAYQBlADMAMQA5ADQANQAwAGIAMQBkAGUANgA2ADYAOQBjAGYAMgBiAGUAMABiADMAYQA3ADAANgBhAGEANQBjADUANgBlAGIAMQBiADIAYwA1AGIANgA3ADcAYwAyADEANgAzADUAOAA1ADAAZQA0ADQAMAA4AGEAMQA='

# Convert it to a Secure String using the key
$secPW = $obfPW | ConvertTo-SecureString -Key $key

# Create a new credential object
$credential = New-Object System.Management.Automation.PSCredential (“test”, $secPW)

# Print password in plain text
$credential.GetNetworkCredential().password

以上是关于powershell 对Powershell脚本进行反混淆密码的主要内容,如果未能解决你的问题,请参考以下文章

创建现有数据库的副本并使用 Powershell 脚本对其进行重命名

PowerShell MDB 查询 - 脚本在 Access 中工作,不在 PowerShell [重复]

PowerShell脚本传递参数

PowerShell 基础ps1 脚本的执行策略和相关渗透思想

powershell是病毒吗?

尝试创建删除电子邮件 powershell 脚本