blc

所属分类:Windows编程
开发工具:C/C++
文件大小:1089KB
下载次数:0
上传日期:2020-07-13 09:27:28
上 传 者anonymouse
说明:  Binary Lifting Contraption to use Ghidra decompiler in IDA Pro

文件列表:
AUTHORS (37, 2020-05-21)
COPYING (17983, 2020-05-21)
LICENSE (18092, 2020-05-21)
Makefile (3653, 2020-05-21)
action.cc (29955, 2020-05-21)
action.hh (17669, 2020-05-21)
address.cc (27326, 2020-05-21)
address.hh (21820, 2020-05-21)
architecture.cc (44981, 2020-05-21)
architecture.hh (17027, 2020-05-21)
ast.cc (62426, 2020-05-21)
ast.hh (10823, 2020-05-21)
blc.sln (1251, 2020-05-21)
blc.vcxproj (17559, 2020-05-21)
blc.vcxproj.filters (14452, 2020-05-21)
blc.vcxproj.user (143, 2020-05-21)
block.cc (96695, 2020-05-21)
block.hh (50848, 2020-05-21)
blockaction.cc (77603, 2020-05-21)
blockaction.hh (20529, 2020-05-21)
callgraph.hh (4372, 2020-05-21)
capability.cc (1573, 2020-05-21)
capability.hh (1991, 2020-05-21)
cast.cc (13470, 2020-05-21)
cast.hh (8783, 2020-05-21)
comment.cc (12201, 2020-05-21)
comment.hh (11553, 2020-05-21)
condexe.cc (36282, 2020-05-21)
condexe.hh (12201, 2020-05-21)
context.cc (7271, 2020-05-21)
context.hh (9199, 2020-05-21)
coreaction.cc (168798, 2020-05-21)
coreaction.hh (50133, 2020-05-21)
cover.cc (15516, 2020-05-21)
cover.hh (5291, 2020-05-21)
cpool.cc (6983, 2020-05-21)
cpool.hh (10657, 2020-05-21)
crc32.cc (3665, 2020-05-21)
crc32.hh (1121, 2020-05-21)
... ...

## WARNING: THIS CODE IS VERY RAW AND PROBABLY VERY BUGGY! ## Introduction This is the blc (Binary Lifting Contraption) plugin for IDA Pro. It is the Bastard love child of Ghidra's decompiler with Ida Pro. The plugin integrates Ghidra's decompiler code into an Ida plugin an provides a basic decompiler capability for all platforms support by both Ida and Ghidra. It provides a basic source code display that attempts to mimic that of the Hex-Rays decompiler. It has only been written with Ida 7.x in mind. ## BUILDING: On all platforms you should clone blc into your IDA SDK's plugins sub-directory so that you end up with `/plugins/blc`. This is because the build files all use relative paths to find necessary IDA header files and link libraries. ### Build blc for Linux / OS X: Use the include Makefile to build the plugin. You may need to adjust the paths that get searched to find your IDA installation (`/Applications/IDA Pro N.NN` is assumed on OSX and `/opt/ida-N.NN` is assumed on Linux, were N.NN is derived from the name of your IDA SDK directory eg `id***k73` associates with `7.3` and should match your IDA version number). This is required to successfully link the plugin. ``` $ cd /plugins/blc $ make ``` Compiled binaries will end up in `/plugins/blc/bin` ``` LINUX ------------------------------------------- | ida | ida*** | ------------------------------------------- IDA 7.x | | | plugin | blc.so | blc***.so | ------------------------------------------- OS/X ------------------------------------------- | ida | ida*** | ------------------------------------------- IDA 7.x | | | | plugin | blc.dylib | blc***.dylib | ------------------------------------------- ``` Copy the plugin(s) into your `/plugins` directory and blc should be listed as an available plugin for all architectures supported both Ida and Ghidra. ### Build blc for Windows Build with Visual Studio C++ 2017 or later using the included solution (`.sln`) file (`blc.sln`). Two build targets are available depending on which version of IDA you are using: ``` ----------------------------------------- | ida | ida*** | ----------------------------------------- IDA 7.x | Release/x*** | Release***/x*** | plugin | blc.dll | blc***.dll | ----------------------------------------- ``` Copy the plugin(s) into your `/plugins` directory and blc should be listed as an available plugin for all architectures supported by both Ida and Ghidra. ## INSTALLATION Assuming you have installed IDA to ``, install the plugin by copying the compiled binaries from `/plugins/blc/bin` to `/plugins` (Linux/Windows) or `/idabin/plugins` (OS X). The plugin is dependent on Ghira processor specifications which you will need to copy over from your own Ghidra installation. Installing Ghidra is a simple matter of unzipping the latest Ghidra release, for example: https://ghidra-sre.org/ghidra_9.1_PUBLIC_20191023.zip Within the extracted Ghidra folder, you will find a `Ghidra` subdirectory which, in turn, contains a `Processors` subdirectory. The decompiler needs access to files contained under `Ghidra/Processors`. By default the plugin looks for the environment variable `$GHIDRA_DIR` which it expects to point at your Ghidra installation folder such that `$GHIDRA_DIR/Ghidra/Processors` exists. If `$GHIDRA_DIR` is not set, then the plugin expects to find `/plugins/Ghidra/Processors` which you may create with a symlink or by copying the approprate directories from your Ghidra installation. ### Pre-built binaries: As an alternative to building the plugin yourself, pre-built binaries for IDA 7.x (Windows, Linux, OS X) are available in the `blc/bins` directory. ## USING THE PLUGIN With the plugin installed, open a binary of interest in IDA. In order for the plugin to be become available, the binary's architecture must be supported by both Ida and Ghidra. With the cursor placed inside the body of an Ida function, select `Edit/Plugins/Ghidra Decompiler`. A successful decompilation (which may take a bit of time, will open a new window containing the C source generated by Ghidra's decompiler. Within the source window, you may double click on a function name to decompile tht function. Double clicking on a global data name will navigate you to that symbol in the Ida disassembly view. The `ESC` key will navigate back to a previous function, or close the source viewer if there is no previous function. The `N` hot key may be used to rename any symbol in the source view. When a symbol in the source view corresponds to a symbol in the Ida disassembly, the symbol will also be renamed in the disassembly. ## POTENTIAL FUTURE WORK * Allow user to set data types for symbols in the source view * Provide IDA derived type information to the decompiler so that it can do a better job with things like structures and pointer dereferencing * Better (at least some) support for string literals * Investigate what settings/info are necessary to get this standalone decompiler to yield results identical to Ghidra's. Is this symbol information? Type information? arch/platform/compiler settings?

近期下载者

相关文件


收藏者