Assisting Go Analysis and Reversing (AGAR) correctly detects 5 to 20x more strings in Go programs compiled for Linux than standalone IDA 9.2.
You can also use AGAR to demystify method calls on interface types.
As it relies on the function's AST and type information, AGAR may not work on stripped or obfuscated Go binaries (see tests).
Tested on
You can read the test evaluation script here. It runs the following scripts in sequence:
- Function retyper
- Slice rebuilder
- Interface rebuilder
- String detector
agar_string.mp4
- Press
Ctrl + Shift + Gor selectAGARfrom the plugins menu. - Specify the scope AGAR should work on. Note that each function in scope will be decompiled multiple times, so running analysis on all functions will take some time.
- Click
OKto run AGAR
agar_iface.mp4
- Right click on the interface type (struct field or local variable) and select "Specialize interface"
- Select the appropriate concrete implementation from the dropdown
Copy the contents of src to the IDA Plugins directory.
The test directory contains Go programs and Python scripts to assess AGAR's ability to analyze these programs when compiled to a variety of architectures.
Currently, there are 6 known failing tests:
- interface_detection-main/arm: Failure
- aes_gcm/amd64_stripped: Failure
- aes_gcm/windows_amd64: Failure
- itab_typedef_2/amd64_stripped: Failure
- itab_typedef_1/amd64_stripped: Failure
- itab_typedef_1/windows_amd64: Failure
This is primarily due to lack of type information in stripped binaries or binaries compiled for Windows.
To run the tests,
- Build the test binaries:
py build.py - Run the tests:
py runner.py
You will need IDA 9.2 with idalib configured.