Generic HWID Protection
February 26th, 2010 0 CommentsHello everyone!
Since I’ve gotten into the hacking scene if you will, I started noticing that there are too many people ripping other people’s work off and labeling it as their own. How can we prevent this? Simple, add in a unique hardware identifier for each computer so that only that piece of hardware can run it.
This is the C# code I’m publicly releasing. I have a more advanced method but I don’t want to post it for obvious reasons
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | // mach_kernel's generic hardware ID checker. // all your base are belong to me! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Management; using System.Threading; using System.Diagnostics; namespace HWIDProtect { class Program { /// <summary> /// Quick and dirty way to get some sort of a hardware ID /// Your head can run wild with how you can encrypt these IDs, /// read some WLM docs =) /// </summary> /// <returns></returns> public static string GetProcessorID() { string sProcessorID = String.Empty; string sQuery = "SELECT ProcessorId FROM Win32_Processor"; ManagementObjectSearcher oManagementObjectSearcher = new ManagementObjectSearcher(sQuery); ManagementObjectCollection oCollection = oManagementObjectSearcher.Get(); foreach (ManagementObject oManagementObject in oCollection) { sProcessorID = (string)oManagementObject["ProcessorId"]; } return (sProcessorID); } /// <summary> /// IT IS IMPORTANT to encapsulate your code in a void, /// because as your hack gets more complicated, you WANT TO AVOID /// having the load parameters be clouded with all this stuff! /// </summary> public static void CheckHWID() { // String I'm making for comparison string cpuID = GetProcessorID(); string setting = Properties.Settings.Default.CPUHWID.ToString(); if (cpuID != setting) { Console.WriteLine("Your HWID isn't in the database, quitting in 5 seconds"); Console.Beep(); Thread.Sleep(5000); // You can use the application close but this is a bit more effective and // can't be f*d with as easily // hackapplication is this process, not another process. // It won't kill anything else than this process! Process hackapplication = Process.GetCurrentProcess(); hackapplication.Kill(); } } static void Main(string[] args) { Console.WriteLine("Welcome to mach_kernel's generic HWID protection example!!"); Console.WriteLine("Your CPUID:" + GetProcessorID()); CheckHWID(); Console.WriteLine(""); Console.WriteLine("Your computer was found in the HWID Database!"); Console.ReadLine(); } } } |

