eteran / edb-debugger

edb is a cross-platform AArch32/x86/x86-64 debugger.
GNU General Public License v2.0
2.68k stars 322 forks source link

Error: Failed to open and attach to process: execv() failed: permission denied #803

Closed yanbrasiliano closed 3 years ago

yanbrasiliano commented 3 years ago

Hello there! I am trying to open an .exe file in my edb but the following error returns:

Failed to open and attach to process: execv() failed: permission denied

image

System: Kubuntu 20.4 Kernel: 5.8.0-50 generic

10110111 commented 3 years ago

Windows executables in Linux normally run via Wine, so direct execution via execve won't work. I don't think EDB will work in this case. You might try starting the process without EDB, and then attaching to it, if your use case allows this.

yanbrasiliano commented 3 years ago

in this case, compiling the source code on Linux would you be able to open it?

10110111 commented 3 years ago

compiling the source code on Linux

The main point is to compile for Linux, not necessarily on it. If you compile it for Linux, then yes, EDB should run it.

eteran commented 3 years ago

Closing since I believe the issue is identified. Windows executables are not executable under Linux (outside of things like wine). Since EDB doesn't itself run executables and just asks the OS to run the target, EDB cannot debug those directly either.

It is possible in principle to debug a Windows executable by running it in wine, and then attaching to that instance of wine... but I doubt the experience would be pleasant.

eteran commented 3 years ago

Also, since this has come up a few times before, I've added a new FAQ section to the WIKI.

https://github.com/eteran/edb-debugger/wiki/FAQ

@10110111 Feel free to clarify the language on it if you think it can be explained better :-)