___RJ___ Moderator
Posts : 15 Join date : 2012-01-18 Age : 32 Location : Cebu
| Subject: Protect DLL based HWID Fri Jan 27, 2012 4:28 pm | |
| - Quote :
- In this tutorial I will tell you how to use protection based on the HWID.
Run the file "Get Hardware Identifier.exe" and will appear figures HWID your computer.
And this code to use to protect DLLs HWID
[code=cpp]
# Include <windows.h> / / Include the header of the protector / / # Include "ThemidaSDK.h"
UCHAR szFileSys [255], szVolNameBuff [255];
DWORD dwMFL, dwSysFlags, dwSerial; # Define My_HWID (1289182852)
Void CheckValidHardwareID () {
/ * Weak Point * /
/ *
DO CheckValidHardwareID PROTECTION FUNCTION ()
because if CheckValidHardwareID () in the patch with the RET CheckValidHardwareID ()
not be invoked and run without checking HWID etc!
You can use CodeVirtualizer, Themida Replace Code, or Enigma Protector to protect CheckValidHardwareID function ()
* /
/ / CODEREPLACE_START / / REPLACE CODE EXAMPLE
/ / VIRTUALIZER_START / / virtualizer EXAMPLE
/ / # Include "vm_begin.inc" / / EXAMPLE PROTECTOR ENIGMA
GetVolumeInformation ( "C: \ " , ( LPTSTR ) szVolNameBuff, 255, & dwSerial, & dwMFL, & dwSysFlags, ( LPTSTR ) szFileSys, 255);
if (dwSerial == My_HWID) / / Do the comparison with the new hwid taken with My_HWID
{
MessageBox (0, 'VALID HARDWARE ID " , "INFORMATION" , MB_OK | MB_ICONINFORMATION);
/ / Serial valid
}
else / / If the serial does not match
{
MessageBox (0, 'VALID HARDWARE ID " , "INFORMATION" , MB_OK | MB_ICONERROR);
ExitProcess (1); / / Force Exit
/ / Invalid Serial
}
/ / CODEREPLACE_END / / REPLACE CODE EXAMPLE
/ / VIRTUALIZER_END / / virtualizer EXAMPLE
/ / # Include "vm_end.inc" / / EXAMPLE PROTECTOR ENIGMA
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls (hDll);
/ / CODEREPLACE_START / / REPLACE CODE EXAMPLE
/ / VIRTUALIZER_START / / virtualizer EXAMPLE
/ / # Include "vm_begin.inc" / / EXAMPLE PROTECTOR ENIGMA
/ * Weak Point * /
/ *
PROTECTION DO CheckValidHardwareID function call ()
because if CheckValidHardwareID () in the patch with the RET CheckValidHardwareID ()
not be invoked and run without checking HWID etc!
You can use CodeVirtualizer, Themida Replace Code to protect the function CheckValidHardwareID ()
* /
CheckValidHardwareID ();
/ / CODEREPLACE_END / / REPLACE CODE EXAMPLE
/ / VIRTUALIZER_END / / virtualizer EXAMPLE
/ / # Include "vm_end.inc" / / EXAMPLE PROTECTOR ENIGMA
}
return TRUE;
} [/code]
It should be noted that the function CheckValidHardware () should your application protection with protector (Themida, virtualizer, etc. ..) that are not easily bypassed
Download Links: HardwareIDProject.rar
Get Hardware Identifier
Credits to : Drache, RCD
Note: Dont post this anywhere... |
|
Mik Moderator
Posts : 52 Join date : 2011-09-20
| Subject: Re: Protect DLL based HWID Sat Mar 17, 2012 6:44 am | |
| hELLO ___RJ___ mEROn kaba Base SA ph Detec Na base kO Dahil DUn sa patch ^^ PM Naman kung Meron |
|