Here is the code in vb.net
Credit: C# to Vb.net Converter
Code
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports System.Security.Cryptography
Imports System.Diagnostics
Imports System.Management
Imports System.Text.RegularExpressions
Imports System.IO
Namespace UbbeLoLs_ProcessFucker
' **IMPORTANT**
' * THIS PROGRAM WAS CREATED BY UBBELOL
' * IF YOU USE THESE FUNCTIONS, PLEASE
' * GIVE PROPER CREDITS OR ELSE I WILL
' * FIND IT AND REPORT IT
' * --
' * USE THIS PROGRAM RESPONSIBLY AND
' * NOT FOR BLACK HAT PURPOSES, TESTING
' * IS ONLY ALLOWED!
' * --
'
Public Partial Class Form1
Inherits Form
Private ManagClass As New ManagementClass("Win32_Process")
Public Sub New()
InitializeComponent()
End Sub
Public Sub CorruptProcess(ProcessName As String, Path As String)
Dim Processlist As Process() = Process.GetProcessesByName(Regex.Replace(ProcessName, ".exe", String.Empty).Trim())
For Each cP As Process In Processlist
Try
cP.Kill()
Catch
Return
End Try
Next
System.Threading.Thread.Sleep(500)
'Have to make sure process is killed before
'proceeding
Dim Enc As SHA512 = New SHA512Managed()
Dim BytesToCorrupt As Byte() = System.IO.File.ReadAllBytes(Path)
Dim data As Byte() = New Byte(BytesToCorrupt.Length - 1) {}
Try
Dim Fi As New FileInfo(Path)
Dim Sz As Long = Fi.Length
System.IO.File.Delete(Path)
System.IO.File.WriteAllBytes(Path, Enc.ComputeHash(data))
Dim buff As Byte() = New Byte(Sz - 1) {}
Dim fs As New FileStream(Path, FileMode.Create, FileAccess.ReadWrite)
Dim bw As New BinaryWriter(fs)
bw.Write(buff)
bw.Close()
Catch
Return
End Try
End Sub
Public Function GetProcessPath(Processname As String) As String
Dim mcol As ManagementObjectCollection = ManagClass.GetInstances()
For Each strt As ManagementObject In mcol
'This could probably be done ALOT better, i just couldn't think of a way
'right now
If strt("Name").ToString() = Processname Then
Return Convert.ToString(strt("ExecutablePath"))
End If
Next
Return Nothing
End Function
Private Sub Form1_Load(sender As Object, e As EventArgs)
UpdateList()
End Sub
Public Sub UpdateList()
Dim mcol As ManagementObjectCollection = ManagClass.GetInstances()
For Each strt As ManagementObject In mcol
Dim NewItem As New ListViewItem()
NewItem.Text = Regex.Replace(strt("Name").ToString(), "-", String.Empty)
NewItem.SubItems.Add(strt("ProcessId").ToString())
If Convert.ToString(strt("ExecutablePath")) = String.Empty Then
NewItem.SubItems.Add("Not retrievable...")
Else
NewItem.SubItems.Add(Convert.ToString(strt("ExecutablePath")))
End If
listView1.Items.Add(NewItem)
Next
End Sub
Private Sub corruptProcessToolStripMenuItem_Click(sender As Object, e As EventArgs)
CorruptProcess(listView1.SelectedItems(0).Text.ToString(), GetProcessPath(listView1.SelectedItems(0).Text.ToString()))
End Sub
Private Sub updateListToolStripMenuItem_Click(sender As Object, e As EventArgs)
UpdateList()
End Sub
End Class
End Namespace