
5cfdf61c454c1fc5e9f0fcad2d12d5ef.ps1
我在我的電腦上發現了一個名稱:
$pyfwthc = # this is just a TON of random letters and numbers didnt wanna waste the space and its probably not important (encrypted maybe?)
$sstring = ConvertTo-SecureString $pyfwthc
$script = (New-Object system.Management.Automation.PSCredential("pyfwthc", $sstring)).GetNetworkCredential().Password
Invoke-Expression $script
這是我該擔心的事嗎?
答案1
讓我們來分解一下。
- 第一行將該大字串儲存在名為「pyfwthc」的變數中。
- 第二行“將加密的標準字串轉換為安全字串”,這樣做是為了保護密碼: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/convertto-securestring?view=powershell-5.1
- 第三行建立一個 PowerShell 憑證,可用於對來自 PowerShell 腳本的其他命令進行身份驗證,而無需暴露密碼。然後它從該憑證中提取密碼。這會將加密的字串轉換為純文字。
- 第四行將“password”作為命令運行:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-5.1
更新:正如其他用戶指出的那樣,它正在將密碼字串作為命令運行。您想要將 $script 的值轉儲到檔案中,以便您可以看到它正在運行的內容:
從腳本中刪除最後一行並運行:
echo $script > this_is_the_script.file