-
Notifications
You must be signed in to change notification settings - Fork 144
/
bindiff_config.proto
306 lines (255 loc) · 8.97 KB
/
bindiff_config.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
// Copyright 2011-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package security.bindiff;
option java_package = "com.google.security.zynamics.bindiff";
option java_outer_classname = "BinDiffProtos";
message Config {
// Next id: 14
// Configuration version. Should be at least "7" for proto based configuration
// files.
int32 version = 1;
// The BinDiff installation directory.
// Directory layout on Linux and Windows:
// <directory>/bin (BinDiff binaries, bindiff.jar)
// <directory>/jre (Bundled JRE)
// <directory>/libexec (Linux: location of bindiff_config_setup)
//
// On macOS, BinDiff uses an application bundle with a different directory
// layout rooted in "bundle_dir", with "directory" below it:
// <bundle_dir>/Contents/app (bindiff.jar)
// <bundle_dir>/Contents/MacOS <directory>
// <bundle_dir>/Contents/MacOS/bin (BinDiff binaries)
// <bundle_dir>/Contents/MacOS/BinDiff (Launcher)
// <bundle_dir>/Contents/runtime/Contents/Home (Bundled JRE)
string directory = 2;
message UiLaunchOptions {
// The java executable used to start the UI. If empty, BinDiff will try to
// auto-detect a suitable JVM.
string java_binary = 1;
// Additional Java VM arguments
repeated string java_vm_option = 2;
// Maximum heap size for the Java VM. If set to zero, 75% of physical RAM
// will be set.
int32 max_heap_size_mb = 3;
// Local IP address and port where the UI should listen on to serve visual
// diff requests. If empty (or zero in case of port), "localhost" and port
// 2000 will be used.
string server = 4;
int32 port = 5;
// Number of times BinDiff should try to launch the UI.
int32 retries = 6;
}
UiLaunchOptions ui = 3;
message IdaProOptions {
// The IDA Pro installation directory. If empty, the BinDiff plugin will
// populate this field with the result of calling idadir(). The BinDiff
// UI will simply ask the user.
string directory = 1;
// Whether to export IDA Pro databases using an x86/x86-64 specific
// heuristic to determine whether a function returns. If unset, defaults
// to "false".
bool binexport_x86_noreturn_heuristic = 2;
}
IdaProOptions ida = 4;
reserved 5, 6; // Binary Ninja, Ghidra
// How many BinDiff threads to use when batch-diffing. Use 0 or -1 for the
// number of hardware threads present in the system.
int32 num_threads = 7;
message LogOptions {
enum LogLevel {
LOG_LEVEL_UNSPECIFIED = 0;
DEBUG = 1;
INFO = 2;
WARNING = 3;
ERROR = 4;
OFF = 5;
}
// Minimum log level
LogLevel level = 1;
// Whether to write a log file
bool to_file = 2;
// Log into this directory. If empty, uses a path under the per-user
// BinDiff directory (i.e. "~/.bindiff/logs").
string directory = 3;
// Whether to also log to standard error
bool to_stderr = 4;
}
LogOptions log = 8;
message BinaryFormatOptions {
// Whether to include demangled function names in the binary database
// format. The default is to include them.
bool exclude_function_names = 1;
}
BinaryFormatOptions binary_format = 9;
message MatchingStep {
string name = 1;
double confidence = 2;
}
// For documentation on the various algorithms, see the BinDiff manual
// at https://zynamics.com/bindiff/manual/index.html#N2038E.
// If empty, built-in settings will be used. Note that order matters and
// duplicates will be ignored, keeping steps that were added first.
repeated MatchingStep function_matching = 10;
// See https://zynamics.com/bindiff/manual/index.html#N20496.
// The comments for function_matching also apply here.
repeated MatchingStep basic_block_matching = 11;
message UiTheme {
message ThemeFont {
string family = 1;
int32 size = 2;
}
// A color gradient for visualizing similarity. Should contain 256 colors.
// All colors should be specified in the form of standard hex triplets:
// #RRGGBB.
repeated string similarity_ramp = 1;
// Color for manually assigned matches. Not used by all disassembler
// plugins/UIs.
string manual_match = 2;
// Colors for graph nodes
string text = 3;
string address = 4;
string mnemonic = 5;
string symbol = 6;
string immediate = 7;
string operator = 8;
string register = 9;
string size_prefix = 10;
string dereference = 11;
string operator_separator = 12;
string stack_variable = 13;
string global_variable = 14;
string jump_label = 15;
string function = 16;
string comment = 17;
// Color gradient for single graph windows
repeated string background = 18;
// Color gradient for the primary side of a graph match
repeated string background_primary = 19;
// Color gradient for the secondary side of a graph match
repeated string background_secondary = 20;
ThemeFont ui = 21;
ThemeFont code = 22;
}
// Maps names to themes
map<string, UiTheme> themes = 12;
message UiPreferences {
// Filename of the default workspace that BinDiff loads automatically.
string default_workspace = 1;
message HistoryOptions {
string new_diff_primary_dir = 1;
string new_diff_secondary_dir = 2;
string directory_diff_primary_dir = 3;
string directory_diff_secondary_dir = 4;
string add_existing_diff_dir = 5;
repeated string recent_workspace = 6;
}
HistoryOptions history = 2;
message LayoutOptions {
int32 x = 1;
int32 y = 2;
int32 width = 3;
int32 height = 4;
// Used to check for changes in screen resolution to avoid placing windows
// of screen.
int32 screen_width = 5;
int32 screen_height = 6;
bool maximized = 7;
int32 divider_position = 8;
}
LayoutOptions layout = 3;
string use_theme = 4;
message GraphLayoutOptions {
enum GraphLayout {
GRAPH_LAYOUT_UNSPECIFIED = 0;
HIERARCHICAL = 1;
ORTHOGONAL = 2;
CIRCULAR = 3;
}
GraphLayout layout = 1;
bool auto_layout = 2;
bool draw_bends = 3;
// A value of 0 disables animations, 1-10 set the speed.
int32 animation_speed = 4;
enum LayoutOrientation {
LAYOUT_ORIENTATION_UNSPECIFIED = 0;
HORIZONTAL = 1;
VERTICAL = 2;
}
message HierarchicalLayoutOptions {
enum HierarchicalLayoutStyle {
HIERARCHICAL_LAYOUT_STYLE_UNSPECIFIED = 0;
DEFAULT = 1;
ORTHOGONAL_EDGE_ROUTING = 2;
}
HierarchicalLayoutStyle style = 1;
LayoutOrientation orientation = 2;
int32 min_layer_distance = 4;
int32 min_node_distance = 5;
}
HierarchicalLayoutOptions hierarchical_options = 5;
message OrthogonalLayoutOptions {
enum OrthogonalLayoutStyle {
ORTHOGONAL_LAYOUT_STYLE_UNSPECIFIED = 0;
DEFAULT = 1;
TREE = 2;
}
OrthogonalLayoutStyle style = 1;
LayoutOrientation orientation = 2;
int32 min_node_distance = 3;
}
OrthogonalLayoutOptions orthogonal_options = 6;
message CircularLayoutOptions {
enum CircularLayoutStyle {
CIRCULAR_LAYOUT_STYLE_UNSPECIFIED = 0;
COMPACT = 1;
ISOLATED = 2;
SINGLE_CIRCLE = 3;
}
CircularLayoutStyle style = 1;
int32 min_node_distance = 2;
}
CircularLayoutOptions circular_options = 7;
message ProximityBrowsingOptions {
bool enabled = 1;
int32 auto_enable_threshold = 2;
int32 child_depth = 3;
int32 parent_depth = 4;
int32 visibility_warn_threshold = 5;
}
ProximityBrowsingOptions proximity_browsing = 8;
// Sensitivity steps range from 0 to 9
int32 scroll_sensitivity = 9;
bool show_scrollbars = 10;
int32 zoom_sensitivity = 11;
enum MouseWheelAction {
MOUSE_WHEEL_ACTION_UNSPECIFIED = 0;
ZOOM = 1;
SCROLL = 2;
}
MouseWheelAction wheel_action = 12;
bool view_synchronization = 13;
}
GraphLayoutOptions call_graph_options = 5;
GraphLayoutOptions flow_graph_options = 6;
message DebugOptions {
bool show_debug_menu = 1;
bool show_super_graph = 2;
}
// Debug settings. These are loaded by the UI, but modifications are not
// written back.
DebugOptions debug = 7;
}
UiPreferences preferences = 13;
}