
are not intrinsic limitations of the analysis algorithms,
but seem to be caused by spurious implementation
oversights. Therefore, an important future project
is to attempt to fix such mistakes to directly resolve
many causes of erroneous CFG edges generated by
these tools.
8 CONCLUSION
In this paper we studied three reverse engineering
tools angr, radare2 and Ghidra. We used the bench-
marks and framework developed in the SoK Binary
Disassembly paper (Pang et al., 2021) to compare our
results and perform an in-depth analysis of control-
flow graphs generated by the tools. We focused on
binaries for the x64 architecture, built for Linux oper-
ating systems using GCC and Clang compilers, with
optimization levels of O0 and O3. With the help of
this paper, we studied the performance of the tools for
different compilers and optimization levels, found the
true positive and false negative edges, categorized the
false negative edges, and compared the performance
of the tools before and after post processing. By us-
ing manual analysis and scripting, we were able to
identify that most errors in the generation of CFGs
are not because of the limitations of the algorithms.
Therefore, they can be easily eliminated by more ro-
bust implementations. With the help of this paper, we
aimed to provide information about CFG reconstruc-
tion errors that may lead to more accurate CFG gen-
eration in the SRE tools and any other algorithms that
use CFGs.
REFERENCES
Andriesse, D., Chen, X., Van Der Veen, V., Slowinska, A.,
and Bos, H. (2016). An in-depth analysis of disassem-
bly on full-scale x86/x64 binaries. In Proceedings of
the 25th USENIX Conference on Security Symposium,
SEC’16, page 583–600, USA. USENIX Association.
Burow, N., Carr, S. A., Nash, J., Larsen, P., Franz, M.,
Brunthaler, S., and Payer, M. (2017). Control-flow
integrity: Precision, security, and performance. ACM
Comput. Surv., 50(1).
Caballero, J. and Lin, Z. (2016). Type inference on executa-
bles. ACM Comput. Surv., 48(4).
Collberg, C., Thomborson, C., and Low, D. (1997). A tax-
onomy of obfuscating transformations. Technical re-
port, Department of Computer Science, The Univer-
sity of Auckland, New Zealand.
Cozzi, E., Graziano, M., Fratantonio, Y., and Balzarotti, D.
(2018). Understanding linux malware. In 2018 IEEE
symposium on security and privacy (SP), pages 161–
175. IEEE.
Eilam, E. (2005). Reversing: Secrets of Reverse Engineer-
ing. John Wiley & Sons, Inc., USA.
Hawkins, W., Hiser, J. D., Nguyen-Tuong, A., Co, M., and
Davidson, J. W. (2017). Securing binary code. IEEE
Security & Privacy, 15(6):77–81.
Horspool, R. N. and Marovac, N. (1980). An approach to
the problem of detranslation of computer programs.
The Computer Journal, 23(3):223–229.
Kline., J. and Kulkarni., P. (2023). A framework for as-
sessing decompiler inference accuracy of source-level
program constructs. In Proceedings of the 9th In-
ternational Conference on Information Systems Secu-
rity and Privacy - ICISSP,, pages 228–239. INSTICC,
SciTePress.
Meng, X. and Miller, B. P. (2016). Binary code is not easy.
In Proceedings of the 25th International Symposium
on Software Testing and Analysis, ISSTA 2016, page
24–35, New York, NY, USA. Association for Comput-
ing Machinery.
NSA (2023). Ghidra. https://ghidra-sre.org/.
Pang, C., Yu, R., Chen, Y., Koskinen, E., Portokalidis, G.,
Mao, B., and Xu, J. (2021). Sok: All you ever wanted
to know about x86/x64 binary disassembly but were
afraid to ask. In 2021 IEEE Symposium on Security
and Privacy (SP), pages 833–851.
Shaila, S., Darki, A., Faloutsos, M., Abu-Ghazaleh, N., and
Sridharan, M. (2021). Disco: Combining disassem-
blers for improved performance. In Proceedings of
the 24th International Symposium on Research in At-
tacks, Intrusions and Defenses, pages 148–161.
Shoshitaishvili, Y., Wang, R., Salls, C., Stephens, N.,
Polino, M., Dutcher, A., Grosen, J., Feng, S., Hauser,
C., Kruegel, C., and Vigna, G. (2016). SoK: (State
of) The Art of War: Offensive Techniques in Binary
Analysis. In IEEE Symposium on Security and Pri-
vacy.
Vaidya, R., Kulkarni, P. A., and Jantz, M. R. (2021). Ex-
plore capabilities and effectiveness of reverse engi-
neering tools to provide memory safety for binary pro-
grams. In Deng, R., Bao, F., Wang, G., Shen, J., Ryan,
M., Meng, W., and Wang, D., editors, Information Se-
curity Practice and Experience, pages 11–31, Cham.
Springer International Publishing.
Wartell, R., Zhou, Y., Hamlen, K. W., Kantarcioglu, M.,
and Thuraisingham, B. (2011). Differentiating code
from data in x86 binaries. In Machine Learning and
Knowledge Discovery in Databases: European Con-
ference, ECML PKDD 2011, Athens, Greece, Septem-
ber 5-9, 2011, Proceedings, Part III 22, pages 522–
536. Springer.
Àlvarez, S. (2023). The official radare2 book. https://book.
rada.re/index.html.
Exploring Errors in Binary-Level CFG Recovery
557