C++ WriteMemory DLL Hack (hack addres and value write)

Posts 1–15 of 20 · Page 1 of 2
C++ WriteMemory DLL Hack (hack addres and value write)
Hi,

How to dll hack C++ writememory ?

sample :

hack address is 0x3462A11 (4byte)
hack value is 5

How do I program it is injected into the dll?

sample : writememory(0x3462A11,5)

sorry my english is bad.
Maybe this:
void MEMwrite(void *adr, void *ptr, int size)
{
DWORD OldProtection;
VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &OldProtection);
memcpy(adr,ptr,size);
VirtualProtect(adr,size,OldProtection, &OldProtection);
}

Using:
DWORD Addres = 0x****;
MEMwrite((void*)(Addres),(void*) "\xFF\xFF\xFF", 3); // "\xFF" - byte which instal on this addres. "3" - number of bytes
First of all if there's an address like getting base address of a game + the offset get the base game address.

Here how you write it :

Code:
DWORD Add = 0x3462A11;
int value = 0;
cout << "Enter the new value: ";
cin << value;
WriteProcessMemory(hProcess, (LPVOID)Add, &value , sizeof(value), NULL);
cout << "Your new value is : " << value << endl;
Simply it's on console so if it's on DLL you're going to use Msg Box and Making header or do any way you want.
if its inside a dll you can simply use memcpy or memset
memcpy example:
Code:
memcpy((void*)0x3462A11/*Address*/, "\x05\x05\x05\x05"/*Bytes you want to write*/, 4/*how much bytes*/);
and memset
Code:
memset((void*)0x3462A11/*Address*/, 0x5/*Bytes you want to write*/, 4/*Count of the bytes*/);
Quote Originally Posted by ARGB View Post
if its inside a dll you can simply use memcpy or memset
memcpy example:
Code:
memcpy((void*)0x3462A11/*Address*/, "\x05\x05\x05\x05"/*Bytes you want to write*/, 4/*how much bytes*/);
and memset
Code:
memset((void*)0x3462A11/*Address*/, 0x5/*Bytes you want to write*/, 4/*Count of the bytes*/);
what is ? = \x05\x05\x05\x05"/

I want to do the following:
memcpy((void*)0x3462A11, hackValue, 4);

I'm create Wolfteam hack.
Help please.
Quote Originally Posted by NmDahmeT View Post
Hi,

How to dll hack C++ writememory ?

sample :

hack address is 0x3462A11 (4byte)
hack value is 5

How do I program it is injected into the dll?

sample : writememory(0x3462A11,5)

sorry my english is bad.
I think this should work too:
Code:
*(int *)(0x3462A11) = 5;
It all depends on what type of adress, and what you want to do with it :O
Quote Originally Posted by NmDahmeT View Post
what is ? = \x05\x05\x05\x05"/

I want to do the following:
memcpy((void*)0x3462A11, hackValue, 4);

I'm create Wolfteam hack.
Help please.
its the value?
Code:
void WriteInteger(DWORD Address, int Value)
{
  *(int *)Address = Value;
}
Code:
WriteInteger(0x3462A11, 5);
Full source using the INSERT as the hotkey

Code:
#include <windows.h>
void WriteInteger(DWORD Address, int Value)//Write the integer value
{
  *(int *)Address = Value;
}

void TheThread()
{
   while(1)//Keep the thread alive
   {
       if(GetAsyncKeyState(VK_INSERT)&0x8000)//Hotkey
       {
           WriteMemory(0x3462A11, 5);//Hack
       }
       Sleep(10);//Stop the loop from chewing the cpu
   }
}

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
   if (fdwReason == DLL_PROCESS_ATTACH)
       CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)TheThread, hinstDLL, NULL, NULL);//Creates the thread

    return TRUE;
}
thank you.
im dll inject and open form1.
im enabled the hack but form1 stopped :S

sorry my englis is bad.

checkbox1 click and remains as follows :


code :

private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e)
{

if(this->checkBox1->Checked)
{
while(1)
{
WriteInteger(0x3462A11, 1);
Sleep(10);
}
}
else
{
while(1)
{
WriteInteger(0x3462A11, 0);
Sleep(10);
}
}
}
@NmDahmeT
You're loading the form from the injected dll?
You don't want to use the while loop in a checkbox.
This will do
Code:
private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) 
{
    if(this->checkBox1->Checked)
    {
        WriteInteger(0x3462A11, 1);
    }
    else
    {
       WriteInteger(0x3462A11, 0);
    }
 }
thank you very much
Address = 0x3456456
Offset = 0x22c
NewValue = 1

How do I write it?

e.g. writememory(Address + Offset) = NewValue;
if(YouKnewHowToSearch == 0)
{
*(int*)(ADR_SERVERPOINTER + OFS_SUPERMASTER) = 0;
}else{
*(int*)(ADR_SERVERPOINTER + OFS_SUPERMASTER) = 1;
}
Posts 1–15 of 20 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us