Skip to content

zahidaz/bin-xray

Repository files navigation

Currently supports ELF. Mach-O and PE support planned.


What's Inside

Interactive Hex Viewer

Virtualized hex dump with color-coded regions, byte-level tooltips, click-to-inspect, and pattern search. Handles binaries of any size.

Struct Viewer

C struct definitions alongside live decoded values. Hover a field and the corresponding bytes highlight — and vice versa. All ELF structs supported.

Memory Map Visualizer

See how file bytes map to virtual address space. Animated SVG arrows connect disk offsets to memory addresses. BSS gaps, permissions — all visualized.

PLT/GOT Animator

Step through lazy dynamic linking one instruction at a time. 5 animated steps with play/pause/step controls.

Section & Segment Toggle

Switch between the linker's view (sections) and the loader's view (segments) of the same binary.

Compilation Pipeline

Trace the journey from hello.c through preprocessing, compilation, assembly, and linking.

Plus: 68 searchable, categorized, cross-linked jargon terms covering ELF structure, symbols, linking, memory, and more.


Learning Modules

Module What You'll Learn
0 What happens when you run ./hello? The full journey from shell to CPU
1 From Source to Binary Preprocessing → compilation → assembly → linking
2 The ELF Header First 64 bytes: magic, type, entry point, table offsets
3 Sections vs Segments Linker's view vs loader's view of the same file
4 Sections Deep Dive .text, .data, .bss, .symtab, .rodata in detail
5 Segments and Loading PT_LOAD, PT_INTERP, memory mapping, permissions
6 Dynamic Linking PLT/GOT, lazy binding, .dynamic, relocations
7 Full Explorer All tools unlocked — load any binary or upload your own

Quick Start

git clone https://github.com/zahidaz/bin-xray.git
cd bin-xray
npm install
npm run dev

Open localhost:3000 and start exploring.


Sample Binaries

Pre-built ELF binaries in public/samples/:

Binary What makes it interesting
hello-dynamic.bin Dynamically linked — PLT/GOT, .interp, .dynamic
hello-static.bin Statically linked — no dynamic sections
hello.o Object file — sections only, no program headers
libhello.so Shared library — ET_DYN, exported symbols
hello-stripped.bin Stripped — no .symtab or .strtab
Regenerate from source (requires Linux + GCC)
bash scripts/generate-samples.sh

Roadmap

  • Mach-O format support (macOS binaries)
  • PE format support (Windows binaries)
  • Auto-detect format from magic bytes
  • DWARF debug info viewer
  • Disassembly view (x86-64, ARM64)
  • Binary diffing (side-by-side comparison)
  • Challenge mode with interactive quizzes

Deploy Your Own

The app exports as a fully static site — no server required:

npm run build

Output lands in ./out. Drop it on any static host.


License

MIT

About

See through your binaries. Interactive web app for understanding ELF binary format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages