Skip to content

Instantly share code, notes, and snippets.

@Shadow0ps
Created June 27, 2017 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shadow0ps/9c73dcc9d3e18dae78a0e4894d276082 to your computer and use it in GitHub Desktop.
Save Shadow0ps/9c73dcc9d3e18dae78a0e4894d276082 to your computer and use it in GitHub Desktop.
This will create a file called perfc in the C:\Windows directory. Petya/Goldeneye looks for this file and if it exists it terminates the program.
if (!(Test-Path "C:\Windows\perfc"))
{
New-Item -path C:\Windows -name perfc -type "file" -value "Inoculated"
Write-Host "System Inoculated"
}
else
{
Write-Host "File already exists! Your system may be infected."
}
@roycewilliams
Copy link

roycewilliams commented Jun 27, 2017

https://twitter.com/hackerfantastic/status/879792893824782337

Hacker Fantastic‏
@HackerFantastic

Kill switch does NOT WORK, created %WINDIR%\perfc & .dat & .dll on a clean 2008 host. Petya still spreads and infects via MS17-010.

[end tweet]

(In other words, this stops the PsExec+WMIC combo, but won't help if you're not patched for MS17-010)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment