How can binary packing be used in mobile security?

Duane Chambers
2 min readSep 1, 2023
Binary packing can be used in mobile security to protect mobile applications against threats such as reverse engineering, tampering, and intellectual property theft.

Binary packing can be used in mobile security to provide mobile app security against threats such as reverse engineering, tampering, and intellectual property theft. Here’s how binary packing can be utilized to increase mobile security:

  • Codification Obfuscation: Binary packing often results in code obfuscation, making it more challenging for attackers to understand a program’s logic, control flow, and algorithms. Obfuscated code is harder to analyze, thus decreasing reverse engineering risks.
  • Anti-Tampering: Binary packing provides anti-tampering measures by encrypting executable code and including a runtime unpacking routine to the application, effectively blocking attackers from directly changing or altering it. Should an attempt at modification fail due to runtime unpacking process failure, protecting the integrity of the application.
  • Intellectual Property Protection: Mobile applications often include proprietary algorithms and techniques that developers want to keep secret, so binary packing makes it harder for attackers to access this sensitive information within its code.
  • Dynamic Unpacking: Binary packing involves adding a runtime routine that unpacks and decrypts compressed code, adding another level of complexity for attackers. Furthermore, this dynamic unpacking process may utilize various anti-analysis techniques, which make it hard for automated tools to analyze the code accurately.
  • Advanced Obfuscation Techniques: Binary Packing can incorporate advanced techniques, including control flow, string encryption, and API call obfuscation. These measures impede reverse engineering efforts by making code more convoluted and challenging to comprehend.
  • Beating Automated Tools: Attackers often utilize automated tools and scripts for reverse engineering. However, binary packing may compromise these efforts as these may no longer accurately unpack and analyze code due to additional runtime layers.
  • Customizability: Certain binary packing tools allow for customization of their packing process, giving developers control to select an obfuscation and security level that meets the needs of their app.
  • Variability: Some binary packing techniques introduce variation into their packed binaries, making it even harder for attackers to create consistent reverse engineering processes.

Binary packing is not a guaranteed solution and comes with challenges and limitations. Implementing binary packing requires skilled experts to avoid compatibility issues or performance bottlenecks; additionally, determined attackers might still be able to reverse engineer packed binaries without much difficulty. Therefore, binary packing should only be considered part of an overall mobile app security strategy, including secure coding practices, code review, threat modeling, and runtime security mechanisms.

Developers considering binary packing as part of their mobile app security approach should carefully assess its tradeoffs, identify threats they want to reduce and select a reputable and well-supported packing solution that suits their application’s specific requirements.

I recommend visiting NIST and Zimperium’s Mobile Security Glossary to learn more about mobile security.

--

--

Duane Chambers

I provide advisory services for corporations and executives regarding network architecture, test design/execution, network virtualization and datacenter design.