A Method to Quantitative Compare Obfuscating Ttransformations

Cover Page

Cite item

Full Text

Abstract

The paper considers the problem of quantitative comparison of potency and resistance of practically applied obfuscating transformations of program code. A method is proposed to find the potency and resistance of transformations by calculating the «comprehensibility» of the obfuscated and deobfuscated versions of a program, respectively. As a measure of program comprehensibility, it is proposed to use the similarity of this program to the approximation of its «most comprehensible» version. Based on the proposed method a model to assess potency and resistance was built, the main elements of which are: a set of investigated obfuscating transformations, a similarity function, a method to approximate the most comprehensible version of the program and a deobfuscator. To implement this model 1) obfuscating transformations provided by Hikari obfuscator are chosen; 2) 8 similarity functions are constructed by machine learning methods using static characteristics of programs from CoreUtils, PolyBench and HashCat sets; 3) the smallest program version was chosen as an approximation of the most comprehensible program version (found among the versions obtained using optimization options of GCC, Clang and AOCC compilers); 4) a program deobfuscation scheme based on the optimizing compiler from LLVM was built and implemented. The results of the potency and resistance for sequences of transformations of lengths one, two and three were experimentally obtained. These results showed consistency with the results of independent potency and resistance evaluations obtained by other methods. In particular, it was found that the highest potency and resistance are demonstrated by sequences of transformations starting with transformations of the control flow graph, and the lowest resistance and potency are generally demonstrated by sequences that do not contain such transformations.

About the authors

P. D Borisov

FSASE SRI "Specvuzavtomatika"

Email: borisovpetr@mail.ru
Goroda of Volos St. 6

Yu. V Kosolapov

I.I. Vorovich Institute of Mathematics, Mechanics and Computer Sciences of the Southern Federal University (SFedU)

Email: yvkosolapov@sfedu.ru
Milchakova St. 8а

References

  1. Akhunzada A., Sookhak M, Anuar A.B., Gani A., Ahmed E., Shiraz M., Furnell S., Hayat A., Khan M.K. Man-At-The-End attacks: Analysis, taxonomy, human aspects, motivation and future directions // Journal of Network and Computer Applications. 2015. vol. 48. pp. 44–57.
  2. Undrits R., Resende J. et. al. CyberSec4Europe D3.23: Cybersecurity Outlook 2. Research Report D3.23. 2022. pp. 1–82.
  3. Biernacki L., Gallagher M., Xu Z., Aga M.T., Harris A., Wei S., Tiwari M., Kasikci B., Malik S., Austin T.. Software-driven security attacks: From vulnerability sources to durable hardware defenses // ACM Journal on Emerging Technologies in Computing Systems (JETC). 2021. vol. 17. no. 3. pp. 1–38.
  4. Варновский Н.П., Захаров В.А., Кузюрин Н.Н., Шокуров А.В. Современное состояние исследований в области обфускации программ: определения стойкости обфускации // Труды Института системного программирования РАН. 2014. Т. 26. № 3. С. 167–198.
  5. Barak B., Goldreich O., Impagliazzo R., Rudich S., Sahai A., Vadhan S., Yang K. On the (im) possibility of obfuscating programs // Journal of the ACM (JACM). 2012. vol. 59. no. 2. pp. 1–42.
  6. Zobernig L. Mathematical Aspects of Program Obfuscation. Doctoral dissertation. ResearchSpace@ Auckland, 2020. URL: www.math.auckland.ac.nz/~sgal018/Lukas-Zobernig-Thesis.pdf (дата обращения: 19.06.2023).
  7. Garg S., Gentry C., Halevi S., Raykova M., Sahai A., Waters B. Candidate indistinguishability obfuscation and functional encryption for all circuits // SIAM Journal on Computing. 2016. vol. 45. no. 3. pp. 882–929.
  8. Kochberger P., Schrittwieser S., Coppens B., De Sutter B. Evaluation Methodologies in Software Protection Research // arXiv preprint arXiv:2307.07300. 2023. pp. 1–67.
  9. Zhou Y., Main A., Gu Y.X., Johnson H. Information hiding in software with mixed boolean-arithmetic transforms // Information Security Applications: 8th International Workshop on Information Security Applications. Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2007. vol. 4867. pp. 61–75.
  10. Reichenwallner B., Meerwald-Stadler P. Efficient Deobfuscation of Linear Mixed Boolean- Arithmetic Expressions // Proceedings of the 2022 ACM Workshop on Research on offensive and defensive techniques in the context of Man At The End (MATE) attacks. 2022. pp. 19–28.
  11. Xu D., Liu D., Feng W., Ming J., Zheng Q., Li J., Yu Q. Boosting SMT solver performance on mixed-bitwise-arithmetic expressions // Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. 2021. pp. 651–664.
  12. Liu B., Shen J., Ming J., Zheng Q., Li J., Xu D. MBA-Blast: Unveiling and Simplifying Mixed Boolean-Arithmetic Obfuscation // Proceedings of the 30th USENIX Security Symposium. 2021. pp. 1701–1718.
  13. Косолапов Ю.В. Об упрощении выражений со смешанной битовой и целочисленной арифметикой // Моделирование и анализ информационных систем. 2023. Т. 30. № 2. С. 140–159.
  14. Ceccato M., Tonella P., Basile C., Falcarin P., Torchiano M., Coppens B., De Sutter B. Understanding the behaviour of hackers while performing attack tasks in a professional setting and in a public challenge // Empirical Software Engineering. 2019. no. 24. pp. 240–286.
  15. Collberg C., Thomborson C., Low D. A taxonomy of obfuscating transformations. Computer Science Technical Reports 148. Department of Computer Science, The University of Auckland, New Zealand. 1997. pp. 1–36.
  16. Mohsen R., Pinto A.M. Evaluating obfuscation security: A quantitative approach // In International Symposium on Foundations and Practice of Security, Springer International Publishing. 2015. pp. 174–192.
  17. Banescu S., Ochoa M., Pretschner A. A framework for measuring software obfuscation resilience against automated attacks // In Proceedings of the 1st International Workshop on Software Protection (SPRO ’15). IEEE Press, Piscataway, NJ, USA. 2015. pp. 45–51.
  18. Holder W., McDonald J.T., Andel T.R. Evaluating optimal phase ordering in obfuscation executives // Proceedings of the 7th Software Security, Protection, and Reverse Engineering/Software Security and Protection Workshop. 2017. pp. 1–12.
  19. Collberg C. The Tigress C Diversifier/Obfuscator. 2016. URL: tigress.cs.arizona.edu/ (дата обращения: 23.06.2023).
  20. Kosolapov Y.V., Borisov P.D. Similarity features for the evaluation of obfuscation effectiveness // In 2020 International Conference on Decision Aid Sciences and Application (DASA). 2020. pp. 898–902.
  21. Borisov P.D., Kosolapov Y.V. On the Characteristics of Symbolic Execution in the Problem of Assessing the Quality of Obfuscating Transformations // Aut. Control Comp. Sci. 2022. vol. 56(7). pp. 595–605.
  22. Xiao Y, Guo Y., Wang Y. Metrics for code obfuscation based on symbolic execution and N-scope complexity // Chinese Journal of Network and Information Security. 2022. vol. 8. no. 6. pp. 123–134.
  23. Crescenzo G.D. Cryptographic program obfuscation: Practical solutions and application-driven models // Versatile Cybersecurity. 2018. pp. 141–167.
  24. Gulwani S., Polozov O., Singh R. Program synthesis // Foundations and Trends in Programming Languages. 2017. vol. 4. no. 1-2. pp. 1–119.
  25. Borisov P.D., Kosolapov Y.V. On the Automatic Analysis of the Practical Resistance of Obfuscating Transformations // Aut. Control Comp. Sci. 2020. vol. 54. pp. 619–629.
  26. Walenstein A., El-Ramly M., Cordy J.R., Evans W.S, Mahdavi K., Pizka M., Ramalingam G., von Gudenberg J.W. Similarity in Programs // Duplication, Redundancy, and Similarity in Software, Dagstuhl Seminar Proceedings. 2007. vol. 6301. pp. 1–8.
  27. Ceccato M., Di Penta M., Nagra J., Falcarin P., Ricca F., Torchiano M., Tonella P. The effectiveness of source code obfuscation: An experimental assessment // 17th International Conference on Program Comprehension, IEEE. 2009. pp. 178–187.
  28. Ceccato M., Di Penta M., Falcarin P., Ricca F., Torchiano M., Tonella P. A family of experiments to assess the effectiveness and efficiency of source code obfuscation techniques // Empirical Software Engineering. 2014. vol. 19. pp. 1040–1074.
  29. Борисов П.Д., Косолапов Ю.В. Способ оценки похожести программ методами машинного обучения // Труды Института системного программирования РАН. 2022. Т. 34. № 5. С. 63–76.
  30. Naville Z. Hikari–an improvement over Obfuscator-LLVM. 2017. URL: https://github.com/HikariObfuscator/Hikari (дата доступа: 14.11.2023).
  31. Junod P., Rinaldini J., Wehrli J., Michielin J. Obfuscator-LLVM–software protection for the masses // In Proc. of IEEE/ACM 1st International Workshop on Software Protection. 2015. pp. 3–9.
  32. Haq I.U., Caballero J. A survey of binary code similarity // ACM Computing Surveys (CSUR). 2021. vol. 54. no. 3. pp. 1–38.
  33. Pagani F., Dell’Amico M., Balzarotti D. Beyond precision and recall: understanding uses (and misuses) of similarity hashes in binary analysis // In Proc. of the Eighth ACM Conference on Data and Application Security and Privacy. 2018. pp. 354–365.
  34. Ding S.H., Fung B.C., Charland P. Asm2vec: Boosting static representation robustness for binary clone search against code obfuscation and compiler optimization // In 2019 IEEE Symposium on Security and Privacy (SP). IEEE. 2019. pp. 472–489.
  35. Garba P., Favaro M. Saturn-software deobfuscation framework based on llvm // In Proceedings of the 3rd ACM Workshop on Software Protection. 2019. pp. 27–38.
  36. Dinaburg A., Ruef A. Mcsema: Static translation of x86 instructions to LLVM. ReCon 2014 Conference, Montreal, Canada. 2014.
  37. Eyrolles N. Obfuscation with Mixed Boolean-Arithmetic Expressions: reconstruction, analysis and simplification tools. Doctoral dissertation. Universite Paris-Saclay, 2017. URL: https://theses.hal.science/tel-01623849/document (дата обращения: 14.07.2023).
  38. Liang M., Li Z., Zeng Q., Fang Z. Deobfuscation of virtualization-obfuscated code through symbolic execution and compilation optimization // In International Conference on Information and Communications Security. Springer International Publishing, 2018. pp. 313–324.
  39. Panchenko M., Auler R., Sakka L., Ottoni G. Lightning BOLT: powerful, fast, and scalable binary optimization // In Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction. 2021. pp. 119–130.
  40. Moreira A.A., Ottoni G., Quintao Pereira F.M. Vespa: static profiling for binary optimization // Proceedings of the ACM on Programming Languages. 2021. vol. 5. pp. 1–28.
  41. Viticchie A., Regano L., Torchiano M., Basile C., Ceccato M., Tonella P., Tiella R. Assessment of source code obfuscation techniques // 16th international working conference on source code analysis and manipulation (SCAM), IEEE. 2016. pp. 11–20.
  42. GCC, the GNU Compiler Collection. URL: https://gcc.gnu.org/ (дата обращения: 14.07.2023).
  43. Clang: a C language family frontend for LLVM. URL: https://clang.llvm.org/ (дата обращения: 14.07.2023).
  44. AMD Optimizing C/C++ and Fortran Compilers (AOCC). URL: https://developer.amd.com/amd-aocc/ (дата обращения: 14.07.2023).
  45. Coreutils – GNU core utilities. URL: https://www.gnu.org/software/coreutils/ (дата обращения: 14.07.2023).
  46. PolyBench/C – the Polyhedral Benchmark suite. URL: https://web.cse.ohio-state.edu/~pouchet.2/software/polybench/ (дата обращения: 14.07.2023).
  47. HashCat – advanced password recovery. URL: https://hashcat.net/hashcat/ (дата обращения: 14.07.2023).
  48. small-programs. A set of small programs for experiments with obfuscations. URL: https://github.com/Boriskin61/small-programs (дата обращения: 22.07.2023).
  49. Куц Д.О. Метод моделирования косвенной адресации в рамках динамической символьной интерпретации. 2023. URL: https://www.ispras.ru/dcouncil/docs/diss/2023/kuc/dissertacija-kuc.pdf (дата обращения: 03.09.2023).
  50. Лебедев Р.К. Автоматическая генерация хэш-функций для обфускации программного кода // Прикладная дискретная математика. 2020. № 50. С. 102–117.
  51. Лебедев В.В. Деобфускация Control Flow Flattening средствами символьного исполнения // Прикладная дискретная математика. Приложение. 2021. № 14. С. 134–138.
  52. BinShamlan M.H., Bamatraf M.A., Zain A.A. The impact of control flow obfuscation technique on software protection against human attacks // In 2019 First International Conference of Intelligent Computing and Engineering (ICOICE), IEEE. 2019. pp. 1–5.
  53. Xu D. Opaque Predicate: Attack and Defense in Obfuscated Binary Code. Doctoral dissertation, 2018. URL: https://etda.libraries.psu.edu/files/final_submissions/17513 (дата обращения: 22.09.2023).
  54. Sun Y. Software Protection Algorithm based on Control Flow Obfuscation // International Journal of Performability Engineering. 2018. vol. 14. no. 9. pp. 2181–2188.
  55. Kim J., Kang S., Cho E.S., Paik J.Y. LOM: lightweight classifier for obfuscation methods // In Information Security Applications: 22nd International Conference, WISA 2021. Springer International Publishing. 2021. pp. 3–15.
  56. Zhao Y., Tang Z., Ye G., Peng D., Fang D., Chen X., Wang Z. Semantics-aware obfuscation scheme prediction for binary. Computers & Security. 2020. no. 99. pp. 1–17.
  57. Wang C., Hill J., Knight J., Davidson J. Software tamper resistance: Obstructing static analysis of programs. Technical report CS-2000-12. Department of Computer Science, University of Virginia, USA. 2000.
  58. Dullien T., Rolles R. Graph-based comparison of executable objects (english version) // Proceedings of the Symposium sur la Securite des Technologies de ’Information et des Communications. 2005. vol. 5. no. 1.

Supplementary files

Supplementary Files
Action
1. JATS XML

Согласие на обработку персональных данных с помощью сервиса «Яндекс.Метрика»

1. Я (далее – «Пользователь» или «Субъект персональных данных»), осуществляя использование сайта https://journals.rcsi.science/ (далее – «Сайт»), подтверждая свою полную дееспособность даю согласие на обработку персональных данных с использованием средств автоматизации Оператору - федеральному государственному бюджетному учреждению «Российский центр научной информации» (РЦНИ), далее – «Оператор», расположенному по адресу: 119991, г. Москва, Ленинский просп., д.32А, со следующими условиями.

2. Категории обрабатываемых данных: файлы «cookies» (куки-файлы). Файлы «cookie» – это небольшой текстовый файл, который веб-сервер может хранить в браузере Пользователя. Данные файлы веб-сервер загружает на устройство Пользователя при посещении им Сайта. При каждом следующем посещении Пользователем Сайта «cookie» файлы отправляются на Сайт Оператора. Данные файлы позволяют Сайту распознавать устройство Пользователя. Содержимое такого файла может как относиться, так и не относиться к персональным данным, в зависимости от того, содержит ли такой файл персональные данные или содержит обезличенные технические данные.

3. Цель обработки персональных данных: анализ пользовательской активности с помощью сервиса «Яндекс.Метрика».

4. Категории субъектов персональных данных: все Пользователи Сайта, которые дали согласие на обработку файлов «cookie».

5. Способы обработки: сбор, запись, систематизация, накопление, хранение, уточнение (обновление, изменение), извлечение, использование, передача (доступ, предоставление), блокирование, удаление, уничтожение персональных данных.

6. Срок обработки и хранения: до получения от Субъекта персональных данных требования о прекращении обработки/отзыва согласия.

7. Способ отзыва: заявление об отзыве в письменном виде путём его направления на адрес электронной почты Оператора: info@rcsi.science или путем письменного обращения по юридическому адресу: 119991, г. Москва, Ленинский просп., д.32А

8. Субъект персональных данных вправе запретить своему оборудованию прием этих данных или ограничить прием этих данных. При отказе от получения таких данных или при ограничении приема данных некоторые функции Сайта могут работать некорректно. Субъект персональных данных обязуется сам настроить свое оборудование таким способом, чтобы оно обеспечивало адекватный его желаниям режим работы и уровень защиты данных файлов «cookie», Оператор не предоставляет технологических и правовых консультаций на темы подобного характера.

9. Порядок уничтожения персональных данных при достижении цели их обработки или при наступлении иных законных оснований определяется Оператором в соответствии с законодательством Российской Федерации.

10. Я согласен/согласна квалифицировать в качестве своей простой электронной подписи под настоящим Согласием и под Политикой обработки персональных данных выполнение мною следующего действия на сайте: https://journals.rcsi.science/ нажатие мною на интерфейсе с текстом: «Сайт использует сервис «Яндекс.Метрика» (который использует файлы «cookie») на элемент с текстом «Принять и продолжить».