ich bin nun seit einigen Wochen auf Win 7 x64 umgestiegen und muss nun feststellen, dass alle meine geschriebenen Hacks nicht mehr funktionieren, die vorher auf Win XP x32 geklappt haben.
Für eine Hackfunktion benutze ich folgendes Modul für eine DLL-Incetion einer in c++ geschriebenen DLL:
Private TargetProcessHandle As Integer
Private pfnStartAddr As Integer
Private pszLibFileRemote As String
Private TargetBufferSize As Integer
Public Const PROCESS_VM_READ = &H10
Public Const TH32CS_SNAPPROCESS = &H2
Public Const MEM_COMMIT = 4096
Public Const PAGE_READWRITE = 4
Public Const PROCESS_CREATE_THREAD = (&H2)
Public Const PROCESS_VM_OPERATION = (&H8)
Public Const PROCESS_VM_WRITE = (&H20)
Public Declare Function ReadProcessMemory Lib "kernel32" ( _
ByVal hProcess As Integer, _
ByVal lpBaseAddress As Integer, _
ByVal lpBuffer As String, _
ByVal nSize As Integer, _
ByRef lpNumberOfBytesWritten As Integer) As Integer
Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _
ByVal lpLibFileName As String) As Integer
Public Declare Function VirtualAllocEx Lib "kernel32" ( _
ByVal hProcess As Integer, _
ByVal lpAddress As Integer, _
ByVal dwSize As Integer, _
ByVal flAllocationType As Integer, _
ByVal flProtect As Integer) As Integer
Public Declare Function WriteProcessMemory Lib "kernel32" ( _
ByVal hProcess As Integer, _
ByVal lpBaseAddress As Integer, _
ByVal lpBuffer As String, _
ByVal nSize As Integer, _
ByRef lpNumberOfBytesWritten As Integer) As Integer
Public Declare Function GetProcAddress Lib "kernel32" ( _
ByVal hModule As Integer, ByVal lpProcName As String) As Integer
Private Declare Function GetModuleHandle Lib "Kernel32" Alias "GetModuleHandleA" ( _
ByVal lpModuleName As String) As Integer
Public Declare Function CreateRemoteThread Lib "kernel32" ( _
ByVal hProcess As Integer, _
ByVal lpThreadAttributes As Integer, _
ByVal dwStackSize As Integer, _
ByVal lpStartAddress As Integer, _
ByVal lpParameter As Integer, _
ByVal dwCreationFlags As Integer, _
ByRef lpThreadId As Integer) As Integer
Private Declare Function OpenProcess Lib "kernel32" ( _
ByVal dwDesiredAccess As Integer, _
ByVal bInheritHandle As Integer, _
ByVal dwProcessId As Integer) As Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Integer
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _
ByVal hObject As Integer) As Integer
Public Sub Inject(ByVal prozessID As String, ByVal dllName As String)
Dim TargetProcess As Process = Process.GetProcessById(prozessID)
TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess.Id)
pszLibFileRemote = Application.StartupPath & "\" + dllName 'name der zu injektenden .dll
pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
TargetBufferSize = 1 + Len(pszLibFileRemote)
Dim Rtn As Integer
Dim LoadLibParamAdr As Integer
LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
'CloseHandle(TargetProcessHandle)
End Sub
End Module
Leider macht das Programm nicht das, was es auf Win XP einwandfrei gemacht hat.
ich kenn mich damit auch wirklich nicht aus, aber
ist die dll denn einen x64 dll?
ist dein zielprozess ein x64 prozess?
erhältst du einen Fehler oder passeiert einfach nichts?
falls beide noch 32bit: wenn du es "so haben willst wie es aus win32 war" kannst du vielleicht auch bei den projekteinstellungen das ganze projekt auf 32bit "kompilieren"
man sollte bedenken: wenn dein zielprozess ein x86 und deine dll ein x64 modul ist, kann es bestimmt zu fehlern kommen, gerade wenn man versucht Funktionen von dem zielprozess mit der dll aufzurufen.
ich gene mal davon aus, das dein zielprozess erin x86 prozess ist ich rate dir einfach mal zu googlen wie x86 programme auf x64 systemen ausgefürhr werden, ich weiss es auch nicht so genau.
z.B. hier: WOW64 ? Wikipedia auch wenn das wirklich nur eine grobe erklärung ist.
Quote:
Originally Posted by MSDN
A 32-bit DLL can be injected only into a 32-bit process, and a 64-bit DLL can be injected only into a 64-bit process. It is not possible to inject a 32-bit DLL into a 64-bit process or vice versa.
ich kenn mich damit auch wirklich nicht aus, aber
ist die dll denn einen x64 dll?
ist dein zielprozess ein x64 prozess?
erhältst du einen Fehler oder passeiert einfach nichts?
falls beide noch 32bit: wenn du es "so haben willst wie es aus win32 war" kannst du vielleicht auch bei den projekteinstellungen das ganze projekt auf 32bit "kompilieren"
man sollte bedenken: wenn dein zielprozess ein x86 und deine dll ein x64 modul ist, kann es bestimmt zu fehlern kommen, gerade wenn man versucht Funktionen von dem zielprozess mit der dll aufzurufen.
ich gene mal davon aus, das dein zielprozess erin x86 prozess ist ich rate dir einfach mal zu googlen wie x86 programme auf x64 systemen ausgefürhr werden, ich weiss es auch nicht so genau.
z.B. hier: WOW64 ? Wikipedia auch wenn das wirklich nur eine grobe erklärung ist.
Schonmal danke für deine Antwort. An der DLL wird es glaube ich weniger liegen. Der Ziel Prozess ist Last Chaos. Den solltest du ja noch kennen
Fehlermeldungen gibt es keine. Das lässt es nochmal warscheinlicher werden, dass VB die DLL garnicht erst in den Zielprozess schreibt.
Ich werde mich die Tage auch noch selber damit beschäftigen. Ich hatte nur gehofft, dass ich nicht der einzige mit diesem Problem bin und deswegen frühzeitig eine Lösung bekommen könnte.
Edit:
Ich habe jetzt selber die Lösung des Problems gefunden. Der Aufruf der OpenProcess Methode funktioniert so, wie oben geschrieben, nicht. Ich musste also
PHP Code:
OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess.Id)
Injection How To 03/05/2011 - General Gaming Discussion - 17 Replies 1.) Wo kriege ich Injection her?
-> http://injection.sourceforge.net/
2.) Knallt euch dann alles in ein Verzeichnis, besorgt euch dann einne der supporteten Clients (steht in der ilpatch.cfg)
3.) Decrypted diesen Client mit UORice
-> http://stud4.tuwien.ac.at/~e9425109/UO_RICE.htm
Sql injection 01/19/2010 - Kal Online - 34 Replies Eine frage woher bekomme ich den Sql Injection + tut würde mich freuen wenn einer mir weiter hilft danke
WTB sql injection 11/27/2008 - Trading - 0 Replies prove me that your coin hack work and i will buy it
URL sql injection 06/24/2008 - RF Online - 2 Replies any one could give me hints or anything on what url should i put in sql injection for rf online.. im a bit confused.. thanks