Can u help me make HACKS for SWAT 4 i know its old but i still play it pls help
simple esp/wh/or chams for css or cod4 ( dont need anticheat proof)
c++
im done with the basic and i want to start with one of these
there many sourcecodes out i know..but the most sourcecodes are multihacks that means this to much stuff in for a beginner (aimbot, esp, wh, speedhack.......) like me
FPS Hacking Example
by Toymaker
This is a general FPS hacking game that can be applied to speed or ammo on any game such as CoD CSS or OP7. If you can't make the connections then you're just looking for free answers and I'll still delete your threads asking for more give aways. This is messy so I welcome questions, haha. I've hacked Call of Duty and Operation 7 before but I'm not going to go out and get Swat 4 and CounterStrike for this but I can assure you it's very similar.
1. Requirements: Dev-C++ Your FPS Game CheatEngine and OllyDBG.
2. Load your FPS and make a game that preferably dosn't have other players in it.
3. A. If you're doing ammo or speed in op7 you see the number is set at 100. So:
- Alt-Tab and Load Cheat Engine
- Open Process - Your Game Name
- New Scan on 100 and get results
B. You now have a list of result addresses representing 100. You need to go to the game and change the value either by running or taking a few shots. Alt-Tab back to Cheatengine.
I. If you are doing ammo, search next, the new exact value. Your ammo remains a finite value after all.
II. If speed, search next, 'SMALLER THAN' type, and quickly. Your speed automatically starts to regenerate after all.
A. You now double click the final result so it appears in the botton CE box. You right click it and select 'view what WRITES here.' You press OK and get a pop up box named 'the following opcodes...' go back to the game and repeat step I. or II.
B. You come back and should have a result of some sort. If you were doing ammo you'll have an address like 0047B8EF in which you can just write the correct amount of NOPs to and prevent your AMMO from decreasing past 0.
I will be using a
speedhack example for the rest of the tutorial. Your results:
Change of 004737f2 - 89 50 24 - mov [eax+24],edx
Change of 00473946 - ff 40 24 - inc [eax+24]
C. You now open OllyDBG and file - open - operation7.exe and press CLTR+G and goto the more interesting result: 00473946 and look around
Code:
00473946 . FF40 24 INC DWORD PTR DS:[EAX+24]
00473949 . 8B46 04 MOV EAX,DWORD PTR DS:[ESI+4]
0047394C . 8B50 24 MOV EDX,DWORD PTR DS:[EAX+24]
0047394F . 52 PUSH EDX
D. These are the first few lines you see. If you ignore the EAX part and do some testing. You'll be able to learn for yourself that what's happening is:
INC DWORD PTR DS:[EAX+24] ; increases new amount of speed
MOV EDX,DWORD PTR DS:[EAX+24] ; loads the new amount of speed into EDX
PUSH EDX ; prints the new value to screen
5. A. All in all the last two lines are not important. This means you can make sacrifice. Notice the INC and MOV EDX command lines are equal in byte size? FF40 24 and 8B50 24 are both 3 bytes.
Code:
00473946 . FF40 24 INC DWORD PTR DS:[EAX+24]
00473949 . 8B46 04 MOV EAX,DWORD PTR DS:[ESI+4]
0047394C . FF40 24 INC DWORD PTR DS:[EAX+24]
0047394F . 52 PUSH EDX
B. If you replace the mov with another inc, you just doubled the speed at which your Speed recovers. That seems like a much safer and harder for players to detect version of speedhack doesn't it?
C. You simply replace the first two bytes to be the same. 0047394C 8B50 24 You will replace 8B50 with FF40 in your hack.
D. NOW When you try this out and are amazed at how your speed recovers so fast you'll notice the amount of speed listed on the screen is like 998 and your SP bar is green. That's because EDX is some unset number from before.
Code:
0047394F . 52 PUSH EDX
E. Considering this is only one byte of data there's not much you can. If you try to push 100 or something it will mess up the code and crash you. Clearly though this means pushing registers is only 1 byte. I went ahead and changed it to PUSH ECX and the SP was only 125 and stayed white. Which may be safer. The byte you need becomes 51.
Code:
00473946 . FF40 24 INC DWORD PTR DS:[EAX+24]
00473949 . 8B46 04 MOV EAX,DWORD PTR DS:[ESI+4]
0047394C . FF40 24 INC DWORD PTR DS:[EAX+24]
0047394F . 51 PUSH ECX
If you didn't know. Look how the last two addresses are 0047394C and 0047394F and between them are 3 bytes? 0047394C+3 = 0047394F and the reason we can just take the first two bytes is because,
0047394C: FF
0047394D: 40
0047394E: 24
0047394F: 51
6. You now are ready to open dev-C++ and paste in this trainer code and change the basic info to compile your hack!
Code:
#include <windows.h>
#include <iostream>
using namespace std;
HWND hHack=FindWindow(NULL,"Operation7");
//DECLARE FUNCTIONS
void write(LPVOID addy, DWORD mydata);
void enableDebugPrivileges();
void dohack();
//Main part
int main() {
if(!hHack)
{
cout << "Window not found" << endl;
system("pause");
exit(0);
}
cout << "Injecting hack..." << endl;
enableDebugPrivileges();
dohack();
system("pause");
}
void write(LPVOID addy, DWORD mydata)
{
DWORD PID, TID;
TID = ::GetWindowThreadProcessId (hHack, &PID);
HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE|PROCESS_VM_OPERATION|PROCESS_VM_READ|
PROCESS_VM_WRITE,FALSE,PID);
WriteProcessMemory(hopen,addy,&mydata,1,0);
CloseHandle(hopen);
}
void enableDebugPrivileges()
{
HANDLE hcurrent=GetCurrentProcess();
HANDLE hToken;
BOOL bret=OpenProcessToken(hcurrent,40,&hToken);
LUID luid;
bret=LookupPrivilegeValue(NULL,"SeDebugPrivilege",&luid);
TOKEN_PRIVILEGES NewState,PreviousState;
DWORD ReturnLength;
NewState.PrivilegeCount =1;
NewState.Privileges[0].Luid =luid;
NewState.Privileges[0].Attributes=2;
AdjustTokenPrivileges(hToken,FALSE,&NewState,28,&PreviousState,&ReturnLength);
}
void dohack()
{
write((LPVOID)0x0047394C, 0xFF);
write((LPVOID)0x0047394D, 0x40);
write((LPVOID)0x0047394F, 0x51);
}
Notice I changed the window name to 'Operation7' and the three writes are as said above. FF40 and 51. You now have a working Operation 7 speedhack that doubles the rate of regeneration and yet keeps the number in a safe range. It doesn't bypass the security but good luck.