binsider

repository·main·Indexed 26 days ago

https://github.com/orhun/binsider

A terminal user interface (TUI) tool for reverse engineers to perform static and dynamic analysis of ELF binaries. Features include ELF layout analysis (sections, segments, symbols, relocations), system call and execution flow tracing, string extraction, hexdump viewing, and library dependency analysis via lddtree.

Tokens
7.4K
Snippets
21
Records
76
Agent score
88%

What's inside binsider

  1. Overview of binsider features

    main

    Binsider is a terminal user interface (TUI) tool for reverse engineers that provides several analysis capabilities:

    • General Analysis: Retrieves file information like size, ownership, permissions, and linked shared libraries (similar to stat(1) and ldd(1)).
    • Static Analysis: Analyzes ELF layout, including sections, segments, symbols, and relocations.
    • Dynamic Analysis: Executes the binary to trace system calls, signals, and execution flow (similar to strace(1) and ltrace(1)).
    • String Extraction: Extracts strings from the binary to find URLs, passwords, or other sensitive data (similar to strings(1)).
    • Hexdump: Provides a structured hexdump view for analyzing binary content.
  2. Navigate the static analysis interface

    main

    When viewing the static analysis layout in Binsider, you can use the following keyboard shortcuts to navigate the data:

    • Vertical Scrolling: Use n (next) and p (previous) to select different blocks, or h/j/k/l for standard directional movement.
    • View Details: Press enter on a selected item to view its specific details.
    • Horizontal Scrolling: Use h and l to scroll horizontally through tables.
    • Search: Press / to search for a specific value within the view.
  3. Build binsider from source

    main

    To build binsider from the source repository, ensure you have Cargo installed with a minimum supported Rust version (MSRV) of 1.74.1.

    Follow these steps:

    1. Clone the repository and enter the directory.
    2. Run the build command using Cargo.

    The resulting binary will be located at target/release/binsider.

    git clone https://github.com/orhun/binsider
    cd binsider/
    CARGO_TARGET_DIR=target cargo build --release
  4. Analyze linked shared libraries recursively

    main

    You can use binsider to drill down into the dependencies of a binary. In the Linked Shared Libraries view:

    1. Navigate to a specific shared library in the list.
    2. Press <kbd>enter</kbd> to re-run binsider specifically on that selected shared library.
    3. Use <kbd>backspace</kbd> to navigate back to the previous binary in the analysis path.

    The current analysis path is displayed in the top right corner of the screen.

  5. Modify binary data via Hexdump

    main

    You can edit binary data directly within the hexdump view like a text editor.

    1. Start typing the new hex values at the desired location.
    2. Press s to save the changes back to the binary file.

    Requirements & Safety:

    • Read-Write Mode: The binary file must be opened in read-write mode for modifications to persist.
    • Backup: Always back up your binary file before making changes, as edits are written directly to the file.
  6. Build binsider without dynamic analysis support

    main

    The dynamic analysis feature is gated behind the dynamic-analysis feature flag. To run binsider on platforms where dynamic analysis is not supported (such as macOS or Windows), build the project with the following command to disable the default features:

    cargo build --no-default-features
  7. Extract strings from binary files

    main

    Use binsider to extract printable strings from binary files, similar to the strings(1) command. This is useful for identifying URLs, passwords, and other sensitive information embedded in a binary.

    To adjust the minimum length of the strings being extracted, you can:

    1. Use the <kbd>+</kbd> or <kbd>-</kbd> keys while the tool is running.
    2. Use the -n command-line argument when starting binsider.