Reverse Engineering with Ghidra

Provided by

Enquire about this course

Overview

The need for reverse engineering binary software components arises in more and more contexts every day. Common cases include analysis of malicious software such as viruses, worms, trojans and rootkits, analysing binary drivers in order to develop open-source drivers for alternate platforms, analysing closed source software for security flaws, and source code recovery in legacy systems.

The first step in such an analysis is generally the acquisition of a high-quality disassembly of the binary component. Ghidra was developed at the US National Security Agency to meet or exceed the capabilities provided by modern commercial disassemblers. Ghidra is free to download, install, and use and is capable of disassembling and decompiling machine languages for a large number of microprocessors and microcontrollers. This course will cover essential background material for effective reverse engineering before diving into the features you will find most useful when using Ghidra for your reverse engineering tasks.

Course Structure: The course consists of 40 hours of instruction over five days, combining lectures with targeted hands-on exercises designed to familiarize the student with the capabilities of Ghidra and its uses in analysing various types of binary files. Students are provided with digital copies of all materials used throughout the course.

+

Prerequisites

Remember that this course is practical and of an extremely technical nature, so a basic understanding of assembly language (preferably x86), C/C++ programming, and software security is a course prerequisite.

Who Should Attend?

Information security officers, anti-virus vendors, vulnerability researchers, security consultants, software developers and other nice people will all benefit from the techniques presented in this class.

What to bring: Students will be provided access to a desktop computer running Windows 10 with all necessary software to complete the training already installed.

+

Delegates will learn how to

The course will provide an overview of disassembler theory followed by a review of the structure of compiler generated code. Armed with that background information, you will be introduced to Ghidra;s features and learn how it can assist you in determining the behaviour of various binary files. The course will cover the basics of the Ghidra interface including the many informational displays it contains before moving on to function calling conventions, stack frame analysis, and how to recognize and understand complex data structures including C++ classes. Coverage of Ghidra;s decompiler will be woven throughout the course. Next, the use of Ghidra in a collaborative reverse engineering environment will be discussed.

The course then moves on to cover Ghidra function identification databases and how to use them effectively, creation of custom data type archives, and using Ghidra to patch binaries. Ghidra;s programming API;s including the Java and Python scripting API;s are then covered along with using Ghidra in headless mode. After discussing how to integrate Ghidra module development into the Eclipse platform, we will discuss the creation and use of plugins, loader modules, and processor modules. Finally, the course will wrap up with a dive into using Ghidra;s debugger for simple debugging tasks as well as more advanced uses such as de-obfuscating malware.

+

Outline

Each student will be provided with many example binaries that will be used throughout the course to demonstrate the capabilities of Ghidra. The binaries run the range from simple demonstrations to real world examples of obfuscated malicious code. These binaries will be used in both instructor-led discussions and individual exercises to reinforce disassembly concepts and familiarize the student with a wide range of Ghidra capabilities. In addition to sample binaries, students will be provided with valuable reverse engineering reference material including sample Ghidra scripts and plugins.
  • Assumptions / Expectations
  • Basic Disassembly Theory Linear Sweep
  • Recursive Descent
  • Binary File Format Basics
  • Ghidra Background Feature summary
  • Getting Started with Ghidra Initial file import, loading, and analysis
    • Disassembly interfaces Text view
    • Graph view
    • Introduction to the decompiler
    • Navigating in Ghidra
    • Ghidra name generation
    • Basic Ghidra editing Renaming
    • Comments
    • Customizing the disassembly listing
  • Review of Ghidra displays Bytes view
  • Memory Map view
  • Data Type Manager
  • Strings view
  • Strings
  • Stack Frame Review Calling conventions
  • Stack frame layouts
  • Ghidra stack related views
  • Working with Complex Data Types Arrays
    • Structs Stack allocated
    • Heap allocated
  • Collaborative reverse engineering with Ghidra Setting up a Ghidra collaboration server
  • Ghidra Data Type Archives
  • Reversing C++ Vtables
  • RTTI
  • Library Code Identification Identifying static libraries
  • Generating and using function identification databases
  • Building Custom Type Libraries
  • Binary Patching
  • Using Headless Mode
  • The Ghidra programming API;s
  • Java
  • Python/Jython
  • Java
  • Python/Jython
  • Configuring a build environment
  • Useful plugin APIs
  • Building and installing plugins
  • Loaders overview
  • Useful loader APIs
  • Building and installing loaders
  • Processor module overview
  • Introduction to SLEIGH and P-code
  • Debugger overview
  • Debugger interfaces
  • Conditional breakpoints and tracing
  • Exception handling
    • Obfuscated code analysis Memory dumping
    • Import table reconstruction
  • Ghidra Scripting
  • Eclipse integration
  • Ghidra Plugins Modules
  • Ghidra Loader Modules
  • Ghidra Proccessor Modules
  • The Ghidra Debugger
About your Instructor

Chris Eagle is a Senior Lecturer of Computer Science at the Naval Postgraduate School (NPS) in Monterey, CA. A computer engineer/scientist for over 35 years, his research interests include computer network operations, computer forensics and reverse/anti-reverse engineering. He was the chief architect of the competition infrastructure for DARPA;s Cyber Grand Challenge. He has been a speaker at conferences such as Black Hat, Shmoocon, and Defcon and is the author of 'The IDA Pro Book' and "The Ghidra Book". In his spare time he is an inveterate CTF player and has twice won the prestigious capture the ag competition at Defcon.

+

Enquire

Start date Location / delivery
No fixed date United Kingdom Book now
01132207150 01132207150

Related article

The Cyber Pulse is QA's new portal to free Cyber content, including on-demand webinars, articles written by leading experts,