27-06-2011, 01:38 PM
بعد ليلة حرب ضارية مع Pchar تبن ان هاكذا نوع من المتغيرات لايمكن تخزين عنوانه فى EAX بل يجب ان يكون فى EDX
و عليه تصبح MyLibraryInjectedByte على هذا النحو
دالة المكتبة يمكن ان تكون على هذا الشكل
الان تم الاستفادة من المكتبة المحقونة 100% اخى cargem
و عليه تصبح MyLibraryInjectedByte على هذا النحو
PHP كود :
MyLibraryInjectedByte: array[1..39] of Byte =
(
//----------- Load the library and get the Handle -----------------//
$68, 0, 0, 0, 0, {PUSH XXXX} // Password.dll
$B8, 0, 0, 0, 0, {MOV EAX XXXX} // @LoadLibrary
$FF, $D0, {CALL EAX} // Call LoadLibrary
{
Result of this function (LoadLibrary) is placed in the EAX
EAX = Handle of loaded library
}
//---------------- Get Address of Function From DLL ----------------//
$68, 0, 0, 0, 0, {PUSH XXXX} // Name of Function to call
$50, {PUSH EAX} // Handle Of loaded library
$B8, 0, 0, 0, 0, {MOV EAX XXXX} // @GetProcAddress
$FF, $D0, {CALL EAX} // Call GetProcAddress
{
Result of this function (GetProcAddress) is placed in the EAX
EAX = Address Of Function to call
}
//--------------------- Execute Function -------------------------//
$BA, 0, 0, 0, 0, {MOV EDX XXXX} // Address Of Parametre = Pchar
$52, {PUSH EDX} // Put Pchar value in the stack
$FF, $D0, {CALL EAX} // Call Function
$68, 0, 0, 0, 0, {PUSH XXXX} // JMP TO real Starting point
$C3 {RETN}
//------------------------------------------------------------------//
);
[align=center]
إقتباس :procedure Input_Boox(S: pAnsiChar); stdcall;[/align]
begin
InputBox(string(S), PChar(''), PChar('') );
end;
الان تم الاستفادة من المكتبة المحقونة 100% اخى cargem

