Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 02:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



THIS HACK NOT WORK !!!

Discussion on THIS HACK NOT WORK !!! within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2016
Posts: 7
Received Thanks: 0
THIS HACK NOT WORK !!!

THIS HACK NOT WORK:
it's give crash!
Code:
#INCLUDE ETC...
 DWORD execute(DWORD HERE )
{
	__asm
	{
push command
push 0x00
call dword ptr ds:[HERE]
	}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
	while(1)
	{
              DWORD HERE = 0x0055011;
			 execute(HERE);	
			 Sleep(300);
	}
        return 1;
}
int  DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
        if(DLL_PROCESS_ATTACH== _Reason)
        {
              CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
        }
 
        return 1;
}
/////
BUT THIS ONE WORK
Code:
#INCLUDE ETC...
 DWORD execute()
{
	__asm
	{
push command
push 0x00
call dword ptr ds:[0x0055011]
	}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
	while(1)
	{
 
			 execute();	
			 Sleep(300);
	}
        return 1;
}
int  DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
        if(DLL_PROCESS_ATTACH== _Reason)
        {
              CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
        }
 
        return 1;
}
WHY ?
Yu-Haxx.. is offline  
Old 08/23/2016, 20:35   #2


 
Jeoni's Avatar
 
elite*gold: 966
Join Date: Apr 2010
Posts: 1,104
Received Thanks: 681
To understand that, you have to understand what exactly you're doing in your assembler part of the code. First, let us take a look at what does not work:
Code:
call dword ptr ds:[0x0055011]
Here you're dereferencing the address 0x00055011 and call to whatever value you get from that. Now, let's take a look at the "working" code:
Code:
call dword ptr ds:[HERE]
Here you're dereferencing your local variable "HERE" (which will assemble to esp or ebp relative addressing) and call to whatever value you get from that. Because you always choose "HERE" to be 0x00055011, you'll always call the code at 0x00055011, which seems to be what you want (regarding that this works).
You can use this code if you want it working without having to pass a constant to the function:
Code:
__asm
{
push command
push 0x00
mov eax, 0x00055011
call eax
}
Or, to avoid using inline assembler since it's just not necessary here, something like that:
Code:
reinterpret_cast<void(__stdcall*)(int, int)>(0x00055011)(command, 0);
With best regards
Jeoni
Jeoni is offline  
Thanks
1 User
Old 09/17/2016, 18:45   #3
 
elite*gold: 0
Join Date: Sep 2016
Posts: 25
Received Thanks: 25
Quote:
Originally Posted by Jeoni View Post
Or, to avoid using inline assembler since it's just not necessary here, something like that:
Code:
reinterpret_cast<void(__stdcall*)(int, int)>(0x00055011)(command, 0);
With best regards
Jeoni
Wrong parameter sequence, hehe.

@OP:
Dereferencing a parameter will yield its value because, internally, a parameter is nothing more than a pointer on the stack (or registers). I think you want the value of the value of the parameter, which points to a pointer.
vaynz is offline  
Old 11/03/2016, 16:47   #4
dotCom
 
Devsome's Avatar
 
elite*gold: 12400
The Black Market: 104/0/0
Join Date: Mar 2009
Posts: 15,875
Received Thanks: 4,381
#closed user is banned. @ just write a private message to the user and ask for Skype.
Devsome is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
All Dragon City Hack (Work And Not Work)
09/20/2013 - Facebook - 3 Replies
Some is work But some is not Sorry _________________________________________________ ________________ New hack habitats and dragons Aztecs : LinkBucks.com - Get your share! New hack 20 weekly gems : LinkBucks.com - Get your share! Hack 5 weekly gems : LinkBucks.com - Get your share! Hack gold 15m by 15m xp : LinkBucks.com - Get your share!



All times are GMT +2. The time now is 02:47.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.