lab experiment: understanding c structures in disassembled code using ghidra

Abstract
This is the lab that helps you to get familiar with the basic functions of Ghidra
and the C program structures in disassembled code.

1 goal of the lab
The goals of this lab include:
• Getting familiar with the steps of using Ghidra to disassemble a binary
code and create analysis results.
• Observing the C program patterns in the disassembled code using
Ghidra.

2 lab instructions
The lab consists of two steps. In the first step, binary codes are created for
different C structures. For the second step, Ghidra is used to disassemble the
constructed binary code

Creating Binary Codes with Different C Structures The binary codes
created by different compilers for the same source code can be different, but
this will not affect the experiment. You can either create the binary codes
under Windows or Linux.
• Creating binary codes with the following structures:
– Nested structure using if-else;
– Loop structure using for;
– Function call structure with returned value.
• In the compiling process, disable all optimization options.

Analyzing Created Binary Codes with Ghidra.
The created binary codes in
the previous step are analyzed using Ghidra here.
• Creating a Ghidra project to hold the created binary codes.
• For each binary code, running analysis to create corresponding disassembled code.
• Exanimating the assembly code and documenting the way a C structure
is implemented in the assembly code.

Last Completed Projects

topic title academic level Writer delivered