PIE Relocation: Tagging Addresses

In a Position-Independent Executable (PIE), absolute addresses aren't "tagged" directly within the machine code. Instead, the linker creates a separate list of instructions and data locations that need fixing, and this list is stored in a special section of the binary called the relocation table. The dynamic loader uses this table at runtime to patch the code with the correct memory addresses once the binary's actual location in memory is known. The Core Mechanism: Linker and Loader Teamwork 🤝 Think of it like moving into a new apartment building. You…

Understanding Binary File Components

Symbol Table Think of the symbol table as a directory for the "named things" within your code, like functions and global variables. When you compile a source file, the compiler creates an object file. This object file contains the machine code for your functions and space for your global variables, but it doesn't yet know the final memory addresses of everything. The symbol table maps these symbolic names (e.g., my_function, global_variable) to their locations within the object file. This is vital for the linker, the tool that combines multiple object files and libraries…

Uncovering Supply Chain Attack with Code Genome Framework

This talk from IBM Research focuses on using AI and machine learning to combat supply chain attacks. The presenters highlight the increasing lack of trust in software due to major security breaches like the XZ backdoor. Here are the key takeaways: The Problem: There's a "semantic gap" between what code is expected to do and what it actually does. This gap is exploited in supply chain attacks where malicious code is hidden in software updates or open-source projects. The Solution: The researchers introduce the "Code Genome Framework," an…