|
You last visited: Today at 04:12
Advertisement
[DLL] Memory Hacking
Discussion on [DLL] Memory Hacking within the Coding Releases forum part of the Coders Den category.
01/08/2010, 16:57
|
#1
|
elite*gold: 0
Join Date: Jan 2010
Posts: 656
Received Thanks: 466
|
[DLL] Memory Hacking
Ich hab für euch mal ein Class Library gemacht, mit dem ihr in VB, C# und in C++ Memorys lesen und verändern könnt.
Download:
VT:
Wichtigste Subs:
Code:
Memory.Write(Process, Adress, Value, Bytes)
Schreibt in die angegebene Memory Adresse.
Code:
Memory.Read(Process, Adress)
Liest den Wert der Angegebenen Adresse aus.
THX wäre sehr nett, da es viel Arbeit war in den Windows APIs rumzukrempeln.
Liebe Grüße, Michael.
|
|
|
01/08/2010, 18:24
|
#2
|
elite*gold: 0
Join Date: Sep 2009
Posts: 148
Received Thanks: 31
|
Total unnützlich und wo ist der VT Scan?
|
|
|
01/08/2010, 19:54
|
#3
|
elite*gold: 131
Join Date: Sep 2009
Posts: 2,512
Received Thanks: 760
|
Bestimmt ganz nützlich :> Aber wie füg die die Funktionen ein? o.o
Thanks
|
|
|
01/08/2010, 21:05
|
#4
|
elite*gold: 0
Join Date: Jan 2010
Posts: 656
Received Thanks: 466
|
Ähm das ist nicht Total unnütz.
1. Die DLL ist komprimiert. So ersparst du dir Programm-Größe.
2. Komfortabler.
In Visual Studio über Projekt > Verweis hinzufügen
Sorry hab VT vergessen:
VT:
|
|
|
01/08/2010, 22:40
|
#5
|
elite*gold: 1
Join Date: Feb 2009
Posts: 6,378
Received Thanks: 7,996
|
Sorry, aber warum sollte ich das hier verwenden und nicht einfach WriteProcessMemory(...) und ReadProcessMemory(...)? Hat das hier Vorteile oder hab ich einfach nicht verstanden wofür das gut ist?
|
|
|
01/08/2010, 23:49
|
#6
|
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
|
geht mir auch so.
klar, kann sein, dass deine lib einem die arbeit abnimmt, einen handle zu holen und das selbst mit dem namen macht......sooo der bringer ist das auch nicht, kann ich mir auch selbst in ne kleine klasse einfügen
|
|
|
01/08/2010, 23:54
|
#7
|
elite*gold: 0
Join Date: Jan 2010
Posts: 656
Received Thanks: 466
|
Ja, ich sagte nur, dass das die wichtigsten Subs sind.
Weil ich nett bin gebe ich euch mal den Source code meiner DLL:
Code:
Public Module Memory
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public RBuff As Long
Public RBuff2 As Single
Public RBuff3 As Integer
Public Function Write(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
End Function
Public Function ReadFloat(ByVal ProcessName As Process, ByVal Address As Single)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)
CloseHandle(processHandle)
Return RBuff
End Function
Public Function WriteFloat(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Single)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
CloseHandle(processHandle)
End Function
Public Function Read(ByVal ProcessName As Process, ByVal Address As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)
CloseHandle(processHandle)
Return RBuff
End Function
Public Function ReadFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
ReadFloat(processHandle, fullAddress, RBuff2, 4, Nothing)
Return RBuff2
CloseHandle(processHandle)
End Function
Public Function ReadLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Bytes As Integer)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
ReadProcessMemory(processHandle, fullAddress, RBuff3, Bytes, Nothing)
Return RBuff3
CloseHandle(processHandle)
End Function
Public Function WriteFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Single)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
WriteFloatMemory(processHandle, fullAddress, Value, 4, Nothing)
CloseHandle(processHandle)
End Function
Public Function WriteLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Long, ByVal Bytes As Integer)
Dim fullAddress As Long
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)
fullAddress = RBuff + Offset
WriteProcessMemory(processHandle, fullAddress, Value, Bytes, Nothing)
CloseHandle(processHandle)
End Function
Public Function NOP(ByVal ProcessName As Process, ByVal Address As Integer, ByVal value As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteProcessMemory(processHandle, Address, value, 1, Nothing)
CloseHandle(processHandle)
End Function
End Module
Außerdem ist die DLL komprimiert was die Programmgröße verkleinert.
|
|
|
01/09/2010, 00:27
|
#8
|
elite*gold: 4
Join Date: Aug 2008
Posts: 6,783
Received Thanks: 4,992
|
Ich versteh den Sinn deines Codes nicht.
Code:
Public Function Write(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)
If GameLookUp.Length = 0 Then
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
Wofür ist die If-Bedingung dort ? Die ist eigentlich total fehl am Platz. Du prüfst ob die Länge von GameLookUp gleich Null ist und wenn das zutrifft tust du nichts. Und dann machst du einfach weiter o_O ?
Quote:
|
Außerdem ist die DLL komprimiert was die Programmgröße verkleinert.
|
Selbst "unkomprimiert" wäre die .NET DLL immer noch klein genug um sie mehr als 100 mal auf eine Diskette kopieren zu können.
|
|
|
01/09/2010, 00:46
|
#9
|
elite*gold: 0
Join Date: Jan 2010
Posts: 656
Received Thanks: 466
|
Da war zuerst eine End Anweisung drin.
Habe wohl vergessen es zu entfernen.
Liebe Grüße, Michael.
|
|
|
01/09/2010, 00:49
|
#10
|
elite*gold: 0
Join Date: Sep 2009
Posts: 148
Received Thanks: 31
|
Alles läuft darauf hinaus, dass die Funktionen aus der Kernel32.dll geladen werden.
Mit deiner DLL geschiet dies auf einem Umweg. Ich muss erst deine DLL laden die wiederrum die Kernel32.dll lädt, die ich aber bereits geladen haben muss um deine DLL zu laden (LoadLibrary).
Die Performanz würde also niedriger sein.
Die größe wird mit deiner DLL nicht kleiner, sondern größer. Ich muss die DLL ja bei dem Programm liegen haben.
Hinzu kommt auch noch das man nicht weiß, was die DLL wirklich beinhaltet.
Der einzige "Vorteil" ist, dass es komfortabeler ist die Funktionen zu benutzen.
Wenn man den Code sieht, sieht man auch das ständig OpenProcess aufgerufen wird, was nicht so performant ist.
Ich weiß nicht warum dies ein Tutorial sein sollte.
|
|
|
01/09/2010, 00:53
|
#11
|
elite*gold: 4
Join Date: Aug 2008
Posts: 6,783
Received Thanks: 4,992
|
Ach sorry hab nit gesehn das es im Tutorial Bereich lag. Ich verschiebs ma in den normalen epvp*coders Bereich.
#moved
|
|
|
01/09/2010, 09:15
|
#12
|
elite*gold: 1
Join Date: Feb 2009
Posts: 1,726
Received Thanks: 729
|
Ich hätte mal die Frage ob die DLL auch mit anderen Programmiersprachen geladen und benutzt werden kann.
Mich würde die aufrufkonvention interessieren.
- gar keine? (Scheint mir so, also nur für C nutzbar)
- stdcall?
...
|
|
|
01/09/2010, 11:21
|
#13
|
elite*gold: 0
Join Date: Mar 2009
Posts: 443
Received Thanks: 597
|
Quote:
Originally Posted by General Desert
Ich hätte mal die Frage ob die DLL auch mit anderen Programmiersprachen geladen und benutzt werden kann.
Mich würde die aufrufkonvention interessieren.
- gar keine? (Scheint mir so, also nur für C nutzbar)
- stdcall?
...
|
nur .net , da es managed code ist
b2t: naja , deine methode ist nicht grade ressourcen sparend. bei jedem write suchst du nach dem process, benutzt openprocess und schreibst dann. schau dir mal die c# library blackmagic an. diese besitzt auch memory editing funktionen,asm funktionen in .net,pattern search,....
|
|
|
01/10/2010, 00:47
|
#14
|
elite*gold: 0
Join Date: Jan 2010
Posts: 656
Received Thanks: 466
|
Man kanns in VB.Net, C#.Net und in VC++ benutzen.
|
|
|
01/10/2010, 15:04
|
#15
|
elite*gold: 0
Join Date: Jan 2010
Posts: 53
Received Thanks: 8
|
Das finde ich echt super. Aber was ich bräuchte ist ein proggi,
besser gesagt eine funktion, mit der ich in einem bestimmten
prozess nach einem string ( z.b. ' huhu' ) suchen könnte
|
|
|
 |
|
Similar Threads
|
memory hacking !!! using uce
01/09/2010 - CrossFire - 1 Replies
how about hacking crossfire by using uce engine !!! i m play crossfire and find alot of hacking for crossfire !!!! shall we discuss about this !!!
|
Quick Memory Editor - Alternative Memory Hacking Software
11/21/2009 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 11 Replies
This might be detected or not by GameGuard, I have not tested this on Official servers however it worked perfectly fine on other private servers.
http://imagenic.net/images/x0jxwzwpg2zxmkdtcf36.p ng
This is just an alternative memory editing tool.
Press thanks if this helps.
Remember, scan before using this.
Cause its 5.5MB.
|
C++ Memory Hacking
10/13/2009 - C/C++ - 6 Replies
Hallo Leute,
ich habe mich vor einiger Zeit mit 'Memory Hacking' beschäftigt, und zwar mit AutoIt. Nun hab ich mir die Frage Gestellt ob bzw. wie man das in C++ machen kann, da man dort noch etliche andere Möglichkeiten als in AutoIt hätte.
Mir geht es dabei darum Memory-Einträge zu verändern, so wie in bestimmten Hacks für z. B. Metin2 oder ähnlichen solchen Spielen.
Oder, wenn mir das jemand sagen könnte wäre mir auch geholfen, weiß jemand ob man auf diese weiße auf die Systemuhr von...
|
Questoin on regards to memory hacking...
01/13/2007 - Planetside - 7 Replies
i have been noticing that people are gettings instabanned while using the UltimateHUD hack and well my question really is, if someone uses lets say TSearch to hack for the CoF value and nop it. Is that detectable on any level?!?. I have 100% certainty that i see a few TR players w/ it and i know they been using it for months and months i just never bothered but i never seen them get banned so maybe thought that Memory hack worked a lil different then you DX Injection hack.
Thanks ahead of...
|
All times are GMT +1. The time now is 04:13.
|
|