Did you attach olly before or after modifying it?
So I was working on a bypass for Project Blackout's Hackshield. I'm trying to just stop if from being initialized, since the main executable has no protection I thought I would start with that. However I loaded PBlackout.exe up in Olly and noticed the addresses I coded to change, were not being changed at all. Is this just something with Olly, or is this code just wrong?
Code:#include <windows.h> BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) { unsigned char* Patch1 = (unsigned char*)(LPVOID)0x402D5F; unsigned char* Patch2 = (unsigned char*)(LPVOID)0x402D66; unsigned char* Patch3 = (unsigned char*)(LPVOID)0x402DA2; DWORD* OldProtect = NULL; switch(fdwReason) { case DLL_PROCESS_ATTACH: while(!GetModuleHandleA("PBlackout.exe")) VirtualProtect((LPVOID)0x402D5F, 0x100, PAGE_EXECUTE_READWRITE, OldProtect); Patch1[0] = 0x90; Patch1[1] = 0x90; Patch1[2] = 0x90; Patch1[3] = 0x90; Patch1[4] = 0x90; //NOP call Patch2[0] = 0xEB; //Always jump Patch3[0] = 0xEB; //Always jump VirtualProtect((LPVOID)0x402D5F, 0x100, *OldProtect, NULL); break; case DLL_PROCESS_DETACH: break; } return true; }
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Did you attach olly before or after modifying it?
Ah we-a blaze the fyah, make it bun dem!
well before because if If I did it after Themida would detect me, because it didn't work
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
__asm INT3; and use olly to see if it's writing properly or not?
Ah we-a blaze the fyah, make it bun dem!
why06 (03-16-2011)
I'm SCHiM
Morals derive from the instinct to survive. Moral behavior is survival behavior above the individual level.
Polymorphic engine
Interprocess callback class
SIN
Infinite-precision arithmetic
Hooking dynamic linkage
(sloppy)Kernel mode Disassembler!!!
Semi debugger
why06 (03-16-2011)
Thanks for the advice guys, I did the next best thing to an INT3, and set a MessageBox, which froze the program at Dll Entry, looks like I have an access violation, I wonder why though, since I used Virtual Protect.
EDIT: Okay looked over the API, loosk like Im using VP wrong my bad, seems like if you put a NULL value in for DWORD* for OldProtect the function fails. So I declared OldProtect like so: DWORD OldProtect; and am just referencing it now. I also fixed the second VirtualProtect too, lets see if this works now. =)
EDIT: Aww damn it was working, but something weird happened. The Patch Succeeded and everything, but then the DLL got a second DLL_ATTACH message, then Hackshield loaded up, maybe something detecting it idk...
Last edited by why06; 03-15-2011 at 02:31 PM.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Hell_Demon (03-16-2011),why06 (03-16-2011)