Thor

The exec() Lie: Linux Doesn’t Run Programs. It Mutates Security Contexts.

fork() clones. exec() mutates. The process survives. The risk survives. Here is how attackers weaponize the leftovers and how you stop them.

Thor's avatar
Thor
Jul 09, 2026
∙ Paid

Most engineers think fork() spawns and exec() launches.

Wrong.

Flowchart showing Linux exec() mutation: preserved attributes (file descriptors, environment, capabilities, PID/namespace/CWD) and replaced attributes (program code, memory map, stack/heap), mapped to five attack vectors (Ghost FD, LD_PRELOAD, Privilege Leftovers, PATH/Args, Fileless Mutation) and six defenses (FD_CLOEXEC, sanitized env, dropped caps, absolute paths, eBPF, SELinux/AppArmor). - THOR
Figure 1: The exec() attack surface – what survives, how attackers weaponize it, and how you stop it. - THOR

User's avatar

Continue reading this post for free, courtesy of Thor.

Or purchase a paid subscription.
© 2026 Isaac Thor · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture