Giter VIP home page Giter VIP logo

hexrayscodexplorer's People

Contributors

a1ext avatar assafcarlsbad avatar atvaark avatar blackzert avatar changbiao avatar drvink avatar gitter-badger avatar hoclan avatar itayc0hen avatar jaybosamiya avatar jhhcs avatar matrosov avatar milabs avatar nofiv avatar noobdoesre avatar ostraconify avatar pr701 avatar rodionov avatar rrbranco avatar stek29 avatar trass3r avatar trou avatar willxinc avatar yeggor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexrayscodexplorer's Issues

ObjectExplorer not work on x64

As I use function Object Explorer in x64 PE I got 2 issue

First : The IDA crash when I click on the context menu, as I see the debug log, I figureout it error in the format string at line 271 - tmp.cat_sprnt(" 0x%x: %s", rtd, name); in ObjectExplorer.cpp, I reformat the output to - tmp.cat_sprnt(_T(" 0x%I64X: %s"), rtd, name); and recompile then the plugin work ok.

Second : I see the vtable reference in PE file compile with vs2013 x64 use LEA instruction insteal of MOV intruction as in x32

lea     rcx, off_14000E2A8

so the code at line 77 in ObjectExplorer.cpp will not work

BOOL get_vtbl_info(ea_t ea_address, VTBL_info_t &vtbl_info) {
.......................................

                    if((*((PUINT) disasm_line) == 0x20766F6D /*"mov "*/) && (strstr(disasm_line+4, " offset ") != NULL))
                    {
                        is_move_xref = TRUE;
                        break;
                    }
......................................
} 

Thanks for aweasome plugin !

Failed on load on ida 6.95 / osx

Wont load on IDA 6.95 on OSX (10.12). Did I miss something obvious? :)

Log:
dlopen(/Applications/IDA Pro 6.95/idaq64.app/Contents/MacOS/plugins/HexRaysCodeXplorer.pmc64): dlopen(/Applications/IDA Pro 6.95/idaq64.app/Contents/MacOS/plugins/HexRaysCodeXplorer.pmc64, 2): Symbol not found: __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv
Referenced from: /Applications/IDA Pro 6.95/idaq64.app/Contents/MacOS/plugins/HexRaysCodeXplorer.pmc64
Expected in: /usr/lib/libstdc++.6.dylib
in /Applications/IDA Pro 6.95/idaq64.app/Contents/MacOS/plugins/HexRaysCodeXplorer.pmc64

vs2017 build failed on IDA pro

build failed

1>------ Build started: Project: HexRaysCodeXplorer, Configuration: Release x64 ------
1>Debug.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>CtreeExtractor.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>GCCObjectFormatParser.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>GCCTypeInfo.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>GCCVtableInfo.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>IObjectFormatParser.cpp
1>MSVCObjectFormatParser.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>ObjectExplorer.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>CodeXplorer.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>CtreeGraphBuilder.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>TypeReconstructor.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>TypeExtractor.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>Utility.cpp
1>C:\Program Files\IDA 7.0\plugins\hexrays_sdk\include\hexrays.hpp(11): fatal error C1083: Cannot open include file: 'pro.h': No such file or directory
1>Generating Code...
1>Done building project "HexRaysCodeXplorer.vcxproj" -- FAILED.

Access violation in process_rtti

I get an access violation for what I believe is cross-thread issue maybe. It says that it had an violation accessing memory or writing to memory that it shouldn't have. I narrowed down the error with building my own version (IDA 6.8 SDK) to the process_rtti() function in ObjectExplorer.cpp.

I made a quick and dirty patch to fix my issue for now, but I'm not familiar with the framework and would prefer someone that knows what they are doing to look into it. The crash happens within the cat_sprint function in qstring.

Line 291

    std::stringstream s_Stream;

    s_Stream << "0x" << rtd << std::hex << ":  " << name;

    /* qstring tmp;

    tmp.cat_sprnt(" 0x%x:  %s", rtd, name);*/

    rtti_list.push_back(s_Stream.str().c_str());

Crash with REconstruct Type

With the latest IDA 6.9, when I attempt to to reconstruct a variable, IDA crashes.

I traced this back to TypeReconstructor.cpp:627. For one reason or another, lvar_t * lvar = vu.item.get_lvar(); returns nullptr, which is passed into make_pointer and subsequently crashes IDA.

I am testing this on IDA64 with version 6.9.

32-bit binary support?

The context menu in the decompiler output menu only shows up when reverse engineering 64-bit binaries. Is this a lack of support inside the plugin or should I do some other troubleshooting?

Additionally, when I setup to build it (thinking maybe I just needed a different build of the plugin) I get the following linker error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1104	cannot open file 'C:\Program Files\IDA 7.1\plugins\HexRaysCodeXplorer64.dll'	HexRaysCodeXplorer	D:\misc\HexRaysCodeXplorer-master\HexRaysCodeXplorer-master\src\HexRaysCodeXplorer\LINK	1	

Where I have the following set in the prop sheet:

    <IDADIR>C:\Program Files\IDA 7.1</IDADIR>
    <IDASDK>D:\idasdk71\idasdk71</IDASDK>

Help with either of these issues is appreciated.

Plugin Not Loading?

I'm running IDA 7.0.170914, Windows x64.
I have a valid HexRays license (I think?) since I can see Psuedo Code and the console area outputs:
Hex-Rays Decompiler plugin has been loaded (v7.0.0.170914)

However this plugin does not load, any ideas?

I've used the latest version from here

I have no idea

Hi I just wanna know what am missing you are explaining everything except how to install or idk where to start if this is for professional it won't hurt to add how to get started don't be so proud with what you know cause there's always someone know more and at some point you started at some point

Thanks
Ali Bayati

Opening graph view twice crashes IDA

Opening the Graph View twice can result in IDA crashing.

Steps to reproduce:

  1. Go in Pseudocode view
  2. Click on Graph View. A ctree graph tab is opened.
    3 Go back in Pseudocode view
  3. Click on Graph View. A second ctree graph tab is opened, the first one contains both graph and the second is empty.
  4. Close the first ctree graph tab (the one with both graphs).
  5. Click on the second ctree graph tab. IDA crashes.

plugin does not work for ida-7.1 (linux)

I compiled the linux shared libs with both EA=0 and EA=1, copied HexRaysCodeXplorer64.so HexRaysCodeXplorer.so to the ida-7.1/plugins/ and then restarted IDA. The HexRaysCodeXplorer plugin did not show up. I also tried to add the the plugin entry in ida-7.1/plugins/plugins.cfg and it did not work either. Please advise. Thanks.

Not working with IDA 6.95

Hello,

I have downloaded the src and recompiled with Visual Studio 2015 for IDA 6.95 but when I load the plugin into the plugins/ folder, it does not seem to load CodeXplorer. Does not show up in the plugins submenu.
I have tried running your precompiled v2.0 and v1.7 binaries for IDA 6.8 and 6.9 as well with the same results.
Windows 10 x64
IDA 6.95
IDASDK 6.95
x86 Decompiler 2.4.0.160808

When compiling I also got errors for missing CallGraphBuilder.cpp and JsonParser.cpp. Where are these files located? They are not in the SDK or in your source distribution. To allow compilation, I have removed these two files from the vcxproj file.

Thanks.

REconstruct Type crash on IDA 6.95

Hello, sir,

Thanks for good plugin, today I'm trying to use with IDA 6.95. features such as display treee etc works well. but REconstruct Type feature will crash the IDA.

I'm using version 2.0 on win7 x64.

Tested both with IDA 32 and IDA64.
test

The example was attached.

Steps to reproduce:

  1. rename attachment to ext name of zip, extract the file
  2. open idb
  3. f5 in the default open function.
  4. reconstruct type on variable v4

ReconstructableType.h and ReconstructableType.cpp are missing from master

The files are missing from the master branch but are referenced in multiple files
including the .vcxproj file.
CodeXplorer.cpp
GCCObjectFormatParser.cpp
GCCTypeInfo.cpp
GCCVtableInfo.cpp
HexRaysCodeXplorer.vcxproj

That is, of course, assuming the project is supposed to build off the master branch.
Just clone the master to some directory other than your regular development directory
and try to build.

Thanks.

hexrayscodexplorer not work in ida 6.6

I download hexrayscodexplorer1.6 plw and p64 to ida plugin direcotory. It has this error:
LoadLibrary(C:\tool\IDAPro6.6\plugins\HexRaysCodeXplorer.p64) error: (can't find specified program)。
C:\tool\IDAPro6.6\plugins\HexRaysCodeXplorer.p64: can't load file

but if I use hexrayscodexplorer 1.5 , It can work.

How to find path?

I have the IDA Pro (64-bit) program installed and wanted to installed this as an extension is that possible? How would I find the <PATH_TO_IDA> info for my makefile stuff?

Unable to load on IDA linux (latest version) and unable to compile in lu

I'm trying to load the plugin against the latest version of the linux IDA, the compiled version refuses to load completely, and the source fails to load with:

oiajsd@ouipreqwouiperwquiopreqw:~/tools/HexRaysCodeXplorer/src/HexRaysCodeXplorer$ IDA_DIR=/home/oiajsd/ida-7.2/ IDA_SDK=/home/oiajsd/idasdk72 EA64=0 make -f makefile.lnx

  • IDA_DIR=/home/oiajsd/ida-7.2/
  • IDA_SDK=/home/oiajsd/idasdk72
  • EA64=0
  • make -f makefile.lnx
    rm -f ./CodeXplorer.o ./CtreeGraphBuilder.o ./ObjectExplorer.o ./TypeReconstructor.o ./CtreeExtractor.o ./TypeExtractor.o ./Utility.o ./MSVCObjectFormatParser.o ./IObjectFormatParser.o ./GCCObjectFormatParser.o ./GCCVtableInfo.o ./GCCTypeInfo.o ./Debug.o HexRaysCodeXplorer.so
    g++ -m64 -fPIC -D__LINUX__ -D__PLUGIN__ -std=c++11 -D__X64__ -D_GLIBCXX_USE_CXX11_ABI=0 -I/home/oiajsd/idasdk72/include -I/home/oiajsd/ida-7.2//plugins/hexrays_sdk/include -c CodeXplorer.cpp -o CodeXplorer.o
    CodeXplorer.cpp: In function ‘bool display_ctree_graph(void*)’:
    CodeXplorer.cpp:348:36: error: ‘WOPN_MENU’ was not declared in this scope
    display_widget(widget, WOPN_TAB | WOPN_MENU);
    ^~~~~~~~~
    CodeXplorer.cpp:348:36: note: suggested alternative: ‘WOPN_TAB’
    display_widget(widget, WOPN_TAB | WOPN_MENU);
    ^~~~~~~~~
    WOPN_TAB
    makefile.lnx:50: recipe for target 'CodeXplorer.o' failed
    make: *** [CodeXplorer.o] Error 1
    oiajsd@ouipreqwouiperwquiopreqw:~/tools/HexRaysCodeXplorer/src/HexRaysCodeXplorer$

Is anyway I can compile this for the latest version? Am I missing something? I did make sure the SDK was compiled

Thank you

IDA 7 support

Hey can you please:

  1. add Ida 7 support
  2. add automatically analyze of struct? like solve this Ida line: *(&v15 + some_var - 77) = *(&v15 + some_var - 76) - *(&v15 + some_var - 77); to a normal strucr?

rename_vars frequently crashes IDA

Crashes seems to be in line vu.refresh_ctext(); of file CodeXploerer.cpp, have reproduced this problem on Mac and Windows with latest ida 6.9.

Which version should be used ?

Hello,
I'm a Linux user, I'd like to use the version you compiled for 6.95 but I'm quite confused by the labelling of versions : which one is the more recent ? Contest version ? Black Hat ?

Also, I tried to compile the current source code for IDA 6.95 but got crashes (or it didn't work after fixing th e NULL derefs). Are you using the code from github to compile the binaries ?

Shortcuts conflicts

Hi,
the new HexRaysCodeXplorer's microcode view shortcut conflicts with a builtin from Hex-Rays:

Conflicting shortcut: M; Candidate actions:
	codexplorer::microcode_view (Microcode View)
	hx:Enum (Enu&m)

Maybe Ctrl-Shift-M would be better ?

Object Explorer Window Opens Unexpectedly (without hotkey)

Several keyboard buttons including the arrow keys will cause the Object Explorer window to open. I think the issue is here:
https://github.com/REhints/HexRaysCodeXplorer/blob/master/src/HexRaysCodeXplorer/CodeXplorer.cpp#L425

Because all of the keycodes are not defined in the above location (only two,) I'm guessing that whenever a keyboard button is pressed where lookup_key_code returns zero, this condition evaluates true and opens the window:

https://github.com/REhints/HexRaysCodeXplorer/blob/master/src/HexRaysCodeXplorer/CodeXplorer.cpp#L395

IDA 7 support ?

Hello,
have you already working on IDA 7 support?
If not, I might try to have a look.

Raphaël

Error: The specified procedure could not be found

Building latest master with Visual Studio 2017 (SDK 10.0.17134.0) with IDA Pro and Hex-Rays x64 7.2. Builds fine (after adding defines as per issue #74 ) with IDA SDK 7.3, but doesn't load:

LoadLibrary(C:\Program Files\IDA 7.2\plugins\HexRaysCodeXplorer.dll) error: The specified procedure could not be found.
C:\Program Files\IDA 7.2\plugins\HexRaysCodeXplorer.dll: can't load file

Any ideas?

Solution to compiling error in VS 2017 for IDA 7.2 (Windows)

HI,
I cloned the codes and tried to compile it in VS2017 with IDA 7.2. It threw many errors related to "WOPN_ONTOP" and "WOPN_MENU" being undeclared identifiers.

I added the following lines to "Common.h"
#define WOPN_ONTOP 0x08
#define WOPN_MENU 0x10

I hope this can help someone else that faced similar errors.

Hexrays.hpp: No such file or directory

When i ran make IDA_DIR=/home/ysg/idafree-7.0 IDA_SDK=/home/ysg/idafree-7.0/idasdk70 EA64=0 make -f makefile.lnx on Linux , i ran into this problem.

I used the IDAFree 7.0 Version

rm -f ./CodeXplorer.o ./CtreeGraphBuilder.o ./ObjectExplorer.o ./TypeReconstructor.o ./CtreeExtractor.o ./TypeExtractor.o ./Utility.o ./MSVCObjectFormatParser.o ./IObjectFormatParser.o ./GCCObjectFormatParser.o ./GCCVtableInfo.o ./GCCTypeInfo.o ./Debug.o HexRaysCodeXplorer.so
g++ -m64 -fPIC -D__LINUX__ -D__PLUGIN__ -std=c++11 -D__X64__ -D_GLIBCXX_USE_CXX11_ABI=0 -I/home/ysg/idafree-7.0/idasdk70/include -I/home/ysg/idafree-7.0/plugins/hexrays_sdk/include -c CodeXplorer.cpp -o CodeXplorer.o
In file included from CodeXplorer.cpp:26:0:
Common.h:57:10: fatal error: hexrays.hpp: No such file or directory
 #include <hexrays.hpp>
          ^~~~~~~~~~~~~
compilation terminated.
makefile.lnx:50: recipe for target 'CodeXplorer.o' failed
make: *** [CodeXplorer.o] Error 1

Linux support

I haven't checked yet the source code but, do you think the plugin may support Linux?

two files not found when building from source

Hi, I had the following build errors. I found the same question before but can I simply delete the lines from .vcxproj file?

1> CallGraphBuilder.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'CallGraphBuilder.cpp': No such file or directory
...
1> JsonParser.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'JsonParser.cpp': No such file or directory

Doesn't compile - Missing definition of custom_viewer_handlers_t

I get several errors:
At ObjectExplorer.cpp:634,

custom_viewer_handlers_t cvh = custom_viewer_handlers_t();
cvh.keyboard = ct_object_explorer_keyboard;

custom_viewer_handlers_t is simply not defined anywhere.

Also, at three locations
set_custom_viewer_handlers(si->cv, NULL, si); throws an error function does not take 3 arguments.

My build system is Visual Studio with IDA SDK 6.8, but this seems to a problem with the codebase.

DLL not loading?

I am running IDA 7.1 x64 on Windows.

I compiled HexRaysCodeXplorer and the resulting DLL is present in the /plugins/ directory.

However it seems the DLL is not loaded.
No new entry is present in Edit->Plugins, nor does the decompile tab get new items when right clicking.
Also no message concerning HexRaysCodeXplorer is visible in the Messages window.

HexRaysCodeXplorer Object Explorer crashes IDA

Having the next code:

int __stdcall PsGetNextJob(PVOID Object)
{
_KTHREAD *ETHREAD; // esi@1
signed int v2; // ecx@1
int v3; // edi@3
int v5; // [sp+10h] [bp-4h]@1

v5 = 0;
ETHREAD = KeGetCurrentThread();
--ETHREAD->SpecialApcDisable;
...
}

Calling Object Explorer in --ETHREAD->SpecialApcDisable; crashes IDA.

How to reconstruct type from multiple locations?

I'm wondering if it's possible to reconstruct a type from multiple functions. For example, this function assigns the vtable but it does not use all fields.

Before reconstruct type:

image

After reconstruct type:

image

That works perfectly. However, it only creates the fields that are specifically used here.

Many more fields of this type are only used in other functions. Reconstruct type seems to just load the existing struct instead of adding newly discovered fields, resulting in weird gap_F8[44] fields. (v2 is a NetConnection *)

image

Does your plugin or IDA itself provide an easy way to solve this?

HexRaysCodeXplorer crashes IDA

IDA crashes when calling "Reconstruct Type" on variable declaration or function names.

For example I have this code in IDA:
void *v4; // eax@1
v4 = operator new(4u);

Calling "Reconstruct Type" on *v4 will crash IDA.

Commit 64-bit binaries to repo

Reading the slide-deck, this is capable of compiling as a 64-bit plugin -- could those bins be committed to the repo so that people don't need to build it for themselves?

Set type on each vtable function pointer

Right now when vtable is created with function pointers if you press "Y" you see that the type is empty.
Please consider setting type of each pointer in vtable struct to it's corresponding function type. This will allow decompiler to use correct number of parameters in each virtuall function call, since not always correct number of args i guessed correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.