Moocable is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

MacOS Dylib Injection through Mach-O Binary Manipulation

Description

This workshop is designed for those looking to develop offensive tooling or learning the technique for defense purposes. The content will cover developing stager code and shellcode for dynamic library injection in macOS environments (Mojave 10.14 & Catalina 10.15) with Golang compiled binaries. The topics covered will include compiling Go dylibs, parsing Mach-O headers, binary code caves, binary entrypoint redirection, typical assembly routines used in shellcode, and understanding the Mach-O load order.

Tags

Syllabus

Introduction
Background
Compiling a Go dylib with C-Shared Build Mode
Parsing the Mach-O Header
Entrypoint Redirection
Loading the Dylib in Memory
Appendix

Online Course


MacOS Dylib Injection through Mach-O Binary Manipulation

Affiliate notice

This workshop is designed for those looking to develop offensive tooling or learning the technique for defense purposes. The content will cover developing stager code and shellcode for dynamic library injection in macOS environments (Mojave 10.14 & Catalina 10.15) with Golang compiled binaries. The topics covered will include compiling Go dylibs, parsing Mach-O headers, binary code caves, binary entrypoint redirection, typical assembly routines used in shellcode, and understanding the Mach-O load order.

Introduction
Background
Compiling a Go dylib with C-Shared Build Mode
Parsing the Mach-O Header
Entrypoint Redirection
Loading the Dylib in Memory
Appendix