RABIN2(1)

πŸ¦‹ rabin2 β€” section 1 of the manual, bestie πŸ¦‹

okay so this is rabin2 (that's the name, and it lives in manual section 1), and she is literally the Binary Information Extractor. think of her as the friend who can look at any binary and tell you what's inside it. no cap. πŸ’–


✨ NAME ✨

rabin2 β€” Binary Information Extractor


πŸŽ€ SYNOPSIS πŸŽ€

rabin2 [-AcdeEghHiIjJlLMpqQrRsStuVvwxZ] [-a arch] [-b bits] [-B addr]
       [-C fmt:C:[D]] [-D lang sym|-] [-f subbin] [-F binfmt] [-k query]
       [-K algo] [-m addr] [-n str] [-N minlen:maxlen] [-o str]
       [-O binop] [-X fmt file ...] [-@ addr] file

🌸 DESCRIPTION 🌸

she's a binary information extractor, and she speaks ELF, PE, MZ and Mach-O β€” giving you all the tea on headers, sections, symbols, imports, exports and debug data. it's giving forensic main character energy. πŸ”₯

also, most of these options are lowkey available inside the radare2 i command too (just type i? for help). iykyk. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

  • -@ addr β€” show the section, symbol or import that lives at that given address
  • -A β€” list sub-binaries and their associated arch-bits pairs
  • -a arch β€” set the arch (x86, arm, .. or <arch>_<bits>)
  • -b bits β€” set the bits (32, 64, ...)
  • -B addr β€” override the base address (for address independent binaries)
  • -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
  • -D lang symbolname|- β€” demangle a symbol name (or - to read from stdin) for that lang β€” options are cxx, ibmxl, swift, java, msvc, ..
  • -e β€” program entrypoint
  • -ee β€” constructor/destructor entrypoints
  • -E β€” globally exportable symbols
  • -f subbin β€” select the sub-binary architecture. super useful for fat-mach0 binaries 🫢
  • -F binfmt β€” force it to use that bin plugin (ignore header check)
  • -g β€” same as -SMZIHVResizcld -SS -SSS -ee (show all info). the "give me everything" option, obsessed.
  • -G addr β€” load address . address to header
  • -h β€” show this help message
  • -H β€” header fields
  • -I β€” binary info
  • -i β€” imports (symbols imported from libraries)
  • -j β€” output in json
  • -J var β€” display an environment variable
  • -k query β€” perform an SDB query on the loaded file. for example: '*'
  • -K algo β€” calculate section checksums (md5, sha1, ..)
  • -l β€” list linked libraries to the binary
  • -L plugin β€” list supported bin plugins or plugin details
  • -m addr β€” show the source line at addr
  • -M β€” main (show address of main symbol)
  • -n str β€” show the section, symbol or import named str
  • -N minlen:maxlen β€” force min:max number of chars per string (see -z and -zz)
  • -o str β€” output file or extraction directory for write operations
  • -O binop β€” perform a binary operation on the target binary (dump, resize, change sections, ...). use -O help for more info:
e/0x8048000       change entrypoint
d/s/1024          dump symbols
d/S/.text         dump section
r/.data/1024      resize section
R                 remove RPATH
a/l/libfoo.dylib  add library
p/.data/rwx       change section permissions
c                 show Codesign data
C                 show LDID entitlements
  • -p β€” show always physical addresses
  • -P β€” show debug/pdb information
  • -PP β€” download the pdb file for the binary
  • -q β€” be quiet, just show less data
  • -qq β€” show less info (no addr/size for -z for ex.)
  • -Q β€” show load address used by dlopen (non-aslr libs)
  • -r β€” radare output
  • -R β€” relocations
  • -s β€” symbols
  • -S β€” sections
  • -SS β€” segments
  • -SSS β€” sections mapping to segments
  • -t β€” display file hashes
  • -T β€” display file signature, certificates and signing details
  • -u β€” resources
  • -v β€” display version and quit
  • -V β€” show binary version information
  • -w β€” display try/catch blocks
  • -x β€” extract sub-binaries contained in the file (for example, architectures inside a FAT Mach-O binary). combine it with -S, -SS, or -u to extract sections, segments, or raw resources instead. so like, -xS extracts sections, -xSS extracts segments, and -xu extracts resources. resource extraction may be combined with section or segment extraction. section, segment and resource filenames include their kind, sanitized name or type, and index β€” and existing files are never overwritten, no worries bestie 🫢. use -o dir to pick the output directory. without it, sections, segments and resources get written below <file>.sections, <file>.segments and <file>.resources respectively. sub-binaries keep the traditional <file>.fat directory.
  • -X format file ... β€” package the given files in fat or zip
  • -z β€” strings (from data section)
  • -Z β€” guess the size of the binary program
  • -zz β€” show strings from raw bins
  • -zzz β€” dump raw strings to stdout (for huge files)

🌈 ENVIRONMENT 🌈

  • R2_NOPLUGINS β€” same as r2 -N. do not load shared plugins
  • R2_PLUGINS_ORDER β€” plugin load order: i=internal, e=env, h=home, s=system; default=iehs; ? prints help
  • RABIN2_ARGS β€” ignore the CLI and use these arguments instead
  • RABIN2_CHARSET β€” set the default value charset for -z strings
  • RABIN2_DEBASE64 β€” same as r2 -e bin.str.debase64 β€” try to decode all strings as base64 if possible
  • RABIN2_DEMANGLE β€” same as r2 -e bin.demangle β€” demangle symbols
  • RABIN2_DEMANGLE_CMD β€” same as r2 -e bin.demangle.cmd β€” try to purge false positives
  • RABIN2_DEMANGLE_TRYLIB β€” same as r2 -e bin.demangle.trylib=<bool> β€” load Swift libs to demangle (default: false)
  • RABIN2_FILTER β€” same as r2 -e bin.filter=<bool> β€” set to false to not rename duplicated symbols/sections (default: true)
  • RABIN2_LANG β€” same as r2 -e bin.lang β€” assume lang for demangling
  • RABIN2_MACHO_NOFUNCSTARTS β€” if set, it will ignore the FUNCSTART information
  • RABIN2_MACHO_NOSWIFT β€” avoid parsing the swift metadata
  • RABIN2_MACHO_SKIPFIXUPS β€” do not parse the mach-o chained fixups
  • RABIN2_MAXSTRBUF β€” same as r2 -e bin.str.maxbuf β€” specify maximum buffer size
  • RABIN2_PDBSERVER β€” same as r2 -e pdb.server β€” use an alternative PDB server
  • RABIN2_PREFIX β€” same as r2 -e bin.prefix β€” prefix symbols/sections/relocs with a specific string
  • RABIN2_RESRAW β€” same as r2 -e bin.resraw=true β€” extract resources without decoding their contents
  • RABIN2_STRFILTER β€” same as r2 -e bin.str.filter
  • RABIN2_STRPURGE β€” same as r2 -e bin.str.purge β€” try to purge false positives
  • RABIN2_SYMSTORE β€” same as r2 -e pdb.symstore β€” path to downstream symbol store
  • RABIN2_VERBOSE β€” same as r2 -e bin.verbose=true β€” show debugging messages from the parser

πŸ’œ EXAMPLES πŸ’œ

list the symbols of a program β€” classic, iconic:

$ rabin2 -s a.out

get the offset of a symbol:

$ rabin2 -n _main a.out

get the entrypoint:

$ rabin2 -e a.out

load symbols and imports from radare2:

$ r2 -n /bin/ls
[0x00000000]> .!rabin2 -prsi $FILE

πŸ“ SEE ALSO πŸ“

radare2(1) β€” go say hi to her big sister πŸ’–


🧚 AUTHORS 🧚

written by pancake <pancake@nopcode.org>. king behaviour, fr fr. πŸ‘‘


that's the whole page, bestie β€” no gatekeeping, everything's in there. ✨

and a lil sign-off: this page is RABIN2(1), dated July 14, 2026. mwah πŸ’‹ πŸŽ€

πŸ“¦ where this page comes from