Git Product home page Git Product logo

amie's Introduction

AMIE

A Minimalist Instruction Extender

AMIE is a Python rework of FRIEND that focuses solely on the ARM architecture (only AArch32 and AArch64 are supported). It is both lightweight and dependency-free, and provides the most relevant and up-to-date information about the ARM system registers and instructions.

Features

Improved processor modules

For MCR/MRC and MCRR/MRCC instructions on AArch32, and for MSR/MRS and SYS instructions on AArch64, the system register encoding is detected and replaced by its user-friendly name in the IDA View subview.

For MCR/MRC and MSR/MRS instructions, it also applies to the Pseudocode subview.

Hints for instructions and registers

Hovering over a system register in the IDA View subview or in the Pseudocode subview will display a summary (usually kept under 30 lines) of the relevant documentation page, including the bitfield when available.

Hovering over an instruction mnemonic in the IDA View subview or in the Pseudocode subview will also display a summary of the relevant documentation page, and the relevant assembly template when available.

Auto-generated resource files

The biggest difference with FRIEND is that the resource files (aarch32.json and aarch64.json) are auto-generated from the Exploration Tools. The system registers and instructions (documentation and encodings) are extracted by a home-made script that parses the ARM-provided XML files.

Installation

Copy the plugin file amie.py, and its resource files aarch32.json and aarch64.json to your plugins directory or your user plugins directory (if you want to share it between multiple IDA Pro versions). These are the default paths:

OS Plugins Directory User Plugins Directory
Windows %PROGRAMFILES%\IDA 7.4\plugins %APPDATA%\Hex-Rays\IDA Pro\plugins
Linux ~/ida-7.4/plugins ~/.idapro/plugins
macOS /Applications/IDA Pro 7.4/idabin/plugins ~/.idapro/plugins

Dependencies

There are no dependencies! :-)

Improvements

Support for implementation-defined system registers is not available yet.

There is no Hex-Rays support for MCRR/MRRC as this is an IDA Pro limitation.

Credits

amie's People

Contributors

neatmonster 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

amie's Issues

AMIE causes IDA crash

Hi,
thanks for the awesome plugin. Unfortunately it has some rather weird side effects.
When this plugin is installed, opening the "Compiler" window (Options -> Compiler) causes an IDA crash.
If I remove this plugin, the crash is gone.
Version 7.2.181105 Linux x86_64 (32-bit address size)

Regards,
Robert

PS: I reported this issue also to hex-rays

is this project dead ?

Hello,

I'm thinking of porting this plugins to be compatible to IDA 8.2. Do you still maintain the project or it is dead ?

Exception while searching for instructions

Hi there.

I got this exception while searching for an instruction in the disassembly view.

Exception in ida_idp.IDP_Hooks dispatcher function: SWIG director method error. Error detected when calling 'IDP_Hooks.ev_out_insn'
Traceback (most recent call last):
  File "/home/patate/idapro-7.4/plugins/amie.py", line 354, in ev_out_insn
    return self.arch.output(outctx)
  File "/home/patate/idapro-7.4/plugins/amie.py", line 251, in output
    mne, op = cp_reg.split()
ValueError: not enough values to unpack (expected 2, got 1)

Not correctly handling the case where "authored" is null in json

What happened?

Every time I move the mouse over a MUL Instruction(e.g. MUL X1, X1, X2), idapython prints this error message

Exception in ida_kernwin.UI_Hooks dispatcher function: SWIG director method error. Error detected when calling 'UI_Hooks.get_custom_viewer_hint'
Traceback (most recent call last):
  File "//xxxxx/ida-pro/plugins/amie.py", line 370, in get_custom_viewer_hint
    hint = self.arch.hint(place.toea(), tag, val)
  File "//xxxxx/ida-pro/plugins/amie.py", line 131, in hint
    desc += "\n\n" + "\n".join(insn["templates"][tmpl_name])
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

Possible reasons

By reading the source code, I think this is because the value of "authored" field of the MUL instruction in aarch64.json is null.

      "MUL_MADD": {
        "authored": null,
        "heading": "MUL",
        "templates": {
          "GENERAL": [
            "MUL  <Wd>, <Wn>, <Wm>",
            "MUL  <Xd>, <Xn>, <Xm>"
          ]
        }
      },

I don't know why "authored" is set to null, it might be a bug with the parser for generating aarch64.josn. But I think it would be good to add the handling of None type in amie.py

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.