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

NAME

4     RABIN2 — Binary program info extractor
5

SYNOPSIS

7     rabin2 [-AceghHiIsSMzlpRrLxvhqQTuUV] [-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 commandline 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
20                 address
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 (iI in r2)
63
64     -i          Show imports (symbols imported from libraries) (ii)
65
66     -j          Output in json
67
68     -k query    Perform SDB query on loaded file
69
70     -K algo     Select a rahash2 checksum algorithm to be performed on sec‐
71                 tions listing (and maybe others in the future) i.e 'rabin2 -K
72                 md5 -S /bin/ls'
73
74     -l          List linked libraries to the binary
75
76     -L          List supported bin plugins
77
78     -M          Show address of 'main' symbol
79
80     -m addr     Show source line reference from a given address
81
82     -N minlen:maxlen
83                 Force minimum and maximum number of chars per string (see -z
84                 and -zz). if (strlen>minlen && (!maxlen || strlen<=maxlen))
85
86     -n str      Show information (symbol, section, import) at string offset
87
88     -o str      Output file/folder for write operations (out by default)
89
90     -O binop    Perform binary operation on target binary (dump, resize,
91                 change sections, ...) see '-O help' for more information
92
93     -p          Disable VA. Show physical addresses
94
95     -P          Show debug/pdb information
96
97     -PP         Download pdb file for binary
98
99     -q          Be quiet, just show fewer data
100
101     -qq         Show less info (no offset/size for -z for ex.)
102
103     -Q          Show load address used by dlopen (non-aslr libs)
104
105     -r          Show output in radare format
106
107     -R          Show relocations
108
109     -s          Show exported symbols
110
111     -S          Show sections
112
113     -SS         Show segments
114
115     -t          Show file hashes
116
117     -T          Show Certificates
118
119     -u          Unfiltered (no rename duplicated symbols/sections)
120
121     -U          Show Resources
122
123     -v          Show version information
124
125     -V          Show binary version information
126
127     -x          Extract all sub binaries from a fat binary (f.ex: fatmach0)
128
129     -X format file ...
130                 Package a fat or zip containing all the files passed (fat,
131                 zip)
132
133     -z          Show strings inside .data section (like gnu strings does)
134
135     -Z          Guess size of binary program
136
137     -zz         Shows strings from raw bins
138
139     -zzz        Dump raw strings to stdout (for huge files)
140

ENVIRONMENT

142     RABIN2_LANG same as r2 -e bin.lang for rabin2
143
144     RABIN2_DEMANGLE demangle symbols
145
146     RABIN2_MAXSTRBUF same as r2 -e bin.maxstrbuf for rabin2
147
148     RABIN2_DEBASE64 try to decode all strings as base64 if possible
149
150     RABIN2_STRFILTER same as r2 -e bin.str.filter for rabin2
151
152     RABIN2_STRPURGE same as r2 -e bin.str.purge for rabin2
153

EXAMPLES

155     List symbols of a program
156
157       $ rabin2 -s a.out
158
159     Get offset of symbol
160
161       $ rabin2 -n _main a.out
162
163     Get entrypoint
164
165       $ rabin2 -e a.out
166
167     Load symbols and imports from radare2
168
169       $ r2 -n /bin/ls
170       [0x00000000]> .!rabin2 -prsi $FILE
171

SEE ALSO

173     rahash2(1), rafind2(1), radare2(1), radiff2(1), rasm2(1), rax2(1),
174     rsc2(1), ragg2(1), rarun2(1),
175

AUTHORS

177     Written by pancake <pancake@nopcode.org>.
178
179                                 Sep 29, 2016
Impressum