Distributed Obfuscation Model for Software Protection (DOSP)

Date
2022-01-09
Authors
Mai Kamel Atef Amro
مي كامل عاطف عمرو
Journal Title
Journal ISSN
Volume Title
Publisher
Al-Quds University
Abstract
This study suggests a new Distributed Obfuscation Model for Software Protection (DOSP-AES). DOSP-AES is proposed as a method of protecting software from a reverse engineering analysis. DOSP-AES is made up of software processes that are obfuscated and de-obfuscated.Three levels of obfuscation techniques are used in the obfuscated software process. DOSP-AES is applied to C++, Java, and Android programs. The first level, name obfuscation, involves renaming identifiers and variables with meaningless names and obfuscating them using the AES algorithm with a random key length of 128 bits. Methods for obfuscating code include the renaming and removing process. Removing means removing unnecessary debugging information, methods, comments, and structures from the program. The transformation of a program's variables, constants, class, method names, and other identifiers to prevent attackers from understanding and analyzing it is referred to as renaming. The second level, data obfuscation, proposed concealing data values by changing the statements in which variables are defined and used. DOSP-AES encrypts the values of constants, local and global program variables to complicate reverse engineering and protect sensitive data from disclosure. Data obfuscation with the AES algorithm and a key length of 256 bits. The most important aspect is that DOSP-AES obfuscates each variable differently from the other when it is mentioned on more than one site with the same application; each variable appears in a different form from the other, despite the fact that they are the same variable. The third level, bytecode obfuscation, where bytecode is modified so that after the bytecode is compiled, it contains obscure compilation errors, but the compiled Java program still functions as expected. Java is compiled into bytecode. Decompiling bytecode files is easy because of the names, fields, and methods within them. Obfuscation is one of the major defenses against decompilation. The goal of bytecode obfuscation is to make the decompiled program much harder to understand so that the attacker must spend more time Sand effort on the obscure bytecode. Identifier names of bytecode are replaced with illegal obfuscated identifiers, which cause syntax errors and compilation errors when decompiling. The DOSP-AES algorithm encrypts identifiers and class names in bytecode files with a key length of 192 bits using the AES algorithm. By obfuscating the code on multiple levels, the attacker will have a more difficult time analyzing and analyzing the code. The de-obfuscated process is a client-server model (distributed system), where clients download the obfuscated software and applications that were uploaded to the internet. The client requests the server for the obfuscation key to de-obfuscate the software, then the server complies by sending the secure key (obfuscated key) as one block of 72 bytes. The key is randomly generated using a key generator (keygen) in the Crypto++ simulator. There are three levels of obfuscation in each subkey. The first level (name obfuscation) is de-obfuscated using 16-byte key lengths, the second Level (data obfuscation) is de-obfuscated using 32-byte key lengths, and the third level (bytecode obfuscation) is de-obfuscated using 24-byte key lengths. Thus, the experiment has produced successful and promising results since it is difficult for reverse engineering tools to read and analyze the obfuscated code. Even the revealed code did not perform as well as the original and obfuscated code. في هذا البحث، تم اقتراح نموذج تشفير جديدوهو تقنية التشفير الموزعة لحماية البرمجيات من عمليات الهندسة العكسية والتغيير. تم تطبيق هذه التقنية على برامج C++, java, android. يتكون النموذج المقترح من نظام لتشفير البرمجيات. ويتكون من عملية تشفير على ثلاثة مستويات: المستوى الأول، هو تشفير الاسم البرمجي (name code obfuscation)، ويتضمن هذا المستوى إعادة تسمية المعرفات function, والمتغيرات variable بأسماءغير مفهومة ولا معنى لها، باستخدام خوارزمية معيار التشفير المتقدمAES (Advance Encryption Standard) باستخدام مفتاح عشوائي randomkey طوله 128 بت لتشفيرها. يتضمن تشفير الكود البرمجي استخدام طريقة إعادة التسمية والإزالة. الإزالة تعني حذف المعلومات غير المفيدة، والتعليقات comments التي لن يتم استخدامها في البرنامج. يجعل الحذف من الصعب على المهاجم attacker القراءة والفهم والتحليل. تتضمن إعادة التسمية تحويل أسماء المتغيرات والمعرفات الأخرى من أجل منع القرصنة او فهم البرنامج وتحليله. المستوى الثاني، هو تشفير البيانات (data obfuscation)، يهدف هذا المستوى إلى إخفاء قيم البيانات وحمايتها. حيث يقوم النموذج المقترح بتشفير قيم الثوابت constant ومتغيرات البرامج المحلية والعالمية global /local variables لجعل عملية الهندسة العكسية أكثر تعقيدًا، باستخدام خوارزميةAES بمفتاح طوله 256 بت. ويشفر نفس المتغير كل مره في نفس البرنامج بطريقة مختلفة يظهر فيها خلال الكود. المستوى الثالث، هو تشفير البايت كود (bytecode obfuscation)، هذا المستوى يقوم بتعديل البايت كود. يقوم DOSP-AES بتشفير المعرفات (Identifier)في ملف البايت كود، باستخدام خوارزمية AESبمفتاح طوله 192 بت.وإذا تم محاوله تشغيل البرنامج وفك تشفيره بدون مفتاح فك التشفير، ف ان البرنامج يعطي أخطاء ولن يتم تشغيله.يهدف تشفير البايت كود لجعل البايت كود أكثر غموضاً، وجعل الملف المشفر أكثر صعوبة بالفهم، لذلك يجب على المهاجم أن يقضي المزيد من الوقت والجهد على محاوله فك تشفير البايت كود. يؤدي استخدام مستويات متعددة من التشفير والتعتيم (Obfuscation and encryption) إلى زيادة صعوبة وتعقيد الكود. لذلك، سيستغرق المهاجم وقتًا أطول لتحليل الكود ويصعب تحليله وفهمه. في عملية إلغاء التشفير، يقوم المستخدم بتنزيل التطبيق او البرنامج الذي تم تشفيره ورفعه على الانترنت، لن يستطيع المستخدم القيام بتشغيل التطبيق المشفرأو استخدامه بدون مفتاح فك التشفير، لذلك يجب على المستخدم ان يقوم بطلب مفتاح فك التشفير من الخادم (server). بعد قيام السيرفر بالتأكد من المستخدم (authentication process) من خلال رمز التأكيد الذي يتم ارساله للمستخدم، ومن خلال رقم التطبيق (software ID) ، يقوم السيرفر بفك تشفير التطبيق عن طريق انشاء مفتاح بشكل عشوائي وله 72 بايت، بعد ذلك يتمكن المستخدم من استخدام التطبيق. يتكون مفتاح فك التشفير من ثلاثة أجزاء، كل جزء يختص ب فك تشفير مستوى معين من مستويات التشفير، المستوى الأول وهو تشفير الكود البرمجي (name obfuscation)، يتم فك تشفيره بمفتاح طوله 16 بايت، المستوى الثاني وهو تشفير البيانات (data obfuscation)، يتم فك تشفيره بمفتاح طوله 32بايت، تشفير البايت كود (bytecode obfuscation)، يتم فك تشفيره بمفتاح طوله 24 بايت. من خلال مقارنه نتائج هذا النموذج (DOSP-AES)، مع نتائج برامج التشفير الأخرى، ومع نموذج (DOSP-RSA)، أثبت هذا النموذج فاعليته وقوته ضد هندسه التحليل العكسية (reverse engineering) وغيرها من أدوات تحليل البرامج والتطبيقات. باستخدام هذا النموذج فانه من الصعب على المهاجم (attacker) القيام بتحليل البرامج والتطبيقات.
Description
Keywords
Citation