proomt

Search

Search posts, papers, and topics

Hall of Fame

Hall of FameAleph One199631 min readtutorialintermediate

Smashing the Stack for Fun and Profit

Summary

The article explains how stack‑based buffer overflows work on x86 Linux, showing stack layout, how overwriting the saved return address can hijack control flow, and demonstrates a simple C exploit. It remains a foundational guide for understanding classic memory‑corruption attacks.

  • Stack frames store saved EBP, return address, then locals; overflowing a local buffer can overwrite the saved return address.
  • Overwriting the return address with attacker‑controlled data redirects execution to injected shellcode or arbitrary code.
  • The article shows how to compute the offset (e.g., 12 bytes) from a buffer start to the return address on a 32‑bit stack.
  • A minimal C exploit modifies the return address to skip code, demonstrating control‑flow hijacking.

Security engineers and low‑level C developers should care because stack overflows are the basis of many classic exploits and understanding them is essential for building and defending modern software.

8/10

Related reading

  1. Trusting-Trust Attack against an Entire Linux Distribution through Binary Manipulation

    The authors show that the classic trusting‑trust attack is not limited to compilers: by tampering with GNU strip they can inject a payload that propagates through NixOS's bootstrap and ends up in almost every binary of the final system. The attack succeeds on a real nixpkgs revision, building a full graphical installer while backdooring the majority of its binaries.

    arXiv cs.SE (Software Engineering)arxiv.org1 minpaperHN24159
  2. Measuring the Checker: Mutation Analysis for GPU-Kernel Benchmark Oracles

    The paper introduces mutation analysis as a quantitative adequacy metric for GPU‑kernel benchmark oracles. By injecting 10,303 deterministic faults into 188 verified CUDA kernels (7,384 with a known kill witness), they show the official KernelBench checker misses 16.9% of faults—especially 78.6% of precision‑related faults. Their analysis quantifies the impact of existing patches (e.g., KernelBen…

    Hugging Face Daily Papersarxiv.org1 minpaper