Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

A real Advanced HWID Protection System !

Hello ,
since am new to this community , I wanted to share some of stuff 😅
So in this Tutorial , i will explain everything from the beginning till the end :

First of all , make an empty project , name it what ever you want and then add new a class & name it what ever you want , Replace all the codes in it with this one:

pastebin.com/Mn6qQ1Gp

Now , you've Imported 2 Classes inside this namespace , HWIDClass & CryptoClass .

HWIDClass : Which is responsible for getting the user's unique HWID MD5 Encrypted,You will need to add { System.Management } as a reference.

CryptoClass : Which is responsible for the encryption , you can see something named as "Key" , in both "Encrypt" & "Decrypt" , You can put your own preferred key inside it . DO NOT Share it when you release your program.

Now Add Another new class and name it what ever you want , then replace all codes in it with this one :

pastebin.com/gTsVShxt

This class will be used in a timer , simply in order to prevent common Debuggers from debugging your Application . [ i know that it's not good enough , i am just too lazy to get every single process hash to include it in the protection thread ]

Now , Let's go to our form , Add 1 label , 1 Textbox & 1 Button , go to code tab and You should be using the following namespaces :
Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using Crypto;
using Protection;

Then Simply Double click on the Form [ In order to obtain the Form1_load Event ]
then first , write before it this :
Code
String Packet;
String SecurityCheck;
bool CrashAPP;
and write the following inside it :
Code
if (ProtectionClass.Connection() == true)
      {
            CrashAPP = false;//Ehh , Dont Crack the app , Connection is OK !
            if (System.IO.File.Exists("C:\\Windows\\bootstat.dll"))
            {
            CrashAPP = true; //Fucking Crash Dat app, Cracking Attempt found !
            Application.Exit();//Checks for the file that was generated by the Protection Thread , if it's there , means that there was a cracking attempt , = Exit Instantly.
            }

            WebClient Downloader = new WebClient();
            try
            {
            if (System.IO.File.Exists("C:\\Windows\\System\\drivers\\etc\\hosts"))
            {
            System.IO.File.WriteAllText("C:\\Windows\\System32\\drivers\\etc\\hosts", " "); // Prevents Hosts Cracking way
            }
            }
            catch (Exception ErrorFileOpened) { MessageBox.Show("Error : Couldn't Access Some files ! "); Application.Exit(); } // IF Couldn't Access etc folder / delete hosts
            //if hosts file was deleted & everything is cool then do the following :
            Packet = Downloader.DownloadString("pastebin. com/raw.php?i=GBKqFL22"); // Put your own Pastebin here

            try { System.IO.File.WriteAllText(Application.StartupPath + "//Keys.lc", CryptoClass.Encrypt(Packet)); }//Makes a .LC file [ Aka License file] With a x2 Encrypted HWID.
            catch (Exception AccessDenied) { MessageBox.Show("Error : Couldn't access some files !", "Error 0xAC1", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); }
            try
            {
            SecurityCheck = System.IO.File.ReadAllText(Application.StartupPath + "//Keys.lc"); // if it's really a generated LC File then read it .
            }
            catch (Exception FileNotFound) { MessageBox.Show("Error : Couldn't read license file !", "Error 0xAC2", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); }
            if (Packet.Contains(CryptoClass.Encrypt(HWIDClass.ENCRYPTEDHWID())))
            {
            if (CryptoClass.Decrypt(SecurityCheck).Contains(CryptoClass.Encrypt(HWIDClass.ENCRYPTEDHWID())))//Decrypts the x2 Encrypted String 1 Time , Then Encrypts The user hwid and Compares between them.
            {
            monoFlat_ThemeContainer1.Text = this.Text + " [valid]";
            MessageBox.Show("Congratz You are an Activated User !"); // this will be for test purposes , you can do further more things  than dat.
            }
            }
            else
            {
            this.Text = this.Text + " [Invalid]";
            }
      }
      textBox1.Text = HWIDClass.ENCRYPTEDHWID();

replace the link inside this code :
Code
Packet = Downloader.DownloadString("pastebin.com/raw.php?i=GBKqFL22");

with the one you would like to put the encrypted HWID inside to check for .

Now copy the same code that was in the form1 into button event and everything should be good , add 2 timers , name the first with "ProtectionThread" And change the following Properties :

Enabled = True ; Interval : 5000 ;

Then name the second one with : "HeartBeatCheck" and change the following Properties :

Enabled = True ; Interval : 50 ;

Then Double click the first timer and add the following code :

ProtectionClass.Protection();

Then Double click the second one and Write the following code :

Code
if (!ProtectionThread.Enabled)
      {
            Application.Exit(); // Mostly , Prevents Killing your Protection Timer.
      }
      if (CrashAPP)
      {
            System.Diagnostics.Debugger.Launch();//Gives an unhandled exception if the application has not exited already =D
      }

Now your application is done , but in order to make the activation work , you will need an HWID Encrypter in order to put the right output into Pastebin

so in the attachement , there is the project itself & The activate , you MUST put the same key in the Activator as well.

Download Source :

ge.tt/8Vak6JK2/v/0
Nice first post, welcome to the forums.
[Image: xd.png]
(Jul 13, 2015 07:19 AM)Royal Bash Wrote:  Nice first post, welcome to the forums.

Thank you sir , really appreciated 🤝
Nice first post, hope to see more from you.
(Jul 13, 2015 07:21 AM)Regan Wrote:  Nice first post, hope to see more from you.

Thank you very much <3 🤗
I will keep posting similar things soon :3
This is looking pretty great. Just and idea instead of overriding there host file because that requires admin rights you can check for loopback something like this.

Code
snippet:
using System.Net;

IPHostEntry ipHostEntry = Dns.GetHostEntry("Url to check");
bool isLoopback = false;
foreach(var address in ipHostEntry.AddressList)
{
      isLoopback = IPAdress.IsLoopback(address);
      if(isLoopback)break;
}

if (isLoopback) Application.Exit(); <-- You can actually place that in the foreach loop.
Horrible conventions. You should fix them.
[Image: aq1KPzP.png]

You don't fool me!
Title should be > Advanced HWID System
and few things can be done better but its ok
(Jul 13, 2015 11:43 AM)Odus Wrote:  [img]i.imgur.com/aq1KPzP.png[/img]

You don't fool me!

This might be my big brother 🤨 , that's really my first time ._.

or it might be someone else , since here in Egypt our IP is Dynamic , Means that it continuously changes on every PC Restart / Router Restart .

so not sure. :S


(Jul 13, 2015 11:15 AM)newmecha Wrote:  This is looking pretty great. Just and idea instead of overriding there host file because that requires admin rights you can check for loopback something like this.

Code
snippet:
using System.Net;

IPHostEntry ipHostEntry = Dns.GetHostEntry("Url to check");
bool isLoopback = false;
foreach(var address in ipHostEntry.AddressList)
{
      isLoopback = IPAdress.IsLoopback(address);
      if(isLoopback)break;
}

if (isLoopback) Application.Exit(); <-- You can actually place that in the foreach loop.

This one is actually much better than mine , Idk why i didn't think about it

Really Thanks for improving my system 🤝
Wrekonize,
If you want you can shrink that down to a one liner as well, little harder to understand but as followed
Code
if (Dns.GetHostEntry("urlhere")?.AddressList?.FirstOrDefault(IPAddress.IsLoopback) != null) Application.Exit();
(Jul 13, 2015 03:17 PM)newmecha Wrote:  Wrekonize,
If you want you can shrink that down to a one liner as well, little harder to understand but as followed
Code
if (Dns.GetHostEntry("urlhere")?.AddressList?.FirstOrDefault(IPAddress.IsLoopback) != null) Application.Exit();

Can be shrunken further:

Code
if (Dns.GetHostEntry("urlhere").AddressList.Any(IPAddress.IsLoopback)) Application.Exit();
Ah yes forgot .Any() also if your not sure what the ? was for its a null conditional operator.
should be
if (IPAddress.IsLoopback(Dns.GetHostEntry("url").AddressList[0])) Application.Exit();
Only3,
Checking against the first entry should be enough yes.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by evikingOct 4, 2022 11:57 PM 0 201 Oct 4, 2022 11:57 PM
Last Post: eviking
[.NET] by SIM-4967739Aug 20, 2022 11:46 AM 5 316 Aug 20, 2022 11:46 AM
Last Post: bullets
[.NET] by xZalurexJan 6, 2021 04:58 PM 5 368 Jan 6, 2021 04:58 PM
Last Post: xZalurex