Skip to content

Instantly share code, notes, and snippets.

@erayarslan
Created July 17, 2014 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erayarslan/9b9042432d105e20df7f to your computer and use it in GitHub Desktop.
Save erayarslan/9b9042432d105e20df7f to your computer and use it in GitHub Desktop.
Memory Hack Attacker
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
int main()
{
int yenideger1 = 61; // yeni degeri 61 olarak tanimladik
HWND pencere = FindWindow(0,"/* Müdahale edilecek yazılımın Görev yöneticisindeki -Görev- altındaki ismi yazılacaktır*/"); //
if (pencere == 0)
{
cerr << "Uygulama bulunamadi."<<endl;
}
else
{
DWORD uygulamaid;
GetWindowThreadProcessId(pencere,&uygulamaid);
HANDLE islem= OpenProcess(PROCESS_ALL_ACCESS,FALSE,uygulamaid);
if(!islem)
{
cerr<<"Islem yapilamadi."<<endl;
}
else
{
int basarili1 = WriteProcessMemory(islem,(LPVOID)0x22ff0c,&yenideger1,(DWORD)sizeof(yenideger1),NULL);// 0x22ff0c değeri değiştirilecek değişkenin adresi
if(basarili1>0)
{
clog<<"Basarili."<<endl;
}
else
{
cerr<<"Hata."<<endl;
}
CloseHandle(islem);
}
}
getch();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment