Bin X-ray is the C++ successor of the original BinView utility, focused on fast interactive binary inspection with an ImGui desktop UI.
At its core, the tool renders a byte-pair scatterplot — a 256×256 matrix where each cell (x, y) represents how often byte value x is immediately followed by byte value y in the file. This fingerprint reveals structure, repetition, compression, and entropy at a glance. In windowed mode the matrix becomes a sliding byte-pair plot, updating in real time as you scrub through the file via the bitmap ribbon overview, letting you watch structural patterns shift across the binary.
A companion 3D byte-trigram scatter plot extends the analysis into three dimensions: every consecutive triplet of bytes becomes a point in a 256³ cube, revealing higher-order structural patterns that are invisible in the 2D matrix.
- Spotting structure in unknown binaries: byte-transition fingerprints make repeated records, delimiters, padding, and format shifts visible quickly.
- Finding section boundaries and repeated layouts: scrub with the ribbon and watch recurring visual motifs appear/disappear by region.
- Comparing random-looking vs organized regions: compressed/encrypted sections usually look noise-like, while tables/headers/text-ish areas tend to form stronger structure.
- Jumping from anomaly to exact offset: hover a transition, get matching offsets, jump directly into hex view, and continue investigation without context switching.
- Exploring higher-order patterns: 3D trigram mode helps when pairwise transitions are not enough and triplet clusters reveal stronger grammar/encoding signals.
- Reverse engineers working with unknown or proprietary file formats.
- Firmware and embedded analysts scanning large blobs for behavior changes.
- Security and malware analysts triaging suspicious sections quickly.
- Low-level developers investigating binary logs, save files, packet captures, or custom storage formats.
- Open a file and scrub the ribbon to locate visually distinct regions.
- Use 2D transition view to identify interesting motifs and boundaries.
- Hover transitions to collect exact offsets and jump to hex instantly.
- Switch to 3D trigram view when 2D patterns are ambiguous.
- Iterate between visuals and byte-level inspection until structure is mapped.
- Legacy-compatible byte-pair scatterplot engine (
P[256][256]) with Scale, Normalize, Full View, and Block Size controls. - Sliding byte-pair plot: scrub the bitmap ribbon to slide the analysis window and watch the scatterplot update in real time.
- Heat-map colour mode: toggle between greyscale and a blue→cyan→green→yellow→red gradient for better density perception.
- Transition seeking: hover the scatterplot to select a byte pair, see all matching offsets in a scrollable address list, and navigate directly to each hit in the hex view.
- Snap-to-data: the seeking crosshair automatically snaps to the nearest non-empty cell within a configurable Chebyshev radius.
- Interactive 256³ voxel scatter plot rendered via orthographic ImDrawList projection with wireframe cube and axis labels.
- Mouse-drag rotation (yaw/pitch) and double-click reset.
- Auto-rotation with adjustable speed (0.05–5.0 deg/frame) and elevation (−89° to 89°).
- Point opacity slider (5 %–100 %) to reveal dense clusters without hiding shadowed points.
- Canvas background presets: Black (default), White, or Custom with an RGB colour picker.
- Canvas clipping prevents wireframe edges, labels, and dots from overflowing into adjacent panels.
- Heat-map / greyscale colour toggle shared with the 2D plot.
- Async
Open Fileflow for large binaries. - Bitmap ribbon navigation: click any pixel to jump to that byte offset; red pointer triangles and a coordinate label mark the current position. Drag to scrub the analysis range.
- Draggable window edges: when
Full Viewis off, drag the highlighted ribbon window's upper/lower edges to resize block length directly; edge drag capture suppresses accidental scrub while resizing. - Mouse gauges for sizing: use dedicated gauges under
Block SizeandRibbon Widthin the left panel for quick visual adjustment. - Wheel-assisted sizing: use the mouse wheel over
Block Size/Ribbon Widthcontrols, or over ribbon window edges, to nudge size quickly (Shift= larger step). - Ribbon shortcut sizing: hold
Ctrland use the mouse wheel over the ribbon to changeBlock Size; holdCtrl+Shiftto changeRibbon Width. - Ribbon auto-slide: optional automatic window sliding in ribbon view with adjustable speed (rows/frame) and optional repeat-from-start behavior at end-of-data.
- Wide ribbon support (up to 8192 columns): ribbon cells stay at least 1 px wide; the ribbon canvas expands and uses horizontal scrolling for very wide layouts.
- Virtualised hex view (ImGuiListClipper) with seek highlighting and programmatic scroll-to support.
- ASCII column highlighting: per-character colouring matches hex byte highlight state.
- Byte inspector panel for the selected offset.
- Three-column workspace: left controls · centre plot + hex view · right bitmap ribbon.
- Dirty-index tracking in trigram computation: only written voxels are zeroed between recomputations, avoiding a full 64 MB clear.
- 3D-mode-gated trigram recompute: trigram accumulation is skipped while in 2D mode, reducing scrubbing cost when only the transition matrix is visible.
- Static heat-map LUT: a 256-entry colour lookup table is built once and shared by both 2D and 3D rendering.
- Optimised projection math: division folded into scale factor; bit-shift row/column indexing in the 2D matrix loop.
- Event-driven idle rendering: when nothing is animating or loading, the main loop sleeps via
MsgWaitForMultipleObjects, dropping CPU/GPU utilisation to near-zero.
- Seven automated test suites:
ByteFormatterTests,BinaryDocumentTests,TransitionMatrixTests,TransitionSeekerTests,TrigramPlotTests,CrosshairCoordsTests,UILayoutLogicTests. - Edge cases covered: empty/missing files, single byte, sub-ranges, boundary clamping, maxResults capping, self-transitions, inverted ranges, repeated trigram accumulation, mapIntensity modes, crosshair coordinate semantics, opacity-alpha validation, ribbon window-edge resize clamping, modifier-wheel routing/clamping (including width/block-size limits), and auto-slide stop/wrap behavior.
Priority order:
- Bookmarks and annotations for persistent investigation sessions.
- Entropy + histogram region strip for explicit structure-vs-random signals.
- Compare mode for file/range diffs and variant triage.
- Structured decoders/templates to move from visual analysis to field-level interpretation.
- Periodicity detector for fixed-size records, framing, and repeated protocol/data blocks.
See Use Cases and Roadmap for expanded guidance.
- Windows 10/11
- Visual Studio 2022 (v143 toolset)
- Windows SDK 10.0+
- Python 3 (for version helper script)
- Open
src/BinXray.slnxin Visual Studio. - Select
Debug|x64. - Build the solution.
- Run:
- app:
src\\x64\\Debug\\BinXray.exe - tests:
src\\x64\\Debug\\BinXray.Tests.exe
- app:
Or from VS Code, use tasks:
Build BinXray (x64 Debug)Run BinXray (x64 Debug)Run Tests (x64 Debug)
src/BinXrayapplication codesrc/BinXray.Teststest runner and testssrc/vendor/imguivendored Dear ImGui.vscodeshared build/run/debug configurationscriptslocal build/release helper scriptspackaginginstaller scaffoldingdocproject documentation

