RZ-BIN(1)

πŸ“¦
version 0.8.2 Β· 3 versions
, in arch rolling, nixos 26.05

πŸ’– NAME πŸ’–

Bestie, this is the rz-bin(1) page: rz-bin β€” Binary program info extractor. Iconic. ✨

✨ SYNOPSIS ✨

rz-bin [-AcdeEghHiIjlLMqrRsSUvVxzZ] [-@ at] [-a arch] [-b bits]
       [-B addr] [-C F:C:D] [-f str] [-m addr] [-n str] [-N m:M]
       [-P pdb] [-o str] [-O str] [-k query] [-D lang symname] file
No cap, that synopsis is giving β€œalphabet soup but make it technical” β€” every flag is exactly as written. 🫢

πŸ’… DESCRIPTION πŸ’…

This command is part of the Rizin project.

rz-bin can analyze and extract useful information from binary executable files like ELF, PE, Mach-O, etc. It supports multiple architectures like x86, ARM, MIPS, PowerPC, etc.

πŸŽ€ OPTIONS πŸŽ€

Okay bestie, buckle up β€” this is the full menu, and we are not skipping a single crumb. πŸ’…

  • -@ addr β€” Show section, symbol, or import at the given address.
  • -A β€” List sub-binaries and their arch-bits pairs.
  • -a arch β€” Set architecture (x86, arm, .. or <arch>_<bits>).
  • -b bits β€” Set bits (32, 64 ...).
  • -B addr β€” Override base address (PIE bins).
  • -c β€” List classes.
  • -cc β€” List classes in header format.
  • -C fmt:C:D β€” Create [elf, mach0, pe] with Code and Data hexpairs (see -a).
  • -d β€” Show debug/dwarf information.
  • -dd β€” Load debug/dwarf information from debuginfod server.
  • -D lang name β€” Demangle symbol name (-D all for bin.demangle=true).
  • -e β€” Entrypoint.
  • -E β€” Globally exportable symbols.
  • -f str β€” Select sub-bin named str.
  • -F binfmt β€” Force to use that bin plugin (ignore header check).
  • -g β€” Same as -SMZIHVResizcld -SS -SSS -ee (show all information).
  • -G addr β€” Load address . offset to header.
  • -h β€” Show usage help message.
  • -H β€” Header fields.
  • -i β€” Import (symbols imported from libraries).
  • -I β€” Binary info.
  • -j β€” Output in JSON.
  • -k sdb-query β€” Run sdb query. for example: '*'.
  • -K algo β€” Calculate checksums (md5, sha1, ..).
  • -l β€” Linked libraries.
  • -L plugin β€” List supported bin plugins or plugin details.
  • -m addr β€” Show source line at addr.
  • -M β€” Main (show address of main symbol).
  • -n str β€” Show section, symbol, or import named str.
  • -N min:max β€” Force min:max number of chars per string (see -z and -zz).
  • -o str β€” Output file/folder for write operations (out by default).
  • -O str β€” Write/extract operations (-O help).
  • -p β€” Show physical addresses.
  • -P β€” Show debug/pdb information.
  • -PP β€” Download pdb file for binary.
  • -q β€” Be quiet, just show fewer data.
  • -qq β€” Show less info (no offset/size for -z for ex.).
  • -Q β€” Show load address used by dlopen (non-aslr libs).
  • -r β€” Show output in rizin format.
  • -R β€” Show relocations.
  • -s β€” Symbols.
  • -S β€” Sections.
  • -SS β€” Segments.
  • -SSS β€” Sections mapping to segments.
  • -T β€” Display file signature.
  • -u β€” Unfiltered (no rename duplicated symbols/sections).
  • -U β€” Resources.
  • -v β€” Show version information.
  • -V β€” Show binary version information.
  • -w β€” Display try/catch blocks.
  • -x β€” Extract bins contained in file.
  • -X fmt [f] .. β€” Package in fat or zip the given files and bins contained in file.
  • -Y fw file β€” Calculate all the possibles base address candidates of a firmware bin.
  • -z β€” Show strings (from data section).
  • -zz β€” Show strings (from raw strings from bin).
  • -zzz β€” Dump raw strings to stdout (for huge files).
  • -Z β€” Guess size of binary program.

πŸ¦‹ ENVIRONMENT πŸ¦‹

These env vars are the little mood-ring settings, bestie:

  • RZ_BIN_CODESIGN_VERBOSE β€” make code signatures verbose.
  • RZ_BIN_DEBASE64 β€” e bin.debase64 β€” try to debase64 all strings.
  • RZ_BIN_DEBUGINFOD_URLS β€” e bin.dbginfo.debuginfod_urls β€” use alternative debuginfod server.
  • RZ_BIN_DEMANGLE β€” e bin.demangle β€” do not demangle symbols.
  • RZ_BIN_LANG β€” e bin.lang β€” assume lang for demangling.
  • RZ_BIN_MAXSTRBUF β€” e bin.maxstrbuf β€” specify maximum buffer size.
  • RZ_BIN_PDBSERVER β€” e pdb.server β€” use alternative PDB server.
  • RZ_BIN_PREFIX β€” e bin.prefix β€” prefix symbols/sections/relocs with a specific string.
  • RZ_BIN_STRFILTER β€” e bin.str.filter - rizin -qc 'e bin.str.filter=??' -
  • RZ_BIN_STRPURGE β€” e bin.str.purge β€” try to purge false positives.
  • RZ_BIN_SYMSTORE β€” e pdb.symstore β€” path to downstream symbol store.
  • RZ_CONFIG β€” sdb config file.
  • RZ_NOPLUGINS β€” do not load shared plugins (speedup loading).

πŸ”₯ EXAMPLES πŸ”₯

List symbols of a program

rz-bin -s a.out

Get offset of symbol

rz-bin -n _main a.out

Get entrypoint

rz-bin -e a.out

Load symbols and imports from rizin

rizin -n /bin/ls

[0x00000000]> .!rz-bin -prsi $FILE

πŸ‘‘ SEE ALSO πŸ‘‘

πŸ’œ AUTHORS πŸ’œ

  • pancake <pancake@nopcode.org>
  • byteninjaa0

That's the whole RZ_BIN(1) manual, dated Jan 24, 2024 β€” mwah, bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from
  • arch rolling: rizin 0.8.2-2 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-PDDC AND CC0-1.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND MIT
  • nixos 26.05: rizin 0.8.2
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms