Yo everyone
This is for
Ricardo Narvaja and/or diz
Link to tute - English mods
It is to big to put into HTML so these bits are seperated by ----'s
Hope JMI don't delete it!!!!!!!!!
E&OE!!!
Armadillo 3: The same method some variants.
Good in the case of armadillo 3 we will use the associated armadillo.exe that in this case this packed with armadillo 3 that works of the same form that previous the difference is to the antidebugger and that this has the code obfuscated, for that reason this new tute to see as handle to us with both differences (for this tute it is essential to read parts 1 and 2 of tute on armadillo since we will not explain everything again)
Antidebugger is similar to where he made PELOCK run in his corresponding tute, is necessary to find the byte of where api IsDebuggerPresent reads and makes EAX=1 and instead of changing it to EAX we must directly change the byte in the memory before taking the program, in my machne this in 7FFDF000
------------------------------------------------------------------------------------
There we encounter the 1 in the DUMP
------------------------------------------------------------------------------------
So we change it to zero
------------------------------------------------------------------------------------
I place the Bp WriteProcessMemory as in previous tute(part 2) and RUN it
------------------------------------------------------------------------------------
Here is where he tries to copy first block 425000 to the process SON.
We watched in the Call Stack of where it is called in the feasible one
------------------------------------------------------------------------------------
We see that the api is called from 43afbc but the decrypter call is following that and is CALLED FROM 439d2f so we go there.
------------------------------------------------------------------------------------
There we have the decrypter call as we cannot go downwards to look for similar call since the code this obfuscated, we were placed upon call good, and do click FOLLOW straight, and there where we fall do click FIND REFERENCES TO SELECTED straight COMMAND and it leaves this to us
------------------------------------------------------------------------------------
the location of both call the decrypter and the encrypter, we go to the bad one that is the encrypter
------------------------------------------------------------------------------------
There we put the nop's the same as we did in tute part 2.
------------------------------------------------------------------------------------
Now just as in the previous tute we put a BPX where it returns from api and we RUN it and it stops here
------------------------------------------------------------------------------------
I place a BP WaitForDebugEvent as we see in the image below.
------------------------------------------------------------------------------------
Now Run it and it stops in the Bp that it places and in the second line of stack I see the direction where this the report 12eff4 in my machine I look for it in the dump and this marked entry there to it point as we explained in tute part 2 (4251d0)
------------------------------------------------------------------------------------
I am now going to place an infinite loop at the entry point, for it I go to cases out attach and I pay attention handle of the process Son to this case is 9a4 (the one that not this in red) of both armadillo3
------------------------------------------------------------------------------------
We opened pupe and we looked for the process son according to handle, soon it frame and I am going to patch and in entry point 4251d0 change the first byte by EB and the second by FE (I do loop infinitely)
------------------------------------------------------------------------------------
Once fact that is necessary to nop the call to WaitForDebugEvent we see in the image the obfuscacion that does not allow to see push nor nothing else (nor the same call)
------------------------------------------------------------------------------------
So when it happens that is necessary to prove here in the listing from the position in which we are at 44776e, we are making GOTO EXPRESSION backwards of a a byte, until we arrived at GOTO EXPRESSION=437768 where appears the call well written as it is seen in the image
------------------------------------------------------------------------------------
There already we can nop it along with previous PUSH EDX it has now left a PUSH but the one of the time if we followed backwards with GOTO EXPRESSION we will arrive at 43775c where we see PUSH nop this.
------------------------------------------------------------------------------------
We see the other PUSH 3e8 that there is to nop that is is possible to be said that there is to nop from here 43775c to the test eax, eax.
Good stuff this obfuscation, I am already tiring (he he)
We sent the jump at 43776E to 401000
------------------------------------------------------------------------------------
Here this the graph for when it comes to decrypt zone 425000 and again it stops.
------------------------------------------------------------------------------------
The memory positions are not the same ones of tute previous where is keeping the 400000 etc so I correct the graph so that it modifies that. I need the initial conditions of the report
------------------------------------------------------------------------------------
I put 400000 so that it takes like initial value that added 1000 to it and will be then the first block from 401000 the one that it will decrypted.
RUN it and we see in the LOG as all the blocks were decrypted up to 424000 we go well now we must skip the block of 425000 and follow until the end of the first section, here is not necessary then 425000 is I complete the block of the first section but if not outside thus and it was necessary to decrypt but we changed limits of the comparison 1 complete block to decrypt and we published the report so that it continues from 426000, this serious example if there were to continue decrypting up to 428000 for example (it is not necessary here I show it like the example)
------------------------------------------------------------------------------------
There it changes the maximum limits of the comparison 429000 so that it stops before it decrypts this block and it publishes the report so that (he he) it follows from 426000.
Let us return to our case, we already have everything in the decrypted memory and run all the blocks.
------------------------------------------------------------------------------------
Good now I write the two lines to uncouple the father from the son
------------------------------------------------------------------------------------
I execute them with F8 and I pay attention after executing the api, that eax is 1 what means that all is well and unhooked correctly. If eax is 0 is an error has occured.
here it attaches to the son and slows it down and it clears loop infinitely to him
------------------------------------------------------------------------------------
Dump with LORDPE with INTELLIDUMP change entry point to the correct one
------------------------------------------------------------------------------------
Good dump this ready and correct one, although we must fix the table with revirgin then when running it gives us an error in the table of the dump but the error is not here
------------------------------------------------------------------------------------
We see that the table is complete except for that reason it does not run is the jump at 40128C we have not determined this api so once we repair it with revirgin, and the table this correct one will perfectly run (he he) dump the this correct and complete one.
Ricardo Narvaja /hobferret
