📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

Blogs >> cyphunk's Blog

Created: Sunday, February 5 2006 11:33.38 CST Modified: Sunday, February 5 2006 11:33.38 CST
This is an imported entry. View original. Printer Friendly ...
cyphunk
Author: cyphunk # Views: 492


Visual Basic Reversed – A Decompiling Approach
by Andrea Geddon
27 pages, 20 of code.

Update 2006.02.11: more intuitive structure list and directions of use.

This is would have made for a good introduction to reversing Visual Basic if it were not for a few errors. One can still learn a bit about the data structure used by the runtime engine but towards the end when trying to find objects the author mixes names he gave structures, or isn’t clear enough to keep them in order to. Regardless, a great deal of the structure is described and some of it in a coherent manner.

The author looks at an example VB program with the objective of finding the serial generation code. He starts from the very first data structure (RT_MainStruct). Here is a bulleted list of the different levels in the vb structure which should make it easier to follow. The author is looking for the onClickCheck event handler. The handlers are not named but can be found working through various levels. 1. First we must find the form name of interest. 2. Then we find the control (button) name of interest (perhaps “Check Serial”). 3. We find the onClick event handle for that button.

  1. The form names can be found under ProjectStruct.Tree.ModulesList. Each ModulesList represents values of either a form or a module object and contains a ObjName which is the internal ASCII name of the Form/Module.
  2. For Forms you will find a FormDescriptor structure referenced. This structure contains substructures for each control in the form. Buttons, text boxes, labels, etc. The author named them FD0_ControlsList[*]. Inside each of these structures you will find the ASCII name (aText_2_0) given to each control, such as “btnSerialChk”, etc.
  3. Inside the structure with the control/button you wish to examine you will find a LocalDispatcher structure referenced. And finally, it is here that you will find references to the functions for each event handler (onClick, onChange, etc). They are not named, only appearing as raw references. So, to determine what is onClick, onChange, onOver, etc… you can either look for familiar signs in the disassembly (such as calls to message box functions) or build an example project that has every event defined and compare the disassembly of each to it. Once the onSerialClick event handler is found you can follow its value to the serial check function.


If you wish to comment on this blog entry, please do so on the original site it was imported from.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
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
Question about memor...
Dec/12


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