Multithreading for obfuscating code against dynamic analysis and reverse engineering
Date
2025-01
Journal Title
Journal ISSN
Volume Title
Publisher
BRAC University
Abstract
Code obfuscation is applied to change the structure of software code that makes it hard
to understand; in fact, it reduces the readability of code. Obfuscation techniques give protection to proprietary code from reverse engineering, tampering, and unauthorised usage.
General code obfuscation techniques make code analyses difficult. Meanwhile, multithreading allows multiple threads to run concurrently within a single process, where each thread
helds a separate execution flow, allowing various parts of code to execute simultaneously
and independently. Code obfuscation techniques have been used in industrial applications
for years, but the scope of multithreading in this area has still not been properly explored.
The general code obfuscation techniques change the code structures as well as change the
control flow format in a single thread. Multithreading obfuscation has the potential to utilise
the complexities of multithreaded execution by adding layers of obscurity to the content and
runtime behaviour of code. By applying M threads in a program code with N functions, it
may provide N**M combinations, making the control flow harder to analyse. Applying this
approach enables the randomness of code execution, and it can give protection against dynamic analysis. Finally, a synchronisation mechanism can increase enough complexity to
hinder the reverse engineering. These approaches should make the reconstruction of the
original sequential logic much harder. In this research, we aim to design an obfuscation tool
for C++ programs that applies multithreading obfuscation techniques to large-scale source
code and this would significantly enhance the software security by increasing complexity and
unpredictability. And the next step of our research is to focus on the improvement of our
obfuscator.
Description
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science and Engineering, 2025.
Keywords
Code Obfuscation, Multithreading, Software security, POSIX Threads, Control Flow Obfuscation, Dynamic analysis, Synchronization mechanisms, LLVM, C Programs, Thread scheduling
