Anti Hack System?

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Anti Hack System?

    Hey.

    Ich habe einen gameserver.

    Will fuer diesen ein Antihack system haben.

    D.h. bestimmte cheat tools sollen den clienten crashen lassen wenn sie laufen.

    Wie funktioniert sowas in etwa?

    Was muss man koennen?

    hier eine art vorgefertigter code

    C-Quellcode

    1. // FFF_ACC.cpp : Defines the entry point for the DLL application.
    2. //
    3. #include "stdafx.h"
    4. #include "FFF_ACC.h"
    5. #include "socket.h"
    6. #include <AtlBase.h>
    7. #include <windows.h>
    8. #include <iostream>
    9. #include <conio.h>
    10. #include <tlhelp32.h>
    11. #include <tchar.h>
    12. using namespace std;
    13. HWND MainWindowHandle = 0;
    14. bool InitWindowApp(HINSTANCE instanceHandle, int Show);
    15. BOOL APIENTRY DllMain( HANDLE hModule,
    16. DWORD ul_reason_for_call,
    17. LPVOID lpReserved
    18. )
    19. {
    20. switch (ul_reason_for_call)
    21. {
    22. case DLL_PROCESS_ATTACH:
    23. case DLL_THREAD_ATTACH:
    24. case DLL_THREAD_DETACH:
    25. case DLL_PROCESS_DETACH:
    26. break;
    27. }
    28. return TRUE;
    29. }
    30. bool check_user(){
    31. bool result;
    32. // Firewall Check Removed For Security Purposes //
    33. return result;
    34. }
    35. void ban_user(char *handler){
    36. // Ban Function Removed For Security Purposes //
    37. }
    38. void wconsole(const char *text,char *color){
    39. if(color == "white"){
    40. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    41. }
    42. if(color == "green"){
    43. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_GREEN);
    44. }
    45. if(color == "red"){
    46. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED);
    47. }
    48. char consoleStringBuffer[2000];
    49. HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    50. DWORD dwChars;
    51. sprintf(consoleStringBuffer, text);
    52. WriteConsole(hOut, consoleStringBuffer,
    53. (DWORD)strlen(consoleStringBuffer), &dwChars, NULL);
    54. }
    55. void wconsole_prox(const char *text, char *color){
    56. wconsole("[","white");
    57. wconsole("ACC","green");
    58. wconsole("]: ","white");
    59. wconsole(text,color);
    60. wconsole("\r\n","white");
    61. }
    62. void reset_method(){
    63. wconsole_prox("Attempting to reset connection to anti-cheat system!","red");
    64. wconsole_prox("Please standby...","white");
    65. // Reset Method Removed For Security Purposes //
    66. }
    67. void acc_connect(){
    68. wconsole_prox("The AntiHack system will now attempt to connect to the server side.","white");
    69. wconsole_prox("Please standby...","white");
    70. // Connect Method Removed For Security Purposes //
    71. }
    72. DWORD WINAPI ThreadFunc( LPVOID lpParam )
    73. {
    74. AllocConsole();
    75. SetConsoleTitle("FlyForFame Anti-Hack Beta 0.2 | Status Window");
    76. char text[255];
    77. sprintf(text,"Calling: %s", reinterpret_cast<const char*>(lpParam));
    78. wconsole_prox("FlyForFame Anti-Hack System(Beta 0.2), Successfully Loaded!","white");
    79. wconsole_prox(text,"white");
    80. if(strstr(reinterpret_cast<const char*>(lpParam),"acc_connect")){
    81. acc_connect();
    82. }else{
    83. if(strstr(reinterpret_cast<const char*>(lpParam),"CheckUser")){
    84. check_user();
    85. }
    86. if(strstr(reinterpret_cast<const char*>(lpParam),"Ban0E1")){
    87. ban_user("E01");
    88. }
    89. if(strstr(reinterpret_cast<const char*>(lpParam),"Ban0E2")){
    90. ban_user("E02");
    91. }
    92. if(strstr(reinterpret_cast<const char*>(lpParam),"Ban0E3")){
    93. ban_user("E03");
    94. }
    95. if(strstr(reinterpret_cast<const char*>(lpParam),"Ban0E4")){
    96. ban_user("E04");
    97. }
    98. if(strstr(reinterpret_cast<const char*>(lpParam),"Ban0E5")){
    99. ban_user("E05");
    100. }else{
    101. acc_connect();
    102. }
    103. }
    104. return 0;
    105. }
    106. void automaton_registry(int level)
    107. {
    108. // Automaton Registry Check //
    109. // When Automaton is installed the path to FlyFF is set here. //
    110. // If Automaton is run the Teleport keys are stored here. //
    111. // Detection Method: 0E1 //
    112. if(level == 1){
    113. CRegKey key;
    114. long nError = key.Open(HKEY_CURRENT_USER, "Software\\FlyFF Automaton", MB_OK);
    115. if(nError == ERROR_SUCCESS)
    116. {
    117. DWORD dwThreadId;
    118. char dwThrdParam[7] = "Ban0E1";
    119. HANDLE hThread;
    120. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    121. MessageBox(NULL, "FlyFF Automaton has been detected!\n\nYou've now been IP/Account Banned.\n\nThe detection does not mean you were running Automaton currently.\nIt could mean it used to be on your system or still resides on your system.\n\nPrivate Message: AntiHack\nOn the forums for information on getting unbanned or why you got this message.\n\n\nDetection Method: 0E1", "FlyForFame Anti-Cheat(Beta 0.1)", MB_OK);
    122. exit(0);
    123. }
    124. }
    125. // GameGuard Down //
    126. // If any application ever loads the gameguard down service it should popup here. //
    127. // I'd asume it's simply used to bypass game guard, but still can be used as a detection method. //
    128. // Detection Method: E02 //
    129. if(level == 2){
    130. CRegKey key;
    131. long nError = key.Open(HKEY_LOCAL_MACHINE, "SYSTEM\\ControlSet001\\Enum\\Root\\LEGACY_GAMEGUARDDOWN", KEY_READ);
    132. if(nError == ERROR_SUCCESS)
    133. {
    134. DWORD dwThreadId;
    135. char dwThrdParam[16] = "Ban0E2";
    136. HANDLE hThread;
    137. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    138. MessageBox(NULL, "GameGuard Down(FlyFF Automaton Module) has been detected!\n\nYou've now been IP/Account Banned.\n\nThe detection does not mean you were running Automaton currently.\nIt could mean it used to be on your system or still resides on your system.\n\nPrivate Message: AntiHack\nOn the forums for information on getting unbanned or why you got this message.\n\n\nDetection Method: 0E2", "FlyForFame Anti-Cheat(Beta 0.1)", MB_OK);
    139. exit(0);
    140. }
    141. }
    142. // GameGuard Down //
    143. // I'm certain that any application that loads gameguard down would create this key. //
    144. // Windows uses registry in order to store services and system drivers. //
    145. // The catch is windows never removes these registry keys even when the service, or driver is unloaded the key remains. //
    146. // Detection Method: 0E3 //
    147. if(level == 3){
    148. CRegKey key;
    149. long nError = key.Open(HKEY_LOCAL_MACHINE, "SYSTEM\\ControlSet001\\Services\\GameGuardDown", KEY_READ);
    150. if(nError == ERROR_SUCCESS)
    151. {
    152. DWORD dwThreadId;
    153. char dwThrdParam[16] = "Ban0E3";
    154. HANDLE hThread;
    155. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    156. MessageBox(NULL, "GameGuard Down(FlyFF Automaton Module) has been detected!\n\nYou've now been IP/Account Banned.\n\nThe detection does not mean you were running Automaton currently.\nIt could mean it used to be on your system or still resides on your system.\n\nPrivate Message: AntiHack\nOn the forums for information on getting unbanned or why you got this message.\n\n\nDetection Method: 0E3", "FlyForFame Anti-Cheat(Beta 0.1)", MB_OK);
    157. exit(0);
    158. }
    159. }
    160. // Detection Method: 0E4 //
    161. if(level == 4){
    162. CRegKey key;
    163. long n1Error = key.Open(HKEY_LOCAL_MACHINE, "SYSTEM\\ControlSet003\\Services\\GameGuardDown", KEY_READ);
    164. if(n1Error == ERROR_SUCCESS)
    165. {
    166. DWORD dwThreadId;
    167. char dwThrdParam[16] = "Ban0E4";
    168. HANDLE hThread;
    169. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    170. MessageBox(NULL, "GameGuard Down(FlyFF Automaton Module) has been detected!\n\nYou've now been IP/Account Banned.\n\nThe detection does not mean you were running Automaton currently.\nIt could mean it used to be on your system or still resides on your system.\n\nPrivate Message: AntiHack\nOn the forums for information on getting unbanned or why you got this message.\n\n\nDetection Method: 0E4", "FlyForFame Anti-Cheat(Beta 0.1)", MB_OK);
    171. exit(0);
    172. }
    173. }
    174. // Detection Method: 0E5 //
    175. if(level == 5){
    176. CRegKey key;
    177. long n2Error = key.Open(HKEY_LOCAL_MACHINE, "SYSTEM\\ControlSet003\\Enum\\Root\\LEGACY_GAMEGUARDDOWN", KEY_READ);
    178. if(n2Error == ERROR_SUCCESS)
    179. {
    180. DWORD dwThreadId;
    181. char dwThrdParam[16] = "Ban0E5";
    182. HANDLE hThread;
    183. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    184. MessageBox(NULL, "GameGuard Down(FlyFF Automaton Module) has been detected!\n\nYou've now been IP/Account Banned.\n\nThe detection does not mean you were running Automaton currently.\nIt could mean it used to be on your system or still resides on your system.\n\nPrivate Message: AntiHack\nOn the forums for information on getting unbanned or why you got this message.\n\n\nDetection Method: 0E5", "FlyForFame Anti-Cheat(Beta 0.1)", MB_OK);
    185. exit(0);
    186. }
    187. }
    188. }
    189. void antihack_connect()
    190. {
    191. DWORD dwThreadId;
    192. char dwThrdParam[12] = "acc_connect";
    193. HANDLE hThread;
    194. hThread = CreateThread(NULL,0,ThreadFunc,&dwThrdParam,0,&dwThreadId);
    195. }
    196. void _stdcall check()
    197. {
    198. // Automaton/GameGuard Down Checks //
    199. automaton_registry(1);
    200. automaton_registry(2);
    201. automaton_registry(3);
    202. automaton_registry(4);
    203. automaton_registry(5);
    204. // Connection to the anticheat server //
    205. antihack_connect();
    206. }
    Alles anzeigen