| View previous topic :: View next topic |
| Author |
Message |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Tue Feb 23, 2010 10:34 pm Post subject: Quick Question |
|
|
My first question is I have been reading many articles about Vista with dll injection, and found out that Vista has put a 'hook' on to CreateRemoteThread and can be only used under certain 'privledges'.
Now, I have attempted to run my injector as Administrator, but that didn't do any good. So I thought of using SetWindowsHookEx() dll injection method, but that method sucks balls even though I got it to work on a couple of app's. I'm wondering my Vista is so limited in dll injection compared to XP, can't they just fix XP, because it seems to be its the only good OS. Anyhow, my question is can we possibly get the CreateRemoteThread() dll injection to work, I know it's possible, not denying but what are those 'privledges' you need?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Feb 23, 2010 11:59 pm Post subject: |
|
|
| the problem is your code, not the os.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Feb 24, 2010 4:40 am Post subject: |
|
|
| we already determined in the previous thread you made this claim that the problem was your code. post it and perhaps someone will bother to deobfuscate and fix it
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Wed Feb 24, 2010 6:15 pm Post subject: |
|
|
| I tested the same 'code' in Windows XP and it worked fine.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Feb 24, 2010 7:15 pm Post subject: |
|
|
| I've never had any trouble with DLL injection in vista... post your code
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25840 Location: The netherlands
|
Posted: Wed Feb 24, 2010 8:11 pm Post subject: |
|
|
cheat engine's dll injector uses CreateRemoteThread as well
Speedhack makes use of dll injection
And speedhack works fine in vista and win7
Have you tried turning UAC off ?
Given your application the SeDebugging rights ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Thu Feb 25, 2010 1:56 am Post subject: |
|
|
| Dark Byte wrote: | cheat engine's dll injector uses CreateRemoteThread as well
Speedhack makes use of dll injection
And speedhack works fine in vista and win7
Have you tried turning UAC off ?
Given your application the SeDebugging rights ? |
Debugging rights is not necessary for CreateRemoteThread or WriteProcessMemory, at least not for me
Make sure you do OpenProcess() with only the necessary privileges, and it should work just fine.
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Thu Feb 25, 2010 11:39 am Post subject: |
|
|
Okay, i'll test it out, i'll edit this post with my results.
Hehehe
Turned off UAC, gave my injector rights, but, it fails once again.
| Quote: |
Cheat Engine 5.6 - Failure enabling Speedhack. (DLL Injection Failed)
|
| Code: |
#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
void main()
{
string DllPath = "C:\\Users\\Al - Homedawy\\Documents\\Visual Studio 2008\\Projects\\Memory Engine (Dll)\\Debug\\Memory Engine (Dll).dll";
HMODULE hKernel32 = GetModuleHandleA("Kernel32");
FARPROC hLoadLibrary = GetProcAddress(hKernel32, "LoadLibraryA");
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
}
HWND hWnd = FindWindowA(NULL, "Untitled - Notepad");
DWORD pID;
GetWindowThreadProcessId(hWnd, &pID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pID);
LPVOID Address = VirtualAllocEx(hProcess, NULL, strlen(DllPath.c_str()), MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE);
if (!Address)
{
cout << "VirtualAllocEx() Failed" << endl;
}
else
{
cout << "VirtualAllocEx() Succeeded!" << endl;
}
SIZE_T BytesWritten;
WriteProcessMemory(hProcess, Address, DllPath.c_str(), strlen(DllPath.c_str()), &BytesWritten);
HANDLE hRemoteThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) hLoadLibrary, Address, 0, NULL);
if (!hRemoteThread)
{
cout << "CreateRemoteThread() Failed" << endl;
}
else
{
cout << "CreateRemoteThread() Succeeded" << endl;
}
cin.get();
}
|
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Thu Feb 25, 2010 1:17 pm Post subject: |
|
|
despite your very very disgusting code, the functionality of the injector does exist. the only code in there that doesn't make me want to throw up is the acquisition of tokens which i'm pretty sure i gave you
also. good job lying before about how you allegedly fixed your injector and got it working.
in b4denial
your couts are causing your program to crash. remove them and it will inject. and if you want to use the ansi versions of the APIs then learn how to use your IDE's settings instead of what you're currently doing
and code either C or C++. don't mix bad C code with random C++ features
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Feb 25, 2010 4:23 pm Post subject: |
|
|
void main()? really?
you should write a simple function that wraps GetLastError / FormatMessage and returns the error string. makes debugging life all that much simpler.
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Mon Mar 01, 2010 6:36 pm Post subject: |
|
|
If something is wrong with my code, could somebody explain to me why speedhack in CE won't work?
| Quote: |
Cheat Engine 5.6 - Failure enabling Speedhack. (DLL Injection Failed)
|
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Mar 01, 2010 7:05 pm Post subject: |
|
|
| that's a separate matter. i just told you the code does not work and after i edited it, it worked. i even told you how to fix it. stop believing your OS or compiler or language is broken. it's just you and your broken code. stubbornness and ignorance are such a horrible combination
|
|
| Back to top |
|
 |
samo502 Master Cheater
Reputation: 0
Joined: 14 Mar 2008 Posts: 342 Location: That place.
|
Posted: Tue Mar 02, 2010 1:06 am Post subject: |
|
|
| Personally I think it would be better to use WinMain on something like this so you don't have a virtually useless console laying around and use Messageboxes to display errors since they are the most common method, and obviously the console sitting around since it only appears to be doing error report work. Just my opinion though.
|
|
| Back to top |
|
 |
|