Introduction: I have made a simple anticheat.exe application, which runs in processes once my patcher/launcer program I also made starts up "MainClient.exe".
A few problems:
1. I need tomake a DLL to make sure that the "AntiCheat.exe" process is open when the "MainClient.exe" process is. If it is not, it will kill the "MainClient.exe" process.
2. A DLL is needed because the problem is people can easily close the AntiCheat.exe process and stop the whole anticheat I have made, yet keep playing normally.
3. The main MainClient.exe can be run with a simple 2 words in a batch file, easily bypassing my launcher, updater, and anticheat. I'd like to make a dll that can, at best, hook into the MainClient.exe application itself, or something that the MainClient.exe always loads. At worst I am looking into at least hooking it into my anticheat.exe.
Also, I do not have the source of the MainClient.exe, just the compiled executable file. I was thinking of possibly hexing the compiled executable, or hexing one of the files it needs to load, and possibly hooking my DLL into it.
My current DLL I have made [I have never made a DLL before... I have only been using visual basic for 3 days] has this code... it returns no errors or warnings:
I am not sure if this would work for what I am trying to do. I have tried importing it into my resources in the project, and in the main class itself on my anticheat. Also I put it in my client. Nothing changed, so I think I may have to either make a new DLL or figure out how to call the MainCheck() function.
Also, it would be incredibly great if someone could tell me how I could hook a DLL to an already compiled file that I don't have the source to.
Thanks for the reply and the help, I hope someone can help me with my problem soon!
A few problems:
1. I need tomake a DLL to make sure that the "AntiCheat.exe" process is open when the "MainClient.exe" process is. If it is not, it will kill the "MainClient.exe" process.
2. A DLL is needed because the problem is people can easily close the AntiCheat.exe process and stop the whole anticheat I have made, yet keep playing normally.
3. The main MainClient.exe can be run with a simple 2 words in a batch file, easily bypassing my launcher, updater, and anticheat. I'd like to make a dll that can, at best, hook into the MainClient.exe application itself, or something that the MainClient.exe always loads. At worst I am looking into at least hooking it into my anticheat.exe.
Also, I do not have the source of the MainClient.exe, just the compiled executable file. I was thinking of possibly hexing the compiled executable, or hexing one of the files it needs to load, and possibly hooking my DLL into it.
My current DLL I have made [I have never made a DLL before... I have only been using visual basic for 3 days] has this code... it returns no errors or warnings:
VB.NET:
Public Class AntiCheat
Public Sub killProcess(ByRef strProcessToKill As String)
Dim proc() As Process = Process.GetProcesses
For i As Integer = 0 To proc.GetUpperBound(0)
If proc(i).ProcessName = strProcessToKill Then
proc(i).Kill()
End If
Next
End Sub
Public Function ProcessesRunning(ByVal ProcessName As String) As Integer
Try
Return Process.GetProcessesByName(ProcessName).GetUpperBound(0) + 1
Catch
Return 0
End Try
End Function
Public Function MainCheck()
If ProcessesRunning("MainClient") >= 1 Then
Dim acp = ProcessesRunning("AntiCheat")
If acp < 1 Then
Return 0
killProcess("MainClient")
Else : Return 0
End If
Else : Return 0
End If
End Function
End Class
Also, it would be incredibly great if someone could tell me how I could hook a DLL to an already compiled file that I don't have the source to.
Thanks for the reply and the help, I hope someone can help me with my problem soon!