Skip to content

Importing executable files with auto-detected format exports corrupted binaries #19

@rszibele

Description

@rszibele

Describe the bug
If you import an ELF binary with the format as Executable and Linking Format (ELF) and then export that binary, it creates a corrupted binary that segfaults.

However, if you import it as "Raw binary" and manually select the language, then the exported file works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Import the cp ELF binary into your project (default settings).
  2. Right-Click it and click Export...
  3. Select Binary as the format.
  4. Export it.
  5. Make the exported binary executable.
  6. Run the exported binary.

Expected behavior
The exported binary should work instead of segfaulting (happens with multiple binaries that I've tested).

Screenshots
Default:
image
Import as Raw binary:
image

Environment (please complete the following information):

  • OS: Kubuntu 18.10
  • Ghira Version 9.0

Additional context
Happens with both i386 and x86_64 binaries.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions