Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qemu remote debugging does not work if the user opens a file in binja that cannot be recognized by LLDB #669

Open
xusheng6 opened this issue Nov 26, 2024 · 1 comment

Comments

@xusheng6
Copy link
Member

  1. qemu-system-x86_64 -bios bios.bin -drive file=disk.img,format=raw -m 1G -S -s
  2. Open bios.bin in binja
  3. Debugger -> Connect To Remote Process
  4. Select gdb-remote, and type host:port as 127.0.0.1:1234
  5. See the following error message:
LLDB failed to connect to target with "'/Users/xusheng/Downloads/CatbertRansomware/bios.bin' doesn't contain any 'host' platform architectures: arm64, armv7, armv7f, armv7k, armv7s, armv7m, armv7em, armv6m, armv6, armv5, armv4, arm, thumbv7, thumbv7k, thumbv7s, thumbv7f, thumbv7m, thumbv7em, thumbv6m, thumbv6, thumbv5, thumbv4t, thumb, x86_64, x86_64, arm64, arm64e, arm64, arm64e"

Screenshot 2024-11-26 at 12 27 18 PM

I am very grateful for this lengthy and useless error message

The issue here is the user can technically open anything before they try to debug, so chances are there will be sth that cannot be recognized by LLDB. And we should tell LLDB to not bother with that

If, however, I open a particular TE binary in the UEFI firmware, e.g., Section_PE32_image_FullShell_Shell_body.efi.zip, the debugging can be started since LLDB recognizes it

@xusheng6
Copy link
Member Author

Relevant files:

disk.img.zip
bios.bin.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant