You need to use an obfuscator and/or a crypter to protect your executable at least. Otherwise people can crack it easy.
But on the other hand, any security should never be made in .NET.
That being said.
Start by making a Windows Form Application.
Delete the form.
Open Program.cs and delete everything in the main method.
Now your application will not show up.
Make a threading system, so it will not close as well.
First thing you do is making a connection between the antihack and the server. It's to ensure people are not closing it. Make sure to send data as well high encrypting it. Make your own algorithms etc. Now to the actual anticheat part.
I will just give some examples, not actual working things.
Use the Process class, but at first make a string array with processnames that's not allowed. A good thing is checking for datas in the process as well. You can use the System.Reflection.Assembly class to do that.
Code:
string[] NotAllowed = new string[] { "hack" };//Don't write .exe
foreach (string prc in NotAllowed)
{
foreach (Process Prc in Process.GetProcessesByName(prc))
{
Prc.Kill();
}
}
Next thing you do is you can check for not allowed injection.
Check your conquer process.
Code:
foreach (Process Prc in Process.GetProcesses())
{
try
{
if (Prc.MainModule.FileVersionInfo.OriginalFilename.ToLower().Contains("conquer"))
{
foreach (ProcessModule module in Prc.Modules)
{
if (module.FileName.Contains("notallowed.dll"))
{
Prc.Kill();
}
}
}
}
catch { }//For processors you do not have access to!
}
Ermm. This is some really basic examples and they are not very good to use, but I hope it helps.