A Quick Guide to Setting Up DOC

This document lists the steps needed to run DOC and interpret a sample program. It is intended to be a quick guide requiring as little reading as possible. It is assumed you have already downloaded the DOC project and loaded it into Eclipse.

  1. Set up Java version.
    1. Install an appropriate Java version. DOC requires Java version 1.5 (5.0) or later.
    2. Ensure Eclipse is aware of your Java installation by going to Windows->Preferences..., then Java->Installed JREs, and adding it to the list if it is absent.
    3. Set the compliance level by selecting Windows->Preferences..., then Compiler. Set Compiler compliance level to 5.0 or greater.
  2. Check out the DOC project from CVS.
    1. Select File->New->Project....
    2. Select Projects from CVS. Click Next.
    3. For Host, enter obfuscation.cvs.sourceforge.net.
    4. For Repository path, enter /cvsroot/obfuscation.
    5. For User, enter anonymous.
    6. For Connection type, select pserver.
    7. Click Next.
    8. For Use specified module name, enter DetectObfuscation. Click Finish.
  3. Add org.eclipse.ui.ide to the build path.
    1. Select File->Import....
    2. Select Plug-in Development->Plugins and Fragments. Click Next.
    3. Click Next again.
    4. Select org.eclipse.ui.ide from the list. Click Add-->.
    5. Click Finish.
  4. Add the GEF library to the project.
    1. Download GEF runtime from http://www.eclipse.org/gef.
    2. Extract the GEF runtime to the folder containing the Eclipse folder. For example, if Eclipse is installed at C:\Eclipse, then extract the folder to C:\.
    3. Restart Eclipse.
    4. Right-click the project name (DetectObfuscation) in Package Explorer.
  5. Launch DOC.
    1. Right-click the DOC project in the Eclipse Package Explorer.
    2. Select Run As->Eclipse Application.
    3. From the Window menu, choose Open Perspective->Other....
    4. Select Obfuscation Detection. Press OK.
  6. Set DLL Stubs path.
    1. Once DOC is running (a second Eclipse windows opens), open the Window menu.
    2. Choose Preferences....
    3. Select DOC from the list on the left.
    4. For the option Stub DLLs Path, enter DOC_WORKSPACE_FOLDER\Imports, where DOC_WORKSPACE_FOLDER is the path to the DOC workspace (ex. c:\workspace\edu.louisiana.cacs.DetectObfuscation).
    5. Click OK.
  7. Open a sample file.
    1. From the File menu, choose New->Project....
    2. Select Obfuscation Detection project wizard. Click Next.
    3. Enter Sample1 as the project name.
    4. For Select asm file, enter DOC_WORKSPACE_FOLDER\Samples\sample1.asm. Click Finish.
  8. Launch the interpreter.
    1. From the list on the left, double-click sample1.asm to open it.
    2. Launch the interpreter by opening the Interpreter menu and selecting VSA-ASG Obfuscation Analysis.

Once interpretation is complete, you should be able to view the state at each instruction by selecting the instruction.

For a more detailed introduction to DOC, see the Usage page.