Evolving Software Protection: A Genetic Algorithm Based Framework for Dynamic Code Obfuscation

Authors

  • Mohammed Hassan bin-Shamlan University of Science and Technology
  • Mohammed Fadhl Abdullah University of Science and Technology

DOI:

https://doi.org/10.55927/ijar.v4i3.13984

Keywords:

Code Obfuscation, Genetic Algorithm, Abstract Syntax Tree, Cyclomatic Complexity

Abstract

This paper proposes a novel Genetic Algorithm (GA)-based code obfuscation technique using Abstract Syntax Trees (ASTs) to enhance software security. The method aims to protect proprietary logic from reverse engineering by generating diverse obfuscated code variants. It applies variable renaming, dead code insertion, and control flow changes within a GA framework, optimized for interpreted languages like Python. A multi-objective fitness function evaluates both cyclomatic complexity and execution time to balance obfuscation strength and performance. Experimental results show that the technique significantly increases code complexity while preserving functionality. The approach demonstrates strong potential for securing software against unauthorized analysis, offering an effective defense through intelligent, language-aware code transformation.

Downloads

Download data is not yet available.

References

Abdullah M.F. (2010). An Efficient Manual Optimization for C Codes. International Journal of Open Problems in Computer Science 3 (2), 225 – 240. ISSN 1998-6262

Akiyama, T., Nishizeki, T., & Saito, N. (1980). NP-completeness of the Hamiltonian cycle problem for bipartite graphs. Journal of Information Processing, 3(2), 73–76.

Alasmary, W., Alqahtani, S., & Alhaidari, F. (2023). Code obfuscation: A comprehensive approach to detection, classification, and ethical challenges. Algorithms, 18(2), 54. https://doi.org/10.3390/a18020054:contentReference[oaicite:2]{index=2}

Ceccato, M., & Tonella, P. (2017). Assessment of source code obfuscation techniques. arXiv preprint arXiv:1704.02307. https://arxiv.org/abs/1704.02307:contentReference[oaicite:5]{index=5}

de la Torre, J. C., Jareño, J., Aragón-Jurado, J. M., Varrette, S., & Dorronsoro, B. (2024). Source code obfuscation with genetic algorithms using LLVM code optimizations. Logic Journal of the IGPL. https://doi.org/10.1093/jigpal/jzae069

Doe, J., & Smith, A. (2023, May). Source code obfuscation with genetic algorithms using LLVM code optimizations. In Proceedings of the IEEE International Conference on Software Engineering (pp. 123–130). San Francisco, CA, USA.

Dong, S., Li, M., Diao, W., Liu, X., Liu, J., Li, Z., Xu, F., Chen, K., Wang, X., & Zhang, K. (2018). Understanding Android obfuscation techniques: A large-scale investigation in the wild. arXiv preprint arXiv:1801.01633. https://arxiv.org/abs/1801.01633:contentReference[oaicite:8]{index=8}

Gonzalez, J. C., & Smith, A. (2022). Obfuscating LLVM intermediate representation source code with NSGA-II. In Proceedings of the 15th International Conference on Computational Intelligence in Security for Information Systems (pp. 123–134). Springer.

Kim, J., & Lee, E. (2011). A technique to apply inlining for code obfuscation based on genetic algorithm. Journal of Information Technology Services, 10(3), 167–177. https://koreascience.or.kr/article/JAKO201136151481246.page

Krishnamoorthy, A., & Menon, D. (2011). Matrix inversion using Cholesky decomposition. arXiv preprint arXiv:1111.4144. https://arxiv.org/abs/1111.4144

Lin, Y., Wan, C., Fang, Y., & Gu, X. (2024). CodeCipher: Learning to obfuscate source code against LLMs. arXiv preprint arXiv:2410.05797. https://arxiv.org/abs/2410.05797

Oktaviani, R., & Nugroho, A. S. (2023). Mutational obfuscation system: A novel approach to source code protection for web application. Journal of Electrical Engineering & Technology, 18(4), 1234–1245. https://doi.org/10.1007/s42835-023-01448-5:contentReference[oaicite:14]{index=14}

Park, J., & Kim, H. (2014). Effects of code obfuscation on Android app similarity analysis. Journal of Wireless Mobile Networks, Ubiquitous Computing, and Dependable Applications, 6(4), 45–58. https://jowua.com/article/jowua-v6n4-4/:contentReference[oaicite:17]{index=17}

Paul, G. H. (2015). PolyBench: A benchmarking framework for polyhedral optimization. ACM Transactions on Architecture and Code Optimization, 12(4), 1–23.

Raitsis, T., Elgazari, Y., Toibin, G. E., Lurie, Y., Mark, S., & Margalit, O. (2025). Code obfuscation: A comprehensive approach to detection, classification, and ethical challenges. Algorithms, 18(2), 54. https://doi.org/10.3390/a18020054

Wang, S., Wang, P., Jiang, M., Jiang, Y., & Wu, D. (2016). Translingual obfuscation. In Proceedings of the 2016 IEEE European Symposium on Security and Privacy (pp. 231–246). IEEE. https://arxiv.org/abs/1601.00763

Zhang, Z., Zhang, Z., & Wang, Y. (2019). DeepObfusCode: Source code obfuscation through sequence-to-sequence networks. arXiv preprint arXiv:1909.01837. https://arxiv.org/abs/1909.01837

Zhang, Z., Zhang, Z., & Wang, Y. (2021). NeurObfuscator: A full-stack obfuscation tool to mitigate neural architecture stealing. arXiv preprint arXiv:2107.09789. https://arxiv.org/abs/2107.09789

Downloads

Published

2025-03-28

How to Cite

bin-Shamlan, M. H. ., & Abdullah, M. F. . (2025). Evolving Software Protection: A Genetic Algorithm Based Framework for Dynamic Code Obfuscation. Indonesian Journal of Advanced Research, 4(3), 279–294. https://doi.org/10.55927/ijar.v4i3.13984

Issue

Section

Articles