View previous topic :: View next topic |
Author |
Message |
Fixxxer How do I cheat? Reputation: 0
Joined: 29 Apr 2013 Posts: 7
|
Posted: Fri Oct 04, 2013 8:08 am Post subject: Code Injection in multiple addresses |
|
|
Hello,
I need to make code injection in 3 spots at the same time.
For example I want to search for code "AA CC DD DD" and have the same code injection in all addresses (it returns more than 1 results),
the code injection would be something like
mov [eax+40],eax
mov eax,[ecx+50]
mov eax,[ecx+60]
I have managed to do this for one spot using autoassemble and aobscan, but I cannot make it work within a lua script using the aobscan, I get a bit confused
Thanks in advance
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Fri Oct 04, 2013 8:37 am Post subject: |
|
|
A script like this will do that:
Code: |
result=AOBScan("AA CC DD DD");
for i=0,result.Count-1 do
autoAssemble(string.format([[
%s:
mov [eax+40],eax
mov eax,[ecx+50]
mov eax,[ecx+60]
]],result[i]));
end
result.destroy()
result=nil
|
AOBScan will return a Stringlist object
string.format('',result[#]) will replace %s with the string stored in result at line #
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Fixxxer How do I cheat? Reputation: 0
Joined: 29 Apr 2013 Posts: 7
|
Posted: Fri Oct 04, 2013 8:54 am Post subject: |
|
|
Thanks alot. That looks easy. Is there any reference/documentation or something regarding the autoAssemble format?
I really like to understand what I am doing and at this point even though I know it will work I get confused with what is the role/purpose of the "[" .
I would also like to add something to this script.
For example i want to find address "1F 2C" and set the [eax+40] to the address value (+offset = 10). To make it easier I assume there is only one address.
something like this would work?
Code: | result1= AOBScan("1F 2C"); // <---my noob code here :)
result=AOBScan("AA CC DD DD");
for i=0,result.Count-1 do
autoAssemble(string.format([[
%s:
mov [eax+40],string.format(result1[0]+10) // <---my noob code here :)
// mov [eax+40],eax
mov eax,[ecx+50]
mov eax,[ecx+60]
]],result[i]));
end
result.destroy()
result=nil |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Fri Oct 04, 2013 11:06 am Post subject: |
|
|
[[ ]] means it's a string. (Multiline string)
to do what you wish you'd do:
Code: |
result1= AOBScan("1F 2C");
result=AOBScan("AA CC DD DD");
for i=0,result.Count-1 do
autoAssemble(string.format([[
%s:
mov [eax+40],%s+10
mov eax,[ecx+50]
mov eax,[ecx+60]
]],result[i],result1[0]));
end
result.destroy()
result=nil
result1.destroy()
result1=nil
|
the second %s gets replaced by the string in result1
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Fixxxer How do I cheat? Reputation: 0
Joined: 29 Apr 2013 Posts: 7
|
Posted: Fri Oct 04, 2013 11:27 am Post subject: |
|
|
Thanks very much once again
|
|
Back to top |
|
|
|