Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 07:20

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

Advertisement



DLL auf inject prüfen

Discussion on DLL auf inject prüfen within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
DLL auf inject prüfen

Hi,

ist es irgendwie möglich, ob eine spezielle DLL in einen spezifischen Prozess injected wurde?

Speziell geht es mir um den Hack und die dazugehörige WExt.dll.
Whoknowsit is offline  
Old 05/14/2011, 14:03   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 343
Received Thanks: 45
Kannst du die Frage noch mal so stellen, dass man diese auch versteht?

MfG

Edit: Meinst du ob eine DLL-injection möglich ist oder nicht?
yihaaa is offline  
Old 05/14/2011, 14:11   #3


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Hm... Wie soll ich die Frage denn stellen? Ich meine genau das, was ich schrieb

WoWExt injected WExt.dll in den gewählten WoW-Prozess, richtig? Ich möchte mit AutoIT herausfinden, ob die o.g. DLL in den WoW-Prozess injected wurde, oder nicht.

Ich sende Zeichenfolgen an WoW, die aber nur dann funktionieren, wenn WoWExt in den Prozess geladen wurde.

EDIT:

Code:
$offset = ......
$wow= _MEMORYOPEN($ProcessID)
$base = _MEMORYMODULEGETBASEADDRESS($ProcessID, "Wow.exe")
If _MEMORYREAD($base + $offset, $wow, "byte") == *** Then
so?!
Whoknowsit is offline  
Old 05/15/2011, 19:17   #4
 
derpo's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 344
Received Thanks: 151
Quote:
Originally Posted by Whoknowsit View Post
Hm... Wie soll ich die Frage denn stellen? Ich meine genau das, was ich schrieb

WoWExt injected WExt.dll in den gewählten WoW-Prozess, richtig? Ich möchte mit AutoIT herausfinden, ob die o.g. DLL in den WoW-Prozess injected wurde, oder nicht.

Ich sende Zeichenfolgen an WoW, die aber nur dann funktionieren, wenn WoWExt in den Prozess geladen wurde.

EDIT:

Code:
$offset = ......
$wow= _MEMORYOPEN($ProcessID)
$base = _MEMORYMODULEGETBASEADDRESS($ProcessID, "Wow.exe")
If _MEMORYREAD($base + $offset, $wow, "byte") == XXX Then
so?!

Hier habe ich mal ein Beispiel erstellt, das die kernel32.dll im eigenen Prozess sucht. _InjectModulInfo ist nicht von mir.
PHP Code:
#include <Memory.au3>
#include <WinAPI.au3>
#include <NomadMemory.au3>
$modulinfo _InjectModulInfo(@AutoItPID)
For 
$i 0 To UBound($modulinfo,1Step 1
    
If $modulinfo[$i][8] = "Kernel32.dll" Then
        MsgBox
(0,"Fund","Ich habe die kernel32.dll gefunden!")
        
ExitLoop
    
EndIf
Next

#FUNCTION# ====================================================================================================================
Name...........: _InjectModulInfo
Description ...: Returns information about every modul in the specified process
Syntax.........: _InjectModulInfo($PID)
Parameters ....: $PID A process identifier
; Return values .: Success        Returns an 2d array with the modules and there information
;                  Failure        Returns -and sets @Error:
;                  |@
error Wrong PID
;                  |@error DllOpen failed -> kernel32.dll might not have been found
Author ........: Deathly Assassin (http://www.*************)
Modified.......:
Remarks .......:
Related .......:
Link ..........:
Example .......: Yes
; ===============================================================================================================================


Func _InjectModulInfo($PID)
    
Local $hModule$hSnapshot$hOpen$iCount 0$aArray[1][10], $i$vMODULEENTRY32$vNext

    
If Not ProcessExists($PIDThen
        SetError
(1)
        Return -
1
    
EndIf

    
SetPrivilege("SeDebugPrivilege"1)
    
$hOpen DllOpen("Kernel32.dll")

    If @
error Then
        SetError
(2)
        Return -
1
    
EndIf

    
$vMODULEENTRY32 DllStructCreate("DWORD dwSize; DWORD th32ModuleID; DWORD th32ProcessID; DWORD GlblcntUsage; DWORD ProccntUsage; ptr modBaseAddr; DWORD modBaseSize; HANDLE hModule; CHAR szModule[256]; CHAR szExePath[260];")
    
DllStructSetData($vMODULEENTRY321DllStructGetSize($vMODULEENTRY32))
    
$hSnapshot DllCall($hOpen"HANDLE""CreateToolhelp32Snapshot""DWORD"8"DWORD"$PID)
    
DllCall($hOpen"BOOL""Module32First""HANDLE"$hSnapshot[0], "ptr"DllStructGetPtr($vMODULEENTRY32))

    Do
        
ReDim $aArray[$iCount 1][10]
        For 
$i 1 To 10
            $aArray
[$iCount][$i 1] = DllStructGetData($vMODULEENTRY32$i)
        
Next
        $iCount 
+= 1
        $vNext 
DllCall($hOpen"BOOL""Module32Next""HANDLE"$hSnapshot[0], "ptr"DllStructGetPtr($vMODULEENTRY32))
    
Until Not $vNext[0]

    
DllClose($hOpen)

    Return 
$aArray
EndFunc   
;==>_InjectModulInfo 
Falls du Memory.au3 und/oder NomadMemory.au3 noch nicht hast, dann kannst du die hier runterladen :
NomadMemory :
Memory :
derpo is offline  
Old 05/15/2011, 23:23   #5


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Danke dafür, aber das funktioniert leider nicht. Ich finde die WExt.dll ums Verderben nicht im WoW-Prozess, obwohl diese injected wurde
Whoknowsit is offline  
Old 05/16/2011, 11:20   #6
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
Naja, ich würde in der dll einfach eine Messagebox öffnen lassen.

Ich kenne keinen weg es zu überprüfen, aber kannst es ja mal per memory probiere, aber weiß nicht ob das klappt und ob man pointer kriegt.

Z.B. einen text der dll suchen etc.
freehuntx is offline  
Old 05/16/2011, 13:05   #7
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
die idee mit dem snapshot ist schon nicht schlecht...

allerdings wirst du bei x64 programmen auf probleme treffen.

ich hatte mir damals eine ähnliche funktion geschrieben:
Code:
ConsoleWrite(CheckForModule(WinGetProcess('vlc'), 'Kernel32.dll')&@CRLF)

Func CheckForModule($pid, $module_name)
	$struct = DllStructCreate('int; int; int; int; int; ptr; int; hwnd; char[256]; char[260];')
	DllStructSetData($struct, 1, DllStructGetSize($struct))
	$snapshot = DllCall('kernel32.dll', 'hwnd', 'CreateToolhelp32Snapshot', 'dword', 8, 'dword', $pid)
	DllCall('kernel32.dll', 'int', 'Module32First', 'hwnd', $snapshot[0], 'ptr', DllStructGetPtr($struct))
	Do
		If DllStructGetData($struct, 9) = $module_name Then Return True
		$module = DllCall('kernel32.dll', 'int', 'Module32Next', 'hwnd', $snapshot[0], 'ptr', DllStructGetPtr($struct))
	Until Not $module[0]
	Return False
EndFunc
weis allerdings nicht genau wie man das am besten auf x64 systemen regelt :s
lolkop is offline  
Old 05/16/2011, 13:18   #8


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Moin,

danke soweit. Also...

Wenn ich beispielsweise prüfe, ob wow64.dll in den WoW-Prozess geladen wurde, funktionieren alle Lösungen d.h. auch die letzte o.g. Lösung zeigt mir true an.

Wenn ich aber schaue, ob WExt.dll geladen wurde, wird mir überall false angezeigt. Mir wird also tatsächlich nichts anderes übrig bleiben, als einen Text in der DLL zu suchen, oder sonstwas... Oder ich muss nach irgendeinem Offset suchen, welches von der o.g. DLL produziert/verändert wird. Scheinbar
Whoknowsit is offline  
Old 05/16/2011, 16:50   #9
 
derpo's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 344
Received Thanks: 151
Führ mal eine der Auflistungsfunktionen von Modulen auf nach der Injektion auf und lass alles mit _ArrayDisplay aus der Array.au3 anzeigen
derpo is offline  
Old 05/16/2011, 18:56   #10


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Schon getan. Die o.g. DLL wird nicht aufgeführt, obwohl sie injected ist.

Code:
#Include <WinAPI.au3>
#include <Array.au3>

; #FUNCTION#;===============================================================================
;
; Name...........: _ProcessGetLoadedModules
; Description ...: Returns an array containing the full path of the loaded modules
; Syntax.........: _ProcessGetLoadedModules($iPID)
; Parameters ....:
; Return values .: Success - An array with all the paths
;               : Failure - -1 and @error=1 if the specified process couldn't be opened.
; Author ........: Andreas Karlsson (monoceres)
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........;
; Example .......; No
;
;;==========================================================================================
Func _ProcessGetLoadedModules($iPID)
    Local Const $PROCESS_QUERY_INFORMATION=0x0400
    Local Const $PROCESS_VM_READ=0x0010
    Local $aCall, $hPsapi=DllOpen("Psapi.dll")
    Local $hProcess, $tModulesStruct
    $tModulesStruct=DllStructCreate("int [1000]")
    $hProcess=_WinAPI_OpenProcess(BitOR($PROCESS_QUERY_INFORMATION,$PROCESS_VM_READ),False,$iPID)
    If Not $hProcess Then Return SetError(1,0,-1)
    $aCall=DllCall($hPsapi,"int","EnumProcessModules","ptr",$hProcess,"ptr",DllStructGetPtr($tModulesStruct),"dword",1000,"dword*","")
    If $aCall[4]>1000 Then
        $tModulesStruct=DllStructCreate("int ["&$aCall[4]&"]")
        $aCall=DllCall($hPsapi,"int","EnumProcessModules","ptr",$hProcess,"ptr",DllStructGetPtr($tModulesStruct),"dword",$aCall[4],"dword*","")
    EndIf
    Local $aReturn[$aCall[4]]
    For $i=0 To Ubound($aReturn)-1
        $aCall=DllCall($hPsapi,"dword","GetModuleFileNameExW","ptr",$hProcess,"int",DllStructGetData($tModulesStruct,1,$i+1),"wstr","","dword",65536)
        $aReturn[$i]=$aCall[3]
    Next
    _WinAPI_CloseHandle($hProcess)
    DllClose($hPsapi)
    Return $aReturn
EndFunc

$MODULES = _ProcessGetLoadedModules(4920)
_ArrayDisplay($MODULES)
Ergebnis:

Quote:
[0]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[1]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[2]|C:\Windows\SYSTEM32\ntdll.dll
[3]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[4]|C:\Windows\SYSTEM32\wow64.dll
[5]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[6]|C:\Windows\SYSTEM32\wow64win.dll
[7]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[8]|C:\Windows\SYSTEM32\wow64cpu.dll
[9]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[10]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[11]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[12]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[13]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[14]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[15]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[16]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[17]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[18]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[19]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[20]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[21]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[22]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[23]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[24]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[25]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[26]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[27]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[28]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[29]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[30]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[31]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[32]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[33]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[34]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[35]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[36]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[37]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[38]|C:\Program Files (x86)\World of Warcraft\WoW.exe
[39]|C:\Program Files (x86)\World of Warcraft\WoW.exe
4920 ist natürlich die PID des entsprechenden WoW-Prozesses.
Whoknowsit is offline  
Old 05/16/2011, 21:24   #11
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
das ganze funktioniert nicht weil du ein 64bit system hast auf dem du 32bit funktionen aufrufen willst...

das hatte ich aber bereits von anfang an gesagt.

du kannst ja mal nach den apis in verbindung mit 64bit systemen googlen und wirst das selbe was ich anfangs sagte mti ewas anderem wortlaut auch in vielen anderen foren finden
lolkop is offline  
Reply


Similar Threads Similar Threads
Open Source Injector - Auto/Manual Inject, Verify Inject, Saves Settings
01/28/2013 - Combat Arms Hacks, Bots, Cheats & Exploits - 5 Replies
Open Source Injector - Auto/Manual Inject, Verify Inject, Saves Settings Features: -Auto Inject -Customizable Delay -Manual Inject -Verify Inject
[How to] ESN Code prüfen
04/09/2012 - Tutorials - 12 Replies
Hallo, nun möchte ich euch erklären und demonstrieren, wie ihr zukünftig eure ESN Codes nach Funktionalität prüfen könnt. Das ganze bin ich kürzlich theoretisch angegangen und heute habe ich es erfolgreich praktiziert. Möglicherweise wissen das schon die meisten von euch, allerdings bekam ich hierauf schon einige Male Ansprachen, deshalb veranschauliche ich das für alle. Anbei möchte ich ein Dank an 3xslink aussprechen, der mich nochmals darauf hingewiesen hat. #1
sql-injection prüfen
03/10/2011 - General Coding - 3 Replies
hey habe gelesen, wie man prüfen kann, ob eine webseite gegen sqlinjection sicher ist. da steht man soltle z.b. beim login in der adresszeile z.b. &user=test einfach schreiben &user=test' also mit nem anführungszeichen. da aber kaum ne webseite login über get macht habe ich einfach n postrequest gesendet halt auch mit &user=test' es hieß, dass es wenn die seite nicht gg sqlinjection geschützt ist ein fehler kommen sollte. habs auf eigener webseite probiert (also auf einer, wo ich in...
Prüfen Sie den Druckserver aus.
10/21/2009 - Metin2 Private Server - 13 Replies
Meine Spülmaschine ist ein Problem, so dass er die Quelle aller Raumfahrt mit der Reinigung schüttelte. Mein Tante wurde eine solche Verwirrung auf der Couch die ganze Zeit.



All times are GMT +1. The time now is 07:20.


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