Flag: Tornado! Hurricane!

 Forums >>  Debuggers  >>  can we code script like Olly Hit Snake plugin using Ollydbg Script?

Topic created on: May 9, 2012 09:17 CDT by nokimchen .

I'd like to write a script which can read the opcodes with its parameter in real-time. Olly Hit Snake plugin can do some part of what i want. Modification of Olly Hit Snake can certainly help me. But the problem is that i don't know C language. So, i would like to write a script using ollyDbgScript like:

var counter                           //variable to crawl the code
var buff                              //var to save the eip & opcode

mov counter, 1                        //initiate the vriable

start:                                //lable for looping
         cmp counter,3E8             //loop for 1000 times (3E8 in HEX= 1000 in DEC)
         ja finish                   //exit after 10 loops
         inc counter                 //Increase ocounter by 1, else ollydbg will freeze

         add buff, eip               //add the eip (address) to the variable
         add buff, " >> "            //just for convience
         opcode eip                  //get the opcodes of that address
         add buff, $RESULT_1         //put the opcode in the variable
         log buff                    //log the variable in the ollydbg log window
         mov buff,""                 //clear the variable

         ESTEP                       //(ESTEP  = f8)  step over the code  //sti = F7
         jmp start                   //If the counter is lower than 10 we jump back
finish:

The problem is: This 1000 lopps takes more than a minute. So, for a million loops, it'll may take days! This is beacuse of the implementation of ESTEP in the script. Is there any alternative which can make the script fast like Olly Hit Snake plugin?

Btw, i want this script to write 'cus certain malware creates a new thread dynamically and randomly and removes the thread immediately it is executed. So, the 'search command' feature of ollydbg dont work :(

  NirIzr     May 11, 2012 08:18.50 CDT
it takes a lot of time because you write it an interpreted language. either C or assembly would do a lot better.

Note: Registration is required to post to the forums.

There are 29,950 total registered users.


Recently Created Topics
Disassembling Motoro...
Jun/13
ida plugin writing f...
Jun/02
New version of RE-Go...
May/29
Decompiling raw bina...
May/22
Incorrect bitness wh...
May/20
PaiMei stalker modul...
May/19
Attach to program us...
May/13
IDA PRO how to make ...
May/12
FACT: OpenRCE is dead.
May/08
Int 3 anti debug?
May/05


Recent Forum Posts
Good Binary Code Pro...
alton
Int 3 anti debug?
SteveIRQL
Attach to program us...
SteveIRQL
Ollydbg 2.0 - Plugin...
openrce...
IDA PRO how to make ...
codeinject
FACT: OpenRCE is dead.
codeinject
IDA Resource Viewer ...
r2x64
FACT: OpenRCE is dead.
djnemo
FACT: OpenRCE is dead.
codeinject
FACT: OpenRCE is dead.
pedram


Recent Blog Entries
lowpriority
Apr/13
OllyMigrate Plugin for Olly...

everdox
Mar/08
2 anti-trace mechanisms spe...

everdox
Mar/07
Advanced debugging techniques

everdox
Mar/06
Branch tracing and LBR acce...

everdox
Mar/05
Using pre-paged in virtual ...

More ...


Recent Blog Comments
newlulu on:
Jun/10
Branch tracing and LBR acce...

newlulu on:
Jun/10
Advanced debugging techniques

newlulu on:
Jun/10
2 anti-trace mechanisms spe...

newlulu on:
Jun/10
OllyMigrate Plugin for Olly...

clarisonic on:
Apr/03
New version of Ollydbg!

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit