Scroll to navigation

RABIN2(1) General Commands Manual RABIN2(1)

NAME

rabin2Binary Information Extractor

SYNOPSIS

rabin2 [-AcdeEghHiIjJlLMpqQrRsStuUVvwxZ] [-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

A binary information extractor supporting ELF, PE, MZ, and Mach-O formats, providing details on headers, sections, symbols, imports, exports, and debug data.

Most options are also available within the radare2 'i' command (type 'i?' for help).

addr
Show section, symbol or import at given address
List sub-binaries and their associated arch-bits pairs
arch
Set arch (x86, arm, .. or <arch>_<bits>)
bits
Set bits (32, 64, ...)
addr
Override base address (for address independent binaries)
List classes
List classes in header format
[fmt:C[:D]]
Create [elf,mach0,pe] with Code and Data hexpairs (see -a)
Show debug/dwarf information
lang symbolname|-
Demangle symbol name (or - to read from stdin) for lang (cxx, swift, java, cxx, ..)
Program entrypoint
Constructor/destructor entrypoints
Globally exportable symbols
subbin
Select sub-binary architecture. Useful for fat-mach0 binaries
binfmt
Force to use that bin plugin (ignore header check)
Same as -SMZIHVResizcld -SS -SSS -ee (show all info)
addr
Load address . address to header
Show this help message
Header fields
Binary info
Imports (symbols imported from libraries)
Output in json
var
Display environment variable
query
Perform SDB query on loaded file. For example: '*'
algo
Calculate section checksums (md5, sha1, ..)
List linked libraries to the binary
plugin
List supported bin plugins or plugin details
addr
Show source line at addr
Main (show address of main symbol)
str
Show section, symbol or import named str
minlen:maxlen
Force min:max number of chars per string (see -z and -zz)
str
Output file/folder for write operations (out by default)
binop
Perform binary operation on target binary (dump, resize, change sections, ...). Use -O help for more information:
 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
Show always physical addresses
Show debug/pdb information
Download pdb file for binary
Be quiet, just show less data
Show less info (no addr/size for -z for ex.)
Show load address used by dlopen (non-aslr libs)
Radare output
Relocations
Symbols
Sections
Segments
Sections mapping to segments
Display file hashes
Display file signature, certificates and signing details
Unfiltered (no rename duplicated symbols/sections)
Resources
Display version and quit
Show binary version information
Display try/catch blocks
Extract sub-binaries contained in file (for example inside FAT mach-o binaries)
format file ...
Package in fat or zip the given files
Strings (from data section)
Guess size of binary program
Show strings from raw bins
Dump raw strings to stdout (for huge files)

ENVIRONMENT

Same as r2 -N. Do not load shared plugins
Ignore CLI and use these arguments instead
Set default value charset for -z strings
Show codesign details at parse time
Same as r2 -e bin.str.debase64 - try to decode all strings as base64 if possible
Same as r2 -e bin.demangle - demangle symbols
Same as r2 -e bin.demangle.cmd - try to purge false positives
Same as r2 -e bin.demangle.trylib=<bool> - load Swift libs to demangle (default: false)
Same as r2 -e bin.lang - assume lang for demangling
If set it will ignore the FUNCSTART information
Avoid parsing the swift metadata
Do not parse the mach-o chained fixups
Same as r2 -e bin.str.maxbuf - specify maximum buffer size
Same as r2 -e pdb.server - use alternative PDB server
Same as r2 -e bin.prefix - prefix symbols/sections/relocs with a specific string
Same as r2 -e bin.str.filter
Same as r2 -e bin.str.purge - try to purge false positives
Same as r2 -e pdb.symstore - path to downstream symbol store
Same as r2 -e bin.verbose=true - show debugging messages from the parser

EXAMPLES

List symbols of a program


$ rabin2 -s a.out

Get offset of symbol


$ rabin2 -n _main a.out

Get entrypoint


$ rabin2 -e a.out

Load symbols and imports from radare2


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

SEE ALSO

radare2(1)

AUTHORS

Written by pancake <pancake@nopcode.org>.

July 10, 2025