Binary Lifting with Remill

Instructor: Duncan Ogilvie
Duration: 3 days
Format: On-site training with lectures and guided exercises.
Price: TBD
Registration: training@ogilvie.pl

Description

Binary lifting translates native machine code into an intermediate representation that can be analyzed and transformed with compiler infrastructure. This training teaches participants how to use Remill to lift binaries to LLVM IR and how to turn raw lifted output into code that can be analyzed, optimized, recompiled, and used for deobfuscation.

The course starts from first principles with LLVM IR. Participants learn how modules, functions, basic blocks, values, memory operations, phi nodes, select, getelementptr, intrinsics, and undefined behavior work. They read IR generated by Clang, write LLVM IR by hand, inspect optimization pipelines, and translate IR back into pseudo-C.

The second part moves from reading IR to building tools with the LLVM C++ API. Participants learn the LLVM object model, verification, Value/User relationships, isa/dyn_cast, PatternMatch, IRBuilder, and safe mutation patterns. Exercises focus on command-line tools that inspect, annotate, visualize, instrument, and transform bitcode.

The final part applies these foundations to Remill. Participants study Remill's architecture, instruction semantics, State, Memory, helper functions, and the lifting pipeline. They recover calling conventions, clean symbolic memory accesses, recover stack variables, handle external calls, extract stack strings, and use lifted IR for deobfuscation tasks such as MBA simplification and exception-based control-flow recovery.

Teaching

The training is exercise-driven. Each lecture block introduces a concept that is applied immediately in a practical task. Participants work inside a prepared development environment and build tools that become part of a lifting pipeline.

The course goal is independence. Participants learn how to diagnose verifier failures, optimizer surprises, unsupported instructions, wrong calling-convention assumptions, @RAM memory artifacts, and stack recovery failures using LLVM documentation, bc-annotate, source inspection, and incremental testing.

Binary lifting is a broad topic, so the class focuses on fundamentals and gives follow-up references for continued study.

Learning Objectives


Outline


Requirements and Recommendations

Prerequisites

Participants should be familiar with:

Workstation Requirements

Each participant needs their own workstation. The prepared environment requires:

After the training, the environment can be deployed offline with Docker.

Classroom Requirements

The training is delivered on-site only. A dedicated classroom with a projector is required. The training uses a collaborative format with frequent questions, live troubleshooting, and shared exercise discussion.

Register


Instructor

Duncan Ogilvie is the creator of x64dbg and has professional experience in DRM, mobile security, reverse engineering, and binary analysis tooling. The course materials focus on practical troubleshooting, transparent lifting internals, and tool-building. Duncan also authored Striga: Lifting x86 to LLVM IR with Python going over the design of a lifter.