You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- On Android binaries, fixes IDA completely messing up the arguments of functions for no reason
28
+
- Exporting
29
+
- Export function addresses for any platform
30
+
- Export function return types (if enabled, see [BromaIDA Settings](#bromaida-settings))
31
+
- Export function arguments' names (if enabled, see [BromaIDA Settings](#bromaida-settings))
25
32
26
33
## Installation
27
34
28
35
1. Get python, then `git clone https://github.com/CallocGD/PyBroma --recursive`, `cd PyBroma` then finally `python .\setup.py install` to install PyBroma (blame CallocGD for breaking `pip install https://github.com/CallocGD/PyBroma/archive/refs/heads/main.zip`)
29
-
1. Download the release/zip file
30
-
2. Copy `BromaIDA.py` and the `broma_ida` folder into `IDA_DIRECTORY/plugins`
36
+
2. Download the release/zip file
37
+
3. Copy `BromaIDA.py` and the `broma_ida` folder into `IDA_DIRECTORY/plugins`
31
38
32
39
## Usage
33
40
34
-
1.`Ctrl-Shift-B` to start importing/exporting
35
-
2. Browse and select the broma file (must have Extras.bro in the same directory if you want to import types)
41
+
1.`Ctrl-Shift-B`, or from the Top Bar (Edit -> Plugins -> BromaIDA) to start importing/exporting
42
+
2. Browse and select the Broma file
36
43
3. Let the script handle the rest and enjoy free/exported bindings
37
44
38
45
## Importing Types Requirements
39
46
40
-
To import types, you must have IDAClang and the headers for the target platform. Currently only tested with Windows and Android.
41
-
1. Open the target binary in IDA
42
-
2. In the top bar, select Options > Compiler, Source Parser: Clang. And in Include Directories, replace with the location of the header files
43
-
1. For Windows binary
44
-
1. Get MSVC Headers by installing MSVC using [Visual Studio Installer](https://visualstudio.microsoft.com/downloads)
45
-
2. Set the Include Directories to `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include`
46
-
2. For Android binaries (Android 64 and 32 bit)
47
-
1. First get gcc-arm-none-linux-gnueabihf (i did so by using scoop; `scoop install extras/gcc-arm-none-linux-gnueabihf`)
48
-
2. Then, in the Include Directories, set it to `C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\include\c++\13.3.1;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\include\c++\13.3.1\arm-none-linux-gnueabihf;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\libc\usr\include;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\lib\gcc\arm-none-linux-gnueabihf\13.3.1\include` (be sure to replace YOUR_NAME with your windows username)
49
-
3. Or use MSVC headers, but be sure to click "Yes" when prompted to use Custom GNU STL!
50
-
3. For MacOS (Intel and M1 Mac) and iOS binaries
51
-
1. First get gcc (i did so by using scoop; `scoop install gcc`)
52
-
2. Then, in the Include Directories, set it to `C:\Users\YOUR_NAME\scoop\apps\gcc\current\include\c++\13.2.0;C:\Users\YOUR_NAME\scoop\apps\gcc\current\include\c++\13.2.0\x86_64-w64-mingw32;C:\Users\YOUR_NAME\scoop\apps\gcc\current\x86_64-w64-mingw32\include` (be sure to replace YOUR_NAME with your windows username)
53
-
3. Or use MSVC headers, but again, be sure to click "Yes" when prompted to use Custom GNU STL.
54
-
3. Click on OK
55
-
56
-
Start the script and when prompted to import types, click yes, then the types will automatically be imported for you.
47
+
- To import types:
48
+
- You must have IDAClang.
49
+
- You must have the STL headers for the target platform (MSVC headers for Windows binary, GCC headers for the others). You can however use MSVC headers on binaries that aren't Windows (_but not the other way around_).
50
+
- Extras.bro **_must_** be in the same directory as the imported Broma file
51
+
52
+
- Get your STL Headers path (on Windows)
53
+
- For Windows binary (or if not using custom GNU STL)
54
+
1. Get MSVC Headers by installing MSVC using the [Visual Studio Installer](https://visualstudio.microsoft.com/downloads)
55
+
2. Your header path should be `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include`
56
+
- For Android binaries (Android 64 and 32 bit)
57
+
1. First get gcc-arm-none-linux-gnueabihf (i did so by using scoop; `scoop install extras/gcc-arm-none-linux-gnueabihf`)
58
+
2. Your header path should be `C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\include\c++\13.3.1;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\include\c++\13.3.1\arm-none-linux-gnueabihf;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\arm-none-linux-gnueabihf\libc\usr\include;C:\Users\YOUR_NAME\scoop\apps\gcc-arm-none-linux-gnueabihf\current\lib\gcc\arm-none-linux-gnueabihf\13.3.1\include` (be sure to replace YOUR_NAME with your windows username)
59
+
- For MacOS (Intel and M1 Mac) and iOS binaries
60
+
1. First get gcc (i did so by using scoop; `scoop install gcc`)
61
+
2. Your header path should be `C:\Users\YOUR_NAME\scoop\apps\gcc\current\include\c++\13.2.0;C:\Users\YOUR_NAME\scoop\apps\gcc\current\include\c++\13.2.0\x86_64-w64-mingw32;C:\Users\YOUR_NAME\scoop\apps\gcc\current\x86_64-w64-mingw32\include` (be sure to replace YOUR_NAME with your windows username)
62
+
63
+
1. Launch the BromaIDA plugin using Ctrl-Shift-B, or from the Top Bar (Edit -> Plugins -> BromaIDA)
64
+
2. Click on the Settings button
65
+
3. Follow the steps above to get and get your STL Headers path (be sure to check "Import Types")
66
+
- Once you get your STL Header path, paste it in the correct folder input. ("MSVC STL Directory" for MSVC, ...)
67
+
- If you **_aren't_** using custom GNU STL, be sure to **uncheck** "Use Custom [Android/Mac] GNU STL".
68
+
- If you **_are_** using custom GNU STL, be sure to **check** "Use Custom [Android/Mac] GNU STL", otherwise you won't be able to select the custom GNU STL path.
69
+
4. Exit out of the settings window
70
+
71
+
Start the script and the plugin will handle everything :)
72
+
73
+
## BromaIDA Settings
74
+
75
+
Can be accessed through the main popup by clicking on the "Settings" button.
76
+
This replaces the old "ask everything everytime" method.
77
+
78
+
Here you will find some options you can set, such as importing types, settings default parser parameters, etc...
79
+
The options you chose will be saved into a [shelf](https://docs.python.org/3/library/shelve.html) stored in the `IDA_DIRECTORY/plugins/broma_ida` folder.
80
+
81
+

82
+
83
+
## Utilities
84
+
85
+
This is section is meant for people who want to contribute.
86
+
87
+
In the `utils` folder, you can find some utilities that can help in contributing.
88
+
89
+
- Currently has:
90
+
-`tasks.json`: To be put in `/BromaIDA/.vscode`, adds 2 tasks for VSCode. "Install Plugin" will copy `BromaIDA.py` and the `broma_ida` to the `IDA_DIRECTORY/plugins` directory; And "Launch IDA v8.3" which will launch IDA (shocker). Just be sure to replace IDA's directory with your IDA installation directory.
57
91
58
92
## Thanks
59
93
60
-
Special thanks to [CallocGD](https://github.com/CallocGD)'s [PyBroma](https://github.com/CallocGD/PyBroma) which is used to import bindings from Broma.
94
+
- Special thanks to:
95
+
- The [IDAPython API](https://hex-rays.com/products/ida/support/idapython_docs): Used for everything.
96
+
-[CallocGD](https://github.com/CallocGD)'s [PyBroma](https://github.com/CallocGD/PyBroma): Used to parse imported Broma files.
97
+
-@sleepyut: Issuing 3 trillion bug reports. Also for suggesting a bunch of features. (they also made BromaBJ)
0 commit comments