1

imagine that if i wanted to find a vulnerability in a program that is used by a lot of people in order to exploit it.

the program is open source and is written in C/C++ . would this even be possible (fuzzing excluded) as google tells me that it is not possible to reverse engineer a C/C++ .exe file back to source code, that you only get assembly?

can i craft exploits based on assembly alone? would make me really sad if this is not possible.

JOW
  • 2,319
  • 2
  • 16
  • 24
harry
  • 21
  • 2

2 Answers2

4

Yes, it's completely possible. You can read through all of the assembly, determine what conditions are not accounted for, and then exploit them. In fact, even when using fuzzing, you will need to read through the assembly to figure out a) is there an exploitable bug, and b) determine how to create that exploit.

All fuzzing does is help you determine where error conditions might exist by trying as many inputs as possible.

Dan Landberg
  • 3,312
  • 12
  • 17
1

No, fuzzing is not a requisite for exploit development.

as google tells me that it is not possible to reverse engineer a C/C++ .exe file back to source code, that you only get assembly?

Though it is technically true that the exact source code that a binary was compiled from cannot be recovered via decompilation, this also somewhat misleading, as your question illustrates. Machine code can be decompiled into a form that very closely resembles source code. Here is an example using Ghidra:

ghidra decompilation

Even so, neither source code nor decompiled machine code are necessary for discovering and exploiting vulnerabilities; in fact, when bug hunting, examining the disassembled machine code can at times be more useful than looking at source or decompiled machine code, as these higher-level representations may obscure critical details.

julian
  • 1,269
  • 1
  • 8
  • 15