Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 23:36

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

Advertisement



NtQueryInformationProcess hook problem...

Discussion on NtQueryInformationProcess hook problem... within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Lazeboy's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 451
Received Thanks: 410
NtQueryInformationProcess hook problem...

hey,
ich versuche NtQueryInformationProcess zu hooken und mal auszulesen mit welchen Parametern diese funktion im verlauf eines Programms aufgerufen wird. Nun kommt es zu meinem Problem.

So funktioniert es:
Code:
ULONG WINAPI hNtQueryInformationProcess(HANDLE a,UINT b,PVOID c,ULONG d,PULONG e)
{
	DWORD ret  =  oNtQueryInformationProcess(a,b,c,d,e);
	return ret;
}
und komischer weise so nicht
Code:
ULONG WINAPI hNtQueryInformationProcess(HANDLE a,UINT b,PVOID c,ULONG d,PULONG e)
{
	DWORD ret  =  oNtQueryInformationProcess(a,b,c,d,e);
	fprintf(myfile,"%d\n",b);
	return ret;
}
darauf hin hab ich mal andere funktionen gecalled und das funktioniert. Also z.b MessageBox funktioniert, jedoch "fprintf(myfile,"bla");" geht komischer weise auch nicht. Ich habe versucht das ganze in einer Konsole auszugeben -> funktioniert auch nicht. Mein Trampolin ist auch richtig.
Könnt ihr mir sagen wieso das crashed ?
Lazeboy is offline  
Old 11/21/2011, 11:28   #2
 
Tyrar's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 1,637
Received Thanks: 1,119
könnte evtl. daran liegen dass fprintf eine crt func is.. nur eine vermutung, aber versuch mal die winapi func WriteConsole
Tyrar is offline  
Old 11/21/2011, 12:06   #3
 
Lazeboy's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 451
Received Thanks: 410
Quote:
Originally Posted by HeavyHacker View Post
könnte evtl. daran liegen dass fprintf eine crt func is.. nur eine vermutung, aber versuch mal die winapi func WriteConsole
ja da kommt nur das problem wie gebe ich den Parameter aus ? sprintf oder sowas funktioniert ja auch nicht

Edit:
danke für die Hilfe ich habs mit wsprintf gelöst. Ich hab mir halt mal UNICODE_STRING angeschaut und das besteht ja aus WCHAR und weil das auch im rin 0 erlaubt ist dachte ich mir muss ja auch in userland hooks gehen
Lazeboy is offline  
Reply


Similar Threads Similar Threads
D3D Hook Problem
11/02/2011 - General Coding - 13 Replies
Hi, ich habe jetzt versucht nen D3D Hook zu schreiben, nachdem ich das Tutorial von purple diamond gelesen habe: http://www.homeofgamehacking.de/attachment.php?aid =120. Leider hab ich echt keine Ahnung was ich hier falsch mache. Bevor ich vor die DllMain Funktion extern "C" hinzugefügt habe, lies sich die Dll nicht mal injecten. Jetzt funktioniert das, allerdings wird kein Rechteck gezeichnet. Die Adresse hab ich auch wie im Tutorial mit IDA bekommen. Wäre wirklich sehr nett wenn sich das...
Hook Send problem (UK)
10/18/2011 - Nostale - 8 Replies
Hello folks, I'm trying to hook the "send" function of nostale. I wrote this little piece of code #include <Windows.h> #include <fstream> #include <detours.h> using namespace std; // byte me
Urban WR D3D Hook PROBLEM!!
06/01/2010 - WarRock - 11 Replies
Hi, Bei dem Urban WR D3D Hook Hack ( http://www.elitepvpers.com/forum/warrock-hacks-bots -cheats-exploits/589000-warrock-urban-wr-d3d-hook- undetected-30-05-2010-a.html ) habe ich ein Problem. Ich habe alles entpackt und extrahiert aber wenn ich den Injector öffne steht da " Auf das angegebene Gerät , bzw. den Pfad oder die Datei kann nicht zugegriffen werden. Sie verfügen eventuell nicht über ausreichende Berechtigungen, um auf das Element zugreifen zu können" !!!! Ich bin aber Administrator...
[C++]D3D hook Problem
11/09/2009 - C/C++ - 28 Replies
#pragma once #pragma comment(lib, "d3d9.lib") #pragma comment(lib, "d3dx9.lib") #include <windows.h> #include <cstdio> #include <d3d9.h> #include <d3dx9.h> LPDIRECT3DDEVICE9 pDevice; const D3DCOLOR txtPink = D3DCOLOR_ARGB(255, 255, 0, 255); // Alpha, Rot, Grün, Blau
C++ hook Problem
10/19/2009 - C/C++ - 15 Replies
Also ich habe mir einen Keyboardhook geschrieben und habe das programm gestartet und es wieder beendet ohne den hook unzuhooken und nun geht meine tastatur nicht mehr (auch im bios nicht mehr) tja ich denke ,dass der hook immernoch läuft und ich bräuchte so eine art hook manager . Oder einfach ein stückcode,das mir alles unhooked . mein code : void MsgLoop() { MSG message;



All times are GMT +1. The time now is 23:37.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.