1

I have very simple C code - compiled on MSVC using clang++ compiler. When I am running it under angr environment - it simply does not finds main() function, while it can do so for other things like strcmp etc. Also, the same program when run under linux (g++) works with no issues.

Additionally, I could see main() symbol in dumpbin.exe, gdb, x64dbg etc.

path_to_binary = "D:\\angr_project\\angr training\\angr_ctf\\00_angr_find\\00_angr_find.exe"  # :string
  print("Started execution\n")
  project = angr.Project(path_to_binary, load_options={'auto_load_libs': False})
  main_fn = project.loader.find_symbol('main')
  if main_fn:
      print("main found")
  else:
      print("main not found")
3
  • Add more details please - maybe attach the file built or how you build the file at least.
    – sudhackar
    Jun 14, 2023 at 8:40
  • Are you sure that the entry point is named main on Windows?
    – raspiduino
    Jun 29, 2023 at 3:13
  • Yes, I have seen the code as well. Jun 29, 2023 at 15:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.