medium · M7 · MASVS-RESILIENCE-1 · PTKD-BIN-NOPIE

    Executable is not position-independent (no PIE/ASLR)

    The Mach-O is not built with PIE, weakening ASLR and making memory-corruption exploitation easier.

    How it is exploited

    Without PIE, the binary loads at a fixed address, so ASLR cannot randomize it. Memory-corruption exploits get a stable layout to build ROP chains against.

    Why it matters

    One of the platform's core exploit mitigations is switched off for your code.

    How to fix it

    1. Build with -fPIC / PIE enabled (default in modern toolchains; find the flag or ancient toolchain that disabled it).
    2. Rebuild any bundled native libraries that were compiled without PIE.

    Does your app have this?

    PTKD checks your build or your source project for PTKD-BIN-NOPIE and every other check in this knowledge base.

    Scan your app

    References

    Related checks (M7)