Register for your free account! | Forgot your password?

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

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

Advertisement



Autoit Hooking (ohne crash) möglich?

Discussion on Autoit Hooking (ohne crash) möglich? within the AutoIt forum part of the Coders Den category.

Reply
 
Old 04/23/2014, 12:36   #16
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,876
Quote:
Originally Posted by golle12 View Post
Ich hab etwas von shadow gefunden was den assembler code injected und zwar macht er einen Jump und nopt die unwichtigen adressen nun meine frage wie kann ich nun damit am anderen Ende des Jumps meine Funktion abfragen oder das sie überhaupt ausgeführt wird? Das ist das was ich schon gemacht habe bisher nopt sie alles und jumpt (irgendwo) zu einer Adresse hin.

PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include<CCInject.au3>
#RequireAdmin
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Test"282187192124)
$Group1 GUICtrlCreateGroup("Test"00281185)
$Input1 GUICtrlCreateInput("Ich habs geschafft!!!"243223321)
$Button1 GUICtrlCreateButton("Namechange"81208957)
$Button2 GUICtrlCreateButton("Inject Script"1681449733)
GUICtrlCreateGroup("", -99, -9911)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            _Change
()
        Case 
$Button2
            _Inject
()
    EndSwitch
WEnd

Func _Inject
()
Local $memopen _MemoryManipulationOpen(ProcessExists("Test.exe"))
$allocated_variable _AllocateMemoryForVariable($memopen)
$asm_variable _CreateASM_CopyRegisterToVariable($allocated_variable"ebx")
$old_opcode ""

_MemoryBytesWrite($memopen,0x00720BE2,"90")
_MemoryBytesWrite($memopen,0x00720BE3,"90")
$old_opcode _InjectASMAtAddress($memopen0x00720BE45$asm_variable)
EndFunc

Func _Change
()

EndFunc 
Du bist schon auf dem richtigen Weg.
Das MemorzBytesWrite ist unwichtig, das macht die InjectASMAtAddress-Funktion von alleine. Was du da jetzt machst ist ebx in eine Variable zu speichern, um diese Variable jetzt noch abzufragen musst du noch den befehl "_ReadVariableMemory" (oder so habe die UDF gerade nicht da und kann mich nicht mehr erinnern ).

Aber ansonsten sieht es gut aus, wenn du beachtet hast, dass du es mit x86 kompillierst.
Das Ganze "Gespringe", was die anderen angemerkt haben ist wirklich nicht trivial, das macht die Funktion aber im Normalfall so, dass du zufrieden bist und dir keine Sorgen mehr machen musst.


Edit:
Wenn du willst, dass du in ebx schreiben kannst, musst du das ganze anders angehen und entweder eine Variable erzeugen von der du dann den Wert per injecteten ASM in ebx schreiben laesst oder du hard codest diesen Wert und schreibst einfach:
"mov ebx, 100"

Falls es dir etwas an Assembler-Kentnisse mangelt kannst du fuer einen Crashkurs auch einmal mein Tut (AutoIt und Assembler) anschauen, darin gehts zwar um andere Anwendungszwecke, aber die UDF FASM.au3 ist bei der CCInject.au3 und auch bei meinem Tut die UDF auf der alles "basiert/aufbaut".
Shadow992 is offline  
Reply


Similar Threads Similar Threads
[AutoIt] - Systemnahes Entwickeln (DLL's, Hooking, APIs, CodeInjection, Security etc)
01/12/2014 - AutoIt - 3 Replies
Hey, Ich habe diesen Thread als eine Art "Disskussionsthread" erstellt. Ich habe mir gedacht das man ein bisschen über das Systemnahe programmieren mit AutoIt spricht, Tipps gibt, interessante/hilfreiche Links postet, Fragen über die im Titel genannten Themenbereiche stellt, Skripte postet, einander hilft etc. Das soll kein Thread sein indem über AutoIt-Basics gesprochen wird, sondern über Fortgeschrittene Dinge. Also, mal ein paar Links von meiner Seite, bezüglich dem Systemnahen...
Autoit/AutoHotkey hooking the mouse
10/03/2009 - Aion - 3 Replies
I am running EU/US Aion 1.5 so no game guard. I am still having trouble sending mouse clicks to Aion the mouseclick("right") function works fine oustide the game but if I <alt> <tab> in it seems to get blocked. I am a bi t puzzled as the freeware mouse driver that I use to re-map extra mouse buttons works. Of course I have tried removing the mouse driver completely to ensure there is no clash. Any one have any ideas? Cheers.
D3D Hooking [autoit]?
04/17/2009 - GW Bots - 11 Replies
edited



All times are GMT +2. The time now is 15:20.


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