Flag: Tornado! Hurricane!

 Forums >>  Target Specific - General  >>  Getting Original Script from AutoIT Executables

Topic created on: June 1, 2006 23:43 CDT by jj .

I recently read a post in [irc-security] where they had an AutoIT executable doing bot stuff (yes, it was a bot).  So anyway, it reminded me of something I did a few months back, wherein I was checking a file which was, yep, an AutoIT exec, and i needed to know what it was doing.  The easiest way of course, was to get the original script.

Anway, enough of the background stuff, after a few F2's, F9's, F8's, F7's, CTRL-L's, CTRL-B's, here's what i came up with (I used OllyDbg btw):

1. For starters, AutoIT executables are UPX-packed, so we have to get into the unpacked version in memory.  UPX is fairly easy, after loading the file in OllyDBG, breakpoint at the last JMP instruction (i have screenshots but then i don't know how to post it hehehe), something like:

CALL ...
POPAD
JMP xxxxx
00
00
00
...

Then F8 to go into the unpacked version.

2. Next up, we have to locate winMain, which can easily be done via IDAPro, in this case, WinMain is the first CALL after the call to GetModuleHandleA.  F2, F9, then F7.

3. After F7ing, there are 6 CALLs before the RETN. F2 on the 5th CALL, F9, then F7.

4. In the next series of instructions find the first JMP, then the first CALL after the JMP. Again, F2, F9, F7.

5. Next, find the CALL right before the RETN. (at this point, i think doing a right-click Analyze-Code, or opening the un-UPX'd file in IDA is quite useful so as not to get lost in the text hehehe).  F2, F9, F7.

6. Finally, in OllyDbg (if your screen is big enough) you should see something like:

PUSH <xxx>     ASCII ">AUTOIT SCRIPT<"
CALL <xxx>
TEST EAX, EAX
or, if you don't see the ">AUTOIT SCRIPT<" text, find these series of instructions:
PUSH
LEA
LEA
PUSH
PUSH
CALL <-- Call to load the original script into memory!
TEST

F2 on the CALL, F9, F8.  Check ECX register.

This works on the latest downloadable AutoIT, with or without the "Decompile" option checked (regardless of whether a password is required or not)

  igorsk     June 2, 2006 05:33.09 CDT
So it's not even compiled to some kind of bytecode? Neat.
Maybe I should write a "decompiler" and sell it for $$$ :)

  jj     June 2, 2006 05:53.00 CDT
apparently not hehehe.  I modified an OllyScript(the first one was done by a friend based on my findings but didn't work with the AutoIT bots) that dumps ECX. do OllyScripts sell? heheheheh

  anonymouse     June 2, 2006 09:31.12 CDT
autoit :) i think i played with it long ago and extracted the original script
i think there is an exe2aut.exe in the download
the decompiles back the exe

but during the course of playing with exe2aut.exe i think i found a passphrase which the inputbox wasnt taking as a whole (EM_SOMELIMIT) on edit box

there were also some passphrase fillers out there somewhere

also one should not unpack the upx with upx -d but work as it is i think else it will crash looking for some values in
upx area

well it has atleast been a year old

it was nice to see the actual script

  d3v3lop3r     February 22, 2007 12:42.11 CST
After that great topic of jj, I continue finding about this and i get this site... Here have a crack for decompile Exe of AutoIT Version autoit-v3.2.X ignoring the passphrase ^_^

http://obijuan.wordpress.com/2006/09/13/yet-another-update-for-autoit-cracking/

  inov8iv   July 2, 2007 14:37.11 CDT
I can't seem to get this method to work, has there been any new light shed on this subject with the newer versions of AutoIT or is there a different method to accomplish this task?

  thECurouZ     July 3, 2007 13:10.32 CDT
Hi everyone,
I think I have played with this Crackme last year.
http://crackmes.de/users/khattam/khattam_s_patch_me_v2/

You can check the solution for this crackme.

Note: Registration is required to post to the forums.

There are 31,313 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
hi!
Jul/01
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit