Difference between revisions of "Sandbox"

From SkullSecurity
Jump to navigation Jump to search
Line 1: Line 1:
This page is for playing or testing!


#include <stdio.h>
#include <windows.h>


<pre>53                push    ebx
void __stdcall DisplayMessage(char *strMessage, int intDurationInSeconds)
8B 54 24 08      mov    edx, [esp+arg_0] ; edx gets the reg code
{
31 DB            xor    ebx, ebx        ; Clear ebx
int intDisplayUntil = GetTickCount() + (intDurationInSeconds * 1000);
89 D3            mov    ebx, edx        ; Move the reg code into ebx
int fcnDisplayMessage = 0x469380;
8D 42 07          lea    eax, [edx+7]    ; Add 7 to the code and put it in eax


</pre>
__asm
{
push 0
push intDisplayUntil
mov  edx, 0
mov  ecx, strMessage
call fcnDisplayMessage
}
}
 
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
DisplayMessage("\x03Loading test plugin", 30);
break;
 
case DLL_PROCESS_DETACH:
DisplayMessage("\x03Unloading test plugin", 30);
break;
}
 
return TRUE;
}

Revision as of 15:34, 16 March 2007

  1. include <stdio.h>
  2. include <windows.h>

void __stdcall DisplayMessage(char *strMessage, int intDurationInSeconds) { int intDisplayUntil = GetTickCount() + (intDurationInSeconds * 1000); int fcnDisplayMessage = 0x469380;

__asm { push 0 push intDisplayUntil mov edx, 0 mov ecx, strMessage call fcnDisplayMessage } }

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch(ul_reason_for_call) { case DLL_PROCESS_ATTACH: DisplayMessage("\x03Loading test plugin", 30); break;

case DLL_PROCESS_DETACH: DisplayMessage("\x03Unloading test plugin", 30); break; }

return TRUE; }