如何阅读后台运行的powershell脚本的内容?

时间:2016-03-29 08:05:12

标签: powershell batch-file

我通过 ProcessExplorer

获得此行
  

C:\ Windows \ System32下\ WindowsPowerShell \ V1.0 \ powershell.exe" -noprofile   -windowstyle hidden -executionpolicy bypass iex([Text.Encoding] :: ASCII.GetString([Convert] :: FromBase64String((gp)   ' HKCU:\ Software \ Classes下\ ZXWNMNLIMAGAL')LOOTDA)));

看起来很可疑或正常吗? 这是否意味着脚本保存在注册表中而不是文件中?怎么读呢?

修改: 现在,当我在注册表中阅读此内容时,我确信它可能是一种编码病毒:

  

Google Update REG_SZ
  " C:\用户\迈克尔\应用程序数据\本地\谷歌\更新\有GoogleUpdate.exe" /C       {BE9473EA-5660-4BF7-91C3-2A2258213EE1} REG_SZ C:\ Windows \ system32 \ WindowsPowerShell \ v1.0 \ powershell.exe -noprofile   -windowstyle hidden -executionpolicy bypass iex([Text.Encoding] :: ASCII.GetString([Convert] :: FromBase64String((gp)   ' HKCU:\ Software \ Classes下\ ZXWNMNLIMAGAL')LOOTDA)));

编辑于2016年3月29日@ 15:55

如果有人想继续这个讨论,我在这里要求解码这个病毒:

How can i read the source code of this encoded powershell script from the registry?

2 个答案:

答案 0 :(得分:1)

  

C:\ Windows \ System32下\ WindowsPowerShell \ V1.0 \ powershell.exe" -noprofile   -windowstyle hidden -executionpolicy bypass iex([Text.Encoding] :: ASCII.GetString([Convert] :: FromBase64String((gp)   ' HKCU:\ Software \ Classes下\ ZXWNMNLIMAGAL')LOOTDA)));

此代码表示PowerShell将在没有窗口的情况下执行,并绕过ExecutionPolicy限制来自注册表项HKCU:\Software\Classes\ZXWNMNLIMAGAL(base64编码)的命令。

对我来说看起来像病毒。

如果在PowerShell控制台中执行此代码,则可以识别该命令:

([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String((gp 'HKCU:\Software\Classes\ZXWNMNLIMAGAL').LOOTDA)))

这将显示您要执行的内容。

答案 1 :(得分:1)

我也一样。我不确定,但它会在PowerShell中运行一个隐藏的脚本。该脚本可能是网络钓鱼。我想我的电子邮件会发送给我的Outlook联系人。

相关问题