Ghidra 101: Slice Highlighting

Ghidra 101: Slice Highlighting
In this blog series, I will be putting the spotlight on useful Ghidra features you may have missed. Each post will look at a different feature and show how it helps you save time and be more effective in your reverse engineering workflows. Ghidra is an incredibly powerful tool, but much of this power comes from knowing how to use it effectively.In this post, I will be discussing what slice highlighting is and how it helps us visualize relationships between variables to better understand a program. Before we can discuss how to use slice highlighting in Ghidra, I’d like to take a moment to introduce the concept of program slicing. In terms of software reverse engineering, program slicing is a way of abstracting code into smaller groups of statements known as slices. Slices are formed by following how a particular variable’s value affects or is affected by the values of other variables. The Ghidra Decompiler exposes functionality to quickly apply highlighting to visualize these program slices.The easiest way to access slice highlighting within Ghidra is to right-click on a variable in the Decompiler:

It is important to note that the slice highlighting options are only available when the cursor is at a variable whose value is being used or set. Slice highlighting is not available in the context menu if the cursor is at a variable declaration or a program point where the address of operator (&) is being used. The Highlight Forward Slice action will highlight variables whose values are affected by the value of the variable under the cursor.

In the above example, a forward slice was requested for inde ..

Support the originator by clicking the read the rest link below.