<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dll Injection blockieren, mit einer art Whitelist?]]></title><description><![CDATA[<p>Hi.<br />
In Google habe ich folgendes Script gefunden:</p>
<pre><code>void AntiInject () 
{ 
   HANDLE hProc = GetCurrentProcess(); 
   while (TRUE) { 
      BlockAPI(hProc, &quot;NTDLL.DLL&quot;, &quot;LdrLoadDll&quot;); 
      Sleep (100); 
   } 
} 

BOOLEAN BlockAPI (HANDLE hProcess, CHAR *libName, CHAR *apiName) 
{ 
   CHAR pRet[]={0xC3}; 
   HINSTANCE hLib = NULL; 
   VOID *pAddr = NULL; 
   BOOL bRet = FALSE; 
   DWORD dwRet = 0; 

   hLib = LoadLibrary (libName); 
   if (hLib) { 
       pAddr = (VOID*)GetProcAddress (hLib, apiName); 
       if (pAddr) { 
           if (WriteProcessMemory (hProcess, 
                            (LPVOID)pAddr, 
                            (LPVOID)pRet, 
                            sizeof (pRet), 
                            &amp;dwRet )) { 
              if (dwRet) { 
                 bRet = TRUE; 
              } 
           } 
       } 
       FreeLibrary (hLib); 
   } 
   return bRet; 
}
</code></pre>
<p>Dieser Blockiert ALLE Dll Injections, jetzt möchte ich aber eine art Whitelist erstellen, dass man zB test.dll Injecten darf, den Rest aber nicht. Wie Funktioniert das?</p>
<p>Lg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/316814/dll-injection-blockieren-mit-einer-art-whitelist</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 17:16:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/316814.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 May 2013 11:34:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:34:31 GMT]]></title><description><![CDATA[<p>Hi.<br />
In Google habe ich folgendes Script gefunden:</p>
<pre><code>void AntiInject () 
{ 
   HANDLE hProc = GetCurrentProcess(); 
   while (TRUE) { 
      BlockAPI(hProc, &quot;NTDLL.DLL&quot;, &quot;LdrLoadDll&quot;); 
      Sleep (100); 
   } 
} 

BOOLEAN BlockAPI (HANDLE hProcess, CHAR *libName, CHAR *apiName) 
{ 
   CHAR pRet[]={0xC3}; 
   HINSTANCE hLib = NULL; 
   VOID *pAddr = NULL; 
   BOOL bRet = FALSE; 
   DWORD dwRet = 0; 

   hLib = LoadLibrary (libName); 
   if (hLib) { 
       pAddr = (VOID*)GetProcAddress (hLib, apiName); 
       if (pAddr) { 
           if (WriteProcessMemory (hProcess, 
                            (LPVOID)pAddr, 
                            (LPVOID)pRet, 
                            sizeof (pRet), 
                            &amp;dwRet )) { 
              if (dwRet) { 
                 bRet = TRUE; 
              } 
           } 
       } 
       FreeLibrary (hLib); 
   } 
   return bRet; 
}
</code></pre>
<p>Dieser Blockiert ALLE Dll Injections, jetzt möchte ich aber eine art Whitelist erstellen, dass man zB test.dll Injecten darf, den Rest aber nicht. Wie Funktioniert das?</p>
<p>Lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2323987</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2323987</guid><dc:creator><![CDATA[antiCheater137]]></dc:creator><pubDate>Fri, 17 May 2013 11:34:31 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:44:34 GMT]]></title><description><![CDATA[<p>Du hast ne 3 vergessen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2323994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2323994</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Fri, 17 May 2013 11:44:34 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:44:49 GMT]]></title><description><![CDATA[<p>Du musst ganz einfach auf einer Whitelist nach dem entsprechenden Schlüssel suchen.</p>
<p>Pseocode:</p>
<pre><code>if (!whitelist.find(apiName))
    BlockAPI(hProcess, libName, apiName);
</code></pre>
<p>Allerings frage ich mich auch, was du mit deinem Code bezwecken willst.<br />
Dieser überschreibt nämlich den Code einer Funktion mit diesem hier:</p>
<pre><code>void function(...)
{
}
</code></pre>
<p>Es wird kein Wert zurückgegeben. Oft macht das nichts, aber kann auch echt schlimme Auswirkungen haben, wenn z.B. ein uninitialisierter Pointer zurückgegeben wird.<br />
Funktionen mit stdcall werden auch nicht funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2323995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2323995</guid><dc:creator><![CDATA[Marthog]]></dc:creator><pubDate>Fri, 17 May 2013 11:44:49 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:51:11 GMT]]></title><description><![CDATA[<p>Man könnte die DLL immer noch manuell injeccten. Mit VirtualAllocEx Speicher anfordern, sich um Relocations un den ganzen Mist kümmern, den fertigen Code/Data mit WriteProcessMemory rüberschaufeln und mit CreateRemoteThread die DLL-Main aufrufen.<br />
Du kannst praktisch nichts dagegen tun.</p>
<p>Man muss halt LoadLibrary nachprogrammieren. Macht nicht viel Spaß aber machbar. Und gegen Dll-Injections BEVOR dein Code ausgeführt wird (mit dem passenden Flag bei CreateProcess kein Problem) kannst du auch nichts tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2323998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2323998</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Fri, 17 May 2013 11:51:11 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:53:23 GMT]]></title><description><![CDATA[<p>Wie kriege ich denn jetzt den apiNamen in der Funktion heraus? Dort steht nicht deklarierter Bezeichner..</p>
<pre><code>BOOLEAN BlockAPI (HANDLE hProcess, CHAR *libName, CHAR *apiName) 
{ 
   CHAR pRet[]={0xC3}; 
   HINSTANCE hLib = NULL; 
   VOID *pAddr = NULL; 
   BOOL bRet = FALSE; 
   DWORD dwRet = 0; 

   hLib = LoadLibraryA(libName); 
   if (hLib) { 
       pAddr = (VOID*)GetProcAddress (hLib, apiName); 
       if (pAddr) { 
           if (WriteProcessMemory (hProcess, 
                            (LPVOID)pAddr, 
                            (LPVOID)pRet, 
                            sizeof (pRet), 
                            &amp;dwRet )) { 
              if (dwRet) { 
                 bRet = TRUE; 
              } 
           } 
       } 
       FreeLibrary (hLib); 
   } 
   return bRet; 
}

void AntiInject () 
{ 
   HANDLE hProc = GetCurrentProcess(); 
   while (true)
   {
	if (apiName != &quot;test.dll&quot;) 
	{
		BlockAPI(hProc, &quot;NTDLL.DLL&quot;, &quot;LdrLoadDll&quot;); 
	}
      Sleep(100); 
   } 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2324002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2324002</guid><dc:creator><![CDATA[antiCheater137]]></dc:creator><pubDate>Fri, 17 May 2013 11:53:23 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 11:57:08 GMT]]></title><description><![CDATA[<p>Lern erst mal die Grundlagen von C++.</p>
<p>apiName ist der dritte Parameter der Funktion BlockAPI.<br />
Du kannst char* nicht mit == vergleichen, also nutze std::string.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2324005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2324005</guid><dc:creator><![CDATA[Marthog]]></dc:creator><pubDate>Fri, 17 May 2013 11:57:08 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 12:00:45 GMT]]></title><description><![CDATA[<p>Und lies meinen Beitrag. Dein Vorgehen ist Murks wenn dein &quot;Gegner&quot; jemand ist, der halbwegs Ahnung hat. (Was beim Reverse Engineering und Cheats schreiben fast eine Voraussetzung ist)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2324006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2324006</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Fri, 17 May 2013 12:00:45 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 13:25:02 GMT]]></title><description><![CDATA[<p>Was könnte man denn sonst gegen die Dlls machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2324030</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2324030</guid><dc:creator><![CDATA[antiCheater137]]></dc:creator><pubDate>Fri, 17 May 2013 13:25:02 GMT</pubDate></item><item><title><![CDATA[Reply to Dll Injection blockieren, mit einer art Whitelist? on Fri, 17 May 2013 13:36:09 GMT]]></title><description><![CDATA[<p>Eine gängige Taktik ist es bestimmte Speicherbereiche auf Veränderungen zu prüfen um so einige Hacks auszuschließen.</p>
<pre><code>if(!Collision())
    Move();
else
    Stop();
</code></pre>
<p>Könnte jemand im Speicher so umfrickeln dass immer Move() aufgerufen wird. Überprüfst du den Code deines Spiels weißt du ob da jemand herumgespielt hat.<br />
Geht aber nur bei Online-Games gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2324036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2324036</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Fri, 17 May 2013 13:36:09 GMT</pubDate></item></channel></rss>