1RABIN2(1)                 BSD General Commands Manual                RABIN2(1)
2

NAME

4     rabin2 — Binary program info extractor
5

SYNOPSIS

7     rabin2 [-AceghHiIsSMzlpRrLxvhqQTuUwV] [-a arch] [-b bits] [-B addr]
8            [-C fmt:C:[D]] [-D lang sym|-] [-f subbin] [-k query] [-K algo]
9            [-O binop] [-o str] [-m addr] [-@ addr] [-n str] [-X fmt file ...]
10            file
11

DESCRIPTION

13     This program allows you to get information about ELF/PE/MZ and CLASS
14     files in a simple way.
15
16     All those command-line flags are also available under the i command in
17     radare2. Type i? for help.
18
19     -@ addr     Show information (symbol, section, import) of the given ad‐
20                 dress
21
22     -A          List sub-binaries and their associated arch-bits pairs
23
24     -a arch     Set arch (x86, arm, .. accepts underscore for bits x86_32)
25
26     -b bits     Set bits (32, 64, ...)
27
28     -B addr     Override baddr
29
30     -c          List classes
31
32     -cc         List classes in header format
33
34     -C [fmt:C[:D]]
35                 Create [elf,mach0,pe] for arm and x86-32/64 tiny binaries
36                 where 'C' is an hexpair list of the code bytes and ':D' is an
37                 optional concatenation to describe the bytes for the data
38                 section.
39
40     -d          Show debug/dwarf information
41
42     -D lang symbolname|-
43                 Demangle symbol name (or - to read from stdin) for lang (cxx,
44                 swift, java, cxx, ..)
45
46     -e          Show entrypoints for disk and on-memory
47
48     -ee         Show constructor/destructors (extended entrypoints)
49
50     -f subbin   Select sub-binary architecture. Useful for fat-mach0 binaries
51
52     -F binfmt   Force to use that bin plugin (ignore header check)
53
54     -g          Show all possible information
55
56     -G addr     Load address . offset to header
57
58     -h          Show usage help message.
59
60     -H          Show header fields (see ih command in r2)
61
62     -I          Show binary info (see iI command in r2)
63
64     -i          Show imports (symbols imported from libraries) (see ii com‐
65                 mand in r2)
66
67     -j          Output in json
68
69     -k query    Perform SDB query on loaded file
70
71     -K algo     Select a rahash2 checksum algorithm to be performed on sec‐
72                 tions listing (and maybe others in the future) i.e 'rabin2 -K
73                 md5 -S /bin/ls'
74
75     -l          List linked libraries to the binary
76
77     -L          List supported bin plugins
78
79     -M          Show address of 'main' symbol
80
81     -m addr     Show source line reference from a given address
82
83     -N minlen:maxlen
84                 Force minimum and maximum number of chars per string (see -z
85                 and -zz). if (strlen>minlen && (!maxlen || strlen<=maxlen))
86
87     -n str      Show information (symbol, section, import) at string offset
88
89     -o str      Output file/folder for write operations (out by default)
90
91     -O binop    Perform binary operation on target binary (dump, resize,
92                 change sections, ...) see '-O help' for more information
93
94     -p          Disable VA. Always show physical addresses (not the same as
95                 -B0)
96
97     -P          Show debug/pdb information
98
99     -PP         Download pdb file for binary
100
101     -q          Be quiet, just show fewer data
102
103     -qq         Show less info (no offset/size for -z for ex.)
104
105     -Q          Show load address used by dlopen (non-aslr libs)
106
107     -r          Show output in radare format
108
109     -R          Show relocations
110
111     -s          Show exported symbols
112
113     -S          Show sections
114
115     -SS         Show segments
116
117     -t          Show file hashes
118
119     -T          Show certificates
120
121     -u          Unfiltered (no rename duplicated symbols/sections)
122
123     -U          Show resources
124
125     -v          Show version information
126
127     -V          Show binary version information
128
129     -w          Show try/catch blocks
130
131     -x          Extract all sub binaries from a fat binary (for example: fat‐
132                 mach0)
133
134     -X format file ...
135                 Package a fat or zip containing all the files passed (fat,
136                 zip)
137
138     -z          Show strings inside .data section (like gnu strings does)
139
140     -Z          Guess size of binary program
141
142     -zz         Shows strings from raw bins
143
144     -zzz        Dump raw strings to stdout (for huge files)
145

ENVIRONMENT

147     RABIN2_LANG same as r2 -e bin.lang for rabin2
148
149     RABIN2_DEMANGLE demangle symbols
150
151     RABIN2_MAXSTRBUF same as r2 -e bin.maxstrbuf for rabin2
152
153     RABIN2_DEBASE64 try to decode all strings as base64 if possible
154
155     RABIN2_STRFILTER same as r2 -e bin.str.filter for rabin2
156
157     RABIN2_STRPURGE same as r2 -e bin.str.purge for rabin2
158
159     RABIN2_DEMANGLE_TRYLIB same as r2 -e bin.demangle.trylib=<bool> - try to
160     dynamically load libraries to demangle
161
162     RABIN2_VERBOSE same as r2 -e bin.verbose=true
163

EXAMPLES

165     List symbols of a program
166
167       $ rabin2 -s a.out
168
169     Get offset of symbol
170
171       $ rabin2 -n _main a.out
172
173     Get entrypoint
174
175       $ rabin2 -e a.out
176
177     Load symbols and imports from radare2
178
179       $ r2 -n /bin/ls
180       [0x00000000]> .!rabin2 -prsi $FILE
181

SEE ALSO

183     radare2(1)
184

AUTHORS

186     Written by pancake <pancake@nopcode.org>.
187
188                                 Nov 22, 2021
Impressum