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
- Build with -fPIC / PIE enabled (default in modern toolchains; find the flag or ancient toolchain that disabled it).
- 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 appReferences
Related checks (M7)
- Executable built without stack canaries
- iOS binary is not encrypted (cryptid = 0)
- On-device cryptocurrency mining code
- iOS build is debuggable (get-task-allow = true)
- Debuggable release (get-task-allow in code signature)
- Source maps shipped inside the app
- Large DEX code without R8 shrinking and obfuscation
- Framework that downloads and runs code after review