Skip to content

Commit

Permalink
add to plugin manager? (#30)
Browse files Browse the repository at this point in the history
* Add plugin.json
  • Loading branch information
github-actions[bot] authored Feb 11, 2022
1 parent c1cdab6 commit d39078b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ___
Before we start, please make sure you have the following dependencies installed and available on your computer:

- At least [Python 3.8](https://www.python.org/)
- Latest stable release of [Binary Ninja (>=2.4)](https://binary.ninja/)
- Latest stable release of [Binary Ninja (>=3.0)](https://binary.ninja/)
- [astyle](https://code.tools/man/1/astyle/) for proper indentation of the decompiled code
- [libgraph-easy-perl](https://packages.ubuntu.com/source/focal/libgraph-easy-perl) only required for printing ASCII graphs

Expand All @@ -39,24 +39,24 @@ Under **Windows**, please make sure the **astyle**-binary has been added to the
Follow the steps below to setup dewolf as a GUI plugin for Binary Ninja.
Afterwards, you will be able to inspect decompiled code from a Binary Ninja dock.

#### Step 1:
#### Step 1:
Clone the dewolf repository into the Binary Ninja plugin folder which is located in one of the following paths corresponding to your operating system:

**Linux:** `~/.binaryninja/plugins`
**MacOS:** `~/Library/Application Support/Binary Ninja`
**Windows:** `%APPDATA%\Binary Ninja`
**Linux:** `~/.binaryninja/plugins`
**MacOS:** `~/Library/Application Support/Binary Ninja`
**Windows:** `%APPDATA%\Binary Ninja`

**Attention:**
If you want to use a python virtual environment, make sure it is enabled for the next steps and also when starting Binary Ninja.

#### Step 2:
#### Step 2:
Install dewolf's python dependencies with:

```bash
pip install -r requirements.txt
```

#### Step 3:
#### Step 3:
Install Binary Ninja python API with:

```bash
Expand All @@ -69,7 +69,7 @@ python <binaryninja_path>/scripts/install_api.py [-v if using virtualenv]
___
## Usage
The dewolf decompiler can be used from both the command line and within Binary Ninja.
The dewolf decompiler can be used from both the command line and within Binary Ninja.
### GUI
After enabling the dewolf decompilation dock widget via **View > Other Docks > Show Dewolf**, the decompiled code for the currently active symbol will be displayed.
Expand Down Expand Up @@ -102,7 +102,7 @@ Please use the `--help` flag for more information.
___
## Configuration
dewolf has multiple configuration options of which some are configurable via the GUI.
dewolf has multiple configuration options of which some are configurable via the GUI.
### via GUI
You can configure dewolf from the Binary Ninja GUI by navigating to **Edit > Preferences > Settings** or by pressing <kbd>Ctrl</kbd> + <kbd>,</kbd>.
Expand Down
33 changes: 33 additions & 0 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"pluginmetadataversion": 1,
"name": "dewolf Decompiler",
"type": ["helper","ui"],
"api": ["python3"],
"description": "Research Decompiler to generate a C-like function representation",
"longdescription": "# dewolf\n\n<img src='assets/logo.png' width='200'>\n\ndewolf is a research decompiler we developed during a research cooperation from 2019 to 2021 between Germany (Fraunhofer FKIE) and Singapore (DSO National Laboratories).\n\nThe restructuring of dewolf is based on the former DREAM/DREAM++ approach [Yakdan et al. NDSS 2015, IEEE (SP) 2016].\n\nThe decompiler dewolf is implemented as a plugin for Binary Ninja and uses their Medium-Level intermediate language as the starting point.\nAlthough we consider dewolf to be pretty stable, it is still a research prototype and not extensively optimized for production use.\nConsequently, you will likely observe a few bugs or even decompilation failures when applying dewolf on real-world binaries.\n\n**If you encounter any bugs, please report them to us so that we can further improve dewolf. :)**\n\n## Usage\n\nAfter enabling the dewolf decompilation dock widget via **View > Other Docks > Show Dewolf**, the decompiled code for the currently active symbol will be displayed.\nIn the dewolf dock, it is possible to navigate through functions by double-clicking them.\n\n![Widget Menu](https://user-images.githubusercontent.com/12004321/145460440-be4b7dfd-bf7e-497f-a7af-1911bf3efc50.png)\n\nThe automatic decompilation of selected functions can be toggled with the *follow* button.\nDecompiled code is cached and can be generated again with the *decompile* button, e.g. after patching instructions in the binary view.\n\n![Widget](https://user-images.githubusercontent.com/12004321/145460476-f869e5cc-d585-4f53-8920-6ecfa4b346d5.png)\n\n## Configuration\ndewolf has multiple configuration options of which some are configurable via the GUI.\n\nYou can configure dewolf from the Binary Ninja GUI by navigating to **Edit > Preferences > Settings** or by pressing <kbd>Ctrl</kbd> + <kbd>,</kbd>.\nSearch for **dewolf** in the search bar and all dewolf related settings will be displayed.\n\n## Support\n\nIf you have any suggestions, or bug reports, please create an issue in the [Issue Tracker](https://github.com/fkie-cad/dewolf/issues).\n\nIn case you have any questions or other problems, feel free to send an email to:\n\n[[email protected]](mailto:[email protected]).",
"license": {
"name": "LGPL-2.1",
"text": "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
},
"platforms": ["Windows", "Linux", "Darwin"],
"installinstructions": {
"Windows": "## Install Dependencies\nPlease make sure you have the following dependencies installed and available on your computer:\n\n- At least [Python 3.8](https://www.python.org/)\n- Latest stable release of [Binary Ninja (>=3.0)](https://binary.ninja/)\n- [astyle](https://code.tools/man/1/astyle/) for proper indentation of the decompiled code\n\nUnder **Windows**, please make sure the **astyle**-binary has been added to the environment Path.",
"Linux": "## Install Dependencies\nPlease make sure you have the following dependencies installed and available on your computer:\n\n- At least [Python 3.8](https://www.python.org/)\n- Latest stable release of [Binary Ninja (>=3.0)](https://binary.ninja/)\n- [astyle](https://code.tools/man/1/astyle/) for proper indentation of the decompiled code\n\nUnder **Linux** (Ubuntu / Debian), you can use the following command to install **astyle**:\n\n```bash\nsudo apt install astyle\n```",
"Darwin": "## Install Dependencies\nPlease make sure you have the following dependencies installed and available on your computer:\n\n- At least [Python 3.8](https://www.python.org/)\n- Latest stable release of [Binary Ninja (>=3.0)](https://binary.ninja/)\n- [astyle](https://code.tools/man/1/astyle/) for proper indentation of the decompiled code\n\nUnder **Darwin** (macOS), you can use the following command to install **astyle**:\n\n```bash\nbrew install astyle\n```"
},
"dependencies": {
"pip": [
"-r requirements.txt"
],
"apt": [
"astyle"
],
"installers": [
"https://sourceforge.net/projects/astyle/files/latest/download"
],
"other": []
},
"version": "0.1",
"author": "fkie-cad",
"minimumbinaryninjaversion": 3233
}
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ isort
networkx
pydot
pygments
sympy == 1.4
numpy
scipy
pytest !=5.3.4
z3-solver == 4.8.10

0 comments on commit d39078b

Please sign in to comment.